<newton>
deathadder, it's render(:edit, status: :unprocessable_entity), they are all symbols, :edit says to run the :edit action and status: :xyz is telling it what status code to respond with (422)
<newton>
there's also #rubyonrails jsyk
<deathadder>
ok
<deathadder>
all this symbol stuff in Ruby is confusing me
<deathadder>
Python doesn't have symbols does it?
<newton>
python doesn't have symbols but there isn't a lot to internalize about it
<newton>
there's a lot of places you could use symbols and strings interchangeably
<newton>
at least in rails :^)
<deathadder>
I learned expressjs today, but it seems to be a very light framework
<deathadder>
only really offers routing and middleware
<deathadder>
RoR seems very feature rich
<newton>
yes, if you're looking for something like express you might look at roda or sinatra
<newton>
rails is an entire mvc framework
<deathadder>
Rails even offers it's own template language
<deathadder>
erb
<adam12>
deathadder: You can consider a Symbol to be a String that only exists in memory once. It's normally used for application data (vs a string that could come from somewhere outside of the app; user, db, whatever).
<deathadder>
its*
<deathadder>
ok, thanks adam12
<adam12>
deathadder: Ie. You'd probably have a symbol named :username, but not likely a symbol named :deathadder.
protektwar has quit [Quit: No Ping reply in 180 seconds.]
<adam12>
ERB is Ruby (Embedded Ruby)
<deathadder>
yes
<adam12>
You can use it on Roda and Sinatra as well.
<deathadder>
I have a little bit of experience with C# and ASP.NET
protektwar has joined #ruby
protektwar has joined #ruby
<deathadder>
but it's very different, the language is statically typed.
<deathadder>
half the code is got to do with types
<adam12>
Definitely. I've heard a lot of people enjoying C# and also enjoying Ruby.
<adam12>
But it's a very different paradigm.
<adam12>
bbl.
<deathadder>
with dynamic languages you spent less time type wrangling, and more time getting stuff done
<deathadder>
spend
<newton>
if you do want to introduce the overhead of type wrangling into your dynamic ruby life look at sorbet.org 😏
<deathadder>
It's like TypeScript for JS
<deathadder>
but for Ruby
<deathadder>
sounds painful
<deathadder>
I had to switch from cmd.exe to powershell
<newton>
no transpiling required but yeah it can be a trip
<deathadder>
cmd.exe is so crap
<newton>
install wsl and abandon both
<deathadder>
powershell is ok
<deathadder>
it's kind of annoying that it uses backslashes
<deathadder>
I'm used to unix with forward slashes. luckily it corrects the slashes
<deathadder>
when I installed rails I had to screw around with config files
<deathadder>
it didn't like one of the gems
<deathadder>
on windows*
<deathadder>
tzinfo
<deathadder>
rails is really cool it has a lot of macros for boilerplate code
<deathadder>
it even creates CRUD macros
<deathadder>
resources
<deathadder>
in the routes.rb you can just say resources and it creates all the routes for you
<weaksauce>
haml is kinda annoyin
<weaksauce>
g
roadie has joined #ruby
reset has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
Rounin has quit [Ping timeout: 240 seconds]
protektwar has quit [Quit: No Ping reply in 180 seconds.]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
idiocrash has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
roadie has joined #ruby
<ox1eef>
another notable feature of symbols is that they are immutable.
roadie has quit [Ping timeout: 240 seconds]
reset has quit [Quit: reset]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
roadie has joined #ruby
idiocrash has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 250 seconds]
ur5us has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
Guest34 has joined #ruby
Guest34 has quit [Client Quit]
leachim6 has quit [Ping timeout: 252 seconds]
oxfuxxx has quit [Ping timeout: 240 seconds]
leachim6 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Excess Flood]
_ht has joined #ruby
favadi has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 250 seconds]
jpn_ has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
abws has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
_ht has quit [Remote host closed the connection]
lucf117 has joined #ruby
lucf117 has quit [Remote host closed the connection]
lucf117 has joined #ruby
some14u has joined #ruby
Rounin has joined #ruby
fercell has joined #ruby
ferr_ has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
jpn_ has quit [Ping timeout: 246 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Excess Flood]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
some14u has quit [Ping timeout: 272 seconds]
some14u has joined #ruby
some14u has quit [Client Quit]
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 240 seconds]
_aeris_ is now known as aeris
some14u has joined #ruby
ur5us has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
oxfuxxx has joined #ruby
oxfuxxx has quit [Excess Flood]
oxfuxxx has joined #ruby
oxfuxxx has quit [Excess Flood]
some14u has joined #ruby
tbob has quit [Ping timeout: 256 seconds]
tbob has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
seabre has quit [Ping timeout: 248 seconds]
seabre has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rapha>
hmm i always thought it intuitive, weaksauce
some14u has joined #ruby
some14u has quit [Client Quit]
roadie has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
some14u has quit [Client Quit]
andrea[m] has quit [Quit: You have been kicked for being idle]
roadie has joined #ruby
jpn has joined #ruby
roadie has quit [Remote host closed the connection]
dviola has joined #ruby
apotheon has quit [Ping timeout: 248 seconds]
apotheon has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
TomyWork has joined #ruby
asio has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucf117 has quit [Ping timeout: 246 seconds]
some14u has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
some14u has quit [Client Quit]
splud has quit [Ping timeout: 248 seconds]
some14u has joined #ruby
favadi has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Vonter has quit [Ping timeout: 240 seconds]
Vonter has joined #ruby
deathadder has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 240 seconds]
splud has joined #ruby
some14u has joined #ruby
favadi has joined #ruby
favadi has quit [Client Quit]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
wnd has quit [Remote host closed the connection]
wnd has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shiru has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
shiru has quit [Quit: leaving]
dionysus69 has quit [Ping timeout: 276 seconds]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
ferr_ has quit [Ping timeout: 276 seconds]
some14u has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tempesta has quit [Read error: Connection reset by peer]
some14u has joined #ruby
Tempesta has joined #ruby
some14u has quit [Client Quit]
jpn_ has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
<nebiros>
how can I add documentation for a @return [Hash]?, I want to describe the keys of the hash
<nebiros>
I was thinking to use yard instead of rdoc in a rails app, or maybe not?
<adam12>
nebiros: I think it's @return Hash<KeyType, ValueType>
<adam12>
ie. Hash<String, Object> or something.
<adam12>
I bounce between rdoc, yard, and tomdoc. I actually dislike all 3 in some way. I think we could do better, somehow.
<nebiros>
adam12: ++
<nebiros>
adam12: guess yardoc is more "feature rich"?
<adam12>
nebiros: Definitely, but it is maintained mostly by one guy and didn't receive any adoption from core.
<adam12>
nebiros: rdoc is obviously core, but I feel has very little forward movement. Most of the original authors have left, and I am not sure anybody is willing to push it forward. But I am unsure a new library would be adopted or blessed by core.
<adam12>
I have some thoughts on how to improve this, but I havent' sat down and looked. But rdoc with improvements would likely be where I focused.
ssh073 has joined #ruby
bit4bit has joined #ruby
fercell has joined #ruby
gproto23 has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
moldorcoder7 has joined #ruby
moldorcoder7_ has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
_ht has joined #ruby
Starfoxxes has quit [Ping timeout: 248 seconds]
jpn_ has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
<havenwood>
nebiros: Just an aside, but you could also add RBS to describe the type: def nebiros: -> Hash[Symbol, String]
<havenwood>
Funny that RDoc is the standard that ships with Ruby and so many folk use Yard. Reminds me of Minitest shipping with Ruby and so many folk using RSpec. Folk like fancy.
<havenwood>
RBS, typeprof and steep are nifty, just need to mature.
<havenwood>
Type and tests serve somewhat as executable docs. I kinda like how Elixir supports tests in docs.
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 272 seconds]
some14u has joined #ruby
jpn has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
Starfoxxes has joined #ruby
<nebiros>
havenwood: got it
<nebiros>
guess rust also has tests in the examples
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
<nebiros>
rubymine doesn't support Hash[Symbol, String] seems like
<nebiros>
*sigh*
bit4bit has quit [Quit: Leaving]
emcb54 has quit [Ping timeout: 240 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
some14u has joined #ruby
gproto23 has quit [Ping timeout: 272 seconds]
jpn has quit [Ping timeout: 246 seconds]
gproto23 has joined #ruby
emcb54 has joined #ruby
<havenwood>
nebiros: RubyMine does have RBS support. I know since I connected them with the author. :)
mooff has quit [Remote host closed the connection]
rawley has quit [Remote host closed the connection]
TCZ has quit [Quit: ...]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xlymian has joined #ruby
comet23 has joined #ruby
comet23 has quit [Client Quit]
gr33n7007h has quit [Ping timeout: 276 seconds]
lucf117_ has joined #ruby
lucf117 has quit [Ping timeout: 276 seconds]
gr33n7007h has joined #ruby
perrierj1 has joined #ruby
perrierjouet has quit [Ping timeout: 248 seconds]
<ox1eef>
the type signatures in yard can be whatever. still, Hash<String, String> is common. I've been using Object<Foo, Bar> to indicate an instance of Object extended by Foo and Bar.
xlymian has quit [Remote host closed the connection]