havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
dumptruckman has joined #ruby
ur5us_ has joined #ruby
<nakilon> nevermind, the object needs attributes and making a method/lambda returning a Struct does not look like something more simple than actually defining a class
dfucci has quit [Ping timeout: 256 seconds]
stryek has quit [Quit: Connection closed for inactivity]
gearnode has quit [Ping timeout: 272 seconds]
akem has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 264 seconds]
mozzarella has joined #ruby
jenrzzz has joined #ruby
Technodrome has joined #ruby
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
ur5us_ has quit [Ping timeout: 260 seconds]
zacts has quit [Quit: leaving]
gix has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
gix has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
gix has quit [Ping timeout: 264 seconds]
s2013 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Remote host closed the connection]
coffeejunk has quit [Read error: Connection reset by peer]
howdoi has quit [Ping timeout: 240 seconds]
jnoon has quit [Read error: Connection reset by peer]
podman has quit [Ping timeout: 260 seconds]
Iambchop has quit [Read error: Connection reset by peer]
meinside has quit [Read error: Connection reset by peer]
graphicsv has quit [Read error: Connection reset by peer]
peteretep_ has quit [Read error: Connection reset by peer]
coffeejunk has joined #ruby
jnoon has joined #ruby
meinside has joined #ruby
howdoi has joined #ruby
podman has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
graphicsv has joined #ruby
Iambchop has joined #ruby
peteretep_ has joined #ruby
howdoi has quit [Client Quit]
jenrzzz has joined #ruby
zacts has joined #ruby
goepsilongo has quit [Quit: goepsilongo]
rudyc3t has joined #ruby
goepsilongo has joined #ruby
GodFather has quit [Ping timeout: 272 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 3.0.1]
rudyc3t has quit [Client Quit]
rudyzh70 has joined #ruby
s3nd1v0g1us has joined #ruby
rudyzh70 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
Swyper has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 256 seconds]
rudyc3t has joined #ruby
jenrzzz has joined #ruby
rudyc3t has quit [Quit: Leaving]
rudyc4t has joined #ruby
rudyc4t is now known as rudyzh
Technodrome has joined #ruby
rudyzh has quit [Client Quit]
dfucci has joined #ruby
zacts has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 264 seconds]
zacts has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
zacts has quit [Quit: leaving]
dfucci has quit [Ping timeout: 265 seconds]
m27frogy has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
zenspider has quit [Remote host closed the connection]
zenspider has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 3.0.1]
zacts has joined #ruby
ChmEarl has quit [Quit: Leaving]
neshpion has quit [Quit: neshpion]
imadper has joined #ruby
mozzarella has quit [Remote host closed the connection]
cowgomoo has joined #ruby
mozzarella has joined #ruby
elcuervo has joined #ruby
cuerbot has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
dfucci has quit [Read error: No route to host]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
nofxx__ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx_ has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has joined #ruby
zacts has quit [Quit: leaving]
Rudd0 has quit [Ping timeout: 246 seconds]
cnsvc has quit [Quit: WeeChat 3.0]
fercell has joined #ruby
sinan has joined #ruby
prestorium has quit [Ping timeout: 240 seconds]
prestorium has joined #ruby
vondruch has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akem has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
orbyt_ has joined #ruby
dhollinger has joined #ruby
ChewyB has joined #ruby
totoro2023 has joined #ruby
alexherbo2 has joined #ruby
totoro2022 has quit [Ping timeout: 265 seconds]
cd has quit [Quit: cd]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 260 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 3.0.1]
gearnode has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has joined #ruby
schne1der has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
naftilos76 has joined #ruby
dfucci has joined #ruby
<naftilos76> Hi everyone, i am building a simple messaging system with tcp connections based on the concept of mqtt messages where there are topics, publishers and subscribers. I am at the very beginning and i am wondering if a publisher has to keep a connection on indefinately during the period it publishes messages. This makes things really faster instead of opening & closing sockets. However if i choose the first where a tcp connection stays always on then my
<naftilos76> understanding says that i have to keep a separate thread of execution with a client.gets in order to capture messages from individual clients. That brings me to the conclusion that 10k clients require 10k threads which is absurd. Can you pls tell me if my thinking is correct?
al2o3-cr has quit [Ping timeout: 256 seconds]
ChewyB has quit [Quit: Leaving]
akem has joined #ruby
vincent_ has joined #ruby
Rudd0 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
lucas__ has quit [Quit: Changing server]
jla has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
lucas_ has joined #ruby
lucas_ is now known as Guest76680
Guest76680 is now known as lucas__
vincent_ has quit [Ping timeout: 256 seconds]
akem123 has quit [Ping timeout: 264 seconds]
akem has quit [Ping timeout: 264 seconds]
akem has joined #ruby
Net has quit [Ping timeout: 240 seconds]
integral has quit [Ping timeout: 240 seconds]
afisher has quit [Ping timeout: 240 seconds]
shokohsc has quit [Quit: Ping timeout (120 seconds)]
kwilczynski has quit [Ping timeout: 240 seconds]
gmcintire has quit [Read error: Connection reset by peer]
llua has quit [Remote host closed the connection]
c355e3b has quit [Read error: Connection reset by peer]
hahuang65 has quit [Read error: Connection reset by peer]
gmcintire has joined #ruby
imadper has quit [Remote host closed the connection]
Nowaker has quit [Remote host closed the connection]
integral has joined #ruby
llua has joined #ruby
hahuang65 has joined #ruby
c355e3b has joined #ruby
Net has joined #ruby
afisher has joined #ruby
kwilczynski has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
Nowaker has joined #ruby
imadper has joined #ruby
shokohsc has joined #ruby
lightstalker has joined #ruby
Technodrome has joined #ruby
brainfunnel has joined #ruby
<naftilos76> Hi everyone, i am building a simple messaging system with tcp connections based on the concept of mqtt messages where there are topics, publishers and subscribers. I am at the very beginning and i am wondering if a publisher has to keep a connection on indefinately during the period it publishes messages. This makes things really faster instead of opening & closing sockets. However if i choose the first where a tcp connection stays always on then my
<naftilos76> understanding says that i have to keep a separate thread of execution with a client.gets in order to capture messages from individual clients. That brings me to the conclusion that 10k clients require 10k threads which is absurd. Can you pls tell me if my thinking is correct?
<ua_> are there any libs you could use? also elixir(erlang vm) is great fit for 10k threads/connections
moldorcoder7 has quit [Quit: %bye mirc%]
moldorcoder7 has joined #ruby
<adam12> naftilos76: Probably want some sort of poll mechanism like IO.select, and not 10k threads.
al2o3-cr has joined #ruby
m27frogy has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
zapata has quit [Ping timeout: 258 seconds]
linoge has joined #ruby
gmcintire has quit [Read error: Connection reset by peer]
c355e3b has quit [Read error: Connection reset by peer]
integral has quit [Read error: Connection reset by peer]
afisher has quit [Read error: Connection reset by peer]
hahuang65 has quit [Read error: Connection reset by peer]
Net has quit [Read error: Connection reset by peer]
kwilczynski has quit [Read error: Connection reset by peer]
gmcintire has joined #ruby
c355e3b has joined #ruby
hahuang65 has joined #ruby
afisher has joined #ruby
kwilczynski has joined #ruby
integral has joined #ruby
Net has joined #ruby
vincent_ has joined #ruby
hahuang65 has quit [Max SendQ exceeded]
hahuang65 has joined #ruby
<naftilos76> adam12: not sure how to do that. canyou give me some hints?
tomaw has quit [Quit: Quitting]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vincent_ has quit [Remote host closed the connection]
tomaw has joined #ruby
RougeR has joined #ruby
<RougeR> this seems broken tome
<RougeR> Addressable::URI.join('http://test.com', 'foo', 'bar').to_s --> Addressable::URI.join('http://test.com', 'foo', 'bar').to_s
<RougeR> sorry --> "http://test.com/bar"
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
meinside has quit [Ping timeout: 240 seconds]
jnoon has quit [Read error: Connection reset by peer]
meinside has joined #ruby
goepsilongo has quit [Quit: Konversation terminated!]
ChewyB has joined #ruby
Technodrome has joined #ruby
vondruch has joined #ruby
goepsilongo has joined #ruby
weaksauce has quit [Ping timeout: 264 seconds]
sonne has quit [Quit: ZNC - http://znc.in]
sonne has joined #ruby
tomaw has quit [Quit: Quitting]
tomaw has joined #ruby
jnoon has joined #ruby
vincent_ has joined #ruby
jla has quit [Ping timeout: 272 seconds]
vincent_ has quit [Ping timeout: 264 seconds]
elcuervo has quit [Quit: ZNC 1.7.5 - https://znc.in]
elcuervo has joined #ruby
elcuervo has quit [Client Quit]
maroloccio has joined #ruby
Rudd0 has quit [Read error: Connection reset by peer]
naftilos76 has quit [Quit: Leaving]
jenrzzz has joined #ruby
elcuervo has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
fandre1986 has joined #ruby
thisirs has joined #ruby
s2013 has joined #ruby
croberts has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
alexherbo2 has joined #ruby
thisirs has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
va5c0 has joined #ruby
steph_ has quit [Ping timeout: 240 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
schne1der has quit [Quit: schne1der]
shtirlic has quit [Quit: leaving]
fandre1986 has quit [Quit: Connection closed]
orbyt_ has joined #ruby
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 264 seconds]
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
cthulchu_ has joined #ruby
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
va5c0 has quit [Ping timeout: 258 seconds]
shtirlic has joined #ruby
va5c0 has joined #ruby
ChmEarl has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
ta has quit [Ping timeout: 240 seconds]
Rudd0 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
serard has joined #ruby
dinfuehr has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
jla has joined #ruby
<ChewyB> Hey, what was the operating system of the 1st ruby version ever? I've read it was in 1993 or 1995 i wonder if it was Dos/Windows or Unix like OS?
<apotheon> good question
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
gearnode has quit [Ping timeout: 264 seconds]
gearnode has joined #ruby
jenrzzz has joined #ruby
<ChewyB> I just download version 0.49 there is no WIN/WINDOWS things, but some UNIX and little linux too. But maybe it could build on DOS or Windows? i wonder. But it looks like the creator was on an Unix like system.
Swyper has joined #ruby
<ChewyB> But it does not build on linux here because gcc has changed things :)
<ChewyB> HOwever its fun.
sinan has quit [Quit: sinan]
sinan has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
phenom has quit [Ping timeout: 246 seconds]
sinan has quit [Client Quit]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
RougeR has quit [Ping timeout: 258 seconds]
hiroaki has joined #ruby
<leah2> the code looks amazingly like the current ones :p
<leah2> (at least as of 1.9)
RougeR has joined #ruby
weaksauce has joined #ruby
brainfunnel has quit [Quit: thanks, bye!]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
nofxx has joined #ruby
nofxx__ has quit [Read error: Connection reset by peer]
phenom has joined #ruby
klaas has quit [Quit: ZNC 1.8.2 - https://znc.in]
klaas has joined #ruby
TCZ has joined #ruby
prestorium has quit [Ping timeout: 256 seconds]
prestorium has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Swyper has quit [Remote host closed the connection]
<grummund> Hi, can anyone tell me if this is a problem with jekyll, ruby, or debian - https://paste.debian.net/1184737/
* grummund is a ruby noob, just using it through 'jekyll' which is written in ruby.
<RougeR> anyone worked with faraday/retries
<RougeR> for some reason its not retrying on Faraday::ConnectionFailed
RougeR has quit [Remote host closed the connection]
RougeR has joined #ruby
va5c0 has quit [Ping timeout: 264 seconds]
<Cubixusin[m]> It is possible to autorefresh some div in `erb` or `haml` without rails and js ?
<RougeR> rails yes, js no.
<RougeR> gotta reload page
Swyper has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
teclator has joined #ruby
<RougeR> yeah so err
<RougeR> looks like this just doesnt work
Swyper has quit [Remote host closed the connection]
<adam12> grummund: Why GEM_PATH? Unexpected for a ruby noob.
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<adam12> grummund: IMHO, forget about system ruby dependencies (anything through apt), forget about GEM_PATH. Run `jekyll` with `--skip-bundle`. Once inside your new project directory, `bundle install --path vendor/bundle`. Then always use `bundle exec jekyll` (not just naked `jekyll`).
fercell has quit [Ping timeout: 265 seconds]
<adam12> grummund: This moves dependencies directly to bundler, which will install them wherever you like (ie. vendor/bundle) and lock them to the versions you need for jekyll.
<grummund> adam12: thanks. is --skip-bundle a ruby thing or a jekyll thing?
* grummund found the offending line in /usr/lib/ruby/vendor_ruby/addressable/uri.rb - require "public_suffix"
Swyper has joined #ruby
steph_ has joined #ruby
serard has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
alexherbo2 has joined #ruby
* Cubixusin[m] uploaded an image: gnome-shell-screenshot-BXVMY0.png (38KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/ugzvlRBNIFwfvzfXloaLQctN/gnome-shell-screenshot-BXVMY0.png >
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
<grummund> ok i see --skip-bundle in 'man jekyll-new'.
s2013 has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
ChewyB has quit [Read error: Connection reset by peer]
TCZ has quit [Remote host closed the connection]
dfucci has quit [Ping timeout: 240 seconds]
prestorium has quit [Quit: prestorium]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ChewyB has joined #ruby
Technodrome has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
<adam12> grummund: Did that get you unstuck?
gix has joined #ruby
vincent_ has joined #ruby
<grummund> adam12: it ran into other errors
gearnode has quit [Ping timeout: 272 seconds]
gearnode has joined #ruby
<adam12> grummund: That's an interesting one.
<adam12> grummund: What's in the mkmf.log file listed?
<adam12> grummund: This is generally related to missing C devtools, but it could be something else.
<adam12> grummund: Maybe try installing libssl-dev through apt/apt-get?
GodFather has joined #ruby
schne1der has joined #ruby
maroloccio has quit [Read error: Connection reset by peer]
evdubs has quit [Quit: Leaving]
maroloccio has joined #ruby
Swyper has joined #ruby
evdubs has joined #ruby
* grummund expects it's something like that but libssl-dev makes no difference
<al2o3-cr> grummund: what OS?
<grummund> debian
<al2o3-cr> grummund: have you install build-essential?
<al2o3-cr> *installed
jla has quit [Ping timeout: 264 seconds]
<grummund> al2o3-cr: thanks, installing build-essential fixes it.
jla has joined #ruby
<al2o3-cr> grummund: np. :)
<grummund> still unsure why it fails to find public_suffix when that is installed with apt, but i guess that's a debian problem.
<al2o3-cr> idk, it's been a long time last time i used debian based OS's.
vincent_ has quit [Remote host closed the connection]
<al2o3-cr> &>> RUBY_VERSION
<rubydoc> # => "2.7.0" (https://carc.in/#/r/ae0k)
jla has quit [Ping timeout: 240 seconds]
<al2o3-cr> yeah, ruby 3 isn't even in testing yet (Arch Linux)
Swyper has quit [Remote host closed the connection]
<grummund> So maybe i can narrow this down, is there a command line that would effect the same as 'require "public_suffix"' ?
<al2o3-cr> grummund: debian apt-package is out of date (3.0.3) `Make sure that `gem install public_suffix -v '4.0.6' --source 'https://rubygems.org/'` succeeds before bundling.
<al2o3-cr> gem i public_suffix:4.0.6
<al2o3-cr> do you rely on package manager or rubygems.
<al2o3-cr> which is shit really.
* grummund was hoping it could be done through apt.
<grummund> if it can't then OK, but that was the expectation.
AndreYuhai has joined #ruby
<al2o3-cr> grummund: just apt-remove ruby-public-suffix or however you do it, then gem i public_suffix:4.0.6 both are in your PATH
<grummund> interesting, i added a 'require "i18n"' to the same file and it can't find that either.
<AndreYuhai> Where should I initialize Sentry for Sidekiq so that when I require my worker in some other script to insert a job, it doesn't initialize sentry as well?
<AndreYuhai> Here is an example: https://ghostbin.co/paste/vhjak
<AndreYuhai> When I also require this worker in one of my scripts, then Sentry gets initialized as well, but I only want that for when I am actually using the script with the Sidekiq
<grummund> al2o3-cr: then i may as well just install everything wholesale outside of debian's package manager (like has been suggested).
<AndreYuhai> I don't know whether that makes sense though
<al2o3-cr> grummund: i do.
<al2o3-cr> even though it's not recommended.
<al2o3-cr> because the package manager as no way of keeping track and it's entirely up to you to keep track.
<al2o3-cr> debian is notorious for out-dated packages.
neshpion has joined #ruby
<grummund> yeah, that's okay so long as what is offered works together. ;)
<grummund> i may come back to this, but for now thanks vm.
<al2o3-cr> grummund: gem search | wc -l = 162657 vs pacman -Ss ^ruby- | wc -l = 308
<al2o3-cr> oh, divide that by two 154
<grummund> i get it.
<AndreYuhai> Or another way to ask is I think, how can I check whether a file is being required
ur5us has joined #ruby
<al2o3-cr> AndreYuhai: is it auto-loading somewhere?
howdoi has joined #ruby
<AndreYuhai> al2o3-cr, do you mean Sentry?
<al2o3-cr> AndreYuhai: ah, nvm, i was thinking something else was happening.
<AndreYuhai> oh okay
jla has joined #ruby
nertzy has quit [Quit: Leaving]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
<al2o3-cr> any rails devs looking for to hotwire?
Axy has joined #ruby
Axy has joined #ruby
jenrzzz has joined #ruby
<adam12> al2o3-cr: I'm using Unpoly in near every project and it's an absolute dream. Not 1-1 for Hotwire but reasonably similar.
<adam12> al2o3-cr: Unpoly 2 is coming soon and it looks even better. Makes me happy to not write an JS but still have decent interactivity.
Mia has quit [Ping timeout: 240 seconds]
<al2o3-cr> adam12: oh nice, didn't even know this existed.
mozzarella has quit [Remote host closed the connection]
<al2o3-cr> the less js the better :)
<adam12> al2o3-cr: It's awesome
jenrzzz has quit [Ping timeout: 256 seconds]
<adam12> al2o3-cr: Yeah! I do use Stimulus with it, but it's optional. I like having rigid connections between HTML and JS so I don't use the Unpoly version (called compilers). But if I added up non-vendor JS, I might have a few hundred lines in my most complex apps.
mozzarella has joined #ruby
<adam12> al2o3-cr: It's in at least two platform-as-a-service offerings, one monitoring platform (like Pingdom), one restaurant ordering system, and one no-code business CRUD backend (like Airtable).
<al2o3-cr> adam12: i'd like to see how they compare in the future, because i've heard seriously good things about hotwire :)
<adam12> (that's just my stuff)
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
rigid has left #ruby [#ruby]
<adam12> al2o3-cr: I think Hotwire might be more automatic; and have pages in different states. Hotwire also looks like it can have custom caching options per "frame", which is neat.
schne1der has quit [Quit: schne1der]
<al2o3-cr> adam12: it's early days yet though.
<al2o3-cr> and being dev'd by the right honarable gentleman himself :)
<adam12> al2o3-cr: For Unpoly, it's basically just HTML over the wire in a declaritive way, so I don't have super complex views. First page load or refresh will load everything from the server, but after page load I might update smaller elements dynamically.
<adam12> al2o3-cr: Yeah. Anything that allows me to avoid a JS buildstep makes me super happy.
<al2o3-cr> adam12: :) just wait and see
<al2o3-cr> honestly i think this is a really good thing.
<adam12> Just today I wrote a dynamic dropdown for address. Select Country, get a list of Province / States. No custom JS; I just tell Unpoly to update the form element for the Province when the Country changes. It's literally `up-validate="#address_province"`. Makes me incredibly happ.y
<al2o3-cr> once it matures.
<al2o3-cr> 👍
<al2o3-cr> adam12: can't get much simpler, can it?
<adam12> al2o3-cr: Nope. It's seriously one of the most productive things for me (the other being Tailwind).
<al2o3-cr> ah, yes css framework.
<al2o3-cr> adam12: scores please?
<adam12> al2o3-cr: For?
<al2o3-cr> unpoly and tailwind
<adam12> What scores tho?
<al2o3-cr> personal ratings that is
<adam12> Ooh
<adam12> Hmm good question.
<al2o3-cr> 10 being the best thing since sliced bread
nertzy has joined #ruby
orbyt_ has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
<adam12> I'd say that Tailwind is a solid 8. I think there's going to be a better approach for me _eventually_ (like something that uses custom elements but without the drawbacks of the shadow dom). It takes some getting used to (a dozen classes per element) but I have zero fear in changing a class, where as with traditional CSS cascade and larger teams, who knows _what_ other people have done.
<adam12> Unpoly is a 9; I bet version 2 will make it a 10 for me, but right now it does have _some_ strange things around error pages, etc. If you change the layout, it doesn't detect it. If assets change, they don't get detected (like Turbolinks does). But in happyness it's fantastic. Modals? Easy. Inline validations? Easy. Smooth pagination? Easy.
<adam12> (that's from a few years ago but resonated with me)
<al2o3-cr> adam they're a very solid scores :)
Swyper has joined #ruby
<al2o3-cr> we need Ractor propogation too and Rails will be flying. life looks good :)
<adam12> al2o3-cr: Yeah! Hanami 2 is looking like it might come to fruition too.
<al2o3-cr> i love hanami :)
chamunks has quit [Quit: Don't worry I'm not gone yet.]
<al2o3-cr> adam12: so simple and beautiful, just how ruby was intended :)
<al2o3-cr> adam12: do you prefer haml?
* al2o3-cr reading upoly link
alexherbo2 has quit [Remote host closed the connection]
<al2o3-cr> looks like python is joining the band-wagon https://www.python.org/dev/peps/pep-0622/ for lolz
<al2o3-cr> adam12: yeah, i see why it resonates with you.
alexherbo2 has joined #ruby
jenrzzz has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
work_ has joined #ruby
<nakilon> they are copying Ruby features for 20 years already
<al2o3-cr> nasty work over there.
<nakilon> they tell you "Ruby is useless, we don't need these features" and then port them after several years -- that's how it always was
<nakilon> pithon is a religion of ignorance and pretending -- the PEP teaches them to be like that
<al2o3-cr> every language does the same.
<nakilon> it's a list of "rules" that they don't and never did follow; so having the habit to quote them teaches them to ignore and pretend
stdedos has joined #ruby
<al2o3-cr> nakilon: true.
<al2o3-cr> good job they had tuples :p
<al2o3-cr> otherwise i don't see how they would work,
<nakilon> I needed a wrapped on the NLP library just two days ago -- googled "how to read STDIN?" and the question has 28 answers at SO
<nakilon> with their "there should be the only one way to..."
<nakilon> *a wrapper
<al2o3-cr> haha, how many of them were the same answer :)
<al2o3-cr> sys.read sys.bytebuffer.read ...
<nakilon> and the one I took was not one of these
<al2o3-cr> was in input ?
<nakilon> sys.stdin.read()
<al2o3-cr> haha, yeah. that's the one.
maroloccio has quit [Ping timeout: 246 seconds]
gdc_m has joined #ruby
<al2o3-cr> nakilon: how'd you profile them lines of code you wrote?
<al2o3-cr> *those ffs
<nakilon> found that I asked that already
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nakilon> that's it: https://dpaste.org/08FL/slim
<nakilon> maybe I should make it a little gem
<al2o3-cr> ah, that's pretty nifty tbf
<nakilon> my rule of thumb is to not incapsulate things in anything that is purposed for reusage until you really reuse it so I'll probably not make it a gem until I need it again in some another program
AndreYuhai has quit [Quit: Leaving]
maroloccio__ has joined #ruby
<al2o3-cr> nakilon: fair enough. just keep something like that around, you never know when it might come in handy :)
<al2o3-cr> nakilon: did ruby-prof offer nothing like this?
<nakilon> afaik it's only a method profiler, same as others
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
maroloccio__ has quit [Client Quit]
<nakilon> at least I don't see it here https://ruby-prof.github.io/
<nakilon> other gems are 7-9 years old
<al2o3-cr> nakilon: i thought it might have offered something like that in respect
<al2o3-cr> 9 years old is going back to at least 1.8/9
<al2o3-cr> ancient :p
jla has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has joined #ruby
linoge has quit [Remote host closed the connection]
s2013 has joined #ruby
stdedos has quit [Quit: Connection closed]
dhollinger has quit [Ping timeout: 264 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gearnode has quit [Ping timeout: 272 seconds]
shtirlic has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
RougeR has quit [Remote host closed the connection]
shtirlic has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
dhollinger has joined #ruby
gdc_m has quit [Quit: gdc_m]
macaronus has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
gearnode has joined #ruby
<deimos_> i'm missing something about ruby and mongo. say i have this, https://dpaste.org/3kPi/slim I cannot get the regex to take the #{variable here} no matter what I do
zacts has joined #ruby
<deimos_> mongo is trying to match the regex on the literal variable name (#{last_month.strftime("%Y-%m")}) and not "2021-01"
<deimos_> i've tried escaping the ", escaping the \#{, without #{}, etc
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<deimos_> i'm clearly approaching this wrong
ur5us has joined #ruby
<havenwood> deimos_: Use a double quoted String.
<havenwood> deimos_: Do you mean that to be a String with a Regexp inside it or just a Regexp?
<havenwood> deimos_: A Regexp would be just:
<havenwood> /^#{last_month.strftime("%Y-%m")}/i
<havenwood> deimos_: Or as a String, double quotes for interpolation:
<havenwood> "/^#{last_month.strftime("%Y-%m")}/i"
<havenwood> "/^#{last_month.strftime('%Y-%m')}/i"
ur5us_ has quit [Ping timeout: 272 seconds]
<deimos_> i think i tried that, but the mongo gem only takes '
<deimos_> so '$regex' is the operator
<havenwood> deimos_: Mongo doesn't know.
<deimos_> err, i'll try i
<havenwood> deimos_: Is it supposed to be a String or Regexp value?
Technodrome has joined #ruby
<havenwood> deimos_: I'd have expected:
<deimos_> the mongo gem seems to want everything wrapped in ', not "
<havenwood> {'$regex' => /^#{last_month.strftime("%Y-%m")}/i}
<havenwood> deimos_: They're both just String literals? ¯\_(ツ)_/¯
<deimos_> i tried that, and mongo tries to query for literally that statement
<havenwood> deimos_: There's no difference once they're parsed.
<deimos_> that's what i thought too
<deimos_> but so far, mongo: 1, deimos_: 0
<havenwood> deimos_: The double quotes allow interpolation, but you just get a String back either way.
<havenwood> &>> require 'date'; /^#{Date.today.strftime("%Y-%m")}/i
<rubydoc> # => /^2021-02/i (https://carc.in/#/r/ae1z)
<deimos_> right
prepend has quit [Read error: Connection reset by peer]
hiroaki has quit [Ping timeout: 246 seconds]
<nakilon> using single quotes by default is a bad habit that masses have been taught years ago by the a codestyle guide that no one wanted to make until it was made by a kid with minimal coding experience
zacts has quit [Quit: leaving]
<deimos_> i use " everywhere, but to translate this, https://docs.mongodb.com/manual/reference/operator/query/regex/, into ruby driver for mongo, https://docs.mongodb.com/ruby-driver/current/tutorials/ruby-driver-aggregation/ you end up with lots of '
<deimos_> I miss postgres and sequel already
jenrzzz has quit [Ping timeout: 240 seconds]
<scriptonaut> anyone know if it's possible to break out of a loop AND the parent loop?
<scriptonaut> I have a while look, and inside there I have an each block. From within the each block, there is a rare condition which requires me to break out of the each and the while loops
<scriptonaut> was wondering if there's an elegant way to do this, otherwise I will simply have some kind of variable like "break_early = false", and set it to true during this special condition
zacts has joined #ruby
<scriptonaut> and then either break if break_early, or put the break_early inside my while conditional
<scriptonaut> it would be cool if there was like: break(2) or something
<scriptonaut> was also considering using a catch/throw but that's kind of spaghetti code
<havenwood> scriptonaut: Can you extract method refactor and just `return` instead of breaking twice?
<scriptonaut> I could
<havenwood> That's a nice way to god.
<havenwood> go*
<scriptonaut> I have an implicit return at the end of my method, where I just have `results`
ur5us has quit [Ping timeout: 260 seconds]
<scriptonaut> I wondered if it might be confusing to explicitly return results in this special case
<scriptonaut> but I assume not?
<scriptonaut> ok, I'll just do that, mostly it just got make curious if multi-level breaks were a thing
<scriptonaut> got me curious*
<leftylink> one's preferred engine can be used to search for a list of languages with labeled break, but Ruby is not one of those
<leftylink> since an expression given to break instead causes the broken thing to evaluate to that
<nakilon> 02:50:54 <scriptonaut> anyone know if it's possible to break out of a loop AND the parent loop?
<nakilon> ctrl+F "nested"