<mooff>
what about webassembly as a production target for Ruby web applications?
<mooff>
has anyone been playing with that?
<mooff>
wondering if you could totally get rid of C in production
<mooff>
(except whatever provider / global equipment is doing, lol)
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
RDSM has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
markong has quit [Ping timeout: 255 seconds]
RDSM has joined #ruby
Bruno37 has quit [Quit: Client closed]
<lena64t>
mooff: There is Artichoke Ruby on its way
<lena64t>
Written in rust so You can compile ruby to webassembly and run in browser
<lena64t>
You can compile whole ruby to WA, and run .rb code on the frontend
<lena64t>
But it's work in progress
<mooff>
i guess does rack work on Artichoke or wasm CRuby?
<mooff>
Mozilla seemed to imply that going through a wasm compilation phase eliminates a couple of classes of memory vulnerabilities
<mooff>
even for C libraries
Pastorinni has joined #ruby
Pastorinni has quit [Ping timeout: 250 seconds]
<ox1eef_>
mooff: github.com/ruby/ruby.wasm
<ox1eef_>
No thread support, no network support. If your rack app uses either of those, it won't be a contender.
roadie has joined #ruby
<mooff>
if you have just read() and write(), that's enough for network support
* mooff
says, from the comfort of his armchair
<mooff>
$ wasi-vfs pack
<mooff>
nice
<ox1eef_>
It seems to have the most potential as something you could delegate work to, rather being the driving force, at least for now
diegosparente has joined #ruby
<diegosparente>
Ruby Brasil
roadie has quit [Ping timeout: 248 seconds]
diegosparente has left #ruby [#ruby]
<ox1eef_>
tudo bem?
moldorcoder7 has quit [Ping timeout: 252 seconds]
<RDSM>
ox1eef_ Due to telegram recently being blocked in Brazil, the ruby brasil telegram group have moved here, we suggested both channels, this one, and a portuguese-speaking one. Some users are getting here expecting the portuguese one.
Bruno68 has joined #ruby
Roqueando has joined #ruby
Bruno68 has quit [Quit: Client closed]
<mooff>
bem-vindos/as
<juuh42dias>
:) thanks (hello folks)
<RDSM>
Thanks :)
RDSM_ has joined #ruby
RDSM has quit [Killed (NickServ (GHOST command used by RDSM_!~RDSM@2001:ac8:88:82:c473:2153:246b:4db6))]
RDSM_ is now known as RDSM
lunks has joined #ruby
artiumdominus has joined #ruby
<artiumdominus>
u all folks use strange names here in IRC?
RDSM_ has joined #ruby
<artiumdominus>
RDSM, LOL, I almost understood your name wrong.
<RDSM_>
@artiumdominus a lot of people do :)))
<artiumdominus>
what it means? Resultados Digitais Station Marketing?
<juuh42dias>
I always use the same handle (when is possible rs)
RDSM has quit [Ping timeout: 265 seconds]
artiumdominus has left #ruby [#ruby]
RDSM has joined #ruby
RDSM has quit [Client Quit]
donofrio has joined #ruby
RDSM has joined #ruby
RDSM_ has quit [Ping timeout: 240 seconds]
RDSM has quit [Changing host]
RDSM has joined #ruby
juliana has joined #ruby
juliana has quit [Client Quit]
juliana has joined #ruby
<juliana>
quit"
juliana has quit [Client Quit]
Roqueando has quit [Ping timeout: 245 seconds]
<leftylink>
I don't think this name is that strange at all. Link from The Legend of Zelda is left-handed so this name is accurate and not strange
Pastorinni has quit [Remote host closed the connection]
Pastorinni has joined #ruby
RDSM_ has joined #ruby
RDSM_ is now known as RDSM
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
RDSM has quit [Client Quit]
CrazyEddy has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #ruby
RoadHouse has joined #ruby
RoadHouse18 has joined #ruby
RoadHouse has quit [Quit: Client closed]
RoadHouse18 has left #ruby [#ruby]
Pastorinni has quit [Remote host closed the connection]
lena64t1 is now known as lena64t
Pastorinni has joined #ruby
Pastorinni has quit [Remote host closed the connection]
Pastorinni has joined #ruby
kokoro has joined #ruby
roadie has joined #ruby
lunks has joined #ruby
gemmaro has quit [Remote host closed the connection]
Ignorand has joined #ruby
TomyWork has quit [Remote host closed the connection]
<Ignorand>
I am having trouble with making an object which I URI.encode_www_form. My object has sub-objects. and it seems I need it to be in the form of "checked" : "false" instead of "checked" => "false"
<adam12>
Ignorand: if I am understanding your problem correctly, there is no difference between those two forms.
<adam12>
Ignorand: So perhaps you can show an example?
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Guest22 has joined #ruby
Guest22 has quit [Client Quit]
RDSM has quit [Ping timeout: 255 seconds]
RDSM has joined #ruby
FullMetalStacker has joined #ruby
<FullMetalStacker>
Hi guys! I have an idea for a project and try to figure out how to do it. The project will start using Discourse, which is a modern web forum software based on rails. I want to kick the project off with installing discourse and run the forum. But then I want to start adding features to my platform which go far beyond the forum, such as a webshop, a knowledgebase, and a fully fledged custom built web application, all in rails.
<FullMetalStacker>
will i use the rails installation of discourse and then expand it to become that monster? or will i rather do a "rails new" and built the other stuff and then have 2 or more rails apps cooperating, i.e. the discourse rails and my own rails, e.g. by synchronizing the user base? (x-post, follow up in #ruby)
ignorand_ has joined #ruby
ignorand__ has quit [Read error: Connection reset by peer]
Pastorinni has quit [Remote host closed the connection]
Ignorand has joined #ruby
<ox1eef_>
Create a new Rails app. And mount Discourse at '/discourse' or something like that. You can do the same for the other parts either with Rails engines, or Rack apps mounted in a similar way to Discourse.
Pastorinni has joined #ruby
RDSM has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
ignorand_ has quit [Ping timeout: 254 seconds]
<ox1eef_>
https://monorepo.tools/ would be good to research as well. Typically done for JS but the idea can be applied to any language.
RDSM has joined #ruby
Pastorinni has quit [Ping timeout: 248 seconds]
<FullMetalStacker>
hey ox1eef_! thanks for your help. the entire platform will have the rails forum discourse, an online shop such as the rails gem spree or shopify or wordpress+woocommerce, a marketplace for the users to trade stuff with each other and the custom rails app for the users to manage their inventory and other features. so if i got you right, i should do a stand-alone installation of every of this feature clusters and then join
<FullMetalStacker>
their login database to be across all those installations?
<FullMetalStacker>
the result should look and feel like one huge app
<FullMetalStacker>
@monorepo.tools, great looking at it right now
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lena64t has quit [Remote host closed the connection]
lena64t has joined #ruby
<ox1eef_>
The Rails router has a 'mount' method. You can use it to mount a Rails application (or any Rack app) at a certain path. You will probably face some challenges in doing so, but in theory it is possible.
Dooky has joined #ruby
<ox1eef_>
One obvious challenge is dependency management. If you mix a bunch of different applications into one process, then Bundler will have to be able to resolve and satisify the dependency requirements of each of them.
Pastorinni has joined #ruby
<FullMetalStacker>
what is a rack app in this sense?
<ox1eef_>
An object that implements call (which receives an 'env' hash), and returns a three-element array (status code, response headers, response body).
<leftylink>
any app that uses Rack, the Ruby web server interface
<ox1eef_>
It is the simple idea that all Ruby web frameworks are built on.
infinityfye_ has joined #ruby
infinityfye_ has quit [Remote host closed the connection]
<FullMetalStacker>
got it
<ox1eef_>
I think you will face a lot of hurdles with that idea.
kokoro has joined #ruby
<ox1eef_>
You want one users table, right ? But each application will have its own idea of what the users table looks like.
<FullMetalStacker>
by mouting to the mountpoint what exactly gets "mounted"? the user base of the mount to be joined to the host?
<FullMetalStacker>
yes, it should feel like one huge app with a single sign on
<ox1eef_>
The application gets mounted. If you mounted Discourse at '/discourse', then visiting /discourse would bring you to the Discourse app.
<ox1eef_>
That won't be easy. I can imagine all sorts of obstacles and challenges.
<FullMetalStacker>
you say this idea is complicated, what would the best approach be? develop all from scratch in one big monolithic rails app?
infinity_fye has quit [Ping timeout: 276 seconds]
<FullMetalStacker>
got it so it is only web linking to the app, but not really joining anything on a database level as i figure.
<ox1eef_>
Right. And discourse will have a users table. Spree will have a users table. And each of their idea of what the table looks like.
<FullMetalStacker>
what i try to do is not reinvent the wheel but stick the existing components together to one huge system
<FullMetalStacker>
what would the best practice way be to do that?
<ox1eef_>
You should look into Rails engines as well. They're something like a slice of an application. And I think hanami has a good approach for this as well. But the idea of mashing different open source Rails apps into one app probably won't work out.
<FullMetalStacker>
should i consider implementing a Single Sign-On (SSO) solution instead and just have all apps living their isolated life behind the scenes_
<FullMetalStacker>
?
<ox1eef_>
I can't answer that but my approach would be to start from zero so you have full control over what's possible.
<ox1eef_>
You could have a forum engine, you could have a e-commerce engine, etc. Look into open source Rails engines as well. It would be easier to integrate multiple engines into one app.
<FullMetalStacker>
looking into those rails engines right now. they are not just gems, right? with such e.g. "e-commerce-engine" you dont mean e.g. the gem spree, no?
markong has quit [Ping timeout: 240 seconds]
<ox1eef_>
An engine can be composed of controllers, models, views, and routes. It is like a small slice of an application that can be integrated into a bigger application. Engines can be distributed as gems.
kokoro has quit [Quit: Ping timeout (120 seconds)]
kokoro has joined #ruby
kokoro has quit [Quit: Ping timeout (120 seconds)]