baweaver

Activity Graph

« Prev | Page 2 of 257 | Next »

2019-02-05

[06:29:07] baweaver: sevenseacat: Seen the new GMK set yet?
[06:29:19] baweaver: https://preview.redd.it/c2csngz8yee21.png?width=960&crop=smart&auto=webp&s=746dd28375b64ba88b798585bbfd638db68f0367
[06:29:24] baweaver: https://www.reddit.com/r/MechanicalKeyboards/comments/amtniv/ic_gmk_metropolis_update_232019_deskmat_sample/
[18:13:10] baweaver: Unless you're in the context of bit-shifting, no.
[18:13:22] baweaver: ohai scrptktty
[18:14:00] baweaver: Typically I'd advise writing things as clearly as possible
[18:14:15] baweaver: Even if that means writing something a bit longer or more verbosely
[18:14:35] baweaver: Mostly because I hate reading my own "clever" code later and trying to figure out what it is and why I did it that way.
[18:18:17] baweaver: MrCrackPotBuilde / loincloth: cool it.
[18:18:39] baweaver: havenwood: wat?
[18:20:47] baweaver: If they show back up I'll mention that their behavior was inappropriate.
[18:21:46] baweaver: Context is a heck of a drug
[18:22:09] baweaver: Eh, happens.
[18:25:56] baweaver: Happy new years to you as well.
[18:26:26] baweaver: Amusingly I ended up deep into Lisp land
[18:26:50] baweaver: Diffing s-expressions
[18:27:46] baweaver: Going to see if it's possible to write something like this and have it work: converter(from: '[].map { |v| v.even? }', to: '[].map(&:even?)')
[18:28:13] baweaver: I have most of the foundational pieces already, it's just generalizing the algorithm enough that it can intelligently do the conversions.
[18:28:52] baweaver: Most of it would be being able to tell that undiff'd code branches are effectively wildcards
[18:29:56] baweaver: '[].map { |v| v.even? }' -> '_._ { |v| v._ }' -> '_._(&:_)' -> '[].map(&:even?)'
[18:30:19] baweaver: Where underscores are wildcards that would try and map from one to another
[18:31:46] baweaver: Here's the problem
[18:31:48] baweaver: First (input) s-exp: (block (send (array) :map) (args (procarg0 :v)) (send (lvar :v) :even?))
[18:32:15] baweaver: Second (output) s-exp: (send (array) :map (block-pass (sym :even?)))
[18:32:34] baweaver: Drops the outer block among other transformations
[18:33:06] baweaver: https://www.rubydoc.info/gems/rubocop/RuboCop/NodePattern
[18:33:14] baweaver: NodePattern in RuboCOp is about the same
[18:33:20] baweaver: gotta go, train arriving, cheers

2019-02-04

[05:25:17] baweaver: Anyone seen this before - https://twitter.com/keystonelemur/status/1092292851403128832
[05:25:29] baweaver: havenwood: Pry tried to munch my SSD XD
[05:26:22] baweaver: pry swp and Gemfile swp files
[17:28:02] baweaver: havenwood / mkroman :http://dpaste.com/3YCVHHZ
[17:29:11] baweaver: http://dpaste.com/1BJMQ4D
[17:29:18] baweaver: 2nd one for Hash.
[17:29:44] baweaver: So ~1.8x String and ~5.7x Hash as far as slower.
[17:30:05] baweaver: Probably because Hash can take arguments or a block or a few other things.
[19:32:08] baweaver: phaul: Either might work better.

2019-02-02

[20:40:45] baweaver: New stream just finished - Exploring ASTs - https://www.twitch.tv/videos/374107796

2019-02-01

[21:48:36] baweaver: Though only on Symbol keys
[21:48:36] baweaver: hashes.select(&Qo[a: 1..10])
[21:51:47] baweaver: Still needs work, but don't have to screw with that anymore for NodePatterns.
[21:51:47] baweaver: Wooo AST Builder - https://gist.github.com/baweaver/0b5bb54fc81eb3d18f4a2c7c60666e86
[21:52:29] baweaver: havenwood: Wait, since when does it do that?
[21:55:06] baweaver: Wait wait wait
[21:55:27] baweaver: ACTION needs to write up on this
[21:55:27] baweaver: When and where?
[21:56:16] baweaver: &>> {a: 1} === {a:1, b: 2, c:3}
[21:56:32] baweaver: Because I remember Matz rejected Hash#=== and Array#=== earlier
[21:59:49] baweaver: ok, so it's a literal
[22:00:17] baweaver: That makes more sense
[22:00:32] baweaver: If they introduced intersection matching and I managed to miss that XD

2019-01-31

[00:14:00] baweaver: istrasci: Because one should keep the same DB type in each stage.
[00:15:13] baweaver: Things that work locally on sqlite3 may not work in prod/staging, breaking parity of environments and exposing a potential for bugs.
[00:16:01] baweaver: _Especially_ if feature parity comes into play enough to make multiple schemas come up as a solution idea.
[06:41:30] baweaver: Going to be experimenting with S-Expressions and ASTs with some code modification thrown in this weekend: https://www.twitch.tv/events/xRFGM18bTUy2jBOIro5YZg
[19:44:35] baweaver: ACTION will never beat havenwood to updating a Ruby version

2019-01-30

[00:01:48] baweaver: For a small application it probably won't kill you.
[00:02:02] baweaver: For a larger one, a Hash is going to be a nightmare down the road
[00:02:39] baweaver: Primarily around documentation, interface contracts, deprecations, and other such things. A class would be used when you need structure, and structure that you can communicate
[00:03:35] baweaver: Sure, one can use `keys` on a hash, but how do you know what the intent of each of those keys is? If it's just a few, it's probably not a big deal, but as it grows it's easy to lose track of them.
[00:04:13] baweaver: Though it's a notably good idea to question standard practice once in a while, as some things are just cargo culted from days and languages long past
[00:04:43] baweaver: Visceral reactions to questions should force an amount of introspection as to _why_ we make certain decisions
[00:06:16] baweaver: A few other fun topics which start that type of fire real quick: goto, global variables, shorthand globals, english operators, etc etc
[00:06:44] baweaver: That said, it'd be impolite to drop those types of grenades without yourself doing some sort of pre-reading on the topic
[00:07:14] baweaver: Even moreso to assume that the lack of response or improper level of it confirms that they're not a big deal
[00:07:51] baweaver: ACTION wrote a small blog post again
[00:39:40] baweaver: phaul: Wasn't meant as an indictment
[00:39:41] baweaver: Just as an "It's ok to ask questions"
[00:40:00] baweaver: I wouldn't characterize any responses here as visceral by any measure
[00:40:10] baweaver: But I have certainly seen them in the past.
[17:43:38] baweaver: havenwood: Who do we know that works on Rubocop?
[17:44:08] baweaver: Looking to get rewriter promoted to more of a first-class gem

2019-01-29

[06:39:45] baweaver: I found fun - https://github.com/jonatas/fast
[06:39:49] baweaver: Now I'm cleaning up fun
[20:49:20] baweaver: Good good, made some progress on s-expressions and code transformations.
[20:49:43] baweaver: Rubocop has an entire regex-style syntax language for it
[20:50:28] baweaver: Ultimate goal is to get a clean upgrade of Rails automated
[20:51:13] baweaver: I think it's possible, just hard.
[20:55:13] baweaver: Recently no, but my next stream is on basically this exact subject.
[20:56:16] baweaver: Speaking of, I need to get that event made later.
[21:05:33] baweaver: Technically all of them
[21:05:46] baweaver: ciphers are language agnostic
[21:41:49] baweaver: ohai Radar. How's things?
[23:52:25] baweaver: ACTION reads backlog
[23:53:24] baweaver: The reason I'd avoid using a Hash directly is that you can't control what consumers have access to galaxie. In general you want to give the least amount of power and control possible to consumers of code.
[23:53:50] baweaver: As to _why_ you want to do that, if you ever have to refactor it's a mess to clean up a loose interface that's propagated for a few years.
[23:54:43] baweaver: It also lets you define methods and your own API on top of it for accessing things, rather than just a KV store. Your downstream code should not know how to connect to a database, that's none of its business.
[23:55:16] baweaver: It should only know that if it sends these values to this other class it has a way to update the database.
[23:55:17] baweaver: Otherwise you end up with your database configuration plastered everywhere in your code.
[23:55:30] baweaver: Every place you perform a db connection using something like that is a consumer
[23:55:40] baweaver: A consumer of a class is something that uses it
[23:56:12] baweaver: What if the connection fails?
[23:56:29] baweaver: How does the client retry? How does it handle load balancing?
[23:56:46] baweaver: By wrapping that in a class you have more control over these things than just passing a value.
[23:57:14] baweaver: Granted you don't always need that level of granularity
[23:57:28] baweaver: Typically I use classes to define the API I want any code that calls it to see. Giving too much information means implementation details leak

2019-01-28

[08:45:04] baweaver: http://ruby-doc.org/core-2.6/IO.html#method-i-seek
[22:08:36] baweaver: Got my first 2019 conference acceptance :D
[22:09:12] baweaver: The lemurs are on the move

2019-01-27

[00:47:59] baweaver: Radar: made something fun: https://github.com/baweaver/trace_spy
[10:48:03] baweaver: phaul: https://www.reddit.com/r/ruby/comments/ak6128/gemalpha_tracespy_tracepoint_with_pattern_matching/ef33rz5/ - Too much on the clap back?
[10:48:18] baweaver: I dislike ivory tower "it must be prod ready!" types.

2019-01-26

[19:00:22] baweaver: https://www.twitch.tv/baweaver
[19:00:22] baweaver: Here we go! Time to play with TracePoint. The only rule? I go in blind and have to figure the rest of it out on stream
[19:05:42] baweaver: https://ruby-doc.org/core-2.6/TracePoint.html
[22:50:29] baweaver: I made fun: https://github.com/baweaver/trace_spy
[22:53:42] baweaver: Ah, right, food. I should get some.
[22:55:42] baweaver: You should check that out, it's fun
[22:56:14] baweaver: Hrm, I should make the method name compare on ===
[22:56:30] baweaver: Still new to the gig :D
[22:56:52] baweaver: Anything I should watch out for next time?
[22:57:42] baweaver: Hrm, I should probably tweak with the mic more.
[22:58:33] baweaver: Interesting. I'll have to test a few things then
[22:58:40] baweaver: Sounds sync is hard
[23:00:36] baweaver: Next up will probably either be more tracepoint or going into s-expressions
[23:01:42] baweaver: I was improving the entire time and screwing around

2019-01-25

[17:51:58] baweaver: `File.exist?`
[23:23:42] baweaver: Going over TracePoint tomorrow on stream - https://www.twitch.tv/events/l_h6rI0NTJC1QdVeigfdsQ
[23:55:42] baweaver: Eh, sometimes when I remember

2019-01-24

[20:38:57] baweaver: Anyone had a case where they needed xor for non-booleans in Ruby?: https://bugs.ruby-lang.org/issues/15559
[22:14:03] baweaver: What's the actual code in question?
[22:14:07] baweaver: Splat, normally.
[22:14:20] baweaver: def one_or_many(*items) ... end
[22:16:59] baweaver: What's the usecase?
[22:17:35] baweaver: because more than likely it would be an `is_a?` call
[22:18:09] baweaver: Though admittedly I find it kind of an anti-pattern to do so.
[22:19:12] baweaver: Could you make it into multiple methods?
[22:20:03] baweaver: Have a code sample?
[22:20:14] baweaver: Depending on what it is there may be a way around it
[22:25:04] baweaver: Yeah, I'd break it into `add_block` and `add_blocks` personally
[22:25:10] baweaver: too much conflating of logic otherwise.
[22:25:26] baweaver: add_block can have the code
[22:25:33] baweaver: add_blocks can just call add_block for each element
[22:27:22] baweaver: DoctorMonocular: https://gist.github.com/PeteMichaud/d4d478618a7b332b7933a4e96eafddc8#gistcomment-2819362
[22:27:24] baweaver: pretty much that
[23:57:31] baweaver: Ducky and Leopold tend to be pretty solid staples

2019-01-23

[05:59:14] baweaver: sevenseacat: Guess what I'm putting together :D
[06:19:38] baweaver: https://twitter.com/keystonelemur/status/1087934826240491523
[06:20:02] baweaver: Was the keyboard
[06:20:03] baweaver: Took a while
[06:20:04] baweaver: Probably spring swapping to some heavier sprints later though
[06:20:05] baweaver: Got too used to nice and heavy ones
[06:20:07] baweaver: Box reds and reds in general are completely intolerable now :P
[06:27:42] baweaver: sevenseacat: https://i.etsystatic.com/18345560/r/il/a5bb81/1671514549/il_fullxfull.1671514549_sgyc.jpg - You think that desk mat would go well with it?
[06:29:27] baweaver: Fair fair. Finding a decent desk mat is danged hard.
[06:29:34] baweaver: Might have to just design one later.
[06:29:47] baweaver: Make a phantom themed lemur
[06:30:31] baweaver: Probably with a costume vaguely inspired by this - https://list.wiki/images/d/d8/Phantom_-_MapleStory_Blitz.png
[06:30:40] baweaver: Add in some Magic Kaito and Lupin the 3rd for good measure.
[06:31:33] baweaver: Could just get the Serika desk mat which is fairly close
[06:32:31] baweaver: Though Kaito and Phantom are literally Lupin riffs
[06:32:54] baweaver: and Lupin the 3rd being a riff off of Arsene Lupin
[06:49:54] baweaver: Anyways, grabbed a Seirika pad, looks pretty good
[18:26:04] baweaver: noob69: Can you not include the user name in the response?
[18:26:16] baweaver: Typically you want to keep response key names the same as the actual data when possible
[18:26:25] baweaver: otherwise you get all types of headaches later mitigating for it
[18:27:16] baweaver: Define requires
[18:27:36] baweaver: and how are you currently rendering JSON
[18:29:52] baweaver: Firstly, don't
[18:29:59] baweaver: Just get the name instead.
[18:30:20] baweaver: How are you serializing the json?
[18:30:21] baweaver: jbuilder or something else?
[18:30:50] baweaver: {user_id: 1, book: "abc murder" reviews: [{user_id: 2, user_name: "Bob" text: "sucks!"}]}
[18:31:06] baweaver: You probably want the ID too, come to think of it
[18:31:19] baweaver: otherwise linking to aforementioned user is a bit difficult.
[18:31:59] baweaver: Keep parity between DB fields and JSON responses whenever possible
[18:32:09] baweaver: Down the other path lies great pain
[19:26:21] baweaver: Twitter mostly.
[19:26:38] baweaver: Ruby Weekly and Awesome Ruby tend to curate things
[19:26:46] baweaver: and Reddit is where a lot of people mention things
[19:26:58] baweaver: https://twitter.com/rubygems
[19:27:06] baweaver: There it is. Every new gem and version goes up there
[19:27:44] baweaver: rubygems on Twitter is the fire hose
[19:55:32] baweaver: Work keyboard is ready to roll: https://twitter.com/keystonelemur/status/1087934826240491523

2019-01-22

[22:42:59] baweaver: skywalker: Explain what it does, and what problem you're trying to solve?
[22:44:07] baweaver: This is a fun thing: https://twitter.com/keystonelemur/status/1087318453017407491
[22:44:46] baweaver: &>> ['|', *('a'..'z')].values_at(1, 0, 1..3, 0, 20..22, 0, 5..8)
[22:44:59] baweaver: Ack, thought I made the future part clear :/
[22:46:27] baweaver: Sorry about that phaul. It's on the 26th.
[22:46:48] baweaver: I'm going to do something either really fun or incredibly stupid with it though
[22:47:04] baweaver: Freeform content, I'm not allowed to study TracePoint before I do it.
[22:47:28] baweaver: So you all get to see me tinkering
[22:48:03] baweaver: Priv escalation is nasty stuff
[22:48:11] baweaver: Huh, didn't notice that comment.
[22:48:14] baweaver: Silly thing

2019-01-20

[00:25:48] baweaver: __FILE__ typically, what are you wanting to use it for?
[00:26:43] baweaver: ohai lupine
[00:26:45] baweaver: How's things?
[03:38:07] baweaver: Trying to post more guitar practice to keep myself honest: https://youtu.be/IhE7Iu0PxCA

2019-01-19

2019-01-18

[06:16:16] baweaver: Ping timeout: 264 seconds
[06:17:07] baweaver: has joined #RubyonRails-offtopic
[06:17:08] baweaver: has joined #logga
[17:50:10] baweaver: has joined #RubyonRails-offtopic
[17:50:10] baweaver: has joined #logga
[17:50:10] baweaver: Changing host
[17:50:20] baweaver: has joined #ruby
[17:50:22] baweaver: has joined #ruby-offtopic
[17:50:50] baweaver: has joined #RubyOnRails
[18:48:32] baweaver: ACTION is a really bad Ruby interpreter
[22:37:43] baweaver: I made a thing because fun and because I'm a sucker for cute animals: https://twitter.com/noopkat/status/1086311131914788864

2019-01-17

[07:07:34] baweaver: sevenseacat: I think that's my favorite keyset by a longshot so far
[07:08:04] baweaver: The purple is much darker than some of the pictures, but that makes it even better
[07:09:42] baweaver: Yeah, that's a nice one
[07:10:34] baweaver: If this set ever comes up it'd be an insta-but for me: https://www.massdrop.com/talk/9665/gmk-nautilus-nightmares
[07:11:04] baweaver: recap sells out in 102m
[07:11:44] baweaver: Interesting. I kinda like the more subdued Nautilus version, but that's still pretty great.
[07:12:33] baweaver: There's always that person, isn't there...
[20:51:18] baweaver: twopoint71: https://medium.com/@baweaver/abusing-hash-constructors-65d59c0a5b27

2019-01-16

[01:45:32] baweaver: https://bugs.ruby-lang.org/issues/15541
[01:45:57] baweaver: JSON.parse(data, symbolize_names: true) -> JSON.parse(data, symbolize_keys: true)
[01:46:20] baweaver: havenwood: Kinda want this thing to go away
[04:48:51] baweaver: Ah, other window
[07:28:32] baweaver: Have an example?
[07:28:57] baweaver: Ideally you don't do that. Also that's quite a mouthful to say out loud
[07:29:53] baweaver: That'd work.
[19:35:15] baweaver: Canada perhaps
[19:35:34] baweaver: Kansas of all places actually just restored a lot of rights and protections with the new Governor.
[19:36:01] baweaver: https://www.kwch.com/content/news/Kansas-governor-renews-expands-ban-on-state-anti-LGBT-bias-504376711.html
[19:36:16] baweaver: Glad that Kobach lost hard, he's a piece of work.

2019-01-15

[09:19:11] baweaver: Phantom - https://geekhack.org/index.php?action=dlattach;topic=95418.0;attach=194898;image
[09:19:30] baweaver: Radar: I just witnessed a miracle
[09:19:42] baweaver: A Rubyist that's become a multi-thread programmer!
[09:20:24] baweaver: Wait wait, need to tweet this as a joke pun / question, one sec.
[09:20:54] baweaver: https://twitter.com/keystonelemur/status/1085104485892935680
[09:20:57] baweaver: I regret nothing
[09:21:32] baweaver: Did you see my really bad one from earlier?
[09:21:46] baweaver: We have these things called Lime Scooters running around SF, pay to ride
[09:21:51] baweaver: So I came up with this gem: https://twitter.com/keystonelemur/status/1083780399740858368
[09:22:34] baweaver: I swear if that one actually works I've found the one :D
[20:47:56] baweaver: al2o3-cr / leah2: Just pinged him, said he's fine, just taking a break.
[20:47:57] baweaver: Should be back in February
[20:49:09] baweaver: We'll work on that
[20:49:17] baweaver: havenwood: want to fix that?
[20:51:10] baweaver: So for everyone who wants him over here, make sure to vote if you're in the US
[20:51:31] baweaver: and preferably not for a certain person, as then I'd doubt he'd want to be here for another 4 years after.
[20:52:03] baweaver: To be fair I kinda don't want to be in the US with them either.
[20:52:11] baweaver: So fair enough apeiros, fair enough.