<havenwood>
cloud69: Use #map rather than shoveling.
<havenwood>
cloud69: product_urls = products.map do |product|
ur5us_ has quit [Ping timeout: 264 seconds]
<havenwood>
cloud69: Doing this for fun? Seems like you should use their API.
<nakilon>
shovel!
<cloud69>
havenwood: Yep just for practice :) i'll use map, thanks
siloxid has joined #ruby
<cloud69>
No, I have to ask: at `scrape_product_urls` at https://pastebin.com/FQUdwiA6 how come `product_urls << url` doesn't get written to despite `url` not being empty?
siloxid has quit [Read error: Connection reset by peer]
siloxid has joined #ruby
phaul has quit [Ping timeout: 258 seconds]
braincrash has quit [Ping timeout: 240 seconds]
rubydoc has quit [Ping timeout: 272 seconds]
ur5us_ has joined #ruby
<havenwood>
cloud69: What line are you referring to?
<cloud69>
havenwood: 26 i believe
<havenwood>
cloud69: When you #map, you'll need to assign a variable to the result.
<havenwood>
cloud69: Line 26 looks like it would append to the Array, as anticipated.
<havenwood>
cloud69: Put a `binding.pry` on line 28 to confirm, but it will be working.
nofxx has quit [Remote host closed the connection]
bkuhlmann has joined #ruby
dcunit3d has joined #ruby
V[excess] is now known as ^
bkuhlma__ has quit [Ping timeout: 256 seconds]
bambanx has quit [Ping timeout: 258 seconds]
Xiti has quit [Quit: Leaving]
bkuhlman_ has joined #ruby
Xiti has joined #ruby
cthulchu_ has joined #ruby
bkuhlmann has quit [Ping timeout: 256 seconds]
Liothen has joined #ruby
silverdust has quit [Ping timeout: 256 seconds]
bkuhlmann has joined #ruby
silverdust has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
bkuhlma__ has joined #ruby
bkuhlman_ has quit [Ping timeout: 246 seconds]
znz_jp has quit [Remote host closed the connection]
oneeggeach has joined #ruby
silverdust has quit [Ping timeout: 256 seconds]
bkuhlmann has quit [Ping timeout: 256 seconds]
znz_jp has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
bkuhlmann has joined #ruby
teardown has joined #ruby
cthulchu_ has quit [Ping timeout: 264 seconds]
bkuhlma__ has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 260 seconds]
johnny56 has joined #ruby
TCZ_ has joined #ruby
Liothen has quit [Ping timeout: 240 seconds]
bkuhlman_ has joined #ruby
bmurt has joined #ruby
duderonomy has joined #ruby
TCZ_ has quit [Remote host closed the connection]
TCZ_ has joined #ruby
bkuhlma__ has joined #ruby
bkuhlmann has quit [Ping timeout: 272 seconds]
TCZ_ has quit [Remote host closed the connection]
bkuhlman_ has quit [Ping timeout: 256 seconds]
georgie has joined #ruby
bkuhlmann has joined #ruby
jpz has quit [Ping timeout: 240 seconds]
jpz has joined #ruby
bkuhlma__ has quit [Ping timeout: 240 seconds]
georgie has left #ruby [#ruby]
bkuhlman_ has joined #ruby
bkuhlma__ has joined #ruby
bkuhlmann has quit [Ping timeout: 260 seconds]
bkuhlmann has joined #ruby
moldorcoder7 has quit [Ping timeout: 258 seconds]
moldorcoder7 has joined #ruby
bkuhlman_ has quit [Ping timeout: 272 seconds]
georgie has joined #ruby
bkuhlma__ has quit [Ping timeout: 272 seconds]
bkuhlman_ has joined #ruby
bkuhlm___ has joined #ruby
bkuhlmann has quit [Ping timeout: 272 seconds]
bkuhlmann has joined #ruby
georgie has left #ruby [#ruby]
<nakilon>
cloud69 03:38:55 <nakilon> Policy & Agreement 2. Use of the Site Whether on behalf of yourself or on behalf of any third-party, you agree not to: “Scrape”, duplicate, reproduce, copy, republish, license, sell, trade or resell the Site for any purpose;
bkuhlman_ has quit [Ping timeout: 272 seconds]
bkuhlm___ has quit [Ping timeout: 256 seconds]
bkuhlman_ has joined #ruby
bkuhlmann has quit [Ping timeout: 256 seconds]
bkuhlmann has joined #ruby
cognemo has quit [Ping timeout: 258 seconds]
bkuhlman_ has quit [Ping timeout: 260 seconds]
bkuhlman_ has joined #ruby
bkuhlmann has quit [Ping timeout: 256 seconds]
bkuhlmann has joined #ruby
bkuhlman_ has quit [Ping timeout: 260 seconds]
bkuhlma__ has joined #ruby
<cloud69>
hehe
<cloud69>
no worries, once it's fully functional it'll have nothing more to do with newegg ;)
bkuhlmann has quit [Ping timeout: 256 seconds]
bkuhlmann has joined #ruby
georgie has joined #ruby
<havenwood>
nakilon: To be fair, there are all sorts of unenforceable provisions in terms of services and folk may have negotiated alternative terms.
<nakilon>
that's why I prefer to name YAML files as .yaml, not .yml
<havenwood>
I prefer to use hson ("Havenwood Standard Object Notation").
<nakilon>
wtf
<havenwood>
It's a private spec that only I know. Interoperability is strictly forbidden.
<havenwood>
nakilon: I wasn't aware of Yandex YML. Heh.
<havenwood>
Does it have a MIME type?
<havenwood>
application/x-shockwave-hson
<nakilon>
havenwood, idk, probably just xml
<nakilon>
found another funny thing: "The URL can be Cyrillic. In this case, the file must be accessible via HTTP."
plujon has joined #ruby
chouhoulis has quit [Remote host closed the connection]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
phaul has joined #ruby
rubydoc has joined #ruby
georgie has quit [Remote host closed the connection]
cd has quit [Quit: cd]
phaul has quit [Ping timeout: 260 seconds]
rubydoc has quit [Ping timeout: 265 seconds]
<cloud69>
guys, it actually works!!
<cloud69>
behold! together we've made newegg's greatest nightmare :P
<cloud69>
but we've also given them free publicity by mentioning them here so many times that it evens out
ur5us_ has quit [Ping timeout: 264 seconds]
chouhoulis has joined #ruby
<apotheon>
I doubt that's Newegg's greatest nightmare.
<apotheon>
. . . but congratulations.
<cloud69>
thank you sir :)
chouhoulis has quit [Ping timeout: 260 seconds]
JohnB has joined #ruby
ChmEarl has quit [Quit: Leaving]
chouhoulis has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 246 seconds]
rubydoc has joined #ruby
queip has joined #ruby
phaul has joined #ruby
XV8 has quit [Ping timeout: 256 seconds]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
chouhoulis has joined #ruby
_whitelogger has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
fippy has quit [Remote host closed the connection]
rubydoc has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
chouhoulis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mynameisdebian has quit [Ping timeout: 264 seconds]
mynameisdebian has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
bocaneri has joined #ruby
XV8 has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
Synthead has joined #ruby
Furai has quit [Quit: WeeChat 2.9]
Synthead has quit [Quit: Leaving]
Furai has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
derpadmin has quit [Ping timeout: 264 seconds]
TvL2386 has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
BenDover has joined #ruby
derpadmin has joined #ruby
Glumetu has joined #ruby
postmodern has joined #ruby
phaul has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
axe has quit [Ping timeout: 258 seconds]
TvL2386 has joined #ruby
phaul has quit [Ping timeout: 258 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
chouhoulis has joined #ruby
phaul has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
braincrash has joined #ruby
bocaneri has joined #ruby
simon_ has joined #ruby
simon_ has quit [Client Quit]
vondruch has quit [Ping timeout: 264 seconds]
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
bocaneri has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
ur5us_ has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
burgestrand has joined #ruby
Rudd0 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 258 seconds]
ur5us_ has quit [Ping timeout: 260 seconds]
braincrash has joined #ruby
Emmanuel_Chanel has joined #ruby
vondruch has joined #ruby
Axy has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
stdedos has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
TomyWork has joined #ruby
infinityfye has joined #ruby
ivz_hh has quit [Ping timeout: 256 seconds]
infinityfye has quit [Read error: Connection reset by peer]
infinityfye has joined #ruby
fippy has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
Tempesta has quit [Quit: See ya!]
TCZ has joined #ruby
johnny56 has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
_paul0 has joined #ruby
paul0 has quit [Ping timeout: 265 seconds]
vondruch has quit [Ping timeout: 256 seconds]
johnny56 has joined #ruby
zxq2 has joined #ruby
<zxq2>
is it good style to use an instance variable that's conditionally defined. in those cases where it's not defined, it's OK that the value is nil. i know this works fine, but unsure of the rubyist's perspective.
BenDover has quit [Quit: BenDover]
johnny56 has quit [Ping timeout: 258 seconds]
rubydoc has joined #ruby
johnny56 has joined #ruby
<jhass>
it seems hard to judge for such a general description. Maybe also phrased weirdly, isn't conditionally defined just meaning one possible value is nil?
johnny56 has quit [Ping timeout: 260 seconds]
TCZ has quit [Remote host closed the connection]
TCZ has joined #ruby
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
TCZ has quit [Remote host closed the connection]
TCZ has joined #ruby
baojg has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 240 seconds]
baojg has joined #ruby
johnny56 has joined #ruby
<zxq2>
well, there's a difference between initializing an instance variable to nil and not defining and then referencing it at which point the value is nil, right? at least in terms of defined?
<jhass>
is there any useful difference?
<zxq2>
i think that's the crux of the question i'm asking
<jhass>
I mean yes, you can observe that fact with defined? I guess, but I would call doing that the smell, not that the ivar is only potentially defined
<jhass>
if you nil check it just regularly, there's no useful difference to having it become nil through explicit assignment or implicitly through omitting the definition
<zxq2>
practically, there isnt much of a difference. but from the perspective of writing readable, clean code - i'm wondering how i should proceed.
<zxq2>
i'm not a well versed ruby programmer
<jhass>
unless you're in you should know what you're doing meta-programming territory using things like #instance_vars
<jhass>
don't worry about it then
<jhass>
do whatever seems nice, avoid defined? and #instance_vars etc unless you know you absolutely need them
<zxq2>
okay, thanks
BenDover has joined #ruby
TCZ has quit [Quit: Things Take Time]
dcunit3d has quit [Read error: Connection reset by peer]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
bkuhlmann has joined #ruby
bkuhlman_ has quit [Ping timeout: 260 seconds]
bkuhlman_ has joined #ruby
bkuhlmann has quit [Ping timeout: 272 seconds]
bkuhlmann has joined #ruby
johnny56 has joined #ruby
bkuhlma__ has joined #ruby
cd has joined #ruby
bkuhlman_ has quit [Ping timeout: 256 seconds]
vondruch has quit [Ping timeout: 260 seconds]
bkuhlmann has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
johnny56 has quit [Ping timeout: 256 seconds]
walidvb has joined #ruby
<walidvb>
hello all!
<havenwood>
walidvb: hi!
<walidvb>
i'm looking for a solution to convert html to pdf, that would be supported by heroku. Main contender seems to be wkhtmltopdf, but it has very poor CSS support(no grid, flex doesn't seem to be working, page-breaks seem difficult, too)
infinityfye has joined #ruby
<walidvb>
havenwood: 👋 long time no visit, all good?
vondruch has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
bmurt has joined #ruby
bkuhlmann has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
johnny56 has joined #ruby
bkuhlma__ has quit [Ping timeout: 256 seconds]
Retropikzel has left #ruby [#ruby]
johnny56 has quit [Ping timeout: 240 seconds]
ChmEarl has joined #ruby
johnny56 has joined #ruby
Emmanuel_Chanel has joined #ruby
JohnB has quit [Quit: Leaving]
johnny56 has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Quit: WeeChat 2.9]
johnny56 has joined #ruby
chouhoulis has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
burgestrand has quit [Quit: burgestrand]
johnny56 has joined #ruby
nevans has quit [Quit: nevans]
johnny56 has quit [Ping timeout: 258 seconds]
TCZ has joined #ruby
teardown_ has joined #ruby
teardown has quit [Ping timeout: 240 seconds]
bkuhlman_ has joined #ruby
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #ruby
johnny56 has joined #ruby
ChmEarl has quit [Quit: Leaving]
bkuhlmann has quit [Ping timeout: 272 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
johnny56 has quit [Ping timeout: 246 seconds]
<adam12>
walidvb: Either use Prawn and write everything in Ruby, or bite the bullet and use a third party service.
<adam12>
walidvb: If you can shell out to Chrome, you could use chrome headless print to pdf, but getting chrome installed is a challenge in itself.
<walidvb>
adam12: at some point i was considering microservicing it to nodejs, but i felt like i was making progress at everystep
<walidvb>
but every step gave me another issue hehe
DaRock has quit [Ping timeout: 256 seconds]
<adam12>
walidvb: Yeah. If you can get a container with Chrome running somewhere, then I'd just make a microservice that accepted HTML and returned a PDF. Could run it on Lambda or similar.
<walidvb>
using the browser's native print gave me such different results that i sorta gave up letting the user do that
<adam12>
walidvb: I was working on the exact same thing a few weeks ago; I'd normally reach for Prawn but Chrome headless is a safer bet.
<walidvb>
my pdf layout had a sidebar, too, which i insisted too long on keeping, tbh..
andremedeiros has quit [Quit: ZNC 1.8.2 - https://znc.in]
ChmEarl has joined #ruby
johnny56 has joined #ruby
walidvb has quit [Ping timeout: 240 seconds]
greengriminal has joined #ruby
ivz_hh has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
andremedeiros has joined #ruby
bkuhlmann has joined #ruby
bkuhlmann has quit [Remote host closed the connection]
SeepingN has joined #ruby
bkuhlman_ has quit [Ping timeout: 272 seconds]
Jello_Raptor has quit [Ping timeout: 256 seconds]
johnny56 has joined #ruby
FluffyFoxeh has joined #ruby
Frogging101 has quit [Ping timeout: 256 seconds]
FluffyFoxeh is now known as Frogging101
Jello_Raptor has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
axe has joined #ruby
elcontrastador has joined #ruby
johnny56 has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
al2o3-cr has left #ruby ["WeeChat 2.9"]
TomyWork has quit [Remote host closed the connection]
<walidvb>
1. when i call wicked_pdf_stylesheet_tag from `header.html.haml`, no header is rendered at all (the header string _is_ valid html, and i did try with a very large top margin)
<walidvb>
I am now trying to simply get it done, so i tried to inline the styles in header.haml.html
teardown_ has quit [Remote host closed the connection]
teardown has joined #ruby
<walidvb>
2. the basic css I add does not do the job at all. Also, it does not apply the stylesheet loaded via an external <link>. Result is as follows: https://share.getcloudapp.com/6quPqRrl
<walidvb>
yes. problem #1: calling the stylesheet prevents the header from rendering
<walidvb>
although it does inline the css, as in the footer (weirdly the footer doesn't have any of these issue)
<adam12>
walidvb: when you do header = renderer.render_to_string, have you looked at `header` to determine it looks accurate?
johnny56 has quit [Ping timeout: 240 seconds]
<adam12>
walidvb: IMHO, I'd just drop wkhtmltopdf now before you waste too much time on it. I'm using Tailwind as well and everything was completely broken with it.
<adam12>
(I'm using grid in some stuff so it's no surprise webkit was busted)
<walidvb>
i did, and it yields valid html. really, it does the same as the footer, which is why i'm so confused
<weaksauce>
say you have a ruby script that you want to run everywhere. anyone have an example of a shell wrapper to use? do you just do something like cd $scriptpath && bundle exec ruby ./bin/thescript.rb $@ or is there a way to pass bundle exec some options to tell it what the current directory should be?
<walidvb>
brb the doorbell rang 😬
<weaksauce>
i guess cd works fine
<adam12>
weaksauce: If it's just a single script file, have you looked at bundler/inline?
<weaksauce>
adam12 i haven't no
<weaksauce>
though it's a few different files
<weaksauce>
using the gli gem
<adam12>
weaksauce: Ah. I'd just make a wrapper like you mentioned.
<walidvb>
adam12: hm chromium yields a bunch of other issues in my experience, not to mention the setup
<weaksauce>
yeah the wrapper seems to work fine... i'll keep that in mind in the future adam12 thanks!
<walidvb>
i'm fine using older CSS styles, though, i'm not displaying this in web ever
<walidvb>
but indeed, these bugs are a bit annoying...
<walidvb>
and having width and inline-block works on body but not in my header
* walidvb
going nuts
<walidvb>
working when i add floats
<walidvb>
i feel like i'm designing emails
<adam12>
LOL
<adam12>
I don't really have an idea, tbh.
<walidvb>
and adam12 i definitely hear your point, i just don't have the resource for that implementation right now unfortunately
<walidvb>
that's alright, thanks for taking a look!
<adam12>
walidvb: If you have budget, I'd just outsource this. There's dozens of people who will accept HTML and return PDF
<walidvb>
yeah... hehe no budget either. bootstrapped startup, with one dev
<havenwood>
walidvb: wicked is a "best effort" tool that shells out to a command line binary with a million broken edge cases. Just use Prawn?
<walidvb>
but maybe i find one that is free for X per month, which could do for the next months or so
<walidvb>
any recommendation?
<adam12>
walidvb: I tried html2pdfrocket.com last week. Generous free tier.
johnny56 has joined #ruby
<adam12>
walidvb: They use webkit tho, so I went looking for someone else running on Chrome.
<walidvb>
havenwood: i'll consider that, even though it seems a bit of a lot of work/learning to just print out a table
<havenwood>
walidvb: But it'll print a table properly. ¯\_(ツ)_/¯
bocaneri has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 264 seconds]
rubydoc has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bkuhlmann has joined #ruby
georgie has joined #ruby
<georgie>
Hi guys Im new to irc does everyone not talk much
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<havenwood>
georgie: We just all wait for question. :)
<georgie>
thanks
<havenwood>
georgie: If you have any questions or code for review or to show, just let us know!
<georgie>
thank you :)
<georgie>
as i understand it ruby on rails doesn't scale well am I wrong to think that
bkuhlman_ has joined #ruby
eydaimon has quit [Ping timeout: 258 seconds]
bkuhlmann has quit [Ping timeout: 240 seconds]
<leftylink>
dang, no rubydoc right now... it's ok, it's not like I needed it right now, just getting a sense of the situation
<havenwood>
georgie: Folk used to say that but then a bunch of Rails apps scaled. So... ¯\_(ツ)_/¯
<georgie>
lol
<georgie>
so no one could get the hang of it?
<havenwood>
georgie: GitHub, for example, seems to be working. :)
bkuhlmann has joined #ruby
<havenwood>
georgie: I think there was a hypothesis it wouldn't scale but multiple independent teams scaled it successfully, proving the hypothesis wrong.
<georgie>
i see
<havenwood>
georgie: Ruby and Rails today are used at scale, so it's kinda a joke.
<georgie>
sorry about that
<havenwood>
georgie: No worries. Fair question.
<leftylink>
IIUC, the impression started because of high profile moves away from rails, like Twitter?
<leftylink>
I guess I wouldn't really know since I don't use Rails
<havenwood>
leftylink: Yeah, I think Twitter was really the only reason for the meme.
bkuhlman_ has quit [Ping timeout: 240 seconds]
<havenwood>
leftylink: Funnily, they still use Rails.
<georgie>
yes, the impression i was under
<havenwood>
They just opted for Scala for under-the-hoods stuff.
<georgie>
ah
<havenwood>
Twitter's sister company, Square, still uses Rails for microservices alongside Java and Go.
<havenwood>
TIMTOWTDI
<georgie>
does that impression prevent more teams from switching to rails?
<havenwood>
georgie: Yes, probably.
<georgie>
ah, what i wanted to understand
<havenwood>
georgie: Then again, many folk see that GitHub, Shopify, Square, and so on all scale just fine so the FUD only hurts so much.
<havenwood>
But it still hurts adoption.
<leftylink>
isn't there some human effect
<havenwood>
Twitter helped Rails get to prominence though, so it wasn't a bad train to be on.
<leftylink>
the negativity bias or something?
<georgie>
I feel a little silly
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TCZ has joined #ruby
<havenwood>
georgie: Is Ruby fast yet is an ongoing question. :P
<georgie>
does that have an impact on rails
<havenwood>
georgie: To a degree, "yes." For serving up web traffic, less so, but async scheduler functionality in Ruby 3 along with non-blocking, Fiber-backed webservers could make a real difference.
<havenwood>
georgie: For stuff like what Twitter offloaded to Scala, it does matter.
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<havenwood>
georgie: For example, Sidekiq can use Ruby 3 Ractors for background jobs so they can peg the cores from a single process—using less memory.
<havenwood>
georgie: And speed never hurts.
<havenwood>
georgie: Rails is making nice query-related improvements, which for the most part probably matters more for speed.
<havenwood>
georgie: Lots of time is spent just waiting on the DB.
<silverdust>
What's it called when you do something like .map(&:as_json) ? also, if I were to pass a parameter to that as_json method, is there a way to still do it that way or I have to write it out as .map { |x| x.as_json(p) } ?
ur5us_ has joined #ruby
bkuhlmann has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
siloxid has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<adam12>
silverdust: Not sure there's a name.
<adam12>
silverdust: If you're on Ruby 2.7, you could use numbered arguments. .map { _1.as_json(p) }
<adam12>
silverdust: &:symbol is basically calling Symbol#to_proc (or symbol to_proc) if you're trying to Google.
siloxid has joined #ruby
teclator has quit [Ping timeout: 240 seconds]
<silverdust>
Thanks adam12
teclator has joined #ruby
<georgie>
havenwood: you could implement that now if you wanted to right? using fiber or async?
<havenwood>
georgie: Yes, you can do it now (kinda a preview) but it'll work even better once Fiber scheduler changes are live in Ruby 3.
<georgie>
faster you mean
<havenwood>
georgie: Yeah, faster with concurrent workloads.
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
braincrash has joined #ruby
ivz_hh has quit [Remote host closed the connection]
<georgie>
guys i would love to volunteer how does that work how do i start?
chouhoulis has joined #ruby
ivz_hh has joined #ruby
<havenwood>
georgie: What would you like to volunteer to do?
ivz_hh has quit [Remote host closed the connection]
<georgie>
i have a degree in computer science and some experience my first choice would be to code
<havenwood>
georgie: There are multiple Ruby implementations like CRuby (reference implementation), JRuby, and TruffleRuby. They're all very open to contributions.
<georgie>
well that would be great
dionysus69 has quit [Remote host closed the connection]
<havenwood>
georgie: Most of CRuby is implemented in C, most of JRuby in Java, and most of TruffleRuby in Ruby.
dionysus69 has joined #ruby
ivz_hh has joined #ruby
<havenwood>
georgie: Or there are a number of gems (Ruby packages) that are happy to have contributors. That's mostly Ruby but also C and Java for gem extensions.