baweaver

Activity Graph

Page 1 of 259 | Next »

2019-07-13

[06:47:55] baweaver: Going to do a quick test drawing over on twitch.tv/baweaver to test the setup before tomorrow's marathon. Starting in a minute.

2019-07-12

[17:59:45] baweaver: havenwood / retromode: why not just use slices?
[18:00:10] baweaver: list[0..(index + 1)].each_with_index ...
[18:06:17] baweaver: or first, or several other bits
[18:06:37] baweaver: Ah, also havenwood, TIL: [1,2].first(1)
[18:06:39] baweaver: &>> [1,2].first(1)
[18:17:24] baweaver: matthewd: So any idea when Rails 6 hits officially?

2019-07-11

[17:56:38] baweaver: Four straight hours of lemur art. Will likely release time-lapses later.
[17:56:38] baweaver: https://twitter.com/keystonelemur/status/1149157711788957696
[17:56:38] baweaver: Going to be livestreaming the process of creating a lemur talk:

2019-07-10

[02:09:47] baweaver: s the error say?
[02:10:00] baweaver: alias is a reserved word
[02:10:11] baweaver: Also that regex will be literally alias
[02:10:20] baweaver: You can also make that a lot faster
[02:10:44] baweaver: aliases = Regexp.union([array, of, regexes])
[02:10:57] baweaver: ines=IO.readlines(dbfile).grep(aliases)
[02:11:34] baweaver: If you did a union on it
[02:11:34] baweaver: grep works with === so it can use regex
[02:11:39] baweaver: Regexp.union(array)
[02:12:01] baweaver: &>> Regexp.union([/a/, /b/, /c/])
[02:12:15] baweaver: &>> Regexp.union([/a/, /b/, /c/]).match 'a'
[04:22:07] baweaver: polysics: how so?
[04:23:36] baweaver: Hashes, possibly
[04:25:09] baweaver: So you need an arbitrarily deep structure of events?
[04:25:50] baweaver: Just make a module that wraps a set of constants
[04:27:01] baweaver: class Something; module GroupA; CONSTS
[04:27:33] baweaver: Hash keys could be anything

2019-06-29

[17:18:05] baweaver: ACTION wanders in
[17:21:52] baweaver: ACTION is on vacation
[20:13:54] baweaver: chalkmonster: Have you seen the RailsConf one yet?
[20:14:02] baweaver: That one is an equal measure of chaos
[20:14:22] baweaver: The same talk was given at RubyConf (as rubyHack) so not much point in doubling back to that one
[20:15:46] baweaver: https://www.youtube.com/watch?v=tmJlos2CST4

2019-06-14

[01:51:46] baweaver: https://twitter.com/keystonelemur/status/1139348584493531141
[01:51:46] baweaver: My thoughts on the new pipeline operator:

2019-06-12

[03:28:32] baweaver: sevenseacat - guess what I got?
[03:28:50] baweaver: https://twitter.com/keystonelemur/status/1138620058043686912
[03:33:37] baweaver: Managed to find it on MechMarket for a pretty good price.
[03:33:57] baweaver: Decided to give it a whirl since it was made on an ALPS64 instead of needing a whole ton of conversion kits
[03:34:23] baweaver: 170 with the AEKII caps
[03:34:24] baweaver: Kinda feels like a steal TBH
[03:34:41] baweaver: But so far the board looks to be in good shape except for one key needing a spring swap that they'd mentioned in the trade
[03:34:53] baweaver: But it still types, just the 3 is a bit stiffer.
[03:43:22] baweaver: sevenseacat: Don't suppose you know about layer switching on a TMK firmware?
[03:44:00] baweaver: Debating if I want to remap it with QMK and just hose the right alt for it

2019-06-11

[07:12:29] baweaver: mcspud: Y'know Ruby has pattern matching right?
[07:12:51] baweaver: syndikate: If you share some of the code we'd be a lot more able to tell you if a better solution exists.
[07:14:46] baweaver: Now who wrote that article?
[07:15:14] baweaver: Right-hand at least
[07:15:41] baweaver: That was a nice wig
[07:15:43] baweaver: I like that wig
[07:15:52] baweaver: I go by either keystonelemur or baweaver
[07:16:03] baweaver: baweaver being short for BA Weaver
[07:16:29] baweaver: mostly because that sounds fancier and more professional
[07:16:30] baweaver: syndikate: Have you seen the video before that one?
[07:16:33] baweaver: Reducing Enumerable
[07:16:36] baweaver: Quite a fun talk
[07:16:40] baweaver: Took forever to make though
[07:17:00] baweaver: Also have another talk accepted to Southeast Ruby to basically go through as much black magic as I can fit in 40m
[07:17:11] baweaver: Eh, ti happens
[07:17:26] baweaver: https://southeastruby.com/
[07:17:33] baweaver: Tales from the Ruby Grimoire
[07:17:50] baweaver: https://twitter.com/keystonelemur/status/1137483374988128256
[07:18:00] baweaver: Characters are about ready for it
[07:18:35] baweaver: It even has a quick intro chapter to it: https://gist.github.com/baweaver/1ae6761dbc121a860597acdf053433f8
[07:18:59] baweaver: Ah, what was your name on there?
[07:19:06] baweaver: I can never remember who I follow or don't
[07:19:29] baweaver: Would you believe me if I said I have 10 years of talks queued up already?
[07:20:02] baweaver: ryez inline rescue requires parens around it
[07:20:57] baweaver: Though I'd probably use the 2.6+ exception clause instead
[07:21:18] baweaver: Integer("x", exception: false)
[07:21:26] baweaver: Integer("x", exception: false) || default_value
[07:21:41] baweaver: Na, that one gets parsed as being parens for puts
[07:21:47] baweaver: Ruby parser is a bit touchy
[07:22:05] baweaver: dminuoso: YOU"RE ALIVE!
[07:22:29] baweaver: Welcome back from Haskell land
[07:22:30] baweaver: We made more syntax to make you mad :D
[07:22:50] baweaver: Did you know Ruby just added Algebraic Data Types too dminuoso?
[07:23:43] baweaver: dminuoso: Na, just screwing with ya. Got your hopes up though, no? How many pages of Google did you just get through?
[07:24:36] baweaver: I limit it to 2-3 talks a year
[07:24:46] baweaver: and I have about 32 talk ideas drafted
[07:25:15] baweaver: If I really really want to go to a conference I submit 5-10 of them at once
[07:25:37] baweaver: Then whichever talk gets accepted I tend to submit to every other conference
[07:26:04] baweaver: Whereabouts?
[07:26:45] baweaver: Feel free to whack me on Twitter any time in DMs if I don't answer on here
[07:27:19] baweaver: I tend to check all of them in any case
[07:27:43] baweaver: Some exceptionally rarely, but Twitter isn't one of them
[07:29:46] baweaver: dminuoso: You see anything on Steep and Sorbet yet?
[07:29:51] baweaver: Ruby 3.x has static types.
[07:30:02] baweaver: As far as how exactly those get implemented, we'll see
[07:30:29] baweaver: I rather doubt HM though
[07:30:35] baweaver: Honestly I don't entirely understand that post
[07:30:50] baweaver: tried to transcribe what all I saw when reading it.
[07:31:24] baweaver: It definitely needs some cleanup
[07:32:58] baweaver: Algebraic Data Types
[07:33:05] baweaver: I'll probably write up on them some time later
[07:33:17] baweaver: I have an entire talk based in Category Theory and Alice in Wonderland
[07:33:39] baweaver: That's pretty accurate, as Haskell leans heavily on them and Category Theory for abstractions
[07:34:39] baweaver: Functor and Monoid are about as common as anything in Haskell, though to be fair in most any languages
[07:37:21] baweaver: What's funny is Reducing Enumerable is literally an introduction to Monoids without ever mentioning them
[07:37:44] baweaver: Well, that, transducers, and bifunctors among others
[07:38:00] baweaver: This was a fairly good overview - http://www.tomharding.me/2017/03/03/fantas-eel-and-specification/
[07:38:29] baweaver: syndikate: Do you know how reduce works?
[07:38:42] baweaver: &>> [1,2,3].reduce(0) { |a, i| a + i }
[07:38:48] baweaver: What's the 0 for?
[07:39:13] baweaver: True, but as an init\al value what significance does it have?
[07:39:33] baweaver: Anything plus 0 is that number
[07:39:45] baweaver: so 0 doesn't really do anything, it's "empty"
[07:40:29] baweaver: + is how you join numbers together to get a new number
[07:40:53] baweaver: Those two properties are called Identity (empty) and Closure (binary operation to join, returns same type)
[07:41:20] baweaver: Add one more property, Associativity, and you have a Monoid. Associativity is being able to group them as long as the order stays the same
[07:41:39] baweaver: a + b + c == (a + b) + c == a + (b + c)
[07:42:29] baweaver: So Integers with the operation + behave like a Monoid
[07:42:30] baweaver: Mono - one, oid - like
[07:42:35] baweaver: Like one, or in other words, reducible
[07:43:10] baweaver: Granted that Integer addition has a few more properties to it that make it into something entirely different called an Abelian Group
[07:43:25] baweaver: Inversion - any operation can be inverted, like + 1 by + -1
[07:43:47] baweaver: Commutativity - You can combine elements in any order and get the same result
[07:45:57] baweaver: Monoids are super common
[07:46:29] baweaver: Mostly recognizing patterns. If data behaves a certain way we can work with it in predefined methods
[07:52:56] baweaver: Abstractions take a while to really get
[07:54:29] baweaver: dminuoso is a better source on that
[07:54:39] baweaver: though the answer is probably playing with Haskell for a bit

2019-06-04

[04:02:56] baweaver: thistledown: Got an example?
[04:03:23] baweaver: Why does the random string method need to be in a different class?
[04:03:51] baweaver: If it were a class method, sure
[04:03:53] baweaver: Though it sounds like that should be a method of class 1
[04:03:56] baweaver: Can you paste your current code here https://dpaste.de/ and select Ruby as the language?
[04:03:57] baweaver: I still think that this sounds like both methods should be in class 1
[04:04:24] baweaver: thistledown: problem 1 - Why class1 and class2? Can you think of better more descriptive names for what they are?
[04:04:26] baweaver: problem 2 - Why is class2 distinct from class1?
[04:04:28] baweaver: Answering questions like these help you build intuition in writing code
[04:04:56] baweaver: It's very difficult to answer questions about abstract entities, because the answers will be very different depending on your usecases
[04:05:28] baweaver: Then start with names
[04:05:29] baweaver: OO deals with the _what_ of programming
[04:05:55] baweaver: Names like class1 and class2 do not communicate the intent of the classes, nor why they should be classes
[04:05:57] baweaver: By finding a name you define what behavior it should and should not have
[04:05:58] baweaver: It would be very odd for a Bike class to have a fly method
[04:06:01] baweaver: or a Plane a swim method
[04:06:03] baweaver: They don't really belong, the names give us an insight into the expected behavior of the code inside so we can make reasonable assumptions about them
[04:06:04] baweaver: class1 and class2 don't give you that
[04:06:31] baweaver: After names you start to get into messages. How does a Human communicate with a Bike or a Car? Probably through a ride or drive method.
[04:07:31] baweaver: The hard truth is that immediate answers will not help you learn. Thinking on problems and reasoning about them, building that intuition, and asking questions to that front will.
[04:15:58] baweaver: That's almost rigged
[04:15:59] baweaver: The only way to really handle it would be a really nasty regex
[04:16:02] baweaver: or tokenization or any type of format detection
[04:16:03] baweaver: Granted not as bad as emails but eesh

2019-06-03

[05:30:51] baweaver: Heyo all, to those who read some of my more out there Ruby content: what are your favorites?
[05:30:53] baweaver: Just got a talk slot to basically show all types of dark Ruby magic for 40m :D
[07:20:58] baweaver: Introducing the next Lemur story, Tales of the Ruby Grimoire - https://twitter.com/keystonelemur/status/1135445733589434369
[20:53:20] baweaver: Yxhvd: if they come back, here's another solution: https://gist.github.com/robjlucas/8d454abf161033ff9d01616b27c65d1e#gistcomment-2933915
[20:53:30] baweaver: Kinda wonder how that could be generalized though
[20:54:00] baweaver: counting based on a dig path or a multi-key and nesting is easy, but doing a merge at a path is a bit more interesting.
[22:38:46] baweaver: cerulean: taking tests again?

2019-05-31

[01:15:28] baweaver: comet23: What exactly are you trying to do that a function needs two blocks?
[01:18:25] baweaver: I get that, but what problem and why do you want to do that specifically to solve it?
[01:25:33] baweaver: comet23: closures
[01:25:46] baweaver: Do you know what those are yet?
[01:25:57] baweaver: A function remembers the context in which it was defined
[01:26:33] baweaver: &>> def adds(n) -> v { n + v } end; (1..5).map(&adds(5))
[01:26:56] baweaver: How does `adds` remember what `n` is?
[01:27:12] baweaver: because of the context it was defined in, which was when the `adds` function was called
[01:27:28] baweaver: So it sees `n` when it creates that proc, and remembers that value
[01:27:31] baweaver: &>> def adds(n) -> v { n + v } end; (1..5).map(&adds(5))
[01:27:35] baweaver: There it goes
[01:29:12] baweaver: Read through this series - https://medium.com/@baweaver/functional-programming-in-ruby-state-5e55d40b4e67
[01:30:34] baweaver: Eh, depends on what people mean by functional
[01:31:12] baweaver: If you have a lambda or function construct that you can pass as an argument a language is sufficiently functional in a manner of speaking
[01:31:31] baweaver: Doesn't mean it'll necessarily be pleasant though, which is where languages like Haskell tend to win out for having first class language-level support for functional pattersn
[01:31:47] baweaver: namely things like Functors, Applicatives, Monoids, Groups, and other concepts in that vein
[01:32:01] baweaver: Like it has operators defined explicitly for interacting with those
[01:32:21] baweaver: -> x { x } == lambda { |x| x }
[01:33:28] baweaver: Just saying it depends on how pedantic one wants to be on the terminology
[01:33:35] baweaver: bingo, closures
[01:34:15] baweaver: If I went into a Haskell channel and said Java is a functional language because it has lambdas they'd lose their minds
[01:34:49] baweaver: I suppose a more apt term would be ability to express concepts native to functional programming
[01:35:28] baweaver: In terms of actual support for high-level functional expressions Java is low on the list, whereas languages like Haskell and OCaml are high
[01:36:20] baweaver: Eiam: the second article on closures should explain more on that: https://medium.com/@baweaver/functional-programming-in-ruby-closures-ac80547eb40d
[01:38:43] baweaver: Not entirely sure we're tracking on the same discussion
[01:39:12] baweaver: My vantage was that you'd mentioned Ruby wasn't functional
[01:50:00] baweaver: al2o3-cr: (+ 1 1)
[18:00:50] baweaver: havenwood: There's a Kernel of truth to that
[18:01:01] baweaver: IO is pretty high up there as well

2019-05-30

[02:52:43] baweaver: haxx0r / havenwood: Why a Hash though?
[02:53:00] baweaver: &>> Array.new(37) { [] }
[02:53:16] baweaver: Array would be less overhead, and indexes are free
[02:56:04] baweaver: That, and arrays would be inefficient for this
[02:56:13] baweaver: Sets would be better for each subgroup
[02:57:29] baweaver: Also do you count 00 in there?
[03:03:37] baweaver: https://bfgblog-a.akamaihd.net/uploads/2013/11/2-1-Roulette-Table-Wheel-1024x463.png
[03:38:01] baweaver: Na, SF. We tend to gamble on the stock market along with our friends in NYC
[06:44:38] baweaver: haxx0r: Round up to the nearest 10?
[06:48:48] baweaver: &>> def ceil_10(n) (n / 10r).ceil * 10 end; [102, 109, 111].map(&method(:ceil_10))
[06:50:15] baweaver: r is rational, and basically just used to avoid float
[06:50:25] baweaver: Ever seen closures?
[06:54:05] baweaver: &>> def ceil_n(n) -> v { ( v / Rational(n) ).ceil * n } end; [10, 100, 1000].map { |n| [1, 124, 1235, 152, 126456].map(&ceil_n(n)) }
[06:55:23] baweaver: They're functions which return functions, and those returned functions remember the context they were created in
[06:55:23] baweaver: Closures are a bit easier to understand with addition though
[06:55:50] baweaver: &>> adds = -> a { -> b { a + b } }; (1..5).map(&adds[5])
[06:56:17] baweaver: Na, they'd probably not see much of a need for it.
[06:56:55] baweaver: Not sure that's really an accurate description
[06:57:23] baweaver: That function can be made in a few minutes, or put into a gem easily enough

2019-05-29

[01:59:45] baweaver: havenwood: You finally found the magic number
[05:22:02] baweaver: al2o3-cr / havenwood: original_set = (real fb set); sample_set = [nil, 'Fizz' ,'Buzz', 'FizzBuzz']; (1..).lazy.find { |i| p i; srand i; !original_set.any? { |v| v != sample_set.sample || v } }
[05:22:09] baweaver: ACTION sits back and waits
[05:25:18] baweaver: Wait. What am I doing. I have TruffleRuby!
[05:26:51] baweaver: and TruffleRuby has? Threading!
[05:27:04] baweaver: Now to see if I can kill a new MacBook with Truffle
[05:35:45] baweaver: Regular Ruby got up to 105_916_225
[05:38:37] baweaver: The fans are singing
[05:53:02] baweaver: Waitasec though, srand is system level. We could make Rust or something do this madness instead.
[06:42:01] baweaver: 531_552_204, calling it a night
[06:43:45] baweaver: could probably make the sample set into 0 to 3 and the fizzbuzz set into that as well. Less computation

2019-05-28

[18:07:37] baweaver: Have you seen my latest mad idea?
[18:08:08] baweaver: https://twitter.com/keystonelemur/status/1132899310931066880
[18:08:13] baweaver: I got tryruby.dev :D
[19:44:38] baweaver: There've been attempts at it
[19:44:53] baweaver: but nothing substantial quite yet that doesn't involve going through a ton of hops

2019-05-27

[06:42:29] baweaver: https://twitter.com/keystonelemur/status/1132899310931066880
[06:42:35] baweaver: Here's a fun idea
[22:23:39] baweaver: So I have a fun project: https://twitter.com/keystonelemur/status/1132899310931066880

2019-05-26

[07:26:05] baweaver: The ActionCable Symphony is now out: https://twitter.com/keystonelemur/status/1132544228024770560
[07:26:07] baweaver: The ActionCable Symphony is now out: https://twitter.com/keystonelemur/status/1132544228024770560
[20:22:16] baweaver: I turned it off.
[20:22:54] baweaver: Not much sense in having it still work if the extent of it would be waiting for a conductor who's not present

2019-05-24

[21:32:54] baweaver: https://github.com/rubysherpas/paranoia/blob/v2.0.5/lib/paranoia.rb#L211
[21:33:05] baweaver: used in production, bad things happened, please fix.

2019-05-18

[00:49:00] baweaver: Caerus: Me and havenwood both gave talks this year too.

2019-05-17

[01:18:03] baweaver: Yeah, it was ImageTragic

2019-05-09

[05:00:45] baweaver: To truly understand something you must be able to write it yourself I figure
[23:40:56] baweaver: havenwood loves them some modiule_method