havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
<havenwood> szqdsegrhrdgdrg: Like Rails, Laravel ship with libraries to handle queues, file storage, and mailers. Rails fairly recently got things like rich text editing, websocket channels, and multi-db support.
<havenwood> szqdsegrhrdgdrg: A difference with Rails is that it modifies the Ruby language, which is extensible, for all sorts of convenience methods for a web framework.
troulouliou_div2 has quit [Quit: Leaving]
_phaul is now known as phaul
<havenwood> szqdsegrhrdgdrg: Phoenix is another very nice framework option for Elixir.
<havenwood> szqdsegrhrdgdrg: If you aren't using rich text editing, mailers, file uploads, etc, etc, you might want something lighter or more composable than either.
<havenwood> szqdsegrhrdgdrg: If you need everything Rails offers, use Rails.
<apotheon> havenwood: "A difference with rails is" . . . that I don't have to use PHP?
<apotheon> . . . but Elixir looks pretty cool.
sergioro has joined #ruby
<apotheon> I charge twice as much for PHP as for Ruby, because I don't want to use it, and I expect to get compensated for doing things I loathe.
<apotheon> Your mileage may vary.
fernando has quit [Quit: fernando]
<havenwood> apotheon: I enjoy Elixir. Phoenix is quite nice. Not quite as much convenience as far as built-in features compared to Rails, but the language is nice, way more on the supervision / modular fault tolerance front, it's definitely Rails-inspired, and LiveView is super neat.
<apotheon> What's LiveView?
wildtrees has quit [Quit: Leaving]
fernando has joined #ruby
<apotheon> I haven't really had particular reason to get into Elixir stuff, so my effort has gone elsewhere, but it does seem like it'd be pretty enjoyable if I found myself in a position to need it for some reason.
<havenwood> apotheon: It's server-side HTML rendering using diffs and dom patching.
<apotheon> Ah, that seems pretty cool.
<havenwood> apotheon: It's what I've been *wanting* to do for ages, but done super nicely.
<apotheon> "Whew. I don't have to build that item on my to-do list, either!"
<apotheon> I talked to someone about my long-term plans for a project -- the secret, behind-closed-doors part, but mostly because it's not relevant yet rather than because I'm paranoid about others learning about it. He said something about how I shouldn't just tell people about that stuff.
<apotheon> I told him that if someone else does a good job with it I'll be grateful to not have to do all the work myself, and if someone else does it badly I'll still do it.
<havenwood> apotheon: Here are some live view app examples: https://phoenixphrenzy.com/results
<havenwood> apotheon: It works impressively well with realtime games.
* apotheon reloads with ES turned on in the browser.
<apotheon> This seems pretty slick.
<apotheon> Now we just need to reimplement it in Ruby with Erlang-style concurrency!
<havenwood> apotheon: Ruby 3 async with websockets should work well. Can still use morphdom. I talked to a Rails dev who implemented something along these lines. Sec, lemme find the repo.
impermanence has quit [Remote host closed the connection]
<havenwood> apotheon: That's a great fiber-backed library for scalable websockets in Ruby ^
<havenwood> apotheon: Also, supports HTTP/2 websockets.
<havenwood> apotheon: I wrote a little Roda plugin for it: https://github.com/socketry/roda-websockets
<havenwood> I gave a talk on H/2 websockets and that ^ lib at OSCON.
<apotheon> I'm not entirely clear on the connection to Falcon in the README.
<apotheon> Is Falcon a hard dependency?
<havenwood> apotheon: Falcon is a Fiber-backed webserver and it can suspend fibers that are out on I/O missions and resume when they return with a result.
<havenwood> apotheon: So with Falcon, you can have *many, many* open connections without scaling issues.
<apotheon> I see.
<havenwood> apotheon: Here's the live-view-like for Rails that I mentioned: https://github.com/hopsoft/stimulus_reflex
<havenwood> apotheon: Demos of the Rails serverside-dom-diff-patcher: https://expo.stimulusreflex.com/
drincruz has quit [Ping timeout: 264 seconds]
<szqdsegrhrdgdrg> Ok thanks
<apotheon> I like the code sample accordions there.
<havenwood> apotheon: Agreed. Nicely done.
fernando has quit [Quit: fernando]
<havenwood> apotheon: I encouraged the author to abstract a version that isn't entangled with Rails, then make a Rails plugin to entangle.
<havenwood> I just really like the idea. I'm trying to get my girlfriend to have her Elixir team implement SVG chart generation in Elixir so they can do LiveView charts.
<havenwood> We should do the same in Ruby. :)
<apotheon> Yeah, making it separable is a great idea.
<havenwood> Then WebAssembly for the non-DOM parts.
<apotheon> Your girlfriend is an Elixir dev . . . ?
<apotheon> Cool.
<apotheon> The missus is an Oracle DBA and DB developer.
<apotheon> . . . so obviously she makes more money than me.
<havenwood> apotheon: Haha, nice.
<apotheon> She's sitting a couple feet away on the couch browsing the web with OpenBSD.
<havenwood> apotheon: She ported her Roda OSS app to Falcon, actually: https://github.com/stephaniewilkinson/yonderbook
<apotheon> It's pretty awesome having a Significant Other who appreciates my interest in quality tech.
<havenwood> Hasn't done Async DB yet, but most of the Async is just masses of API calls.
<havenwood> Here's the app: https://www.yonderbook.com/
<havenwood> apotheon: Agreed!
<apotheon> Oh, right, I remember you mentioning this thing to me before.
<havenwood> Her day work apps are Elixir/Ember but dabbles in Ruby for my sake. :P
<adam12> lol
<apotheon> That's nice of her.
drincruz has joined #ruby
<szqdsegrhrdgdrg> The creator of Ruby, say that he will do anything not to Ruby die
<apotheon> I've given the missus software I wrote for her birthday more than once, and I think those things may be her all-time favorite birthday gifts. That's pretty cool.
gitter1234 has quit [Quit: Connection closed for inactivity]
<apotheon> (wrote in Ruby, of course)
<apotheon> One of those things was a tool for automating setup of her most commonly used workspace layouts with running software in them, for i3.
<havenwood> szqdsegrhrdgdrg: Matz never said that. :P He did say we must keep swimming to not die.
<havenwood> Sharks...
<taserface> well I out-geek you all
<taserface> I don't have a girlfriend
<taserface> suck it
<apotheon> I'm pretty sure there are a couple species of shark that don't need to do that but, in general, yeah . . . they don't get enough oxygen if they aren't in motion.
<havenwood> apotheon: I think about those species every time Matz gives his keynote about sharks.
<apotheon> I guess, according to the law, I don't have a girlfriend, either.
<apotheon> The government says I have a wife.
<havenwood> I have a domestic partner.
<taserface> szqdsegrhrdgdrg: ruby is unlikely to die in our lifetime
drincruz has quit [Ping timeout: 250 seconds]
<apotheon> I was going to make a joke about the missus not being very domestic, but I realized that we haven't left home more than two or three times in about two weeks (other than to go for walks together), and that's not because of COVID-19; that's normal for us.
<apotheon> (working from home is a wonderful thing for introverts)
<apotheon> taserface: I plan on living forever.
<havenwood> Matz says he'll be the benevolent dictator for Ruby only in his corporeal form, but also plans on living forever.
<havenwood> ¯\_(ツ)_/¯
<adam12> Hah
<apotheon> Hey, it's another thing I have in common with Matz!
<apotheon> havenwood: You seem to have good taste in licenses.
<apotheon> lemme double-check that comment for accuracy
<havenwood> apotheon: I'm a lawyer. :P
<apotheon> Srsly?
<havenwood> Yup. Still keep my license active though I don't practice law anymore.
<havenwood> Well, in "special status" but not inactive. :P
<apotheon> Actually, I'm having a hard time finding something you wrote from scratch that has a license on it, now that I think about it.
<apotheon> found one
<havenwood> apotheon: What doesn't have a license? Hah.
<apotheon> ein
<apotheon> example
alexherbo2 has quit [Ping timeout: 256 seconds]
<havenwood> apotheon: One-off script example without tests.
<apotheon> yeah
<apotheon> not big projects
<apotheon> Most of what's in your repositories so far seems to be forks, though, upon closer inspection.
<apotheon> (not a complaint or anything; just a realization that fewer of the license choices were your own than it first seemed)
<havenwood> apotheon: Here're some licenses on things I've written: https://github.com/socketry/roda-websockets/blob/master/LICENSE
<apotheon> havenwood: I'm guessing you weren't a practicing copyright lawyer, as those seem remarkably rare in IRC.
<apotheon> Yeah, the roda-websockets thing was the first license I noticed.
<havenwood> apotheon: Here's GNU license. ;) https://github.com/DataBLE/datable_scan/blob/master/LICENSE.txt
<apotheon> Now you're disappointing me.
<havenwood> apotheon: There are good reasons.
<apotheon> I'll take your word for it.
<havenwood> apotheon: Anyway, if you look at my gems you'll find MIT unless there's a reason for CC or something else.
<taserface> oh let's start that discussion
<apotheon> I'm trying to not really start that discussion, actually.
<apotheon> thus "I'll take your word for it"
<apotheon> havenwood: What does "special status" mean, anyway?
<apotheon> Hilariously, my interest in licensing led me to a point where a patent lawyer I know asked me for information and advice about some software licensing stuff because the copyright lawyers he knew were, in his words, "clueless".
<havenwood> apotheon: I can't appear in court other than as a prosecutor, public defender, etc. without getting admitted pro hac vice but don't have to do expensive annual continuing education (CLEs) and can go active status whenever I wannt.
<apotheon> havenwood: Ah, that's cool.
<havenwood> apotheon: I did actually do a fair amount of copyright law and business drafting as in-house counsel after quitting medical malpractice. I've been inventor on several patents but am not myself a patent lawyer.
<havenwood> I'm actually not eligible for patent law since I don't have a technical degree.
<havenwood> for the patent bar*
<apotheon> I figured that was what you meant.
jingjinghack has joined #ruby
<apotheon> havenwood: Do you mind if I PM you about something related to copyright law?
<havenwood> apotheon: I don't mind reading it! I can't promise a response other than that you should seek legal advice. :P
<apotheon> right
caterfxo has quit [Quit: leaving]
<apotheon> sent
szqdsegrhrdgdrg has quit [Remote host closed the connection]
impermanence has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
tpanarch1st_ has joined #ruby
tpanarch1st has quit [Ping timeout: 264 seconds]
Elicro has joined #ruby
william1_ has joined #ruby
william1_ has quit [Ping timeout: 250 seconds]
plutes has quit [Remote host closed the connection]
plutes has joined #ruby
gix has quit [Ping timeout: 250 seconds]
Elicro has quit [Remote host closed the connection]
<pyrmont> havenwood: Am also a lawyer! :D
renich has quit [Quit: renich]
alfiemax has joined #ruby
taserface has quit [Ping timeout: 250 seconds]
adam12 has quit [Read error: Connection reset by peer]
cschneid has quit [Ping timeout: 264 seconds]
adam12 has joined #ruby
cschneid has joined #ruby
tpanarch1st_ has quit [Ping timeout: 246 seconds]
caterfxo has joined #ruby
<havenwood> pyrmont: Rubyist Lawyers Guild!
cockadopolous has quit [Quit: leaving]
<pyrmont> havenwood: It's the best way for us to work concurrently (apologies in advance to everyone).
ChmEarl has quit [Quit: Leaving]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
alfiemax has quit [Ping timeout: 256 seconds]
fluxAeon has quit [Ping timeout: 256 seconds]
fluxAeon has joined #ruby
cd has quit [Quit: cd]
MuffinPimp has quit [Quit: Goodbye.]
postmodern has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
<al2o3-cr> sharks are born swimming
Eiam has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
drincruz has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
braincrash has quit [Quit: bye bye]
drincruz has quit [Ping timeout: 264 seconds]
braincrash has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
cockadopolous has joined #ruby
alfiemax has joined #ruby
humon has joined #ruby
humon has quit [Client Quit]
baojg has quit []
MuffinPimp has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jetchisel has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 258 seconds]
cliluw has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
sauvin has joined #ruby
cthulchu_ has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
_whitelogger has joined #ruby
markopasha has joined #ruby
donofrio has quit [Remote host closed the connection]
cschneid_ has quit [Ping timeout: 246 seconds]
cschneid has joined #ruby
buckworst has quit [Quit: WeeChat 2.7.1]
dionysus69 has joined #ruby
chalkmonster has joined #ruby
schne1der has joined #ruby
jingjinghack has quit [Read error: Connection reset by peer]
jingjing1 has joined #ruby
jingjinghack has joined #ruby
jingjing1 has quit [Ping timeout: 246 seconds]
baojg has joined #ruby
baojg has quit []
lesihctej has joined #ruby
alexherbo2 has joined #ruby
jetchisel has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
_whitelogger has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
mattwc has quit [Ping timeout: 256 seconds]
d0liver has quit [Ping timeout: 256 seconds]
jnoon has quit [Ping timeout: 256 seconds]
meinside has quit [Ping timeout: 256 seconds]
ryzokuken has quit [Ping timeout: 256 seconds]
graphicsv has quit [Ping timeout: 272 seconds]
peteretep has quit [Ping timeout: 272 seconds]
tag has quit [Ping timeout: 272 seconds]
gajus has quit [Ping timeout: 272 seconds]
Mutsuhito has quit [Ping timeout: 256 seconds]
timwis has quit [Ping timeout: 256 seconds]
alnk has quit [Ping timeout: 256 seconds]
grvgr has quit [Ping timeout: 256 seconds]
iamdevnul has quit [Ping timeout: 256 seconds]
Liothen has quit [Ping timeout: 256 seconds]
ctp has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 240 seconds]
d10n-work has quit [Ping timeout: 240 seconds]
jetpack_joe has quit [Ping timeout: 240 seconds]
r3my has quit [Ping timeout: 240 seconds]
timeless has quit [Ping timeout: 256 seconds]
peteretep has joined #ruby
gajus has joined #ruby
mattwc has joined #ruby
iamdevnul has joined #ruby
d0liver has joined #ruby
tag has joined #ruby
graphicsv has joined #ruby
ryzokuken has joined #ruby
jnoon has joined #ruby
meinside has joined #ruby
Mutsuhito has joined #ruby
jetpack_joe has joined #ruby
ctp has joined #ruby
grvgr has joined #ruby
solars has joined #ruby
NODE has quit [Excess Flood]
alnk has joined #ruby
d10n-work has joined #ruby
Liothen has joined #ruby
timeless has joined #ruby
timwis has joined #ruby
r3my has joined #ruby
NODE has joined #ruby
jingjing1 has joined #ruby
sergioro has quit [Quit: leaving]
jingjinghack has quit [Ping timeout: 250 seconds]
conta has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
jingjing1 has quit [Ping timeout: 265 seconds]
william1 has joined #ruby
jingjing1 has joined #ruby
cschneid_ has quit [Quit: ZNC 1.7.5 - https://znc.in]
ur5us has quit [Ping timeout: 246 seconds]
tag has quit [Read error: Connection reset by peer]
tag has joined #ruby
cschneid has joined #ruby
jingjinghack has joined #ruby
william1_ has joined #ruby
jingjing1 has quit [Ping timeout: 264 seconds]
william1 has quit [Ping timeout: 250 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta1 has joined #ruby
conta has quit [Ping timeout: 256 seconds]
conta1 is now known as conta
rsq has joined #ruby
<rsq> Technical question: If I call File.size, do I get the actual file size, or the size on disk?
<jhass> I would expect whatever stat(2) reports
<rsq> jhass: thanks! I continue the search there.
<jhass> it literally just returns st_size of the stat struct
<rsq> Great, I check what stat is doing on my filesystem.
rsq has left #ruby ["ruby"]
xco has joined #ruby
_whitelogger has joined #ruby
code_zombie has quit [Quit: Leaving]
davor has quit [Ping timeout: 258 seconds]
davor_ has joined #ruby
davor_ is now known as davor
Ven`` has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
leitz has joined #ruby
alfiemax has quit [Remote host closed the connection]
donofrio has joined #ruby
NODE has quit [Quit: changing servers]
cschneid has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
NODE has joined #ruby
pandakekok9 has joined #ruby
william1_ has quit [Ping timeout: 250 seconds]
william1_ has joined #ruby
drincruz has joined #ruby
akem has quit [Quit: Leaving]
akem has joined #ruby
duderono_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kitallis has joined #ruby
<kitallis> is there a shorter way of writing: ["male", "female", "non-binary"].map { |g| [g, {}] }.to_h
<kitallis> (without the new to_h syntax)
<al2o3-cr> kitallis: ["male", "female", "non-binary"].to_h { |g| [g, {}] }
<kitallis> yeah, that doesn't work in ruby 2.5.1
<kitallis> I don't know why that syntax works at all
<leftylink> it's an ordinary block, no different from any other ruby block
<kitallis> to_h works fundamentally on tuples
stoffus has joined #ruby
<al2o3-cr> it must be a 2.6 thing
<kitallis> it is
<kitallis> in 2.6 to_h behaves in 2 different ways depending on block v no-block
<kitallis> and it's weird
coniptor has quit [Ping timeout: 250 seconds]
<al2o3-cr> kitallis: Hash[%w(male female non-binary).zip([{}].cycle)]
<al2o3-cr> it's shorter i wouldn't say it's better
<kitallis> wow
<al2o3-cr> oh, if you don't want the *new* to_h stick a to_h at the end instead.
nofxx__ has quit [Ping timeout: 264 seconds]
<al2o3-cr> instead of Hash[] that is
<kitallis> yeah
<kitallis> just going to do that
roadie has joined #ruby
<kitallis> sometimes I tend to intentionally make code that is concise, when its locality is a part of a chain of transformations in lieu of excessively verbose
<kitallis> this was one of those cases
nofxx__ has joined #ruby
<kitallis> clojure's -> macro has ruined me
<al2o3-cr> kitallis: bear in mind they i showed is approx 2x slower than your way.
akem has quit [Ping timeout: 256 seconds]
<al2o3-cr> *bare
<al2o3-cr> lol bear haha
drincruz has quit [Ping timeout: 250 seconds]
<leftylink> now you're reminding me of the full bridge rectifier video
<leftylink> where he goes on a tangent about the phrase "bare hands"
<al2o3-cr> i'm a dope sometimes.
<leftylink> I think it's a good time for me to watch that video again. it's been a while.
<kitallis> is that electro boom
<al2o3-cr> %w(male female non-binary).each_with_object({}).to_h is also slower :(
akem has joined #ruby
nullus has joined #ruby
coniptor has joined #ruby
jmcgnh has quit [Ping timeout: 256 seconds]
kitallis has quit [Remote host closed the connection]
drincruz has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
fluxAeon has quit [Ping timeout: 256 seconds]
conta has quit [Quit: conta]
tpanarch1st_ has joined #ruby
Translat-Embedde has joined #ruby
jmcgnh has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
fluxAeon has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
wymillerlinux has joined #ruby
mheld has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 265 seconds]
pupsikov has joined #ruby
banisterfiend has joined #ruby
Bounga has joined #ruby
Bounga has quit [Remote host closed the connection]
Bounga has joined #ruby
Rapture has joined #ruby
_whitelogger has quit [Remote host closed the connection]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
william1_ has quit [Ping timeout: 256 seconds]
hiroaki has quit [Remote host closed the connection]
sagax has quit [Quit: Konversation terminated!]
coniptor has quit [Ping timeout: 256 seconds]