Activity Graph

Page 1 of 11 | Next »


[01:11:53] Eiam: Ping timeout: 268 seconds
[18:03:35] Eiam: has joined #ruby


[00:51:20] Eiam: has joined #ruby


[18:23:58] Eiam: Quit: Textual IRC Client: www.textualapp.com


[18:36:46] Eiam: https://github.com/nahi/logger/issues/3
[18:36:46] Eiam: lol what the hell
[18:38:47] Eiam: come back from holiday and super old shit fails to deploy now thanks bud


[16:29:05] Eiam: Ping timeout: 268 seconds


[22:35:24] Eiam: in console whats your staff.first.is_admin? value
[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:37:33] Eiam: Scriptonaut: ^
[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:39:36] Eiam: right so I don't get the bug
[22:39:40] Eiam: its working exactly as the code says
[22:40:17] Eiam: oh, something to do with how irb echos statements or something
[22:40:26] Eiam: i don't think thats the return value of your statement
[22:43:37] Eiam: whats the implementation of receive_direct_message_alerts
[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:46:04] Eiam: but I only see one implementation, receive_direct_message_alerts=
[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
[22:54:15] Eiam: it behaves the same on 2.3.7
[22:56:04] Eiam: if you split your assignment out into its own line
[22:56:07] Eiam: the behavior will change
[22:56:27] Eiam: i thought assignment in comparisons were frowned upon
[22:56:48] Eiam: on line 6 if you set @x = flag, then do false && @x you'll see it shifts
[22:58:57] Eiam: oh you are counting on the early exit to avoid the assignment
[22:59:46] Eiam: Scriptonaut: yeah, that is interesting
[22:59:51] Eiam: i don't know why you are seeing that behavior in console


[18:35:41] Eiam: has joined #ruby
[20:31:49] Eiam: happy new year rubyist
[20:32:01] Eiam: another year of helping people with their homework
[21:07:39] Eiam: and maybe professionals with their workwork =)
[21:42:53] Eiam: funny most of my workwork in ruby involves figuring out how to slice data into various views
[21:44:04] Eiam: thats kind of like pizza!
[21:44:28] Eiam: Ruby: The ultimate pizza cutter
[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:01:54] Eiam: was more a jab at people constantly enumerating large structures poorly =)
[22:03:12] Eiam: I just turn it all into hashes so lookup is super easy!
[22:36:00] Eiam: did you just encode a pizza
[22:36:22] Eiam: oh AND you got a .tap in there to abuse, look at you
[22:38:08] Eiam: hehe that was a thing when I was in high school
[22:39:16] Eiam: didn't Why used to do weird ruby code
[22:57:13] Eiam: your circle isn't one?


[17:24:04] Eiam: Ping timeout: 264 seconds


[22:42:03] Eiam: sagax: the docs http://ruby-doc.org/core-2.5.3/Kernel.html#method-i-60
[22:43:14] Eiam: isene: chruby and ruby-install?
[22:43:23] Eiam: sagax: "click to toggle source"
[22:43:26] Eiam: in the docs.
[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
[23:41:25] Eiam: havenwood: or just call the appkit API? =)


[00:34:40] Eiam: bah, w.e
[17:51:34] Eiam: or you could use XPC or IPC if this is macOS
[17:51:45] Eiam: which is bsaically what havenwood said
[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
[17:53:06] Eiam: it wasn't remote_ruby cause this was 7 years ago
[17:53:13] Eiam: well hell let me see if I have the repo still I can just look at the gemfile =o
[18:01:18] Eiam: gem "pry-remote"
[18:01:18] Eiam: gem "pry-byebug"
[18:01:18] Eiam: gem "pry"
[18:01:18] Eiam: hah past me trying to document his gemfile # Strictly for development for sane debugging & stepping behavior
[18:01:32] Eiam: havenwood: ahh yes it was DRB!!!
[18:01:51] Eiam: https://ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.html
[18:19:36] Eiam: Inside: just use chruby and run your unit tests?
[18:19:48] Eiam: if it looks good, deploy to QA and verify then off to production?
[19:48:57] Eiam: considering I pay people on my team to do code reviews
[19:49:12] Eiam: I'd find it mildly offensive to request free code reviews as an actual task =)
[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:50:39] Eiam: yeah, probably legal ones =)
[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
[20:00:03] Eiam: even ##javascript can get rough to follow, its 1111 people
[20:01:25] Eiam: whose that, Big OSS?


[00:32:52] Eiam: GraphQL?? he should machine learn hisAPI too
[01:16:45] Eiam: there is a project that hosts emails into usenet
[01:16:55] Eiam: which i suspect may involve a part of what you just said
[01:18:02] Eiam: NotSatoshi: https://github.com/mikel/mail ? this seems google-able
[01:24:44] Eiam: you probably dont' want to replace the ruby 'method' with your 'method'
[01:28:01] Eiam: ModusPwnens: and when you def method, what happens
[01:30:58] Eiam: yeah.. this is method https://ruby-doc.org/core-2.2.0/Method.html
[01:31:33] Eiam: thinking
[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:32:07] Eiam: feel like that would break a lot of stuff tho
[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? =)
[01:45:59] Eiam: "This is why we invented the monkey patch!"


[17:27:00] Eiam: has joined #ruby
[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:28:23] Eiam: which makes things get messy real fast
[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
[19:16:17] Eiam: the code is just.. awful
[19:16:29] Eiam: that may be a reflection on its author however
[19:17:15] Eiam: oh clojure con god
[19:17:29] Eiam: my old manager became a clojure nut, never shuts up about it now
[19:19:42] Eiam: watching
[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:46:47] Eiam: yes, I agree with that sentiment
[20:46:54] Eiam: how do I get it in Ruby? =)
[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:14] Eiam: well, I don't allow nils, so an empty state is set to :no_value
[21:33:26] Eiam: its just handling that no_value is fairly annoying in Ruby itself
[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
[23:20:57] Eiam: i feel like only one of those people were actually helpful
[23:21:40] Eiam: and roda is like sinatra! how is that promoting any clever or original pattern!


[19:29:26] Eiam: Ping timeout: 260 seconds


[20:02:40] Eiam: JjOtt: means what it says on the tin, you over released something
[20:02:44] Eiam: oh they left
[20:48:05] Eiam: hmm select and break?
[20:48:22] Eiam: oh that'll give you the object not its value
[20:48:59] Eiam: oh, just use reduce and break?
[20:49:28] Eiam: set your memo to the value you want 'returned'
[20:49:30] Eiam: and break out
[20:52:05] Eiam: reduce imo
[20:52:13] Eiam: given your constraints defined
[20:53:51] Eiam: why is the map touching the DB at that point?
[20:53:58] Eiam: do the DB lookup and then work with local data
[20:54:06] Eiam: those transforms shouldn't incur db hits..
[20:54:25] Eiam: depends on your ORM or whatever though too I suppose
[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..
[20:55:56] Eiam: well that sucks =)
[20:56:01] Eiam: get a better DB? =)
[20:56:23] Eiam: (i realize its probably not your endpoint and beyond your control)


[19:00:42] Eiam: has joined #ruby


[20:51:47] Eiam: Ping timeout: 268 seconds


[23:46:28] Eiam: just watched!


[17:41:10] Eiam: has joined #ruby


[17:30:29] Eiam: has joined #ruby
[23:11:05] Eiam: Read error: Connection reset by peer


[19:56:30] Eiam: Ping timeout: 250 seconds


[18:39:33] Eiam: if you are building vagrant files shouldn't that be in #vagrant ?
[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:20:09] Eiam: Ping timeout: 252 seconds
[18:19:36] Eiam: has joined #ruby


[21:04:45] Eiam: ACTION looks up what the heck sample does
[21:31:30] Eiam: lol thats just cruel
[21:31:46] Eiam: 'here is this non destructive thing, lets make it destructive!'


[17:22:57] Eiam: i google 'ruby literals' and just search for it on one of the pages
[17:23:30] Eiam: but you have to know they are called literals to find that too, otherwise 'ruby &:' is ehh
[17:32:49] Eiam: general purpose tools
[17:33:04] Eiam: vs a specialized tool
[21:45:52] Eiam: 2.3.7 i see the same as phaul


[17:35:35] Eiam: has joined #ruby


[00:20:00] Eiam: Ping timeout: 250 seconds


[20:31:05] Eiam: Read error: Connection reset by peer
[20:33:23] Eiam: has joined #ruby


[20:32:28] Eiam: has joined #ruby
[20:40:48] Eiam: comet23: sure
[20:41:07] Eiam: read the topic? https://ruby-community.com/pages/user_rules
[20:41:31] Eiam: I'm sure some people may take umbrage with the word 'official'
[20:42:30] Eiam: okay. did you have a question about ruby?
[20:49:42] Eiam: why do I feel like this is going to end with me asking for adult supervision
[20:50:33] Eiam: alright because I've got 10 min till my next meeting, lets do it
[20:51:08] Eiam: https://en.wikipedia.org/wiki/Modular_programming
[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:54:20] Eiam: this is drifting into a meta conversation too
[20:54:52] Eiam: Confident Ruby is another good book imo for writing clean, clear code in Ruby
[20:55:05] Eiam: it really changed the way I thought about my own code
[20:55:37] Eiam: SeepingN: you don't like confident ruby? =)
[20:56:28] Eiam: its good. my team enjoyed it, but maybe they said that cause i sign the checks
[20:57:05] Eiam: SeepingN: I don't use nil to return meaning anymore, I protect my boundaries and declare clear intent
[21:41:37] Eiam: apeiros: well then! so lawyered =)
[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 =)
[21:42:45] Eiam: Inside: i only have the ebook form of it.
[22:26:36] Eiam: Inside: its a couple dollars, really need to expense it? =o
[22:35:49] Eiam: self publishing probably easier and faster
[22:35:56] Eiam: (and cheaper...)
[22:41:34] Eiam: well keynote for sure is optimized to be displayable on giant 100 inch or whatever those thigns are
[22:41:36] Eiam: 100 foot? =)
[22:42:24] Eiam: baweaver: some weird functional programming shim into ruby ?
[22:42:30] Eiam: baweaver: Raskell?


[16:50:42] Eiam: Inside: instead of being sad, be glad that ruby still has neat things to discover and explore after two years =) I love finding out about new stuff in ruby, even if its just 'new to me' and been around since 1.9 or whatever.
[16:51:26] Eiam: true mastery eludes us, the teachers are also the students.


[17:55:20] Eiam: Quit: Textual IRC Client: www.textualapp.com
[18:13:57] Eiam: has joined #ruby


[22:21:27] Eiam: Remote host closed the connection
[23:29:45] Eiam: has joined #ruby


[16:15:15] Eiam: has joined #ruby


[11:29:10] Eiam: Read error: Connection reset by peer


[16:30:23] Eiam: Ping timeout: 276 seconds
[17:58:36] Eiam: has joined #ruby


[16:50:08] Eiam: ACTION hands baweaver a beer so they can settle in


[17:17:16] Eiam: has joined #ruby


[17:15:36] Eiam: Ping timeout: 252 seconds


[15:58:07] Eiam: edwardthefma: hello


[16:30:53] Eiam: havenwood: wouldn't *input work too?
[16:30:57] Eiam: why the double splat
[16:31:08] Eiam: (single splat worked in a quick test here)
[16:32:26] Eiam: double splat doesn't work, says the method expected 0 arguments
[16:49:45] Eiam: cthu|: the fun thing about software is bugs are more common than we'd like to admit


[07:19:30] Eiam: *.net *.split
[07:32:46] Eiam: has joined #ruby
[08:13:56] Eiam: *.net *.split
[08:27:17] Eiam: has joined #ruby
[08:51:30] Eiam: *.net *.split
[09:05:09] Eiam: has joined #ruby
[20:51:44] Eiam: zenspider: OpenStruct?
[20:53:42] Eiam: rubyist generally love magic tho
[20:53:52] Eiam: ACTION tosses out rainbows
[22:54:57] Eiam: perfs not a problem until its a problem!


[04:29:26] Eiam: Ping timeout: 260 seconds


[15:25:53] Eiam: has joined #ruby
[17:39:07] Eiam: Quit: Textual IRC Client: www.textualapp.com
[21:25:00] Eiam: has joined #ruby


[18:31:18] Eiam: Ping timeout: 272 seconds


[15:55:19] Eiam: dump the content prior to dupe, call dupe on it, look at it after
[15:55:35] Eiam: if it doesn't reproduce without rails layered on top, its probably Rails and not Ruby
[15:56:12] Eiam: as I recall dupe is shallow by default
[16:18:11] Eiam: you could check out jruby
[16:19:41] Eiam: you can't "disable" the GIL and I'm not sure you'd just want to anyway. Even if your threads were actually put on n distinct cores, I question that you'd get a reliable result
[16:20:31] Eiam: jruby does not have a GIL and will let you spin up n distinct actual threads in parallel.
[16:20:45] Eiam: havenwood: okay sure its code "anything" is possible
[16:21:23] Eiam: I could fly for a few seconds too, or some might say, fall with grace
[17:13:07] Eiam: with Rails, one never knows whats actually Ruby anymore at all


[18:42:32] Eiam: just have ruby do the file.open etc...
[18:43:06] Eiam: http://flori.github.io/file-tail/ too =p
[18:44:34] Eiam: ah, sorry
[18:44:40] Eiam: beat me to it =) got distracted with othe rwork
[18:45:51] Eiam: right but by using tail, grep, sed, awk and ruby, you vastly increase the amount of things I need to know to figure out what you've done and how to fix/update it
[18:46:24] Eiam: not to mention every one of those has its own version that could all be updated independently
[18:46:41] Eiam: its the philosophical "I"
[18:46:48] Eiam: its the you in 2 years, its the co-worker next month
[18:47:12] Eiam: famous last words