« Back to channel list

#ruby - 02 November 2017

« Back 1 day Forward 1 day »
[00:01:17] charliesome_: has joined #ruby
[00:01:30] gnufied: has joined #ruby
[00:05:55] darkmorph: has joined #ruby
[00:06:31] havenwood: Radar: Range#cover? is fancy
[00:06:50] peteley: has joined #ruby
[00:07:06] havenwood: Radar: It checks whether the thing is between the beginning and end without iterating.
[00:07:16] jenrzzz_: has joined #ruby
[00:07:16] havenwood: As long as it's comparable.
[00:07:20] jdawgaz: has joined #ruby
[00:07:23] Radar: havenwood: oh nice. I should probably use that here instead.
[00:08:52] cdg_: has joined #ruby
[00:14:47] AndBobsYourUncle: has joined #ruby
[00:16:31] bib: has joined #ruby
[00:17:06] apeiros: has joined #ruby
[00:19:50] ineb: has joined #ruby
[00:20:01] charliesome: has joined #ruby
[00:20:54] Freshnuts: has joined #ruby
[00:26:50] charliesome_: has joined #ruby
[00:28:21] pilne: has joined #ruby
[00:28:48] chouhoulis: has joined #ruby
[00:29:08] darix: time to open bugs against seed-fu and AR for pg10 support
[00:31:26] apeiros: has joined #ruby
[00:34:47] jgt1: has joined #ruby
[00:39:07] p0p0pr37: has joined #ruby
[00:39:22] AndBobsYourUncle: has joined #ruby
[00:40:16] orbyt_: has joined #ruby
[00:40:40] jdawgaz: has joined #ruby
[00:41:29] jdawgaz: has joined #ruby
[00:42:14] jdawgaz: has joined #ruby
[00:42:43] darix: hmm it is only AR 4.2.10
[00:42:50] darix: Radar: worth to open a bug for it anyway?
[00:42:56] darix: https://github.com/mbleigh/seed-fu/issues/122
[00:43:06] jdawgaz: has joined #ruby
[00:43:13] Radar: darix: uh I wasn't aware we were having a conversation about that
[00:43:42] darix: Radar: i just asked one question about it. nothing more.
[00:43:52] jdawgaz: has joined #ruby
[00:44:02] Radar: darix: but why ask me?
[00:44:21] darix: you arent on the rails team anymore?
[00:44:32] Radar: ACTION tries to remember a time he was actually on the Rails team, can't.
[00:44:41] Radar: And is this even a Rails issue?
[00:44:42] jdawgaz: has joined #ruby
[00:45:32] GodFather: has joined #ruby
[00:45:32] jdawgaz: has joined #ruby
[00:46:02] darix: Radar: active record 4.2.10 has similar code to what is buggy in seed-fu
[00:46:19] jdawgaz: has joined #ruby
[00:47:04] jdawgaz: has joined #ruby
[00:47:14] griffindy: has joined #ruby
[00:49:52] charliesome: has joined #ruby
[00:50:57] darix: https://gist.githubusercontent.com/darix/e50239719fd3102bece9007cc6526417/raw/4fce8fc606a5aa1970cfb581c068bb37ef6e9a14/gistfile1.txt
[00:54:08] AndBobsYourUncle: has joined #ruby
[00:57:56] arescorpio: has joined #ruby
[00:58:22] apeiros: has joined #ruby
[01:00:49] defn: has joined #ruby
[01:02:53] defn: apeiros: any thoughts on mucking with the random seed for hash values using set_trace_func?
[01:04:38] ur5us: has joined #ruby
[01:08:46] charliesome_: has joined #ruby
[01:11:24] apeiros: has joined #ruby
[01:12:41] jphase: has joined #ruby
[01:15:30] charliesome: has joined #ruby
[01:21:50] jphase: has joined #ruby
[01:26:15] apeiros: has joined #ruby
[01:27:56] mtkd: has joined #ruby
[01:30:24] charliesome_: has joined #ruby
[01:30:34] sucks: has joined #ruby
[01:34:58] AndBobsYourUncle: has joined #ruby
[01:35:35] jphase: has joined #ruby
[01:35:48] ur5us: has joined #ruby
[01:38:11] alfiemax: has joined #ruby
[01:38:14] jgt1: has joined #ruby
[01:39:13] charliesome: has joined #ruby
[01:40:39] alfiemax_: has joined #ruby
[01:43:02] Radar: darix: https://github.com/jeremyevans/sequel/issues/1445 It would be good here to show how to reproduce that issue.
[01:43:32] apeiros: has joined #ruby
[01:44:44] jphase: has joined #ruby
[01:46:01] darix: Radar: i can only reproduce it on seed-fu right now (see meta.discourse.org) but given sequel has the same code.
[01:46:18] Radar: darix: exactly what command do I need to run in sequel's codebase to see a breakage on postgresql 10?
[01:49:53] neo95: has joined #ruby
[01:50:00] charliesome_: has joined #ruby
[01:51:03] darix: seems sequel actually handles pg10 already
[01:51:07] goyox86: has joined #ruby
[01:51:20] darix: it would have been reset_primary_key_sequence
[01:55:14] apeiros: has joined #ruby
[01:56:59] Radar: darix: soooo there really is no issue with the sequel gem at all?
[01:59:02] h-michael: has joined #ruby
[02:00:29] mjolnird: has joined #ruby
[02:00:54] mjolnird: has joined #ruby
[02:01:50] hutch34: has joined #ruby
[02:06:51] charliesome: has joined #ruby
[02:07:13] Devalo: has joined #ruby
[02:08:57] apeiros: has joined #ruby
[02:09:57] d^sh: has joined #ruby
[02:11:04] Radar: darix: https://github.com/jeremyevans/sequel/issues/1445
[02:11:14] Radar: Oops, I meant to link to my comment: https://github.com/jeremyevans/sequel/issues/1445#issuecomment-341296897
[02:11:30] Radar: You're right that it's broken in sequel, but only on the latest gem release. Master contains a fix for this problem already.
[02:11:42] Radar: I include my steps to reproduce the issue, and a link to the commit which fixes it.
[02:12:07] hutch34: has joined #ruby
[02:12:16] jphase: has joined #ruby
[02:17:19] darix: thank you for the deeper look!
[02:19:56] charliesome_: has joined #ruby
[02:20:23] enterprisey: has joined #ruby
[02:21:29] jphase: has joined #ruby
[02:21:44] ElDoggo: has joined #ruby
[02:23:11] xall: has joined #ruby
[02:23:24] ElDoggo_: has joined #ruby
[02:23:42] AndBobsYourUncle: has joined #ruby
[02:24:29] jdawgaz: has joined #ruby
[02:25:39] darix: Radar: the good news is i can link the sequel fix to seed-fu as guideline how to fix it :D
[02:26:53] ElDoggo: has joined #ruby
[02:27:37] nofxx: has joined #ruby
[02:27:55] ElDoggo_: has joined #ruby
[02:28:49] apeiros: has joined #ruby
[02:28:56] ElDoggo__: has joined #ruby
[02:32:13] ElDoggo: has joined #ruby
[02:33:58] ElDoggo_: has joined #ruby
[02:34:58] ElDoggo__: has joined #ruby
[02:38:39] charliesome: has joined #ruby
[02:41:29] jdawgaz: has joined #ruby
[02:42:09] cdg: has joined #ruby
[02:44:25] jphase: has joined #ruby
[02:45:35] nopolitica: has joined #ruby
[02:47:59] sucks_: has joined #ruby
[02:48:30] nofxx: has joined #ruby
[02:50:11] guacamole: has joined #ruby
[02:53:33] jphase: has joined #ruby
[02:54:29] cagomez: has joined #ruby
[02:58:11] alex``: has joined #ruby
[02:58:18] ur5us: has joined #ruby
[02:59:04] gizmore: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:02:46] jphase: has joined #ruby
[03:05:49] guacamole: has joined #ruby
[03:11:55] jphase: has joined #ruby
[03:15:53] hutch34: has joined #ruby
[03:16:35] sorg: has joined #ruby
[03:17:25] sorg: Hi, I'm using Regex for a project. Every time I use mystring.match() should I pass in Regexp.new(/my regex/) or is mystring.match(/mystring/) enough?
[03:17:51] Radar: sorg: the latter is fine
[03:18:02] sorg: Radar: Great, thanks!
[03:19:52] alan_w: has joined #ruby
[03:20:06] orbyt_: has joined #ruby
[03:20:58] uZiel: has joined #ruby
[03:22:38] xall_: has joined #ruby
[03:23:43] alfiemax_: has joined #ruby
[03:25:08] nofxx: Radar, ain't =~ /more rubesque?/
[03:25:24] Radar: nofxx: who am I to judge?
[03:26:38] apeiros: has joined #ruby
[03:27:10] darix: nofxx: tbh i prefer .match nowadays as i get a match object. and named match groups are so much more fun
[03:27:41] Radar: >> "quick brown fox jumped over"[/brown/, 0]
[03:27:42] ruby[bot]: Radar: # => "brown" (https://eval.in/891068)
[03:27:53] Radar: >> "quick brown fox jumped over"[/brown/]
[03:27:54] ruby[bot]: Radar: # => "brown" (https://eval.in/891069)
[03:28:22] Radar: >> "quick brown fox jumped over" =~ /brown/
[03:28:23] ruby[bot]: Radar: # => 6 (https://eval.in/891070)
[03:28:29] Radar: >> "quick brown fox jumped over".match(/brown/)
[03:28:30] ruby[bot]: Radar: # => #<MatchData "brown"> (https://eval.in/891071)
[03:28:57] Radar: nofxx: So it depends, really. Did sorg want the character position or MatchData?
[03:30:52] bruce_lee: has joined #ruby
[03:34:11] darix: >> "quick brown fox jumped over".match(/(?<color>brown)/)
[03:34:12] ruby[bot]: darix: # => #<MatchData "brown" color:"brown"> (https://eval.in/891074)
[03:34:53] jphase: has joined #ruby
[03:34:59] darix: >> mo="quick brown fox jumped over".match(/(?<color>brown)/); mo[:color]
[03:35:00] ruby[bot]: darix: # => "brown" (https://eval.in/891077)
[03:35:17] jdawgaz: has joined #ruby
[03:35:18] guardianx: has joined #ruby
[03:38:31] cagomez: has joined #ruby
[03:39:10] ozcanesen: has joined #ruby
[03:39:27] cschneid_: has joined #ruby
[03:41:33] apeiros: has joined #ruby
[03:41:57] sucks__: has joined #ruby
[03:46:08] ramfjord: has joined #ruby
[03:46:34] chrisarcand: Radar: Surprised to see you here, thought you had permanently moved to Elixirland :)
[03:46:42] Radar: chrisarcand: I am everywhere :)
[03:46:49] chrisarcand: A good place to be
[03:47:01] Radar: I'm going to be teaching a bunch of people Ruby / Elixir over the next 6 months. I'm not leaving Ruby any time soon.
[03:48:38] jphase: has joined #ruby
[03:49:17] uZiel: has joined #ruby
[03:50:02] apeiros: has joined #ruby
[03:58:33] jenrzzz: has joined #ruby
[03:58:34] jenrzzz: has joined #ruby
[04:00:48] solocshaw: has joined #ruby
[04:01:29] RickHull: has joined #ruby
[04:02:23] jphase: has joined #ruby
[04:02:37] ledestin: has joined #ruby
[04:03:11] alnewkirk: has joined #ruby
[04:03:35] apeiros: has joined #ruby
[04:03:48] ramfjord: has joined #ruby
[04:05:37] akkad: Elixir is the new hotness?
[04:06:56] darix: aint that new
[04:08:03] RickHull: paul graham will finish arc one day and we can bask in the lisp re re surgence
[04:08:23] RickHull: but haskell will eat everything (maybe?)
[04:09:36] guacamole: has joined #ruby
[04:10:33] RickHull: how about Factor? Forth is pretty hip
[04:11:13] RickHull: and you can't count out SML or OCaml
[04:11:44] RickHull: Rust is *so* mainstream
[04:12:55] RickHull: wasn't there some spinoff of rebol fairly recently?
[04:13:27] RickHull: ah yes, Red -- The Language (TM)
[04:14:02] RickHull: is Dart going anywhere?
[04:14:27] RickHull: D seems neat
[04:14:52] ledestin: has joined #ruby
[04:14:53] cdg: has joined #ruby
[04:15:34] RickHull: i don't think smalltalk is coming back. what happened to the seaside framework? maglev? was that strongtalk?
[04:15:41] RickHull: is ObjC all we get?
[04:16:11] jphase: has joined #ruby
[04:17:00] RickHull: what about Urbit? and hoon and pwn and poon and what else?
[04:17:40] apeiros: has joined #ruby
[04:17:45] akkad: new relatively
[04:24:01] ineb: has joined #ruby
[04:24:25] dn`_: has joined #ruby
[04:25:20] jphase: has joined #ruby
[04:25:56] ramfjord: has joined #ruby
[04:26:25] solocshaw: has joined #ruby
[04:29:28] darix: general relativity?
[04:31:01] Radar: akkad: yes it's the hotness :D
[04:31:27] akkad: but if ruby was perfect, why leave it?
[04:31:48] baweaver: ACTION grabs popcorn
[04:32:24] Radar: ACTION shares popcorn
[04:32:24] akkad: Lone Star Ruby Conference begets Lone Star Elixir Conference. it's tech, not fashion
[04:32:50] Radar: what if there was never The One Perfect Language (excluding haskell of course)
[04:33:21] baweaver: ACTION glances at dminuoso 
[04:33:27] Radar: he should be online soon
[04:33:39] baweaver: Na, that's basic summoning right there
[04:33:54] baweaver: either that or bitemyapp
[04:35:28] apeiros: has joined #ruby
[04:39:05] jphase: has joined #ruby
[04:39:53] ahrs: has joined #ruby
[04:41:46] FastJack: has joined #ruby
[04:42:33] Freshnuts: has joined #ruby
[04:42:45] anisha: has joined #ruby
[04:44:18] Freshnuts: has joined #ruby
[04:44:58] anisha: has joined #ruby
[04:46:25] anisha: has joined #ruby
[04:46:33] apeiros: has joined #ruby
[04:47:56] gix: has joined #ruby
[04:50:06] Xiti: has joined #ruby
[04:50:32] Freshnuts: has joined #ruby
[04:51:24] govg: has joined #ruby
[04:52:02] Freshnuts: has joined #ruby
[04:52:48] kies: has joined #ruby
[04:52:48] jphase: has joined #ruby
[04:58:03] bruce_lee: has joined #ruby
[04:58:45] jdawgaz: has joined #ruby
[05:00:02] apeiros: has joined #ruby
[05:00:15] benjen: has joined #ruby
[05:05:20] alfiemax: has joined #ruby
[05:09:40] apeiros: has joined #ruby
[05:10:03] RickHull: if I had to bet my future on one framework going forward, it might be tensorflow
[05:10:59] alfiemax_: has joined #ruby
[05:12:39] RickHull: ACTION shots fired
[05:12:48] RickHull: says more about the future of technology in general than anything else
[05:12:57] Technodrome: has joined #ruby
[05:15:44] jphase: has joined #ruby
[05:16:10] apeiros: has joined #ruby
[05:18:23] alfiemax: has joined #ruby
[05:19:06] jamesaxl: has joined #ruby
[05:23:10] texasmynsted: has joined #ruby
[05:24:55] LocaMocha: has joined #ruby
[05:25:33] jdawgaz: has joined #ruby
[05:26:23] jdawgaz: has joined #ruby
[05:26:32] texasmynsted: I see .rvm referenced in my .bashrc but no $HOME/.rvm directory exists. I also see chruby. Is chruby an alternative to rvm?
[05:26:38] Radar: texasmynsted: es
[05:27:12] baweaver: ....do you have a highlight on rvm Radar? :P
[05:27:13] texasmynsted: I am trying to install bundler (again) for my octopress site, but failure message
[05:27:14] jdawgaz: has joined #ruby
[05:27:18] Radar: baweaver: no u
[05:27:38] Radar: baweaver: I had a terminal window not quite full window size and IRC was poking out underneath it
[05:27:41] baweaver: What error?
[05:27:58] baweaver: Triple Monitor, center is IRC
[05:28:00] jdawgaz: has joined #ruby
[05:28:07] texasmynsted: gem install bundler
[05:28:11] texasmynsted: ERROR: While executing gem ... (Errno::EACCES)
[05:28:25] texasmynsted: sudo gem install bundler results in
[05:28:25] baweaver: try running `which ruby`
[05:28:45] jdawgaz: has joined #ruby
[05:28:45] texasmynsted: ERROR: While executing gem ... (Errno::EPERM)
[05:29:03] RickHull: easy there tiger
[05:29:04] texasmynsted: which ruby = "/usr/bin/ruby"
[05:29:17] baweaver: So still system Ruby then
[05:29:26] texasmynsted: ok, that is likely not goo
[05:29:31] jphase: has joined #ruby
[05:29:35] jdawgaz: has joined #ruby
[05:29:56] baweaver: Run `rvm implode` and follow this: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
[05:30:10] baweaver: that'll get you back to a stable state you can work from
[05:30:23] jdawgaz: has joined #ruby
[05:30:55] texasmynsted: in the project I see both ".rbenv-version" and a ".rvmrc"
[05:31:13] texasmynsted: there seems to be no rvm executable in the path.
[05:31:13] jdawgaz: has joined #ruby
[05:31:40] RickHull: the project wants to use rvm. what is the story with the host?
[05:31:41] texasmynsted: so `rvm implode` = command not found
[05:31:42] baweaver: Probably not in your profile.
[05:31:58] jdawgaz: has joined #ruby
[05:32:18] baweaver: I'd just run through that above link and make sure you update your bash_profile
[05:32:48] jdawgaz: has joined #ruby
[05:33:21] RickHull: how does rvm or anything else handle sudo? like -- sudo is not even the same a root login environment or whatever
[05:33:38] jdawgaz: has joined #ruby
[05:34:17] RickHull: related, I wonder if texasmynsted just needs something tweaked in the login environment
[05:34:23] RickHull: a PATH entry or rvm thingie
[05:34:25] jdawgaz: has joined #ruby
[05:35:13] jdawgaz: has joined #ruby
[05:35:17] apeiros: has joined #ruby
[05:35:24] texasmynsted: rvm is not installed
[05:35:27] RickHull: I gave up a while back on trying to use version managers on a system-wide basis
[05:35:33] texasmynsted: I checked brew and macports
[05:35:36] RickHull: and just use them in homedir
[05:35:40] Radar: texasmynsted: hey you were following that guide that baweaver linked to, yeah?
[05:36:03] jdawgaz: has joined #ruby
[05:36:47] texasmynsted: I can start from there. I have rubies installed and somethhing called ruby_select
[05:36:48] jdawgaz: has joined #ruby
[05:36:59] aupadhye: has joined #ruby
[05:37:34] PaulCapestany: has joined #ruby
[05:37:38] jdawgaz: has joined #ruby
[05:37:58] ElDoggo: has joined #ruby
[05:38:22] jdawgaz: has joined #ruby
[05:38:38] ElDoggo: has joined #ruby
[05:38:43] jphase: has joined #ruby
[05:39:13] jdawgaz: has joined #ruby
[05:39:13] anisha: has joined #ruby
[05:39:39] ElDoggo: has joined #ruby
[05:40:03] jdawgaz: has joined #ruby
[05:42:12] alfiemax: has joined #ruby
[05:42:42] Tempesta: has joined #ruby
[05:44:28] ElDoggo: has joined #ruby
[05:45:49] iamarun: has joined #ruby
[05:47:18] texasmynsted: hopefully there will be no conflicts
[05:47:55] jphase: has joined #ruby
[05:50:29] ElDoggo__: has joined #ruby
[05:51:55] Tempesta: has joined #ruby
[05:52:59] ElDoggo__: has joined #ruby
[05:53:27] apeiros: has joined #ruby
[05:53:29] texasmynsted: this link right?
[05:53:31] texasmynsted: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
[05:55:22] texasmynsted: ok, thank you.
[05:55:30] texasmynsted: will give that a try tomorrow.
[05:57:29] ElDoggo_: has joined #ruby
[06:00:21] solocshaw: has joined #ruby
[06:00:34] ineb: has joined #ruby
[06:01:40] jphase: has joined #ruby
[06:02:26] sucks_: has joined #ruby
[06:06:02] ElDoggo: has joined #ruby
[06:07:16] apeiros: has joined #ruby
[06:08:05] alfiemax: has joined #ruby
[06:08:24] Devalo: has joined #ruby
[06:11:29] Hexafox[I]: has joined #ruby
[06:11:29] ElDoggo_: has joined #ruby
[06:11:52] dionysus69: has joined #ruby
[06:14:33] ElDoggo__: has joined #ruby
[06:15:23] jphase: has joined #ruby
[06:16:27] apeiros: has joined #ruby
[06:17:01] ElDoggo: has joined #ruby
[06:17:10] kriskropd: has joined #ruby
[06:21:50] guacamole: has joined #ruby
[06:25:35] ElDoggo__: has joined #ruby
[06:26:34] cschneid_: has joined #ruby
[06:29:35] ElDoggo__: has joined #ruby
[06:30:12] apeiros: has joined #ruby
[06:30:38] mochiyoda_: has joined #ruby
[06:32:06] ElDoggo: has joined #ruby
[06:37:33] biberu: has joined #ruby
[06:40:23] ElDoggo: has joined #ruby
[06:47:53] Technodrome: has joined #ruby
[06:49:04] guacamole: has joined #ruby
[06:49:13] michael1: has joined #ruby
[06:49:17] Wirehead_Wannabe: has joined #ruby
[06:57:03] alfiemax_: has joined #ruby
[06:58:20] apeiros: has joined #ruby
[06:58:56] ludova: has joined #ruby
[07:00:40] Paraxial: has joined #ruby
[07:00:58] Wirehead_Wannabe: has left #ruby: ("Leaving")
[07:01:04] SCHAPiE: has joined #ruby
[07:04:42] alfiemax: has joined #ruby
[07:07:31] dionysus69: has joined #ruby
[07:10:45] apeiros: has joined #ruby
[07:21:46] snickers: has joined #ruby
[07:22:07] jgt: has joined #ruby
[07:24:20] Paraxial: has joined #ruby
[07:28:31] apeiros: has joined #ruby
[07:32:01] Paraxial: has joined #ruby
[07:33:06] conta: has joined #ruby
[07:35:21] MatrixRuby: has joined #ruby
[07:38:19] alfiemax: has joined #ruby
[07:40:29] jgt1: has joined #ruby
[07:42:43] jphase: has joined #ruby
[07:43:33] apeiros: has joined #ruby
[07:43:38] ledestin: has joined #ruby
[07:46:29] alfiemax_: has joined #ruby
[07:46:55] reber: has joined #ruby
[07:47:12] jgt1: has joined #ruby
[07:48:50] yCrazyEdd: has joined #ruby
[07:51:17] aufi: has joined #ruby
[08:00:24] Paraxial: has joined #ruby
[08:00:46] kies: has joined #ruby
[08:00:56] jphase: has joined #ruby
[08:02:36] wunz: has joined #ruby
[08:05:42] jgt1: has joined #ruby
[08:06:51] hurricanehrndz: has joined #ruby
[08:07:33] Uptime: has joined #ruby
[08:07:59] hfp_work: has joined #ruby
[08:08:27] burgestrand: has joined #ruby
[08:09:12] ShekharReddy: has joined #ruby
[08:12:31] Paraxial: has joined #ruby
[08:12:42] mark_66: has joined #ruby
[08:13:19] alex``: has joined #ruby
[08:14:07] ta: has joined #ruby
[08:14:42] jphase: has joined #ruby
[08:15:34] Uptime: has joined #ruby
[08:16:06] fusta: has joined #ruby
[08:18:47] TomyWork: has joined #ruby
[08:21:17] jgt1: has joined #ruby
[08:21:21] kies: has joined #ruby
[08:23:50] jphase: has joined #ruby
[08:27:14] claudiuinberlin: has joined #ruby
[08:30:28] ta: has joined #ruby
[08:36:02] jgt1: has joined #ruby
[08:39:18] dn`: has joined #ruby
[08:39:57] Paraxial: has joined #ruby
[08:40:16] fusta: has joined #ruby
[08:44:15] cdg: has joined #ruby
[08:45:27] jenrzzz: has joined #ruby
[08:45:27] jenrzzz: has joined #ruby
[08:45:57] mikecmpbll: has joined #ruby
[08:46:06] alex``: has joined #ruby
[08:49:17] ElDoggo: has joined #ruby
[08:49:58] ta: has joined #ruby
[08:50:30] Paraxial: has joined #ruby
[08:51:00] ElDoggo_: has joined #ruby
[08:51:58] ElDoggo__: has joined #ruby
[08:52:22] ur5us: has joined #ruby
[08:52:47] dinfuehr: has joined #ruby
[08:53:29] ElDoggo__: has joined #ruby
[08:54:27] ElDoggo: has joined #ruby
[08:54:46] ta: has joined #ruby
[08:55:37] mikecmpbll: has joined #ruby
[08:56:25] burgestrand: has joined #ruby
[08:57:29] ElDoggo__: has joined #ruby
[08:58:54] gigetoo: has joined #ruby
[08:59:59] ElDoggo: has joined #ruby
[09:02:11] Paraxial: has joined #ruby
[09:03:49] ta: has joined #ruby
[09:04:50] alfiemax: has joined #ruby
[09:06:01] ElDoggo: has joined #ruby
[09:06:39] darkness: has joined #ruby
[09:08:31] ElDoggo__: has joined #ruby
[09:11:49] ramfjord: has joined #ruby
[09:13:59] mjolnird: has joined #ruby
[09:14:58] claudiuinberlin: has joined #ruby
[09:15:00] PaulCapestany: has joined #ruby
[09:15:00] ElDoggo__: has joined #ruby
[09:15:03] ferr: has joined #ruby
[09:19:42] Klumben: has joined #ruby
[09:20:34] chmurifree: has joined #ruby
[09:24:39] heinrich5991: has joined #ruby
[09:27:03] mim1k: has joined #ruby
[09:28:02] paranoicsan: has joined #ruby
[09:30:49] Beams: has joined #ruby
[09:32:14] dhollinger: has joined #ruby
[09:32:51] marr: has joined #ruby
[09:34:03] haraoka: has joined #ruby
[09:34:34] kapil___: has joined #ruby
[09:36:55] quobo: has joined #ruby
[09:37:05] alfiemax: has joined #ruby
[09:37:32] dextrey: has joined #ruby
[09:37:59] wunz: has joined #ruby
[09:42:48] FahmeF_: has joined #ruby
[09:43:07] claudiuinberlin: has joined #ruby
[09:48:27] QualityAddict: has joined #ruby
[09:49:18] jottr: has joined #ruby
[09:56:35] ferr: has joined #ruby
[09:56:58] cdg: has joined #ruby
[09:59:46] PaulCape_: has joined #ruby
[10:00:10] jphase: has joined #ruby
[10:00:40] alfiemax: has joined #ruby
[10:00:58] MatrixRuby: has joined #ruby
[10:01:21] FahmeF: has joined #ruby
[10:02:11] raynold: has joined #ruby
[10:04:57] FahmeF_: has joined #ruby
[10:06:12] jinie: has joined #ruby
[10:11:11] Serpent7776: has joined #ruby
[10:11:57] mim1k: has joined #ruby
[10:12:10] hs366: has joined #ruby
[10:12:55] bruno-: has joined #ruby
[10:15:08] jaruga: has joined #ruby
[10:18:35] burgestrand: has joined #ruby
[10:21:34] banisterfiend: has joined #ruby
[10:21:52] ur5us: has joined #ruby
[10:29:33] ur5us: has joined #ruby
[10:30:35] eroux: has joined #ruby
[10:32:34] GodFather: has joined #ruby
[10:35:07] cadillac_: has joined #ruby
[10:40:04] RougeR: has joined #ruby
[10:41:41] kacper: has joined #ruby
[10:45:37] Technodrome: has joined #ruby
[10:47:12] ek926m: has joined #ruby
[10:50:12] shoogz: has joined #ruby
[10:50:12] shoogz: has joined #ruby
[10:56:30] dminuoso: What the fuck.
[10:56:32] dminuoso: >> (1..2).map { |a| a * 2 }
[10:56:33] ruby[bot]: dminuoso: # => [2, 4] (https://eval.in/891386)
[10:56:37] dminuoso: Why am I not getting (2..4) ?
[10:56:43] dminuoso: This is insane.
[10:56:54] dminuoso: ACTION pokes havenwood
[10:56:56] dminuoso: ACTION pokes baweaver
[10:57:01] dminuoso: Functional programmers, we must unite.
[10:57:09] dminuoso: Range could be such an awesome Functor.
[10:58:29] anisha: has joined #ruby
[10:59:04] nopolitica: has joined #ruby
[11:07:16] lxsameer: has joined #ruby
[11:09:39] apparition: has joined #ruby
[11:11:33] chouhoulis: has joined #ruby
[11:12:16] ramfjord: has joined #ruby
[11:14:21] banisterfiend: has joined #ruby
[11:14:30] am55: has joined #ruby
[11:15:36] mjolnird: has joined #ruby
[11:16:38] alfiemax: has joined #ruby
[11:17:06] bob_f: has joined #ruby
[11:17:18] tvw: has joined #ruby
[11:17:54] bob_f: Hi. When `String === foo` is evaluated, is there a method called on `foo` that I can override to affect the result of the expression ?
[11:18:42] b0zz0: has joined #ruby
[11:19:16] dminuoso: bob_f: https://ruby-doc.org/core-2.4.2/String.html#method-i-3D-3D-3D
[11:19:29] ek926m: has joined #ruby
[11:19:31] dminuoso: bob_f: so if foo responds to to_str, that's what will be used.
[11:20:04] bob_f: dminuoso: Okay, that makes sense.
[11:20:39] dminuoso: bob_f: I was looking at String#===
[11:20:45] dminuoso: bob_f: for String === it's Class#=== that will be used.
[11:20:50] ek926m: has joined #ruby
[11:20:53] dminuoso: Fooled me well there.
[11:21:12] bob_f: dminuoso: Aha, interesting. I am trying to do something awful, and this was a hurdle.
[11:21:21] dminuoso: bob_f: Or Module#=== rather
[11:21:25] morfin: has joined #ruby
[11:21:49] morfin: rubygems rely on tags when downloading from git?
[11:22:16] ek926m: has joined #ruby
[11:23:52] morfin: as example i have gem which i added like gem 'mygem', '~1.0.0' would it rely on tags or what?
[11:23:54] GreatMazi: has joined #ruby
[11:23:56] ek926m: has joined #ruby
[11:25:09] ek926m: has joined #ruby
[11:27:43] bob_f: dminuoso: Yeah, so I made the same mistake as you, but unfortunately looking at Module#=== it doesn't look like there's anything I can override.
[11:28:02] bob_f: dminuoso: Unless rb_ob_js_kind_of(arg, mod) calls a method on the RHS object ?
[11:28:17] bob_f: Sorry for the typo - working on two machines at the moment.
[11:30:48] bob_f: C source for `rb_obj_is_kind_of` suggests it just looks directly at the object's class/ancestors, rather than calling any Ruby instance method.
[11:33:39] Psybur: has joined #ruby
[11:38:26] bob_f: dminuoso: Ah, don't worry about it - I just changed the `if String === value` line elsewhere in the lib. No need to hack this.
[11:38:33] bob_f: Thanks for the pointer though.
[11:38:37] morfin: well, you can just get ancestors and checn include? i guess
[11:38:55] morfin: it works even with included classes
[11:39:00] bob_f: morfin: The class doesn't inherit from String. It used to, but I think this is a mistake so I'm changing that.
[11:39:10] morfin: bob_f look at this
[11:41:22] elomatreb: morfin: gems are downloaded and published according to the versions on rubygems.org, unless you use the bundler git endpoints git tags play no role
[11:42:10] morfin: i use git endpoint and wondering how versions are handled for such gems
[11:42:14] dminuoso: It's reasonable to use tags on commits that have been released on rubygems.org though
[11:42:23] morfin: >> module Foo end; class Bar include Foo; end; Bar.ancestors
[11:42:24] ruby[bot]: morfin: # => [Bar, Foo, Object, Kernel, BasicObject] (https://eval.in/891467)
[11:42:46] morfin: bob_f, see - Bar do not inherit from Foo but still has Foo in ancestors
[11:42:51] elomatreb: If you use git endpoints I think it will by default grab the latest master commit, unless you tell it to get a tag or some other branch
[11:43:25] bob_f: morfin: Sure, but you can't `include String` on a class so I'm not sure how this helps ?
[11:43:31] nadir: has joined #ruby
[11:43:50] bob_f: morfin: The solution is to just fix the single point where it checks if the type is a String, and add the actual type of the object instead, rather than relying on it having String as an ancestor.
[11:44:01] mim1k: has joined #ruby
[11:44:35] elomatreb: morfin: http://bundler.io/v1.15/guides/git.html
[11:45:06] morfin: i don't get it why everybody likes Iordania domains
[11:46:14] elomatreb: It's the cTLD of "British Indian Ocean Territories", actually. And I guess it became cool among tech people due to being similar to I/O?
[11:46:26] morfin: bob_f, i'd rather check if it quacks as duck )
[11:46:37] anisha: has joined #ruby
[11:46:53] bob_f: morfin: Hey, me too, but this is a PR far Arel, so I'm not about to change their methodology. :)
[11:47:02] alfiemax: has joined #ruby
[11:48:01] morfin: well, i think i will change my gem and bump version in it and everything in theory should be fine
[11:50:06] charliesome: has joined #ruby
[11:51:11] MatrixRuby: has joined #ruby
[11:56:37] synthroid: has joined #ruby
[11:59:10] jdawgaz: has joined #ruby
[12:03:55] shoogz-: has joined #ruby
[12:03:55] GreatMazi1: has joined #ruby
[12:05:41] Psybur: has joined #ruby
[12:12:46] Antiarc: has joined #ruby
[12:13:04] gnufied: has joined #ruby
[12:14:57] banisterfiend: has joined #ruby
[12:15:10] cschneid_: has joined #ruby
[12:18:22] [[thufir]]: has joined #ruby
[12:18:32] bruno-: has joined #ruby
[12:29:05] charliesome: has joined #ruby
[12:30:48] cabotto: has joined #ruby
[12:34:21] sepp2k: has joined #ruby
[12:35:31] claudiuinberlin: has joined #ruby
[12:39:26] mim1k: has joined #ruby
[12:42:21] alfiemax: has joined #ruby
[12:44:39] im0nde: has joined #ruby
[12:44:46] jdawgaz: has joined #ruby
[12:45:54] darkmorph: has joined #ruby
[12:46:25] brendan-: has joined #ruby
[12:47:50] mson: has joined #ruby
[12:49:05] jphase: has joined #ruby
[12:52:58] banisterfiend: has joined #ruby
[12:53:25] alnewkirk: has joined #ruby
[12:53:33] burgestrand: has joined #ruby
[12:53:56] shinnya: has joined #ruby
[12:55:32] cdg: has joined #ruby
[13:02:24] gGREATmAZI: has joined #ruby
[13:05:24] yebo_: has joined #ruby
[13:06:49] yebo_: anyone know why this does not work https://stackoverflow.com/questions/47073869/multiple-action-mailer-not-working-in-rails
[13:07:21] KenSentMe: has joined #ruby
[13:07:51] Psybur: has joined #ruby
[13:08:11] am55: has joined #ruby
[13:08:32] KenSentMe: Hello, i’m trying to write a script where a sound is played when a certain key is pressed. How can i let the script do something when for example pressing the ‘a’ key?
[13:11:03] chouhoul_: has joined #ruby
[13:13:44] aufi: has joined #ruby
[13:14:02] alfiemax: has joined #ruby
[13:15:12] yebo_: anyone able to use two email servers we tried and it failed, any help appreciated https://stackoverflow.com/questions/47073869/multiple-action-mailer-not-working-in-rails
[13:18:18] jdawgaz: has joined #ruby
[13:19:03] jdawgaz: has joined #ruby
[13:19:50] EXCHGR: has joined #ruby
[13:19:53] jdawgaz: has joined #ruby
[13:20:03] impermanence: has joined #ruby
[13:20:05] chouhoulis: has joined #ruby
[13:20:32] nowhere_man: has joined #ruby
[13:22:27] GreatMazi: has joined #ruby
[13:23:08] jdawgaz: has joined #ruby
[13:23:24] cdg: has joined #ruby
[13:23:40] lele: has joined #ruby
[13:24:31] dminuoso: yebo_: ?rails
[13:24:33] dminuoso: ?rails yebo_
[13:24:34] ruby[bot]: yebo_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:27:31] alfiemax: has joined #ruby
[13:28:09] ramfjord: has joined #ruby
[13:32:06] bruno-: has joined #ruby
[13:33:24] cschneid_: has joined #ruby
[13:34:52] jdawgaz: has joined #ruby
[13:35:41] jdawgaz: has joined #ruby
[13:36:20] def_jam: has joined #ruby
[13:36:26] jdawgaz: has joined #ruby
[13:37:16] jdawgaz: has joined #ruby
[13:37:24] eb0t_: has joined #ruby
[13:38:02] jdawgaz: has joined #ruby
[13:38:19] Exagone313: has joined #ruby
[13:39:33] alfiemax: has joined #ruby
[13:39:37] [[thufir]]: has joined #ruby
[13:39:49] ElDoggo: has joined #ruby
[13:41:13] minimalism: has joined #ruby
[13:43:48] ramfjord: has joined #ruby
[13:50:27] mikejw: has joined #ruby
[13:50:49] mikejw: anyone know how I use asciidoc.js in the browser?
[13:51:39] funburn: has joined #ruby
[13:51:50] mikejw: I guess follow these steps?
[13:51:51] mikejw: http://asciidoctor.org/docs/install-and-use-asciidoctorjs/
[13:52:49] mikejw: can't get any official approach working
[13:55:03] DLSteve: has joined #ruby
[13:55:35] jrafanie: has joined #ruby
[14:03:29] xrlabs: has joined #ruby
[14:04:24] parzo: has joined #ruby
[14:12:32] Rapture: has joined #ruby
[14:14:49] funburn_: has joined #ruby
[14:18:27] darkmorph: has joined #ruby
[14:22:40] alfiemax: has joined #ruby
[14:23:33] alfiemax_: has joined #ruby
[14:25:54] iamarun: has joined #ruby
[14:26:26] webguynow: has joined #ruby
[14:28:04] Technodrome: has joined #ruby
[14:29:23] cadillac_: has joined #ruby
[14:29:25] johno84: has joined #ruby
[14:29:25] nofxx: has joined #ruby
[14:30:31] Rodya_: has joined #ruby
[14:38:59] Rodya_: has joined #ruby
[14:41:33] pushergene: has joined #ruby
[14:42:24] cadillac_: has joined #ruby
[14:42:47] yebo_: join #RubyOnRails
[14:43:09] havenwood: pushergene: hi
[14:43:23] Pierreb|home: has joined #ruby
[14:43:48] tcopeland: has joined #ruby
[14:45:08] yaroslav: has joined #ruby
[14:45:36] oleo: has joined #ruby
[14:46:38] charliesome: has joined #ruby
[14:49:06] jrafanie: has joined #ruby
[14:50:08] cabotto: has joined #ruby
[14:52:26] Technodrome: has joined #ruby
[14:55:02] dminuoso: havenwood: So what is your opinion on what (1..2).map(&double) should do?
[14:55:42] havenwood: I think it should #!> NameError: undefined local variable or method `double'
[14:55:52] dminuoso: Given double = -> (e) { e * 2 }
[14:56:16] dminuoso: let double = -> (e) { e * 2 } in (1..2).map(&double)
[14:56:40] havenwood: .reverse.join
[14:57:07] havenwood: Just trying to find meaning.
[14:57:23] dminuoso: Well, if its equipped with map its a functor right?
[14:57:29] bob_f: dminuoso: If you're remotely interested, this is why I was asking about String.=== earlier: https://github.com/rails/arel/pull/503/files
[14:57:31] elomatreb: tbf how often you actually want to enumerate all values in a range vs. how often you want to double a range, I think the current behavior is fine
[14:57:52] dminuoso: elomatreb: Is it too much to ask for .to_a if you want an array?
[14:58:02] charliesome_: has joined #ruby
[14:58:47] alfiemax: has joined #ruby
[14:59:05] elomatreb: Maybe if it was designed to be like that from the start, but I don't think the effort of changing it now would be justified by that kind-of-nice behavior
[15:00:30] dminuoso: havenwood: https://eval.in/891631
[15:00:34] dminuoso: Ive been having so much fun with this.
[15:00:56] dminuoso: But Range really tripped me over.
[15:01:58] cagomez: has joined #ruby
[15:01:59] dminuoso: Now if only you could invoke lvar callables like: doubleF [1,2,3]
[15:02:16] kahra: has joined #ruby
[15:02:17] dminuoso: Then Ruby would be awesomesauce.
[15:02:44] dminuoso: However! set_trace_func to the rescue!
[15:03:30] polishdub: has joined #ruby
[15:04:45] cschneid_: has joined #ruby
[15:05:22] havenwood: dminuoso: I guess the syntactical nicety is just a method definition away: define_method :doubler, doubleF
[15:05:42] guacamole: has joined #ruby
[15:06:30] texasmynsted: hmm. Why does "ruby-install --latest ruby" need my root password?
[15:06:53] havenwood: texasmynsted: do you not own your ~/.rubies/ directory?
[15:06:56] texasmynsted: This is a brew thing, it should not need root right?
[15:07:37] bruno-: has joined #ruby
[15:07:41] havenwood: texasmynsted: if you installed ruby-install with `sudo` it'll install to a system directory where you'll need root to install Rubies.
[15:08:03] dminuoso: havenwood: Wow that's interesting. I mean I definitely dont want to tag my functions with define_method, it really diminishes the beauty of tacit programming.
[15:08:13] dminuoso: But TIL. Wasnt aware you could define_method against callables.
[15:08:19] texasmynsted: no just ruby-install
[15:08:29] ek926m: has joined #ruby
[15:08:34] iamarun: has joined #ruby
[15:08:35] havenwood: texasmynsted: It's odd, because the default location is in your home, so...
[15:08:49] havenwood: i retract what i said about root, i need coffee
[15:09:09] havenwood: texasmynsted: https://github.com/postmodern/ruby-install/blob/master/share/ruby-install/ruby-install.sh#L14-L20
[15:09:47] havenwood: texasmynsted: If you don't prefix your `ruby-install` command with `sudo` and don't otherwise have `UID == 0` then src/ and .rubies/ should be in $HOME.
[15:10:07] havenwood: texasmynsted: Check you can create a directory in ~/.rubies/ and ~/src/ as is?
[15:10:20] texasmynsted: I just did a ctrl-z and then whoami, and I am me not root
[15:10:38] havenwood: texasmynsted: mkdir ~/.rubies/test
[15:10:42] havenwood: texasmynsted: mkdir ~/src/test
[15:10:46] rippa: has joined #ruby
[15:11:22] texasmynsted: both directories created w/o error
[15:11:53] havenwood: texasmynsted: (( UID == 0 )) && echo "surprize, UID 0" || echo "as expected, not UID 0"
[15:12:36] texasmynsted: as expected, not UID 0
[15:12:59] havenwood: texasmynsted: ah, it wants your root password for installing deps.
[15:13:14] havenwood: texasmynsted: betcha it'll not ask if you use --no-install-deps
[15:13:29] texasmynsted: I suppose I need deps
[15:13:32] texasmynsted: ACTION shrug
[15:13:41] havenwood: yeah, i'd recommend
[15:13:43] havenwood: or install them yourself
[15:13:57] texasmynsted: I do not care about it asking for root. I just care that it is installing correctly
[15:14:19] havenwood: texasmynsted: Based on what you've shown, it should end up properly installed in ~/.rubies
[15:15:03] texasmynsted: I suppose everything it is doing can be un-done if needed.
[15:15:11] havenwood: texasmynsted: yup!
[15:15:33] ElDoggo: has joined #ruby
[15:16:09] mim1k: has joined #ruby
[15:16:26] cadillac_: has joined #ruby
[15:17:40] ElDoggo: has joined #ruby
[15:17:47] texasmynsted: ok, got message "Successfully installed ruby 2.4.2 into /Users/mmynsted/.rubies/ruby-2.4.2"
[15:18:15] havenwood: texasmynsted: now if you restart your terminal chruby should detect it (assuming you're using chruby)
[15:18:19] texasmynsted: that sounds encouraging
[15:19:04] vipaca: has joined #ruby
[15:20:14] TheRealMattM: has joined #ruby
[15:21:09] alnewkirk: has joined #ruby
[15:24:41] alfiemax: has joined #ruby
[15:24:41] Megamosaren: has joined #ruby
[15:26:58] johno84: has joined #ruby
[15:29:51] jrafanie: has joined #ruby
[15:30:48] uZiel: has joined #ruby
[15:31:01] johno84: has joined #ruby
[15:31:42] netherwolfe: has joined #ruby
[15:35:10] cadillac_: has joined #ruby
[15:37:03] sucks: has joined #ruby
[15:37:10] yebo_: anyone know of busy IRC channels for ruby code questions?
[15:37:48] robnester: has left #ruby: ("Leaving")
[15:37:52] yebo_: we tried #RubyOnRails but almost dead
[15:38:23] kculpis: has joined #ruby
[15:39:17] TheBrayn: have you tried this channel right here?
[15:39:43] havenwood: yebo_: this is the Ruby language channel, so it's the perfect place to ask Ruby questions
[15:39:45] yebo_: <@ruby[bot]> yebo_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:40:26] yebo_: no one seems to have experience with using two mail servers see question https://stackoverflow.com/questions/47073869/multiple-action-mailer-not-working-in-rails
[15:40:43] dminuoso: Cant get more rails related than that.
[15:41:09] moei: has joined #ruby
[15:41:18] dminuoso: yebo_: "But It is not getting worked in production mode"
[15:41:22] dminuoso: Is a wonderful error description.
[15:41:32] dminuoso: I mean grammar aside, it doesn't tell much.
[15:41:39] yebo_: good point
[15:42:33] elomatreb: I'm assuming that syntax error in mailer2.rb is not in your actual files?
[15:43:56] ramfjord: has joined #ruby
[15:45:08] synthroid: has joined #ruby
[15:45:20] dminuoso: havenwood: How much code you think might break, that given `foo bar` it would call foo.call(bar) if `foo` was known to be a local variable?
[15:45:43] dminuoso: I mean covering method names with lvars, but using those same methods in the same scope ought to be a rare thing.
[15:45:45] dminuoso: And bad style ontop.
[15:45:52] dminuoso: covering = hiding
[15:46:01] synthroid: has joined #ruby
[15:46:41] michael1: has joined #ruby
[15:47:15] Technodrome: has joined #ruby
[15:47:51] anisha: has joined #ruby
[15:49:57] ehxor: has joined #ruby
[15:50:22] cadillac_: has joined #ruby
[15:50:32] netherwolfe: has joined #ruby
[15:51:07] snickers: has joined #ruby
[15:51:43] imode: has joined #ruby
[15:53:32] selim: has joined #ruby
[15:55:38] claudiuinberlin: has joined #ruby
[15:55:48] bruno-: has joined #ruby
[15:57:22] snickers: has joined #ruby
[16:02:08] memo1: has joined #ruby
[16:02:13] havenwood: dminuoso: yeah, I can't think of code that'd break - hmmm
[16:02:30] havenwood: dminuoso: I wouldn't even know where to begin with modifying parse.y...
[16:03:05] kapil___: has joined #ruby
[16:03:10] havenwood: well, I guess I know where to begin
[16:03:13] havenwood: I don't know where to end.
[16:03:29] dminuoso: havenwood: I dont think you need to modify parse.y at all
[16:03:48] havenwood: dminuoso: mmmm
[16:03:52] sucks_: has joined #ruby
[16:03:59] dminuoso: ast>> foo = ""; foo bar
[16:04:00] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/891721
[16:04:40] ramfjord: has joined #ruby
[16:05:10] paranoicsan: has left #ruby: ()
[16:05:11] havenwood: aha, I assumed you meant modifying the grammar
[16:05:15] dminuoso: ast>> foo = ""; bar foo
[16:05:16] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/891722
[16:05:19] ozcanesen: has joined #ruby
[16:05:52] cadillac_: has joined #ruby
[16:06:07] dminuoso: havenwood: Well the grammar already allows for this, so this is nice.
[16:07:27] dviola: has joined #ruby
[16:07:49] dminuoso: asm>> foo = ""; bar foo
[16:07:50] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/891726
[16:07:51] dminuoso: asm>> foo = ""; foo bar
[16:07:52] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/891727
[16:08:10] dminuoso: Yeah, it just looks like the compiler would need a tweak.
[16:08:53] dminuoso: https://github.com/ruby/ruby/blob/trunk/compile.c#L5864-L5903
[16:08:59] dminuoso: Ill start poking there. :)
[16:09:00] havenwood: I guess `[:opt_aref, {:mid=>:[], :flag=>16, :orig_argc=>1}, false]` is already a special case.
[16:09:23] havenwood: Only 2 of the 3 existing ways to call are `mid: :call`.
[16:09:42] havenwood: `foo[bar]` style calling
[16:09:45] guacamole: has joined #ruby
[16:09:56] havenwood: >> pp RubyVM::InstructionSequence.compile('foo = :itself.to_proc; foo[42]').to_a.last
[16:09:59] ineb: has joined #ruby
[16:10:02] ruby[bot]: havenwood: # => undefined method `pp' for main:Object ...check link for more (https://eval.in/891731)
[16:10:03] havenwood: oh, right pp
[16:10:09] havenwood: >> RubyVM::InstructionSequence.compile('foo = :itself.to_proc; foo[42]').to_a.last
[16:10:10] ruby[bot]: havenwood: # => [1, [:trace, 1], [:putobject, :itself], [:opt_send_without_block, {:mid=>:to_proc, :flag=>16, :orig_ ...check link for more (https://eval.in/891733)
[16:10:43] havenwood: dminuoso: nice
[16:11:42] govg: has joined #ruby
[16:11:49] guacamole: has joined #ruby
[16:11:52] troys: has joined #ruby
[16:12:38] lovemercy124: has joined #ruby
[16:17:40] claudiuinberlin: has joined #ruby
[16:18:05] ramfjord: has joined #ruby
[16:18:24] polishdub: has joined #ruby
[16:18:38] solocshaw: has joined #ruby
[16:22:00] aufi: has joined #ruby
[16:25:22] cadillac_: has joined #ruby
[16:27:26] texasmynsted: Ok, I have a Gemfile with many gems. How do I find out what the latest stable version is, say of rake? I have 0.9 listed in Gemfile. Maybe it does not matter?
[16:29:04] kies: has joined #ruby
[16:30:00] texasmynsted: if I do "gem list" it will show me the current versions of locally installed gems.
[16:30:43] Xiti: has joined #ruby
[16:30:51] vipaca: has joined #ruby
[16:31:21] elomatreb: texasmynsted: `bundle outdated`
[16:32:20] texasmynsted: that seems better than gem list -r |grep '^rake '
[16:33:42] ramfjord: has joined #ruby
[16:34:16] texasmynsted: if I bundle update, will that update to the latest "compatible" versions?
[16:34:26] raul782: has joined #ruby
[16:34:37] texasmynsted: or just try to update everything to the latest stable version?
[16:35:14] yebo_: has joined #ruby
[16:35:30] michael1: has joined #ruby
[16:35:47] cabotto: has joined #ruby
[16:36:19] texasmynsted: ACTION shrug. Just going to try and see what happens
[16:37:49] xMopxShell: has joined #ruby
[16:37:54] dextrey: has joined #ruby
[16:38:06] texasmynsted: oh I see. It does not alter the Gemfile
[16:39:13] ramfjord: has joined #ruby
[16:41:10] Nicmavr: has joined #ruby
[16:41:28] Nicmavr: has joined #ruby
[16:42:11] mim1k: has joined #ruby
[16:43:25] lacour: has joined #ruby
[16:44:27] elomatreb: texasmynsted: Sorry. bundle update will install the newest versions matching the constraints specified in the gemfile, and update the Gemfile.lock with the exact versions
[16:44:30] mostlybadfly: has joined #ruby
[16:44:51] ltp: has joined #ruby
[16:44:55] texasmynsted: I am just going to try to update the Gemfile to all latest and see what happens.
[16:45:05] texasmynsted: This seems wrong but.
[16:45:07] texasmynsted: ACTION shrug
[16:45:11] orbyt_: has joined #ruby
[16:45:27] anisha: has joined #ruby
[16:45:49] elomatreb: If the constrains in the Gemfile were specified correctly, you shouldn't need to do much. E.g. "~> 11.0" like with rake means "11.0.0 or later"
[16:47:30] eckhardt: has joined #ruby
[16:48:06] mtkd: has joined #ruby
[16:49:53] quobo: has joined #ruby
[16:50:03] cadillac_: has joined #ruby
[16:50:40] texasmynsted: I need to update the constraints but octopress seems dead so who knows if I am breaking it
[16:50:52] texasmynsted: I need a newer jekyll
[16:51:48] yebo_: Any idea how to have two mail servers? See https://stackoverflow.com/questions/47073869/multiple-action-mailer-not-working-in-rails
[16:51:53] texasmynsted: I should likely replace octopress but do not want to take the time at the moment, for something working
[16:52:13] guacamole: has joined #ruby
[16:53:02] havenwood: yebo_: Did you check that the mailer files exist like suggested earlier? That's really a better #RubyOnRails question as folk have pointed out. That channel should be more busy at this hour, so if you hang around you might get an answer.
[16:53:45] texasmynsted: sigh " You have already activated rake 12.0.0, but your Gemfile requires rake 12.2.1."
[16:53:55] havenwood: yebo_: There's also a Ruby on Rails Slack channel that's pretty busy.
[16:54:48] texasmynsted: I thought bundle install would install the version from the Gemfile
[16:55:19] havenwood: texasmynsted: It will install the version from the Gemfile.lock, if one exists.
[16:55:31] nowhere_man: has joined #ruby
[16:55:41] havenwood: texasmynsted: bundle exec rake
[16:56:06] Sembei: has joined #ruby
[16:56:13] texasmynsted: so basically use the rake as defined in the Gemfile rather than whatever is installed for my local system?
[16:56:38] havenwood: texasmynsted: yes, by prefixing `bundle exec` to the command, it'll pin to the exact version specified in the Gemfile.lock.
[16:57:45] eckhardt_: has joined #ruby
[17:01:37] ruby874: has joined #ruby
[17:01:53] alan_w: has joined #ruby
[17:01:57] goyox86: has joined #ruby
[17:02:06] alan_w: has left #ruby: ()
[17:02:27] alan_w: has joined #ruby
[17:02:51] phaul: has joined #ruby
[17:02:53] cagomez: has joined #ruby
[17:03:27] texasmynsted: That totally hosed octopress
[17:03:35] ruby-lang616: has joined #ruby
[17:04:02] alan_w: sorry, mistype :o
[17:05:40] Megamos: has joined #ruby
[17:06:32] yebo_: any idea how to solve multiple emails servers https://stackoverflow.com/questions/47073869/multiple-action-mailer-not-working-in-rails
[17:06:44] texasmynsted: If put my gemfile back to the way it was, I should be able to bundle install, to restore what I had, right?
[17:07:46] cagomez: has joined #ruby
[17:07:47] havenwood: texasmynsted: It's the Gemfile.lock that you'd want to restore, if you want the gems just like they were.
[17:08:20] havenwood: texasmynsted: Re-bundling may or may not get you the same Gemfile.lock that you had before. Usually not if time has passed.
[17:08:36] havenwood: texasmynsted: The `bundle update` command is like deleting your Gemfile.lock and rebundling.
[17:09:08] havenwood: I don't think it's particularly intuitive. I prefer the RubyGems terminologies, but Bundler somehow snuck into the stdlib so that's that.
[17:09:32] texasmynsted: So pull my Gemfile and Gemfile.lock from git. Then bundle install and all good?
[17:09:41] havenwood: texasmynsted: yes
[17:10:21] havenwood: texasmynsted: Hugo is a nice static site generator written in Go. ;-P
[17:10:22] texasmynsted: Ok. Will try that... And see if I can get this working again
[17:10:52] texasmynsted: I have been wanting to write my own in Haskell. Have some of it
[17:11:34] texasmynsted: yasod can do static sites also iirc
[17:11:42] havenwood: texasmynsted: An immutable, side-effect free blog.
[17:12:32] texasmynsted: It is just time.
[17:13:14] texasmynsted: And right now octopress has all the nice features, like updating RSS feeds, google, auto-deployment, etc, etc.
[17:13:20] ElDoggo: has joined #ruby
[17:13:44] texasmynsted: Do not want a Go based site
[17:14:01] apeiros: has joined #ruby
[17:14:19] goyox86: has left #ruby: ()
[17:15:10] texasmynsted: All I wanted was the ability to pass parameters to an include, heh. Modern Jekyll can do this no problem.
[17:15:23] goyox86_: has joined #ruby
[17:16:26] chouhoulis: has joined #ruby
[17:17:19] j416: has joined #ruby
[17:17:50] mson: has joined #ruby
[17:18:05] texasmynsted: Hmm "An error occurred while installing yajl-ruby (1.1.0)"
[17:18:23] jamesaxl: has joined #ruby
[17:19:19] texasmynsted: My Gemfile wants Ruby 2.0.0, I have the latest installed. I seem to be unable to install 2.0.0. If I update the Gemfile to use 2.4.2 then I get this error on bundle install.
[17:21:06] lobloblobster: texasmynsted: Does it have native extensions?
[17:22:25] vipaca: has joined #ruby
[17:24:32] texasmynsted: Maybe I just need a old 2.0.x version of Ruby for it.
[17:24:55] texasmynsted: I keep trying ruby-install ruby 2.0.0, or 2.0, or 2.0-stable, etc.
[17:25:02] texasmynsted: But it can not find any of them.
[17:25:27] goyox86_: has left #ruby: ()
[17:25:44] texasmynsted: I see ruby-2.0.0-p648.tar.bz2 here --> https://cache.ruby-lang.org/pub/ruby/2.0/ but I have no idea if this is stable or what
[17:26:24] solocshaw: has joined #ruby
[17:26:25] goyox86: has joined #ruby
[17:26:44] texasmynsted: heh It install p648 but
[17:27:01] jrafanie: has joined #ruby
[17:27:10] texasmynsted: This is exactly the kind of stuff that is frustrating for a simple static site
[17:29:51] conta: has joined #ruby
[17:30:05] GreatMazi1: has joined #ruby
[17:33:58] ta: has joined #ruby
[17:34:56] cabotto: has joined #ruby
[17:37:05] gGREATmAZI: has joined #ruby
[17:42:59] guacamole: has joined #ruby
[17:43:38] aufi_doma: has joined #ruby
[17:45:41] mim1k: has joined #ruby
[17:47:21] hahuang65: has joined #ruby
[17:47:41] borodin: has joined #ruby
[17:47:51] sucks: has joined #ruby
[17:53:18] borodin: has joined #ruby
[17:55:01] solocshaw: has joined #ruby
[17:55:03] alnewkirk: has joined #ruby
[17:59:02] tomphp: has joined #ruby
[18:00:29] aufi_doma: has left #ruby: ()
[18:02:20] Technodrome: has joined #ruby
[18:04:07] alnewkirk: has joined #ruby
[18:04:46] phaul: has joined #ruby
[18:04:50] tomphp: has joined #ruby
[18:06:56] ldepandis: has joined #ruby
[18:07:00] alfiemax: has joined #ruby
[18:08:12] raynold: has joined #ruby
[18:09:49] tomphp: has joined #ruby
[18:13:03] sucks: has joined #ruby
[18:13:05] cdg: has joined #ruby
[18:15:33] alnewkirk: has joined #ruby
[18:17:10] claudiuinberlin: has joined #ruby
[18:18:19] texasmynsted: so chruby is global and persistent?
[18:19:08] havenwood: texasmynsted: chruby is a couple functions you can source that let you set env vars to switch Rubies
[18:19:36] havenwood: texasmynsted: this is the code: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh
[18:19:36] texasmynsted: like ~/.ruby-version ? I guess
[18:20:05] havenwood: texasmynsted: if you also source auto.sh, chruby will detect ~/.ruby-version files: https://github.com/postmodern/chruby/blob/master/share/chruby/auto.sh
[18:20:30] havenwood: texasmynsted: here's an example of sourcing both chruby.sh and auto.sh: https://github.com/postmodern/chruby#auto-switching
[18:20:31] texasmynsted: oh nice, thank you
[18:20:55] ElDoggo: has joined #ruby
[18:21:16] texasmynsted: ok, now I see what it meant by auto. Ok this is very nice
[18:22:42] oleo2: has joined #ruby
[18:23:01] mim1k: has joined #ruby
[18:23:48] eblip: has joined #ruby
[18:24:02] def_jam: has joined #ruby
[18:24:29] orbyt_: has joined #ruby
[18:24:46] alnewkirk: has joined #ruby
[18:25:20] texasmynsted: oh I guess chruby does not persist unless you create the .ruby-version file
[18:25:50] havenwood: texasmynsted: no, it doesn't persist env vars between shell sessions
[18:26:02] havenwood: texasmynsted: you can create a .ruby-version file in / or ~ to set a default
[18:26:16] texasmynsted: this is perfect
[18:26:34] claudiuinberlin: has joined #ruby
[18:26:49] havenwood: we've discussed adding more functionality for setting a default, but for now it's just .ruby-version
[18:28:41] Dimik: has joined #ruby
[18:30:55] alfiemax: has joined #ruby
[18:31:32] voice_ftp: has joined #ruby
[18:32:47] kinduff: has joined #ruby
[18:33:03] kinduff: good morning
[18:35:34] kinduff: has joined #ruby
[18:38:10] kinduff: has joined #ruby
[18:38:31] alnewkirk: has joined #ruby
[18:39:19] apeiros_: has joined #ruby
[18:40:46] funburn: has joined #ruby
[18:41:06] ramfjord: has joined #ruby
[18:43:36] cagomez: has joined #ruby
[18:44:09] jolamb: ok, circular dependency problem. I have files lib/a.rb and lib/b.rb. b.rb depends on a.rb - `requires 'a'`. I have test/test_a.rb and test/test_b.rb. test_a.rb has `require a`, test_b.rb has `require b`. When I run "rake test" it warns about circular dependencies, because - I think - a.rb gets required twice
[18:44:19] jolamb: test_a.rb -> a.rb; test_b.rb ->
[18:44:28] jolamb: test_a.rb -> a.rb; test_b.rb -> b.rb -> a.rb
[18:44:32] guacamole: has joined #ruby
[18:45:17] jolamb: Is this happening because I'm doing something wrong when I require a from b, or is this warning something I should suppress/ignore?
[18:45:52] kinduff: jolamb: indeed, you're falling into a circular pattern there, either you require at higher level (b.rb -> a.rb), or call b.rb at test_a.rb
[18:46:47] mikecmpbll: has joined #ruby
[18:46:59] jolamb: kinduff: I don't get what you mean by "require at higher level (b.rb -> a.rb)" - b.rb already requires a.rb
[18:47:07] darkmorph: has joined #ruby
[18:47:13] GreatMazi1: has joined #ruby
[18:47:18] kinduff: jolamb: by higher level I mean, maybe you got c.rb that requires a&b.rb, and that's what you call for test_a.rb and test_b.rb, or for your script, and you leave your tests with the corresponding require.
[18:49:27] claudiuinberlin: has joined #ruby
[18:50:04] kinduff: jolamb: https://gist.github.com/kinduff/204c90789a8c509779d0719e82196c7d/fc91692022a4ceb0f130fa929dece6ea61260103 or https://gist.github.com/kinduff/204c90789a8c509779d0719e82196c7d/9df24d661a65d7ce42264c6980755fdab0ddc954
[18:50:45] kinduff: something like that, I'm just waking up so I'm not sure if that works for your case
[18:50:54] jrafanie: has joined #ruby
[18:51:14] PaulCapestany: has joined #ruby
[18:52:05] jdawgaz: has joined #ruby
[18:52:20] guacamole: has joined #ruby
[18:54:01] jolamb: kinduff: I'm pretty sure that's what I've got more or less. Lemme poke at this a bit more
[18:55:46] alnewkirk: has joined #ruby
[18:55:47] imode: has joined #ruby
[18:56:06] arup_r: has joined #ruby
[18:57:26] arup_r: I am trying to replace the playlistId with some interger. Input string: "playlistNotFound: The playlist identified with the requests <code>playlistId</code> parameter cannot be found." .. Output I want: "playlistNotFound: The playlist identified with the requests <code>123</code> parameter cannot be found." .. I was trying: sub(/<code>(playlistId)</code>/, '1') , But it is close, not correct. :) Any help
[18:57:52] Devalo: has joined #ruby
[18:58:01] apeiros: arup_r: the / needs escaping
[18:58:18] apeiros: also you'll replace the <code></code> too
[18:58:30] jolamb: kinduff: hrm, looks like it's actually a circular dependency in the oauth gemn
[18:58:34] ElDoggo: has joined #ruby
[18:58:44] dextrey: has joined #ruby
[18:59:30] arup_r: apeiros: yeah I tried s.sub(/<code>(playlistId)<\/code>/, '1') . but it is replacing all as you said. But I want to replace just * playlistId*
[18:59:54] apeiros: arup_r: the rest is static, shouldn't be that hard to add it to the replacement part
[19:00:12] kinduff: apeiros: a = "Hello %{where}"; a % { :where => "world!" }
[19:00:30] kinduff: apeiros: => "Hello world!"
[19:00:46] kinduff: jolamb: oh, comes from a gem then?
[19:01:09] apeiros: kinduff: you certainly meant arup_r
[19:01:57] arup_r: kinduff: input string is not under my control :)
[19:02:28] jolamb: kinduff: looks that way. Any way I can tell ruby to skip warnings on external deps?
[19:02:33] sameerynho: has joined #ruby
[19:02:34] Devalo: has joined #ruby
[19:03:22] kinduff: jolamb: can you provided more context on how you're using the gem?
[19:05:59] kinduff: arup_r: why not just sub("playlistId", "123")
[19:06:04] arup_r: apeiros: you meant like this rigt s.sub(/<code>(playlistId)<\/code>/, '<code>1</code>') ? It works. just confirming
[19:06:14] jolamb: I've got a dependency on ruby-trello. It depends on oauth. oauth.rb requires oauth/client/helper, which requires oauth/consumer, which requires oauth/client/net_http, which requires oauth/client/helper
[19:06:17] apeiros: arup_r: yes
[19:06:25] arup_r: hm. thanks apeiros
[19:06:33] apeiros: kinduff: depending on the input string, that's more volatile
[19:06:38] jolamb: kinduff: ^^ there's the context
[19:06:39] apeiros: +potentially
[19:07:35] apeiros: does anybody happen to use the 2016 or 2017 mbp with 2x 5k screens? if so, does using both screens spin up the fans?
[19:10:46] conta1: has joined #ruby
[19:14:51] dionysus69: has joined #ruby
[19:15:21] oleo2: has joined #ruby
[19:15:39] BTRE: has joined #ruby
[19:18:21] nowhere_man: has joined #ruby
[19:18:47] jphase: has joined #ruby
[19:19:46] Devalo: has joined #ruby
[19:21:45] kies: has joined #ruby
[19:21:51] jphase: has joined #ruby
[19:22:08] beerich: has joined #ruby
[19:23:35] funburn: has joined #ruby
[19:23:43] beerich: Anybody have experience with server-side validations?
[19:24:30] apeiros: beerich: you'll usually have a much better chance at an answer if you ask your actual question instead of metaquestions like this
[19:25:32] beerich: Is there a common approach to validations with regards to assertions or nomenclature choices in order to standardize structure?
[19:25:42] vipaca: has joined #ruby
[19:26:11] apeiros: what kind of server are we talking about?
[19:26:20] funburn: has joined #ruby
[19:26:23] beerich: a ruby web server
[19:26:30] apeiros: using a framework?
[19:26:33] memo1: has joined #ruby
[19:26:46] beerich: I'm writing my own framework
[19:26:49] apeiros: not familiar with sinatra, but that'd be my starting point
[19:26:52] beerich: I'm writing assertions
[19:27:14] beerich: I'm not relying on other frameworks nor validations. I'm writing my own validations. This is not a framework question.
[19:27:24] beerich: sorry, writing validations
[19:27:36] beerich: this is a ruby question, not framework
[19:27:39] apeiros: in that case - you are defining the structure and standardization
[19:28:25] beerich: yes which is why I'm asking how it's best approached. When I use a method named "validate_referrer", if it returns false, is it invalidated?
[19:28:44] beerich: Are the set of validations assumed false then approved individually?
[19:28:50] apeiros: IMO using prefixes is a code smell
[19:29:05] beerich: code smell?
[19:29:20] apeiros: early indicator of something probably being done wrong
[19:29:42] beerich: why is that?
[19:30:20] apeiros: why do you have the prefix?
[19:30:34] beerich: because I'm trying to validate the referrer
[19:30:40] beerich: hence validate_referrer
[19:31:04] apeiros: ok. will you have other validate_* methods on the same object?
[19:31:25] beerich: that too would obviously be called validate_referrer
[19:31:30] beerich: why are you focussing on the method name?
[19:31:39] beerich: I don't repeat method names
[19:31:50] beerich: that's obviously a problem
[19:32:31] Azure: has joined #ruby
[19:32:32] apeiros: I don't focus on the method name. I was answering your question
[19:33:24] beerich: I'm referring to the structure of methods with regards to boolean assumption pre-test. Another question is on the "validate" in the method name, as it suggests if it's returned as true, it is validated.
[19:33:29] apeiros: I fail to see how other validate_* methods could be called validate_referrer as well, as there can only be one method of a given name. but ok. lets look at it from another angle.
[19:33:49] beerich: Yes that's my point. What would you call a method that tests its validity?
[19:34:05] jrafanie_: has joined #ruby
[19:34:10] apeiros: depends. what do you want out of it? if it's just to know whether it's valid, I'd call it "valid?"
[19:34:26] apeiros: if you want to know what's wrong with it, I'd call it "errors"
[19:34:35] beerich: ok but you write a whole class based on a referrer?
[19:34:51] apeiros: I don't know. You gave pretty little context.
[19:35:01] apeiros: but in general, I'd write a validation class, yes.
[19:35:21] beerich: it's just that. It's validity of the referrer, to see if it's expected. "errors" would be a whole bunch of tests, which shouldn't be one method.
[19:35:38] beerich: validations don't have to be in their own class
[19:35:42] apeiros: and something to validate a referrer would either be a subclass of a generic validation class, or be composed of it
[19:35:55] beerich: validations can be methods in the class of the object
[19:35:58] beerich: completely internal
[19:35:59] apeiros: beerich: either you have questions on how others do it, or you know already how you want to do it
[19:36:01] apeiros: what is it now?
[19:36:30] beerich: I have a way of doing it, but I'm asking if there's an accepted approach on the nomenclature
[19:36:45] beerich: that's what I was asking
[19:36:48] apeiros: as said, or at least implicated before, that's framework level stuff.
[19:37:01] apeiros: go look around at how different frameworks do it
[19:37:03] beerich: there are no validations in Sinatra
[19:37:09] beerich: I don't rely on frameworks
[19:37:22] apeiros: no, but you ask for "accepted approaches"
[19:37:25] jrafanie: has joined #ruby
[19:37:34] apeiros: if there is one, don't you think it's accepted *because other frameworks* use it?
[19:37:41] beerich: ok but that doesn't mean the answer is "move to Rails"
[19:37:43] apeiros: otherwise, what's the meaning of "accepted" at all?
[19:37:49] mim1k: has joined #ruby
[19:37:51] apeiros: did I say that?
[19:37:53] beerich: a generalized approach
[19:37:54] ledestin: has joined #ruby
[19:38:22] apeiros: again, if there is a generalized approach, what do you think where it'd materialize? where would it be used?
[19:38:31] beerich: the meaning of accepted means that people often agree on an approach to their own validations, not just looking at frameworks
[19:38:46] beerich: it would be used in those objects written by ruby developers
[19:38:52] beerich: not simply referring to frameworks
[19:39:09] apeiros: ok, I have no idea what you're asking then.
[19:39:14] neo95: has joined #ruby
[19:39:17] beerich: nobody writes validations?
[19:39:20] apeiros: it makes no sense to me if you phrase it like that.
[19:39:37] apeiros: you have a weird way of interpreting words.
[19:39:53] beerich: I'm in a ruby group asking about ruby
[19:39:56] beerich: not frameworks
[19:40:09] beerich: I can only think people write their own validations
[19:40:13] apeiros: I don't think I can help you.
[19:40:25] beerich: but thank you
[19:40:25] bougyman: validations of what?
[19:40:44] beerich: fields in forms
[19:40:59] beerich: that's in the scope of the expected object
[19:41:23] matthewd: ... conditionals?
[19:41:24] bougyman: There are a few ways i've seen.
[19:41:35] bougyman: Contracts, Design By Contract, is one I liked.
[19:41:49] havenwood: beerich: If you haven't already, I'd recommend taking a look at Roda and dry-validations.
[19:41:50] havenwood: beerich: http://dry-rb.org/gems/dry-validation/
[19:41:51] havenwood: beerich: http://rodauth.jeremyevans.net
[19:41:55] bougyman: But validating input still happens before being handed off to the contracted method.
[19:42:17] havenwood: oops, wrong link - here: http://roda.jeremyevans.net
[19:42:34] vipaca: has joined #ruby
[19:42:38] beerich: ok will have a look
[19:42:59] beerich: I'm just thinking there is a structured approach to validations...from a security point of view.
[19:43:04] beerich: and other angles
[19:43:14] havenwood: beerich: When you say "validations," what do you mean?
[19:43:40] beerich: anything coming into a system through a form, or at any point, simply testing the object for sufficient properties
[19:43:51] beerich: at any point, asking if the object is complete enough for moving on
[19:43:56] havenwood: beerich: Are you talking about JS validations? Model validations? Database validations? All of them?
[19:44:02] beerich: server side
[19:44:11] beerich: 100% objects
[19:44:20] beerich: no database, no client...all model
[19:44:25] alfiemax: has joined #ruby
[19:44:48] beerich: example: A user's firstname isn't "44"
[19:45:34] jrafanie: has joined #ruby
[19:45:52] matthewd: beerich: There is not a generally-agreed-upon approach to implementing this from first principles, because the generally-agreed-upon approach is to use existing frameworks (e.g., rails, dry) to do it.
[19:46:02] orbyt_: has joined #ruby
[19:46:06] beerich: validate_firstname, is it automatically assumed as false, tested, then set true? Or the other way around? Is the return of "validity" expected to be true by convention if it's validated?
[19:46:25] beerich: Ya I tend to write my own
[19:47:28] matthewd: Do what you like. But if you explicitly exclude anything frequently-used enough to have been extracted to a library, you're unlikely to learn of a "common approach".
[19:48:07] beerich: ok that's what I was pretty much looking for. Thanks
[19:48:13] matthewd: I'm not even sure how to answer your above questions anyway, tbh
[19:48:32] beerich: I'm constantly trying to sniff out discussed common practices
[19:48:34] matthewd: "automatically assumed as false, tested, then set true" -- huh? Something is either true or false, or it's not evaluated.
[19:48:50] guacamole: has joined #ruby
[19:48:57] beerich: ok but booleans start out as either true or false. There is no nil in boolean.
[19:49:15] beerich: so you have to assume one and prove otherwise
[19:54:39] mynameisdebian: has joined #ruby
[19:55:17] beerich: Anyway, found what I'm looking for. thanks everyone.
[19:55:26] michael2: has joined #ruby
[19:55:59] mynameisdebian: Is there a way to quickly create a set of variable with specific names from an array? Something like, myArr.convertToVars("var1", "var2", "varD")
[19:56:21] jenrzzz: has joined #ruby
[19:56:52] beerich: your own method
[19:57:00] mynameisdebian: In other words, if I had [1,2,3] and I used that syntax, it would be equivalent to var1=1 and var2=2 and varD=3
[19:57:02] vipaca: has joined #ruby
[19:57:16] mynameisdebian: I only have to do it once and it seems like there would probably be a method for it
[19:57:28] beerich: nothing already written. Write your own method
[19:57:36] beerich: nothing like .to_vars
[19:58:19] mynameisdebian: If I have an array of values and an array of names, is there a way to do <name>=<value> ?
[19:58:21] cagomez: has joined #ruby
[19:58:37] beerich: a method. Iterate through each and provide the assignment
[19:59:15] mynameisdebian: how do I turn the <name> string into a variable?
[19:59:17] apeiros: mynameisdebian: take a look at Enumerable#zip and #map
[20:00:36] matthewd: mynameisdebian: `var1, var2, varD = myArr`
[20:00:49] havenwood: mynameisdebian: We don't really set local variables dynamically like that.
[20:01:05] apeiros: oh oy, just read the beginning of the question
[20:01:21] apeiros: don't. don't use variablenames as a hash. use a hash.
[20:01:55] havenwood: mynameisdebian: If you'd like to play with it in irb, just for fun, try: target_binding = binding; my_array = %w[var_oatmeal var_porridge var_gruel]; my_array.each { |var| target_binding.local_variable_set var, var }; target_binding.irb
[20:02:10] quobo: has joined #ruby
[20:02:17] havenwood: mynameisdebian: then you can: var_porridge #=> "var_porridge"
[20:02:25] apeiros: havenwood: you should mention that you can't define new variables in a binding
[20:02:36] matthewd: apeiros: I think you're reading too much into the fact the guessed pseudocode used strings
[20:02:44] tomphp: has joined #ruby
[20:02:48] cdg: has joined #ruby
[20:02:51] apeiros: 20:57 mynameisdebian: In other words, if I had [1,2,3] and I used that syntax, it would be equivalent to var1=1 and var2=2 and varD=3
[20:02:54] apeiros: matthewd: ^
[20:02:58] apeiros: I don't think so?
[20:03:03] havenwood: mynameisdebian: TL;DR: don't dynamically set local variables
[20:03:13] mynameisdebian: damn that sounds complicated
[20:03:38] matthewd: apeiros: Isn't that a totally reasonable description of `a, b = ary` ?
[20:04:25] apeiros: matthewd: could be, but `myArr.convertToVars("var1", "var2", "varD")` makes me think otherwise. but if splat answers their question - great :)
[20:05:31] matthewd: mynameisdebian: Does my answer solve your problem? If not, we probably need more information.
[20:05:52] mynameisdebian: I had a bunch of variables that I put into an array and output to YAML. I'm reading it back and realizing I want the original variable names. It's easy for me to create an array with the names of the variables as strings, and another with the data variables. Is there a way to take the variable names from the first array and create variables with those names?
[20:06:07] mynameisdebian: matthewd, I'm sorry, let me read again
[20:06:12] havenwood: mynameisdebian: Try using hash keys instead of variables to point at values.
[20:06:38] mynameisdebian: that would have been pretty smart
[20:06:50] hahuang65: has joined #ruby
[20:07:13] Megamos: has joined #ruby
[20:07:30] mynameisdebian: matthewd you're awesome!
[20:08:06] mynameisdebian: thanks everyone else as well
[20:09:52] Ryzokuken: has joined #ruby
[20:13:07] ycyclist: has joined #ruby
[20:13:15] nopolitica: has joined #ruby
[20:15:42] alfiemax: has joined #ruby
[20:20:15] shinnya: has joined #ruby
[20:27:38] solocshaw1: has joined #ruby
[20:28:26] BTRE: has joined #ruby
[20:29:21] oleo2: has joined #ruby
[20:32:44] Rapture: has joined #ruby
[20:35:25] oleo2: has joined #ruby
[20:42:51] Immune: has joined #ruby
[20:44:06] tomphp: has joined #ruby
[20:44:25] safetypin: has joined #ruby
[20:45:43] slima: has left #ruby: ()
[20:46:58] tomphp: has joined #ruby
[20:47:18] ta: has joined #ruby
[20:55:53] ta: has joined #ruby
[20:57:13] dextrey: has joined #ruby
[20:59:32] madhatter: has joined #ruby
[21:07:01] goyox86: has joined #ruby
[21:13:54] nopolitica: has joined #ruby
[21:18:31] vipaca: has joined #ruby
[21:20:48] darkmorph: has joined #ruby
[21:22:29] Devalo: has joined #ruby
[21:23:38] jdawgaz: has joined #ruby
[21:25:57] jrafanie: has joined #ruby
[21:29:19] ap4y: has joined #ruby
[21:30:53] vipaca: has joined #ruby
[21:31:29] cagomez: has joined #ruby
[21:31:40] cagomez: has joined #ruby
[21:32:47] cagomez: has joined #ruby
[21:34:18] ResidentBiscuit: has joined #ruby
[21:35:35] cagomez_: has joined #ruby
[21:36:26] vipaca: has joined #ruby
[21:36:42] jamesaxl: has joined #ruby
[21:36:50] veeti: has joined #ruby
[21:36:53] oleo2: has joined #ruby
[21:37:08] ResidentBiscuit: has joined #ruby
[21:41:23] jdawgaz: has joined #ruby
[21:42:36] Xiti: has joined #ruby
[21:43:47] vipaca: has joined #ruby
[21:46:14] ap4y: has joined #ruby
[21:46:27] jdawgaz: has joined #ruby
[21:50:56] cagomez: has joined #ruby
[21:55:01] cahoots: has joined #ruby
[21:55:35] cahoots: hi, when i use the Hash#to_json and JSON#pretty_generate methods, it gives me fat arrows instead of colons in the hashes. what might be the issue?
[21:56:09] Radar: cahoots: Do you have an example?
[21:56:11] baweaver: >> {a: 1, 'b' => 2}.to_json
[21:56:12] gauravgoyal: has joined #ruby
[21:56:14] ruby[bot]: baweaver: # => undefined method `to_json' for {:a=>1, "b"=>2}:Hash ...check link for more (https://eval.in/892001)
[21:56:23] Radar: baweaver: A+ for effort
[21:56:25] baweaver: ...why that isn't default
[21:56:30] havenwood: cahoots: Rails?
[21:56:32] Radar: >> require 'json'; {a: 1, 'b' => 2}.to_json
[21:56:33] ruby[bot]: Radar: # => "{\"a\":1,\"b\":2}" (https://eval.in/892003)
[21:56:39] baweaver: yeah, pretty much
[21:56:47] cahoots: ohhh lol it's because i was using hashes as keys in the hash... which json doesn't support
[21:56:55] cahoots: seems like that should raise an exception...
[21:57:13] Radar: cahoots: It'd be helpful next time to include the code that you're having an issue with so we can validate things like this.
[21:57:19] Radar: Two sets of eyes better than one, etc etc
[21:57:36] baweaver: Anything can be a hash key :D
[21:58:13] baweaver: (which I have totally and shamelessly abused before
[21:58:52] havenwood: baweaver: NaN is a strange one...
[21:59:58] oleo2: has joined #ruby
[22:00:30] havenwood: Though I can't reproduce my expected oddity...
[22:00:31] jphase: has joined #ruby
[22:01:20] havenwood: Ah, right - I can.
[22:02:46] havenwood: >> {Float::NAN => :weasels, 0.0 / 0 => :hedgehogs, Float::INFINITY * 0 => :hamsters, Float::NAN => :lemurs}
[22:02:47] ruby[bot]: havenwood: # => {NaN=>:lemurs, NaN=>:hedgehogs, NaN=>:hamsters} (https://eval.in/892008)
[22:03:18] Rapture: has joined #ruby
[22:04:30] havenwood: >> {0.0 / 0 => :hedgehogs, Float::INFINITY * 0 => :hamsters, Float::NAN => :lemurs}.values_at Float::NAN, Float::INFINITY.fdiv(0)
[22:04:32] ruby[bot]: havenwood: # => [:lemurs, nil] (https://eval.in/892009)
[22:04:50] havenwood: https://bugs.ruby-lang.org/issues/13146
[22:04:57] havenwood: "You have to understand what NaN is, before playing with it." ~Matz
[22:06:29] cagomez: has joined #ruby
[22:08:43] Technodrome: has joined #ruby
[22:09:19] troulouliou_div2: has joined #ruby
[22:11:07] cahoots: has joined #ruby
[22:12:58] jphase: has joined #ruby
[22:15:02] nopolitica: has joined #ruby
[22:15:58] jdawgaz: has joined #ruby
[22:16:08] c-c: Ideas on how to get the console width and height for stdin?
[22:16:30] Radar: c-c: can you explain a little about why you'd want to do that?
[22:16:47] c-c: I want to render my own view 30 fps in the console
[22:18:14] geizp: has joined #ruby
[22:18:20] jphase: has joined #ruby
[22:19:30] geizp: have a question about the minitest gem... when it outputs, it runs each test, lists "S" after each one right now, i'm just starting. i get that means "skipped." i also have one that has an asterisk, but have no idea what that means or where to find it in the documentation
[22:20:02] havenwood: c-c: See io/console
[22:20:34] sagax: has joined #ruby
[22:20:59] c-c: also found $ tput lines
[22:21:11] jphase_: has joined #ruby
[22:21:12] havenwood: >> require 'io/console'; IO.console.winsize # c-c
[22:21:13] ruby[bot]: havenwood: # => (https://eval.in/892015)
[22:21:32] havenwood: #=> [42, 120]
[22:21:49] dinfuehr: has joined #ruby
[22:21:56] c-c: aa, indeed
[22:23:24] orbyt_: has joined #ruby
[22:27:56] agent_white: has joined #ruby
[22:29:18] jdawgaz: has joined #ruby
[22:30:53] jdawgaz: has joined #ruby
[22:32:57] cahoots: has joined #ruby
[22:33:04] troulouliou_div2: has joined #ruby
[22:34:27] guacamole: has joined #ruby
[22:37:08] cagomez: has joined #ruby
[22:37:10] eckhardt: has joined #ruby
[22:39:22] jenrzzz: has joined #ruby
[22:39:22] jenrzzz: has joined #ruby
[22:40:26] c-c: I bumped into this gem. I will try with this http://ruby-doc.org/stdlib-2.0.0/libdoc/curses/rdoc/Curses.html
[22:42:13] Kug3lis: has joined #ruby
[22:43:29] mr_rich101: has joined #ruby
[22:43:35] cahoots: has joined #ruby
[22:43:45] ycyclist: I am looking for an rpm to install openssl version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
[22:43:56] ycyclist: I asked on the openssl group, but apparently nobody is over there.
[22:44:58] jdawgaz: has joined #ruby
[22:45:44] jphase: has joined #ruby
[22:47:00] jphase_: has joined #ruby
[22:49:10] mson: has joined #ruby
[22:50:29] troulouliou_div2: has joined #ruby
[22:50:44] vipaca: has joined #ruby
[22:51:18] jackjackdripper: has joined #ruby
[22:53:53] basket: has joined #ruby
[22:55:17] mr_rich101: has joined #ruby
[22:57:31] jphase: has joined #ruby
[22:58:53] jphase_: has joined #ruby
[23:02:34] troulouliou_div2: has joined #ruby
[23:02:57] naquad: has joined #ruby
[23:03:57] jphase: has joined #ruby
[23:04:26] Xiti: has joined #ruby
[23:06:33] thinkpad: has joined #ruby
[23:07:35] cagomez: i have 2 arrays of ID's , foo and bar. how do I easily check whether all foo's are in bar?
[23:09:18] havenwood: cagomez: Are they sorted the same?
[23:10:14] cagomez: havenwood: no. I came up with ... intersect = foo & bar; insersect.count == foo.count
[23:11:32] Radar: cagomez: can bar be bigger than foo?
[23:11:36] Guest72603: that is amazing, why does foo & bar work?
[23:11:49] cagomez: Guest72603: set operators
[23:11:50] havenwood: >> [1, 2, 3] - [3, 2, 1] == []
[23:11:51] ruby[bot]: havenwood: # => true (https://eval.in/892018)
[23:11:56] cagomez: Guest72603: https://www.safaribooksonline.com/library/view/ruby-cookbook/0596523696/ch04s14.html
[23:12:11] Radar: cagomez: /nick quickdraw ps thanks
[23:12:22] Guest72603: that is so cool
[23:12:29] havenwood: >> require 'set'; [1, 2, 3].to_set == [3, 2, 1].to_set # cagomez
[23:12:31] ruby[bot]: havenwood: # => true (https://eval.in/892019)
[23:12:42] havenwood: cagomez: are they uniq?
[23:12:47] zululee: has joined #ruby
[23:13:05] cagomez: nevermind havenwood , I got it
[23:13:16] havenwood: cagomez: i guess with #- you've gotta go both ways
[23:13:21] havenwood: aye, counting is fine
[23:15:17] al2o3-cr: cagomez: ids1.all? { |id| ids2.member? id }
[23:16:02] nopolitica: has joined #ruby
[23:20:28] al2o3-cr: cagomez: also (foo & bar) == foo
[23:23:42] al2o3-cr: if sorted of course.
[23:24:55] kus_ubuntui686: has joined #ruby
[23:27:58] charliesome: has joined #ruby
[23:28:03] cdg: has joined #ruby
[23:39:05] vipaca: has joined #ruby
[23:41:10] cdg: has joined #ruby
[23:44:52] mynameisdebian: has joined #ruby
[23:49:14] cschneid_: has joined #ruby