« Back to channel list

#ruby-offtopic - 21 October 2017

« Back 1 day Forward 1 day »
[00:08:44] workmad3: has joined #ruby-offtopic
[00:19:55] nofxx: has joined #ruby-offtopic
[01:00:36] Technodrome: has joined #ruby-offtopic
[01:29:00] Technodrome: has joined #ruby-offtopic
[02:09:26] workmad3: has joined #ruby-offtopic
[02:25:48] kapil___: has joined #ruby-offtopic
[03:38:20] DarkBushido: has joined #ruby-offtopic
[03:38:20] DarkBushido: has joined #ruby-offtopic
[04:10:02] workmad3: has joined #ruby-offtopic
[04:17:29] DarkBushido: has joined #ruby-offtopic
[04:17:29] DarkBushido: has joined #ruby-offtopic
[06:10:33] workmad3: has joined #ruby-offtopic
[08:11:14] workmad3: has joined #ruby-offtopic
[09:02:07] Technodrome: has joined #ruby-offtopic
[09:17:55] mikecmpbll: has joined #ruby-offtopic
[09:48:27] scorpiosec_: has joined #ruby-offtopic
[10:51:29] nofxx: has joined #ruby-offtopic
[11:43:04] nofxx: has joined #ruby-offtopic
[12:12:27] workmad3: has joined #ruby-offtopic
[13:21:05] mikecmpbll: has joined #ruby-offtopic
[13:35:16] unreal: has joined #ruby-offtopic
[15:30:43] Technodrome: has joined #ruby-offtopic
[16:13:43] workmad3: has joined #ruby-offtopic
[17:02:47] apeiros_: has joined #ruby-offtopic
[17:56:32] Technodrome: has joined #ruby-offtopic
[18:14:13] workmad3: has joined #ruby-offtopic
[18:34:29] apeiros_: has joined #ruby-offtopic
[20:14:56] workmad3: has joined #ruby-offtopic
[20:31:55] apeiros: ACTION drafting the API for form inputs
[20:32:04] apeiros: how the hell can this shit have sooo friggin many properties
[20:56:27] elomatreb: Forms as in HTML forms? Have fun going down that rabbit hole
[21:03:42] apeiros: I've had to go down that rabbid hole too many times before with 3rd party form utilities and hated it. now I build my own.
[21:03:52] apeiros: and that D in rabbid was intentional :)
[21:05:01] apeiros: luckily I can shit on browser compat. that's what often ruins a lot of the fun. all the tiny little patches and workarounds for broken browsers (usually IE)
[22:25:05] haylon: I basically wrote a DSL that generates the HTML version of whatever missing methods I gave it.
[22:25:21] haylon: It's basically almost as painful
[22:27:12] al2o3-cr: haylon: nokogiri does this ;)
[22:27:44] haylon: I figured it would, but I also wanted to learn how to write a DSL
[22:27:46] al2o3-cr: just don't it'll be slow as shit.
[22:27:48] haylon: I didn't dig too hard into Nokogiri
[22:28:31] haylon: 'tis be simple https://github.com/predatorian3/ruby_html
[22:28:39] haylon: no tests either unfortunately.
[22:30:10] al2o3-cr: haylon: it's not recommended. seriously.
[22:30:50] al2o3-cr: sometimes my ideas are not the bright. :P
[22:30:59] haylon: again, it was a learning exercise in how to write a DSL
[22:31:48] al2o3-cr: haylon: ok :)
[22:37:01] al2o3-cr: haylon: decent code tho, well commented and such :) +1
[22:38:06] haylon: Thank you al2o3-cr ! I forced myself to learn the documentation bits early on so you know, when I forget, I know what I was doing/thinking.
[22:38:49] haylon: Golang docs were difficult for me to master with the package level documentation, function leve, and then testable examples.
[22:40:11] al2o3-cr: haylon: can be improved slightly tho :)
[22:40:29] haylon: Where at?
[22:40:55] al2o3-cr: args.detect{|arg| arg.is_a? Hash} || {}
[22:42:46] al2o3-cr: args.find(->({})) { |arg| Hash === arg }
[22:43:15] al2o3-cr: personal opinion
[22:43:38] al2o3-cr: or even arg.is_a? Hash is fine
[22:44:10] haylon: I've never seen the (->({})) thing before
[22:44:39] al2o3-cr: haylon: it's just a lambda
[22:44:48] al2o3-cr: i'll show you
[22:45:36] al2o3-cr: >> [1,2,3].find(->{"nay"}) { |n| n > 5 }
[22:45:37] ruby[bot]: al2o3-cr: # => "nay" (https://eval.in/884428)
[22:48:54] al2o3-cr: haylon: ->(){} is just stabby lambda syntax
[22:49:32] haylon: Got ya. I'll have to give it a whirl. I've wrote it down to try and mess with Lambdas.
[22:51:50] al2o3-cr: most people like .call i like to yield it makes more sense to me.
[22:55:56] al2o3-cr: >> ->{RUBY_VERSION}.yield
[22:55:57] ruby[bot]: al2o3-cr: # => "2.3.0" (https://eval.in/884431)
[22:56:42] al2o3-cr: that could be .[], .(), .===, .call (alias yield)
[23:04:17] al2o3-cr: haylon: which do you find better?
[23:05:21] al2o3-cr: >> {:foo=>1, :bar=>2}.values_at(*h.keys)
[23:05:23] ruby[bot]: al2o3-cr: # => undefined local variable or method `h' for main:Object (NameError) ...check link for more (https://eval.in/884432)
[23:06:04] al2o3-cr: >> h = {:foo=>1, :bar=>2}; h.values_at(*h.keys)
[23:06:05] ruby[bot]: al2o3-cr: # => [1, 2] (https://eval.in/884433)
[23:06:26] al2o3-cr: >> h = {:foo=>1, :bar=>2}; h.keys.map(&h)
[23:06:28] ruby[bot]: al2o3-cr: # => [1, 2] (https://eval.in/884434)
[23:12:33] haylon: The last one kind of makes more sense to me
[23:12:42] haylon: although, you're getting way more out of my league here
[23:14:09] al2o3-cr: haylon: you know how the yield (keyword) works?
[23:16:47] al2o3-cr: it yields an object to the block
[23:17:22] haylon: From what I understand, its to allow a function to hold off on executing the rest of its code, and do what's in the do...end block, whether that be execute other code, or assign variables.
[23:18:31] al2o3-cr: why did you do `instance_eval(&block)` on line 68?
[23:19:30] haylon: to see if there were any other methods that needed to be evaulated inside that tag
[23:19:50] haylon: basically allowing me to nest blocks
[23:21:15] al2o3-cr: haylon: ok.
[23:22:16] haylon: I know I'm not the best at this stuff, probably sound like a doofus
[23:22:27] al2o3-cr: not at all.
[23:23:06] haylon: However, thank you for taking the time to talk to me al2o3-cr , its been super educational!
[23:23:10] haylon: stuff to look into
[23:23:28] haylon: However, I need to go and get physically running. I'm a few miles behind.
[23:42:38] miah: has joined #ruby-offtopic
[23:57:00] DarkBushido: has joined #ruby-offtopic
[23:57:00] DarkBushido: has joined #ruby-offtopic