Page 1 of 11 | Next »
[01:12:29] Eiam: if you put it in a module, then its in the module. in a class then its in the class. in a block then its in the block
[01:13:16] Eiam: if this is just a single .rb trying to poke at some problem that doesn't seem 'bad'
[01:29:13] Eiam: uhmm. I personally prefer to write code that solves the problem I'm trying to solve then worry about how the style fits and what problems I had/didn't have with it, especially if its just a throw away script
[01:40:14] Eiam: bjpenn: it would go from 'nil' to 'false' which isn't quite the same thing. probably doesn't matter
[21:29:36] Eiam: these days I write most of my code INSIDE a halted pry session, then pop it back into the file
[00:07:53] Eiam: they'd have to wait for me to shower, sleep, build it all in my head, then write some horrible code that I deleted 10 times..
[22:16:08] Eiam: you can start a game of #idlerpg or pop over to Rails, Swift... all kinds of stuff if you look
[18:55:36] Eiam: if your date can't understand what you are saying http://www.rubyinside.com/advent2006/4-ruby-obfuscation.html , is it really a good date?
[22:37:29] Eiam: your first line makes it sound like that value is false, since line 3 shows false. if is_admin is false, the next call will be false && super(true) which can only return false
[22:38:49] Eiam: so then its false && super(true) as the return value on line 4, which we already established must be false because it says false in your output.
[22:45:12] Eiam: i mean do you have receive_direct_message_alerts and receive_direct_message_alerts=
[22:45:57] Eiam: because it looks like you are calling two different implementations and wondering why each has its own return value
[22:48:33] Eiam: okay... what I'm saying is you could be calling "methodA" and it gives you false. later you call "methodB" and it gives you true, then you again call "methodA" and it gives you false again, which is expected...
[22:49:36] Eiam: receive_direct_message_alerts and receive_direct_message_alerts= aren't the same method , they could be defined totally different
[21:42:53] Eiam: funny most of my workwork in ruby involves figuring out how to slice data into various views
[21:45:42] Eiam: ACTION writes a single line of Ruby to enumerate the pizza 15 times to pull the one pepperoni he wants from the whole pizza
[22:43:58] Eiam: it will literally show the implementation, not sure how much more direct how it works gets!
[21:49:17] Eiam: reminds me of all the people using ruby to parse version strings in macOS and getting that 10.10 was less than 10.9
[17:52:12] Eiam: there was a gem ages ago... it took ruby from one client, passed it over the wire, then ran it on another client
[18:01:18] Eiam: hah past me trying to document his gemfile # Strictly for development for sane debugging & stepping behavior
[19:50:13] Eiam: Zarthus: not disputing it as a random thing, but as an actual like ongoing action to just have all your code get reviewed here?
[19:58:48] Eiam: WA9ACE: when you go into an ios dev channel on slack its got 3000 people or more. good luck.
[19:59:17] Eiam: I know most the active people here and have seen and conversed with them off and on for years. hard to do that in slack groups that big
[01:31:56] Eiam: i guess you could try to re-define the ruby version of method slot your code in then pass it onto the original implementation
[01:45:01] Eiam: there are more creative minds than my own and certainly smarter ones. perhaps they will swing around and contribute at some point.
[01:45:40] Eiam: baweaver: re-implement your own 'method' cause f Ruby and their implementation. Thoughts? =)
[17:28:17] Eiam: I was recently playing around with using sentinel style values to indicate intent rather than nil/empty and one of the things I found cumbersome was when you use a value like :no_value instead of leaving it nil, that operations like .any? treat :no_value as true, but nil as false
[17:29:12] Eiam: because then you are having to check for ==true (if your options are true, false or :no_value)
[17:29:52] Eiam: is the safest path forward there to wrap those into a small struct to not expose the bool directly either?
[19:01:48] Eiam: you basically just forced :no_value to also become falsey which is basically more lines of code to "if value == true" else "now its falsey"
[19:16:13] Eiam: thats what im finding, but I really wanted to not rely on the absence of a value to mean something specific
[20:37:10] Eiam: havenwood: if I understand what hes said correctly its basically "Solving this is a language problem and none of them have great solutions here are some things I'm poking at or proposing"
[20:54:30] Eiam: nullable types doesn't address the fundamental disconnect between does null mean no value or does it mean never assigned?
[21:13:32] Eiam: Im importing data, I map that data to either I know this value is true, I know this value is false, or I dont know if this value is true or false
[21:33:58] Eiam: a false means "I know the answer, and its false" a true means "I know the answer, and its true" and :no_value means I don't know if this is true or false.
[23:12:02] Eiam: clever and original pattern for an enterprise API... I dunno something just doesn't feel right with that statement but I cannot quite put my finger on it
[23:12:49] Eiam: dachi_: implement it all via method_missing. Its not original at all, at least not in Ruby. I'd argue its cleverness
[23:17:09] Eiam: havenwood: feels like we talked ourselves into a circle of everyone agrees its not great and here we are
[20:54:55] Eiam: why not get array of object, get all data and do a single lookup, then filter that?
[20:55:42] Eiam: you are paying the price of an array of unknown size DB lookups one at a time but if you've already got the data..
[18:43:15] Eiam: okay, well im not sure why you decided on needing a nested for loop. can't recall the last time i wrote a for loop in ruby but just personal experience. Whats the actual issue you are trying to solve?
[17:23:30] Eiam: but you have to know they are called literals to find that too, otherwise 'ruby &:' is ehh
[20:52:07] Eiam: comet23: Modular programming has its place, I'm not sure Ruby has any specific spin on the concept of modular programming vs another langauge
[20:53:38] Eiam: part of what I enjoy about ruby is how little code I often write to accomplish tasks, thus I don't use a lot of modular practices in the type of ruby I write beyond more basic functional composition
[20:57:05] Eiam: SeepingN: I don't use nil to return meaning anymore, I protect my boundaries and declare clear intent
[21:42:04] Eiam: apeiros: its like how we have #swift-lang and apple won't put a stupid .txt file on the website to make it official, so we are unofficial =)
[22:41:34] Eiam: well keynote for sure is optimized to be displayable on giant 100 inch or whatever those thigns are