Hacker News new | past | comments | ask | show | jobs | submit | swanson's comments login

RE "neutered inspector": you can inspect the element and click ".cls" to toggle off classes: https://i.imgur.com/ig2SQw3.png

RE "you can't chain selectors": you can stack modifiers like `dark:hover`. The example of having the same styles for hover, active, and focus actually seems Not Great as those are different states that you 99% of the time want to look visually different (Tailwind examples include things like hover:bg-blue-600 active:bg-blue-700 which just seems like a better guardrail)


RE: RE: Neutered inspector. Thanks for showing me that, I legitimately missed when it was added and never got it into my workflow. I'll stick a note on that section of the article

RE: RE: You can't chain selectors. Its still a valid issue, a lot of styles you would want to apply text decoration to hover/focus/focus-visible, but not the visited, active, or plain state. You still have to write `hover:underline focus:underline focus-visible:underline`.


I got really into daily fantasy at the height of the boom: you make a fantasy football lineup and enter it into paid contests. For big leagues like the NFL you can potentially win millions of dollars (but there are tons and tons of players and lots of 'pros' that do it full-time).

But for the past several years, I have been only playing niche sports: specifically Canadian football (CFL). It's way smaller stakes but the competition is much easier and I've written my own analytics tools so I have a nice edge compared to NFL where there is tons and tons of high quality content and analysis. I've profited over $20k during the past three seasons.


I used OR-Tools via the Python bindings a few years ago. It was nice to work with once I got setup but it was a pain to get it installed (both locally and when deploying to a cloud server).

I would have liked some kind of API that I could call out to instead but nothing existed at the time: you pass in the inputs to construct the linear equations and then you get back the results.


I think the article would be better if you were to include even a basic template instead of just adding the <strong> tag. Right now, my first impression would be "why not just wrap the content in <strong> in JS instead of making a network request on every keystroke?"

The benefit of being able to reuse the server template logic isn't being demonstrate because of the simplicity of the example.


I was thinking of that, but I think the point is that you do any transformation in Ruby. I focused on how to do that. Thanks for the feedback.


It is great to see more options for non-accredited investors. There are plenty of software-type folks in low-cost of living states that don't meet the net-worth / salary bar but are well off financially and understand the risks.


This is neat. You might consider making a twitter / instagram bot version. I like the Word of the Daily and would be nice to mix that into my twitter feed vs getting an email or viewing the page.


And getting FDA approval is not the finish line. It's just the start of the roll-out. Now employ teams of reps to get the drug covered by every commercial insurance company and all Medicare/Medicaid parties so that patients have access to this life-saving treatment, get policies and authorization forms and billing codes created and implemented. Do outreach to make sure doctors and patients even know that a drug has been approved and how it compares to existing options.


I really hated SmartTVs and would actively avoid them, but I recently got one of the Roku branded TVs and it's actually quite good. Roku has always been great for me in terms of software updates, availability of streaming services, and good-enough UI that everyone in the family can use it.


Aren't roku devices notorious for gathering data on how you use their hardware and what you watch? In fact as far as I know you can't even use their TVs without actually creating an account with them. If this is still true, it's completely NUTS!


When you set up a Roku TV, you have the option to never connect to the Internet and use it as a dumb TV. In that mode, no WiFi or Ethernet connection is active and there's no connection to a Roku account.

If you've already connected the TV, you can factory reset it to an unconnected state.


Roku does like to log all your actions, but just use something like pi-hole and it's nicely blocked.


You're placing too much trust into the effectiveness of pi-hole and its associated filter lists. Here are some failure modes I can think of:

* using fallback hardcoded IPs when DNS fails

* using DoH so it's impossible to tamper with the response

* using the same domain for spying as other critical functions

* new domains might not show up on the filter lists right away, and if the TV keeps a backlog of failed requests, all your viewing history might be uploaded when that happens


https://news.ycombinator.com/item?id=21011313

Apparently Roku sends audio and/or video fingerprints of frames (not frames themselves).


I got a Roku device too, and just didn't connect it to the internet. Works fine for me. I'd still prefer an unconnected option, but this will do.


I share some of the same issues, I have found that ERB templates work better than HAML for lots of data attributes.

Basecamp seems to use liberal newlines / spacing when creating html tags (like one line per attribute) so that might help.

Server-side "component partials" still don't have a great story, but view_component is one emerging option.


As another option, HAML lets you extract the attributes into a ruby helper method:

https://haml.info/docs/yardoc/file.REFERENCE.html#attribute-...


Same. I’ve been a happy user of Haml for about ten years, but I think that Tailwind and Stimulus will permanently force me back to ERB :(


They are both JS frameworks, but they are fundamentally different approaches.

React (and React-rails) moves rendering / state / logic clientside. You can use tools like react-rails to more easily pass data from your Rails controller to your react components (basically conveniences to create props from instance variables).

Stimulus doesn't handle rendering at all. It's intended to be used for small little "sprinkles" of JavaScript (think things like: showing / hiding content, toggling classes, basic event handlers). If you used to write jQuery snippets to wire up a click event to run ~5-10 lines of JS, then you might look at Stimulus as a more modern implementation (es6, mutationobserver, etc). Stimulus plays nicely with Turbolinks since it needs existing HTML (servered rendered from normal Rails views) to attach to.

You're basically looking at two diverging paths: do you go down a JS-driven SPA application with React (or some kind of hybrid where you have React do parts of the page) or do you opt for Basecamp's "I cant belive its not a SPA" approach with Turbolinks, server-rendered HTML, and Stimulus for small interactivity.

Here's a talk I gave at the London Ruby meetup about Stimulus and in what contexts you might want to use (or not use it): https://assets.lrug.org/videos/2020/september/matt-swanson-s...


What you are describing seems similar to good old BackboneJS?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: