<Guest39>
Seeking wisdom on Ruby on Rails vs Django For web deb =D
<bougyman>
Don't use them
<bougyman>
create lightweight apis and offload most of the logic onto the client.
<bougyman>
neither rails nor django is "lightweight". There's roda, sinatra, rack, others for making lightweight apis in ruby. Similar exist for python (offtopic for this channel)
<FullMetalStacker>
@gr33n7007h Yeah, thank you for that link, I am aware of that project. But what I wanted to say is if the Rails project itself has considered to support Crystal, not if someone has forked or cloned Rails to a separate fork/project
<gr33n7007h>
FullMetalStacker: i highly doubt that will happen
<FullMetalStacker>
why?
<FullMetalStacker>
It would really make sense for Rails in terms of gaining former glory
<gr33n7007h>
it's a completely different language for one.
D_A_N has joined #ruby
<gr33n7007h>
the blood, sweat,tears and agony thats gone into making rails 7 would just not be justified imho.
Nasenspray has joined #ruby
<FullMetalStacker>
well, yes, a different language. but "completely different"? is is almost identical sytax. i would not go so far to say that crystal is "compiled ruby" as some do, but for sure the similarities are such that any rubyist can adapt in zero time. Making Rails supporting both, scripted ruby and compiled Crystal, would give Rails an tremendous competitive advantage, overtaking in speed many of the main competitors such as node/
<FullMetalStacker>
express.js. And instead of reinventing the wheel and creating new web frameworks for Crystal from scratch (such as Amber Framework or Lucky Framework) someone could have the entire power of long-term project Rails with the C-like runtime speed of Crystal, if computation speed is what he needs for his project. Instead of abandoning Rails and going for Elixir/Phoenix or other faster technologies.
grokify has joined #ruby
<ox1eef_>
the syntax is similar, sure but there's a ton of differences that would lead to a Rails that isn't Rails as we know it.
<gr33n7007h>
FullMetalStacker: i get your point, i just don't see it happening tbh.
<FullMetalStacker>
@ox1eef_ can you give examples?
grokify has quit [Remote host closed the connection]
<ox1eef_>
FullMetalStacker: Rails is a Ruby framework, and Crystal - although inspired by Ruby, is not Ruby. It is its own language with its own ideas. What works best for Crystal will not be Rails. it will be what is born in the Crystal ecosystem by people familiar with Crystal. It is not trying to fit a square into a circle. It doesn't work.
<ox1eef_>
And yep - world cup started 2 days ago.
<FullMetalStacker>
can someone help me please with this:
<FullMetalStacker>
why are "123" and "Cool Man" not eliminated?
caedmon has joined #ruby
<ox1eef_>
friends.select { f.length != 4 }
btedo has joined #ruby
<ox1eef_>
friends.select { |f| f.length != 4 } *
<ox1eef_>
as a general rule, don't mutate what you're iterating over.
<wnd>
related, you may have misunderstood what #map does
<FullMetalStacker>
ox1eef: Thanks for the solution and the hint what is the cause!
<FullMetalStacker>
wnd: Can you elaborate and make me understand my misunderstanding?
<ox1eef_>
if only "Ryan" should be left, then you actually want: friends.select { |f| f.length == 4 }
<FullMetalStacker>
yes, i adapted that, thanks!
<ox1eef_>
map is not used as a filter (like reject, or select) - it is used to transform the elements of an array into something else... for example, [1,2,3].map(&:to_s) will give you an array of strings instead of an array of integers.
<FullMetalStacker>
ok got it thank you!
<ox1eef_>
np
grokify has quit [Remote host closed the connection]
btedo has quit [Remote host closed the connection]
btedo has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
btedo has quit [Ping timeout: 268 seconds]
leftylin1 is now known as leftylink
desnudopenguino has joined #ruby
alexherbo2 has joined #ruby
otisolsen70 has quit [Quit: Leaving]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
btedo has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
btedo has quit [Ping timeout: 260 seconds]
otisolsen70 has joined #ruby
grokify has quit [Remote host closed the connection]
Petruchio has quit [Remote host closed the connection]
caedmon has quit [Ping timeout: 256 seconds]
cartdrige has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
caedmon has joined #ruby
szkl has joined #ruby
TomyWork has joined #ruby
btedo has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
alexherbo2 has joined #ruby
btedo has quit [Ping timeout: 268 seconds]
caedmon has quit [Quit: caedmon]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
caedmon has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
stirl has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
stirl has quit [Remote host closed the connection]
stirl has joined #ruby
___nick___ has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
crax23 has joined #ruby
grokify has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
dionysus69 has joined #ruby
desnudopenguino has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
Aminda has quit [Remote host closed the connection]
grokify has quit [Remote host closed the connection]
aighearach_ has quit [Remote host closed the connection]
aighearach_ has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
Nasenspray has quit [Remote host closed the connection]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
duderonomy has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Linux_Kerio has quit [Ping timeout: 268 seconds]
some14u has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tirnanog has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
idkwtf has joined #ruby
hightower2 has quit [Remote host closed the connection]
markong has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
some14u has quit [Ping timeout: 260 seconds]
hightower2 has joined #ruby
otisolsen70 has quit [Quit: Leaving]
some14u has joined #ruby
odd131 has joined #ruby
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
znpy has joined #ruby
<znpy>
hi all! quick question: i need to start working on a codebase at work that's on ruby 2.7.x, is Programming Ruby at https://ruby-doc.com/docs/ProgrammingRuby/ still good as an introductory book about ruby ?
<znpy>
i have prior programming experience but the book says it's about version 1.6 from ~2000
<znpy>
22 years is a bit much
<znpy>
otherwise, what material would you recommend ?
some14u has quit [Ping timeout: 260 seconds]
<weaksauc_>
huh
<weaksauc_>
that's supposed to be an excerpt from the pickaxe book
<weaksauc_>
I thought they were using something more recent than that
<znpy>
weaksauc_: it's the full book it seems ?
<znpy>
weaksauc_: «The seminal work on Ruby in English, this first edition of the Pragmatic Programmers’ book is available for free online.»
<weaksauc_>
there were a lot of changes from 1.8 to 1.9
<weaksauc_>
quite a few breaking changes
<znpy>
sure
<weaksauc_>
well grounded rubist is good
<weaksauc_>
i really liked eloquent ruby but it's out of print
<znpy>
is it just me or there is no proper tutorial about current ruby on the website ?
<znpy>
the ruby programming wikibook is from 2012
<weaksauc_>
yeah
<weaksauc_>
ruby koans are good practical things
<weaksauc_>
why's guide is pretty good too
<weaksauc_>
not too much has changed though in the basics of ruby