<adam12>
ox1eef_: did you look at esbuild at all? Not trying to solutionize, just curious.
<adam12>
ox1eef_: What are you using wasm for?
<ox1eef_>
i only saw it in bridgetown briefly, i didn't dig deep. a big downside with nanoc is that for both scss, and the webpack files outside the entry point, incremental compilation doesn't work but if i could mark files somehow as dependencies i think it could be solved. i get closer and closer to thinking about forking nanoc and trying to build something similar to bridgetown.
<ox1eef_>
the wasm part was largely a project for learning Rust, i have a couple of wasm libraries - one for mapping western numerals to eastern numerals, and another for that acts as an interface to The Qur'an, and embeds the contents of The Qur'an into the web assembly.
<adam12>
WASM support for Ruby is fairly recent, isn't it?
<ox1eef_>
i'm not entirely sure, i read that the next major version of ruby will include WASI support which should be a help, but Rust is way ahead of the game, it has great tooling, like wasm_bindgen, js-sys, and wasm-pack which is a powerful tool for compiling for different targets and the like
<ox1eef_>
it feels like ruby is stagnating
<caleb>
I would not agree. Shopify, Stripe, GitHub, Gusto, all are investing very heavily into ruby and also rails development
<caleb>
however, if by stagnating you mean, useful and boring, I'll take it
<ox1eef_>
if you read the state of wasm article, you will see that ruby is nowhere, and python is coming up behind rust. the same story plays out in terms of machine learning, and AI.
<hnj>
how about blockchain?
<ox1eef_>
i believe python / JS has the upper hand there, too.
<caleb>
fairly certain hnj was being tongue-in-cheek
<ox1eef_>
it is my view that technology is going through a major change, and ruby isn't paying attention. it's focusing on the problems of a decade ago.
<caleb>
you're welcome to that view
<ox1eef_>
don't put all your eggs in one basket, that's all i can suggest
<ox1eef_>
one thing is for certain, WebAssembly will change the face of technology, it's going to happen, and ruby is barely on the map, and will be playing a game of catch up, like it does in many other categories.
<hnj>
caleb: (:
<ox1eef_>
time will tell, the truth doesn't need to be defended.
sn0rl5x has joined #ruby
<hnj>
ox1eef_: do you have a good article at hand explaining WebAssembly and how/what/why it will change the face of technology? I honestly have not the slightest clue what it is … I’m just sceptical of anything that claims to be a complete game changer because that often turns out to be bullshit, see blockchain …
<ox1eef_>
did you read state of wasm article, and what it is being used for? in time, it will likely replace docker - for example.
<hnj>
no, will do, thanks
davidw_ has joined #ruby
<caleb>
I don't disagree about WASM, I was blogging about writing WAST and compiling with WABT back in 2017
<caleb>
I just don't agree that ruby is stagnating just because it's not keeping up with Rust in WASM support.
<caleb>
playing with the wasmer ruby gem last week was a ton of fun and worked very well
TomyWork has quit [Remote host closed the connection]
protektwar has quit [Ping timeout: 244 seconds]
grvgr has joined #ruby
<ox1eef_>
I don't mean to be argumentative, i apologize and at the end of the day i'm a ruby programmer, of course i want to see it succeed but i stand by the substance of what i said. Based on 'the state of wasm', Ruby is seeing very little use in that context. How can it mature when it is not being used ? How can the ecosystem grow, when there's barely anyone working on it? The same is true for machine
<ox1eef_>
learnig, and AI, where Python is king and the go-to for such contexts, because it has a mature ecosystem that's been invested in. Ruby doesn't.
<ox1eef_>
When newcomers want to learn machine learning, they go where the best libraries are, and that's Python - so it attracts people towards. There's no such thing for Ruby, and I see WebAssembly being exactly the same - up to this point.
szkl has quit [Quit: Connection closed for inactivity]
s-liao-200070 has quit [Quit: Client closed]
sn0rl5x has quit [Ping timeout: 252 seconds]
<legit>
ox1eef_: yeah, it's sad that ruby may have lost popularity lately
<legit>
I think rails might be shrinking as well, which is also sad
_ht has joined #ruby
<ox1eef_>
i agree, it is sad, and to a certain extent i blame rails. too often it is the primary focus. there`s no room for other ideas, for other thoughts - they exist, sure, but they never break through.
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
<adam12>
I wouldn't mind a RubyCentral-ish place that I could donate to that would push some of these things forward.
<adam12>
RubyTogether might have been that, but I'd be curious how much work they do is non-Bundler.
yossarian has quit [Ping timeout: 255 seconds]
yossarian has joined #ruby
yossarian has quit [Changing host]
yossarian has joined #ruby
<ox1eef_>
Rails holds a unique position where it is both an open source framework, and the framework used to generate profits for a business for the primary author and lead BDL of said open source project. I know of no other project like that. When merb was around, I think it seen like a competing business and merged into Rails. So Rails won. I don't know. Ruby owes a large part of its success to Rails, but it
<ox1eef_>
might be what sees it fall into irrelevance too.
<ox1eef_>
Rails doesn't deny it is opinionated, but it also made moves to be the only opinion. well, whatever, not worth the discussion.
<adam12>
Going through the relics of the past, it feels like Rails definitely doesn't experiment much anymore.
<adam12>
Which, maybe it never did to begin with (tho ViewComponents lived previously in one form or another, so did actionresource and whatever else)
<adam12>
I'm not sure how many great ideas never surfaced, but I did find some interesting ones.
<ox1eef_>
that's why i think it would have been better to let rails be rails, and let merb be merb, and choose between the two. it's not like rails doesn't easily support attaching other rack apps to it, but in my experience, it simply doesn't happen in practice.
<adam12>
Mack (from Mark Bates?) had a way of distributing the application using DRb. But it wrapped a lot of under the hood stuff. Not sure if this is a great idea, but it's interesting.
<adam12>
Merb had action args, which meant that actions would receive their params as args. It didn't do anything for testing (IIRC, because of how much needed to be constructed) but did remove some magic on where params came from.
<ox1eef_>
there was Ramaze too, a lot of interesting ideas. even today there are interesting ideas, but you are unlikely to get a job working with them.
<adam12>
Ramaze had the ability to re-route requests, internally (not a 3xx redirect). I cant remember seeing that elsewhere.
<ox1eef_>
it also didn't rely on much magic, you would require the files yourself and it would be transparent.
<caleb>
I'll use this moment to pitch the jeremy evans stack
<adam12>
I use the jeremy evans stack on a bunch of larger projects
<adam12>
but at least for roda, I'm now generally shipping hanami-router with some tooling around it.
<adam12>
I have no issue with the routing tree, but for some reason, I end up with a few people every year who can't wrap their head around it.
<adam12>
Or they make a mess of it.
<ox1eef_>
i prefer the class-based approach for any sort of complexity, i think those DSLs are easily vulnerable to block spaghetti.
<adam12>
If Rails adopted Sequel, I'd possibly move back.
<adam12>
But since that will never happen :P
leadgeek has joined #ruby
<caleb>
Clearbit is all sinatra (could likely be ported to roda) and sequel, and was my first exposure to a ruby ORM that wasn't ActiveRecord or the long dead DataMapper
<caleb>
I love Sequel so much more than AR now
<ox1eef_>
DataMapper, the good old days.
<caleb>
RIP DM
jpn has quit [Ping timeout: 256 seconds]
<leah2>
i didnt see many rails codebases but most were awful :p
<adam12>
Heh
<leadgeek>
I'm brand new to ruby, but need to parse out a single line from a big block of text (screen scrape from watir, system status). It seems that a .text.grep() isn't a thing. Is there a simple way to grep out a line of text from a .text variable?
<leah2>
if you want only the first match, you can use text[/.../]
<leah2>
if you want all .scan(/.../)
<leah2>
but if you want the whole line, i guess above is easier
havenwood has joined #ruby
<leadgeek>
yeah, it's a whole line containing, in this case "MemoryInUse"
<leadgeek>
and the only line containing that
<adam12>
leadgeek: If you're on a new enough version of Ruby, and you have a reference to an object, inside `irb` you can `ls` it.
<adam12>
leadgeek: ie. `ls text`
<leadgeek>
ruby 3.1.2
<leadgeek>
Seems to be an interesting language. I'm only using it because watir seems to fit my need, but maybe worth adding to my toolchest ;-)
<adam12>
That will give you a list of the methods available. And you could look at the docs for them by using `help`.
<adam12>
leadgeek: I'm just mentioning it because many people I run into who have issues with Ruby don't realize you can look at any object, and all it's methods. So they fumble around.
<adam12>
So if you're new to Ruby, might as well start out right.
<adam12>
caleb: Clearbit was Alex right?
<leadgeek>
cool.
<caleb>
adam12: yup!
<adam12>
caleb: It's not surprising he used Sinatra. I feel like he is/was a prominent Sinatra blogger for a while.
<adam12>
caleb: Tho Clearbit was able to connect my company to my home IP, and that was maybe the first time in a long time that I felt _dirty_ about data tracking.
<ox1eef_>
The REPL is one of ruby's strong points, although most of those "commands" you see in irb have been copied from pry, which is also worth checking out.
<caleb>
adam12: yeah Reveal's secret sauce is bonkers
<caleb>
Alex is a great guy, but I've got a short story on how I probably rubbed him the wrong way after I signed the offer but hadn't started yet
<caleb>
a group of us went out to dinner and I was shitting on some places I had been that started with sinatra but ended up with a `config.ru` the size of rails for all the middleware they packed in, might as well have used rails
<caleb>
he made a face, and I was "oh shit I dun goofed"
<caleb>
I started, looked at the config.ru and was like "yup, there it is"
<adam12>
LOL
<leadgeek>
worked well btw.
<adam12>
There are things I miss from Rails, and _very_ few I miss from ActiveSupport specifically. But one thing I don't miss are the "great" Rails upgrades. I usually just upgrade Roda/Sequel/whatever at my leisure.
<ox1eef_>
Even if it is a huge config.ru with a lot of middleware, it's transparent and apparent to those working with it. A lot of Rails is behind the scenes magic you never realize.
<caleb>
I don't disagree with most of that statement oxleef_, but everyone at Clearbit is very senior and knows how rails works under the hood inside and out
<caleb>
the architecture they went with works well for them, and I won't say they should've picked rails
<ox1eef_>
fair enough
<caleb>
it was just a funny anecdote
jpn has joined #ruby
<adam12>
caleb: You're not at Clearbit anymore right. Shopify IIRC?
<caleb>
yeah, Clearbit -> Senior Management @PBS -> back to IC at Shopify
<caleb>
slowly worming my way into the open source teams at Shopify after getting hired to work on Checkout
howdoi has joined #ruby
markong has quit [Ping timeout: 240 seconds]
moldorcoder7 has quit [Ping timeout: 256 seconds]
jpn has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
emcb54 has quit [Read error: Connection reset by peer]
emcb54 has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
<jdmark>
what reasons would learning ruby over javascript be for a total programmnig beginner?
<adam12>
jdmark: If you're a total beginner, learning Ruby means you wouldn't have to know async programming out of the gate. With JavaScript, there's a good chance you'd end up with async or callbacks fairly soon after starting, which might be too soon in the learning process.
<jdmark>
what is async programming?
<jdmark>
and what are callbacs?
<jdmark>
request for data?
<adam12>
jdmark: If you're looking at web dev, Rails is batteries included out of the box, and has less churn than Javascript. You might be able to build something quicker, without death by a thousand cuts in the JS world.
<jdmark>
What do you mean by 'batteries included' and 'churn'? I've heard those terms and the death by a thousand cuts analagy before.
<adam12>
jdmark: Batteries included = with Ruby + Rails, you get a lot of stuff with just those 2. There are no decisions to be made, and you can build a web application without anything else.
<hnj>
jdmark: do you have a goal what you want to create? why is your choice between ruby and JS? what about other languages?
<jdmark>
yes but javascript has many frameworks to choose from
<adam12>
Churn is the change of things. Ruby (and Rails) moves slow, a lot slower than most of the Javascript ecosystem. So while you are learning, there's a good chance that what you know in your first year is still relevant. This is sometimes less true in Javascript (tho becoming better).
<jdmark>
react
<jdmark>
etc
<caleb>
software development has trends just like fashion, and sometimes just wearing the same 5 pairs of blue jeans and shirt for 10 years is nice
<jdmark>
i want to learn object orientated programming with the shortest learning curve
<ox1eef_>
async programming describes an event loop where the main thread is not blocked, and a function call is carried over to another thread which will be run at a later time, separate to the main thread. callbacks are the functions that run on that separate thread. that's probably not entirely accurate, but it's the general idea.
<jdmark>
and to be able to crank out usable code in the shortest time posssible
<jdmark>
also my choirces for learning material are the odin project or freecodecamp
<jdmark>
which narrows my OOB languages to Ruby and Javascript
jpn has quit [Ping timeout: 256 seconds]
<adam12>
Well I'd write both and see which one you like more, tbh.
<jdmark>
That entirely makes sense
<caleb>
^ that's the best way to put it, otherwise coming to a #ruby channel and asking "should I learn ruby" I would respond with a resounding yes
<caleb>
lol
<jdmark>
You have to know the languages to be able to write anything
<adam12>
jdmark: Might be worth doing the guided tours of languages. A ruby version is here: https://try.ruby-lang.org
<jdmark>
But obviously Ruby is going to be easier to learn with less features
<adam12>
jdmark: I'm not sure of a Javascript version but I'm sure the #javascript channel could advise you on one. Or maybe check MDN.
<jdmark>
What is the name of the standard that Javascript is based on?
<adam12>
jdmark: Ecmascript?
<jdmark>
I think so
<jdmark>
With Ruby adopting less features and deviating less from Ecmascript than Ruby would make it easier to learn
jpn has joined #ruby
leadgeek has quit [Quit: Leaving]
yossarian has quit [Ping timeout: 268 seconds]
Wellington2 has joined #ruby
yossarian has joined #ruby
yossarian has quit [Changing host]
yossarian has joined #ruby
mixfix41 has quit [Quit: brb]
jpn has quit [Ping timeout: 240 seconds]
Wellington2 has quit [Ping timeout: 240 seconds]
___nick___ has quit [Ping timeout: 248 seconds]
<ox1eef_>
i'm in love with nanoc to the point it almost feels like cheating on my wife
<adam12>
:O
<ox1eef_>
:D
<ox1eef_>
jk jk
_ht has quit [Remote host closed the connection]
SunClonus has joined #ruby
bit4bit_ has joined #ruby
bit4bit has quit [Remote host closed the connection]
SunClonus has quit [Read error: Connection reset by peer]
gproto23 has joined #ruby
finsternis has quit [Read error: Connection reset by peer]