Readit News logoReadit News
CornCobs commented on Show HN: Wat – Deep inspection of Python objects   github.com/igrek51/wat... · Posted by u/igrek51
timdorr · a year ago
I'm not a Python dev. Why would they do this? This is giving vibes of malware embedded into npm packages.
CornCobs · a year ago
Not everywhere that python is run has access to pip. Sshing into some locked down remote machine and needing to debug some script is a use case that comes to mind.
CornCobs commented on Show HN: Wat – Deep inspection of Python objects   github.com/igrek51/wat... · Posted by u/igrek51
revskill · a year ago
Is there similar tool for typescript/javascript ?
CornCobs · a year ago
Isn’t the browser inspector more than sufficient? You get the interactive object inspector in the console, live expressions, log points etc.

For node you it’s possible to hook it up with the browser inspector as well

CornCobs commented on Generalizing Support for Functional OOP in R   blog.r-project.org/2024/0... · Posted by u/samch93
CornCobs · 2 years ago
Something interesting I realized about their choice of name - S7.

1. It's a combination of S3 and S4 obviously.

2. It's also linked to another OOP system called R6. Interesting how it's a step forward one way (6->7) and a step 'backwards' in another way (S->R).

To me it shows the philosophy of not creating something entirely new but improving the existing systems quite nicely!

CornCobs commented on Generalizing Support for Functional OOP in R   blog.r-project.org/2024/0... · Posted by u/samch93
usgroup · 2 years ago
Yet you’re using OOP every time you call plot, predict, summary and so on: possibly without realising.
CornCobs · 2 years ago
I actually think this "multi-tiered" system of OOP is quite cool, when compared to languages that stick OOP in your face upfront.

1. Basic users don't even know it's there, they're just calling regular functions.

2. S3 in base is super simple to understand and easy to extend the first time you need to implement your own summary.

3. Full blown OOP with slots and methods is available when you really need it (rare for a user and not library author imo, lists and S3 are sufficient for most things).

The big issue I see is the incompatibilities in the various systems making this "ramp up" not so smooth. But it looks like that's what S7 is trying to address so that's cool.

CornCobs commented on Generalizing Support for Functional OOP in R   blog.r-project.org/2024/0... · Posted by u/samch93
orhmeh09 · 2 years ago
Thank you for the correction. Is it possible to use NSE in say Python or JavaScript?
CornCobs · 2 years ago
Yes, though the languages do not support it explicitly you can simulate lazy evaluation by wrapping all your arguments in closures. This way they won't be evaluated until called within the function body.
CornCobs commented on Enhancing R: The Vision and Impact of Jan Vitek's MaintainR Initiative   r-consortium.org/blog/202... · Posted by u/wodenokoto
rrr_oh_man · 2 years ago
I adore R.

It's the language I'm most proficient in. Tidyverse is the most human-friendly way for explorational data analysis. Data.Table is blazing fast. RStudio is the best IDE I've ever seen and so tightly coupled with the mostly amazing documentation that it's a pure delight. CRAN's quality control next to none.

That being said, I prefer Python for my production use cases.

Why? What's missing in R, imho, is:

a) a decent interface to the web.

b) a decent way to use async processing / utilise the CPU fully.

I've found ways around both, but compare `Shiny` to `FastApi` + `Jinja2` and `future` to `asyncio`.

Shiny just feels clunky, no matter what you do. And R `future` (which saved my butt in 2019 when I was processing millions of geospatial data points for a project, so not throwing any shade) can be a total mindfuck and bug out (at least back then).

(Man, I miss working more in R, though.)

CornCobs · 2 years ago
I too am a Tidyverse shill. Hadley Wickham truly did an amazing job designing the whole ecosystem and API. I personally haven't encountered another API that has given me the same feeling of mastery and empowerment - just the correct blend of expressiveness, cohesion and ease of use.

Of course this is partly attributed to R's great DSL capabilities and making documentation first class. But I've definitely seen terrible APIs in R too.

Wonder if anyone else has had a similar experience with another ecosystem? (Regarding API design)

CornCobs commented on Facebook just updated its relationship status with Web Components   mux.com/blog/facebook-jus... · Posted by u/mmcclure
j-bos · 2 years ago
Having worked with internal company web components, I despise them. In a bureaucracy, bad and buggy web components are a blight because, unlike a bad React component,ad hoc fixing them requires a mess of searching and tons of boilerplate. I accept this news with mourning.
CornCobs · 2 years ago
I'm in a similar boat. I have to use a 3rd party component library written in web components for our react app (esri/calcite-components) and it's a huge pain because * You can't override styles except what is exposed through css variables * They often encapsulate some internal logic which I can't control from React (tbh this could happen with a React library too)
CornCobs commented on Mobile Ad Blocker Will No Longer Stop YouTube's Ads   gizmodo.com/your-mobile-a... · Posted by u/Hary06
BadHumans · 2 years ago
Just use NewPipe. It's just a better Youtube client even if it had ads.

https://newpipe.net/

CornCobs · 2 years ago
Seconding NewPipe. Though recently it's been unable to load comments and the error banner keeps popping up as a result (no comments may actually be a plus?)

I still use the regular Youtube app for shorts but NewPipe is definitely a better experience overall. My main gripes with the official Android Youtube client: - They made it so annoying to choose your video resolution (Seriously, who tested this and found it better than the old method?) - I can accept not being able to play in the background, but if you lock your screen while in fullscreen mode and then unlock it, there is a very noticeable lag before the app exits fullscreen mode, and in this period you cannot resume playback.

CornCobs commented on If Inheritance is so bad, why does everyone use it?   buttondown.email/hillelwa... · Posted by u/harperlee
explaininjs · 2 years ago
Mainly because nobody is a "CSS Dev". If someone's entire job was developing CSS, you might expect that they would be willing to learn one new slightly different way of doing it. But in reality the pushback comes from full stack developers who already have a million other things to worry about, such that relearning all the basic CSS they already know, to achieve benefits that are rather minuscule in the grand scheme of things, is a low priority. I personally am working on a Tailwind product that is fairly small (~10k lines, perhaps), and the Tailwind isn't an annoyance per-say, but it's definitely less ergonomically friendly than the well-engineered enterprise application I was working on before, which was 100x the size and used exclusively pure CSS.

Personally, my dream would be if inline styles supported the full CSS gamut of pseudo selectors and the child element selector. Then you'd have the admitted benefits of not needing to synchronize the two files, along with the benefit of not needing to relearn all of CSS.

Edit: it's funny, in a way, that all these developers complaining about how CSS "doesn't scale" are likely writing their Tailwind in an large scale application styled entirely via CSS. https://github.com/search?q=repo%3Amicrosoft%2Fvscode++langu...

CornCobs · 2 years ago
Inline styles don't work with a strict CSP. Have you ever had to work with such a restriction?
CornCobs commented on Arraymancer – Deep learning Nim library   github.com/mratsim/Arraym... · Posted by u/archargelod
CornCobs · 2 years ago
What syntax of nim's is the network: ... Used to declaratively construct the neural networks? Is it a macro? Looks really neat!

u/CornCobs

KarmaCake day356September 12, 2020View Original