<FromGitter>
<vladfaust> @straight-shoota all your arguments break on the fact that we already do have `foo &.bar`. We use it, but could have used `foo { |x| x.bar }`, which is *more explicit and self-explanatory*.
<rkeene>
mps, Learning more certainly helps see what's language and what's not
markoong has quit [Remote host closed the connection]
markoong has joined #crystal-lang
ashirase_ has joined #crystal-lang
markoong has quit [Ping timeout: 240 seconds]
jemc has quit [Ping timeout: 246 seconds]
Vexatoast has quit [Quit: ZNC Quit]
Vexatos has joined #crystal-lang
devil_tux has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter>
<j8r> @vladfaust the main point of `&.` is to chain blocks in a single line. I don't see a real plus in your proposal
<FromGitter>
<j8r> This only free us the `|x|` character, and add more confusions and complexity
<FromGitter>
<j8r> Crystal is already too complex :|
<FromGitter>
<HarrisonB> I'm confused what @vladfaust is responding to
<FromGitter>
<j8r> About a proposal in an issue
<FromGitter>
<j8r> I need to create an efficient Crystal file watcher that use Inotify...
<FromGitter>
<girng> @mps i only know php, javascript fluently, still learning crystal. however, i've never been a part of such a community like this before with the other languages, so i think i'll end up knowing crystal the strongest
<mps>
girng: my intention was not to give advice, just wrote 'aloud' what is my experience with learning languages, and not only languages. And yes, community where one can speak freely and ask even 'stupid' question without being ridiculed by others is good place to 'extend' ones knowledge
ashirase has quit [Ping timeout: 246 seconds]
ashirase_ has quit [Ping timeout: 250 seconds]
ashirase has joined #crystal-lang
ashirase_ has joined #crystal-lang
<FromGitter>
<girng> :D
markoong has joined #crystal-lang
<FromGitter>
<drum445> What do you guys think of using ECR (server side rendering) vs a separate app layer in something like Vue (client side rendering)?
ashirase has quit [Remote host closed the connection]
<jokke>
drum445: totally depends on your usecase
<FromGitter>
<drum445> What would you say are good use cases for each? I've never really use ssr but it seems like it could be good for less "interactive" sites
<FromGitter>
<drum445> So things that aren't very event driven
<jokke>
yeah exactly
<jokke>
so if you have more or less static content just use ssr and for stuff with a lot of reactive user interfaces use client side rendering
<jokke>
ssr is also much more accessible
<FromGitter>
<drum445> because you don't need another language?
<jokke>
because it works without javascript
<jokke>
for users that have it disabled
<jokke>
as a rule of thumb i'd say any public facing website should work without js
<FromGitter>
<robacarp> โ๐ป
<jokke>
which, sadly, isn't the case
<FromGitter>
<robacarp> I wish that were true, but the days of unobtrusive js are long over I think
<FromGitter>
<robacarp> My preference is: prove to me that you need JavaScript to have a better user interaction, and have a Sane fallback
<jokke>
yeah. but it's not a question of feasibility
<jokke>
only laziness
<FromGitter>
<robacarp> No, devs are just lazy
<FromGitter>
<drum445> I think JS is probably required for most things
<FromGitter>
<robacarp> Internet got along just fine for a long time without a metric ton of JavaScript that sites are being written with these days. Try it, there are a lot of great paradigms out there
<FromGitter>
<drum445> I really don't like what JS has become
<FromGitter>
<drum445> Templating engines are solid enough for most things
<FromGitter>
<yxhuvud> "No, devs are just lazy" <- It is usually a case of companies not wanting to pay to have two different implementations of the same html pages.
<jokke>
Yxhuvud: yeah
<jokke>
_but_ usually there's absolutely no reason to implement it in js in the first place
mps has quit [Quit: leaving]
<jokke>
you can even write a single page app without any javascript
<FromGitter>
<drum445> Most of them are done badly and ruin browser controls
<jokke>
yeah
<jokke>
if you want your stuff to be snappy you can add something like turbolinks (yes that's javascript)
<FromGitter>
<j8r> vue.js or ECR, pre render as much as possible :)
<jokke>
slang
<jokke>
imho much nicer than ecr
<FromGitter>
<Blacksmoke16> ill be the odd man out and like angular
<FromGitter>
<j8r> yeah, whatever techno: serving static content is more performant on server, better for SEO, faster for clients
<FromGitter>
<j8r> and more robust too - it depends less of a runtime
<FromGitter>
<Blacksmoke16> @straight-shoota would i be better off include the additions to `http/spec_helper` in my PR and use that for the oauth stuff, or just duplicate it in the `client_spec`?
<jokke>
what i really dislike about the js frameworks is the ssr components that depend on node and all that crap
<jokke>
fun fact btw: parceljs has native support for importing rust files :)
<jokke>
i'd love to see an embedded crystal version with a simplified stdlib and no gc
<jokke>
so we can compile to webasm too :)
<jokke>
and ยตC's too
<FromGitter>
<vivus-ignis> anyone has experience reading from a pipe? i.e. i do smth like `curl ... | ./crystal_prog`
<FromGitter>
<vivus-ignis> i tried this ` STDIN.each_line do |l| ...`, but it never enters this block
<FromGitter>
<drum445> Vue is my favourite frontend by far these days
<FromGitter>
<drum445> Angular seems too heavy
<FromGitter>
<drum445> I might try and use SSR more
jemc has joined #crystal-lang
mps has joined #crystal-lang
<jokke>
yeah vue is nice
<jokke>
but i also like preact
<jokke>
especially in combination with typescript
<jokke>
vivus-ignis: yeah. i do it all the time
<jokke>
please paste a minimal example
<FromGitter>
<vivus-ignis> jokke, could you show me a snippet please?
<FromGitter>
<vivus-ignis> folks, what is this ampersand here: `password = STDIN.noecho &.gets.try &.chomp` ? cannot find an explanation in the official "book" on crystal-lang
<FromGitter>
<HarrisonB> @vivus-ignis it represents the block param
<Yxhuvud>
It is a short form for typing ...try {||}
<FromGitter>
<HarrisonB> it's equivalent to `STDIN.noecho { |x| x.gets.try(x.chomp) }`
<Yxhuvud>
It is a short form for typing ...try {|x| x.chomp}
<Yxhuvud>
oops.
<FromGitter>
<Sija> to be precise `STDIN.noecho { |x| x.gets.try { |y| y.chomp } }`
<FromGitter>
<vivus-ignis> interesting. is this a crystal invention? cannot recall such stuff in ruby
<FromGitter>
<Sija> @HarrisonB your example is bit off in terms of 2nd arg
<FromGitter>
<Sija> @vivus-ignis in ruby you'd write `.try(:chomp)` instead of `.try(&.chomp)`
<FromGitter>
<vivus-ignis> got it. thanks, @HarrisonB Yxhuvud @Sija
<FromGitter>
<talbergs> Anyone has decent completion for crystal? At least main library api method completion. Damn I'm ready to switch away from vim to a place with completion
<FromGitter>
<vivus-ignis> oh cool thank you @Sija
<FromGitter>
<girng> grrrr vscode. updated extensions without my permission
<FromGitter>
<girng> made a issue in their repo. really sad
lwakefield[m] has joined #crystal-lang
<FromGitter>
<HarrisonB> @Sija thank you for the correction!
<FromGitter>
<j8r> It should be in the block section of the crystal guide
<FromGitter>
<jwoertink> Anyone here using sidekiq.cr ?
<FromGitter>
<jwoertink> I'm wondering how you run it along side your web app. Normally you'd have a Procfile that would run the local exec, but I don't have an exec from installing the shard locally
<FromGitter>
<Blacksmoke16> i use mosquito and docker, require the things it needs to run and just run the built binary in a docker container
<FromGitter>
<jwoertink> When you install that shard, do you add a target for it in your shard.yml to get a separate binary?
<FromGitter>
<Blacksmoke16> using the `targets` in shard.yml
<FromGitter>
<Blacksmoke16> yea
<FromGitter>
<jwoertink> do you point the `main` to your `lib/mosquito/whatever.cr` then?
<FromGitter>
<Blacksmoke16> so when i do a `shards build --production --static --release --no-debug` it will generate it as its own binary
<FromGitter>
<Blacksmoke16> which would be two separate binaries i can include in separate containers, so that if my worker fails it wont bring down web api
<FromGitter>
<jwoertink> cool. I'll give that a shot
<FromGitter>
<Blacksmoke16> id imagine sidekiq is similar?
<FromGitter>
<Blacksmoke16> i used it in ruby but not crystal