NaN1352's comments

NaN1352 | 4 years ago | on: We check our node_modules folder into source control

I don’t check in node_modules but do a backup once in a while.

With frontend nowadays it’s sad but after six months it’s highly unlikely that my project will compile, not to mention the tooling like Vue, Vite, etc that has breaking changes.

I mean it’s scary. You write a program and it WONT run if you just give it enough time. Locking versions is not really a solution since often times the tooling itself, and IDE extensions require newer versions of packages.

Maybe you wanted to fix a typo a year down the line but oh no, now you need to figure out why Vite won’t start, why eslint dropped support for xyz, spend hpurs figuring out what you need to change in your configs, etc.

NaN1352 | 4 years ago | on: Modern PHP Cheat Sheet

As a JS dev it’s nice to see php imitate some newer js syntax like nullish coalescing, arrow function, … helps me to switch between the languages.

It really needs a way to declare type of small data structures though, in a very concise way (no class boilerplate, for performance eg. going through 10000’s of entities).

PS : on the other hand I’m starting to dislike how languages become "designed by committee", and lose the purity of the original design.( thinking of JS mostly here with its gazillion rfcs)

NaN1352 | 4 years ago | on: Modern PHP Cheat Sheet

Can you directly cast an object / assoc array to an instance of such a class?

If I have a function that receives eg a Message, it means an instance of the class right? So somehow my assoc.array/object still needs to be instanced, and if I do just $message = new Message($theData) … it doesn’t auto assign properties right? That would be handy though still very much boilerplate.

I guessthe language is just designed for how it’s been used so far, may e it will change if JIT makes php more open ended in its uses.

NaN1352 | 4 years ago | on: Modern PHP Cheat Sheet

Genuine question from a php hobbyist : what is the equivalent of Typescript’s ability to declare an object’s structure?

It’s really weird to me, I mean don’t we do this all the time? Work with eg. an $options array/obj passedto a constructor, or say, a message decoded from JSON…

I could write $name = $message[‘username’] … and there is no checks in ide or runtime, while the phpdoc will just document $message to be an object or array… what am I missing?

It looks like php devs create full blown classes to represent just about every data strcuture, but what if it’s just data and you don’t need any attached logic’ Isn’t there a concise way to declare a complex type?

NaN1352 | 4 years ago | on: The metaverse is bullshit

The scariest part about people like Mark Zuckerberg is they actually believe their own drivel.

I believe much of it comes down to left brain hemisphere dominance, as would suggest Mc Gilchrist’s "The Divided Brain".

These people are ungrounded, and most concerning is they are less capable of empathy (a scientific fact outlined in the book I mentioned).

It really does not bode well for society that these people have so much power and money, as it’s not just them, but millions of people around the world slowly getting out of touch themselves through using apps and services created from this "left hemisphere dominant" attention to the world.

NaN1352 | 4 years ago | on: macOS Monterey

Focus …. by adding gazillions of notification options, and also get more notifications for "weekly screen time"… yeah, I really needed even more useless information to process instead of living my life. If i want time off i’ll just put the device down, what a concept :/

They’ve got it completely backwards.

NaN1352 | 4 years ago | on: Storybook: UI component explorer for front end developers

I agree it’s fairly easy nowadays to maintain a "live" demo of your components with Vue or React.

It’s useful also to keep semi static mockups when you do revisions on a homepage for example (as the html/css guy) so you can preview something with the team.

And nowadays you have simple Markdown + Vue plugins for eg. Vite, so you could even write your styleguide / demo as .md files.

NaN1352 | 4 years ago | on: DaisyUI – Tailwind CSS Components

I would suggest the use of convention like SuitCss for your custom component classes so you can lint them thoroughly to ensure low specificity.

I would recommend to use a prefix on your custom classes, to "namespace" them. "btn" is far too generic. This can even be linted by eg. postcss-bem-linter.

NaN1352 | 4 years ago | on: DaisyUI – Tailwind CSS Components

Looks good. I’d really like to use this. Mainly I like that the author used same approach as I do whereby with careful use of low specificity, a custom "btn" class can be further customized just by adding TW classes (ie. not css specificity issues).

My only gripe with this is that you should then use a clearly defined and separate naming convention for custom classes, for example SuitCSS is good:

Not

btn btn-large rounded-full

But

du-Btn du-Btn—-primary rounded-full

ie. PascalCase component names,

optional prefix (eg. du for daisy ui, because other apps also have their prefix see eg. Twitch and Algolia css)

Bem conventions like double dash for modifier as opposed to a descendant

https://github.com/suitcss/suit/blob/master/doc/naming-conve...

So yeah I would like to be able at a glance to know where a class is from. "btn" is not from tailwind, but where is it from? What if my app uses multiple components, from third party etc? It’s not clear.

Other than that This is better than Bootstrap approach even with custom classes, because you take care of css specificity problem (assuming you can add a tw class anywhere and override the builtin custom classes)...

this is the middle way that nobody uses for whatever reason, the one that makes sense, but requires a good basic understanding of css specificity as well as setup stringent css linter

Also using a convention would let you use a good linter on the custom selectors

https://github.com/postcss/postcss-bem-linter

NaN1352 | 4 years ago | on: My mindfulness practice led me to meltdown

Healing trauma is a much better approach, look into Julie Brown talks, "Nurturing Resilience" by Kathy Kain, Irene Lyons channel.

Vipassana is a form of trauma healing anyway, to clear the nervous system from your past essentially, and then keep going further where the ego itself as a form of "contraction" in the entire musculature and nervous system, also lets go.

The problem with those retreats is Vipassana is a completely outdated approach that was made for people living 1000+ years ago. The world, our lives drastically changed since.

A buddhist on a podcast said "trauma is the human condition".

Practicing gratitude, loving kindness, compassion are spiritual practices and also part of healing trauma... and should provide a much more stable ground for opening the body .

Or for a purely physical approach Yoga is great, though after a while... yoga will also surface anger, etc... if it needs to be processed.

I also did retreats 3 times. Yes I felt an immense love when I was there, and I was still miserable years later ... when I finally looked into therapy in general, and then trauma specifically.

When you go into the body and build capacity to feel the intense emotions that may be there, some say possibly even inherited trauma from before birth, you need to balance it out with some kind of grounding. THAT grounding is somewhat provided on retreats by the safe environment, and whatevers going on energetically (very strange)... but essentially they dont teach you that or very little, so then they send you on your way and now you know how to intensely feel the body, but you have no tools to handle the intense levels of fear, anxiety, grief and so on..that may come up.

NaN1352 | 4 years ago | on: Valve Steam Deck

Exactly. But I fear that 1280x800 won’t look great upscaled on my 1440p.

That said for playing 2d or lighter indie games it will probably run fine at native 1440p... assuming with external display that you can use native res.

NaN1352 | 4 years ago | on: Valve Steam Deck

30fps gives longer battery life.

IGN clarified 2 tflops "in the ballpark of xbox one or ps4".

NaN1352 | 4 years ago | on: macOS Nix setup: an alternative to Homebrew (2020)

I used to work like this with virtualbox Ubuntu on Windows host for front end dev. It worked great. Even had a AHK script that makes the vm fullscreen borderless, bar the win 10 taskbar below, clean and super usable.

The issue is I got an M1 mini mac for development, and I’d rather have the superior fonts and gui of Sublime, MacVim, etc. Granted they look pretty good already on Ubuntu.

I feel like Docker container is the middle way here, you can keep the host clean from complex installs, and you can use evetything on the host to edit your code, since it’s so easy to map folders with Docker.

I don’t really see a downside, although it is super convenient as well with a graphical vm, that you can archive and backup your entire vm, along with all your os preferences, editor settings, terminal settings etc.

edit:

I guess I could also use Macvim etc. on the host with shared folders but those shared folders are slower and have all kind of permission issues afaik, I think Docker mapped folders work better.

Last time I heard Docker on Mac uses virtualization under the hood so it’s about the same as virtualbox (unlike os supported "containers" on linux host), but I don’t know if that is still true for M1?

NaN1352 | 4 years ago | on: Using Paper for Everyday Tasks

I would love to. The most cumbersome thing about notebooks, even larger ones like A3, is 1) they dont lie flat, and 2) even if (eg. rings) when I want to write on the left page, my hand hits the "spine" between the pages and its not comfortable writing.

When I used paper I got used to have a stack of A4, put a title in one corner, I?d keep them on my left beside the keyboard. There are nice a4 in 4 light pastel colors, easier on the eyes than white, and simple memory cue when looking in the pile.

I’d have cheatsheets and tasks, the task/feature pages with lots of check boxes. I’d keep some cheatsheets for a long time, like css/typescript, and the task ones i would throw away when that feature is done.

NaN1352 | 4 years ago | on: I’m a Physicist Who Searches for Aliens. U.F.O.s Don’t Impress Me

> But scientifically speaking, there is little to warrant that connection.

Nothing more annoying than people pretending they are open minded about extraterrestrial life when they are not. Plus the need to defend one’s "credibility".

Nobody talking about ufos as non-scientists pretends they are doing science. Just excitement, and interesting questions. A very healthy exercise, essential part of philosophy, metaphysics in particular... Questions which open our mind and help reconsider the "mundane" also, by reframing it.

Who is this guy writing for? Nobody. Or himself. "Look at me I am a very rational person, that does not believe in fairytales".

As Alan Watts said: "science is the art of prediction".

edit:

Perhaps explaining my thinking better:

- a lot of science is in fact predictions aka theories / models based on what is deemed sufficient, correlated observations

- as long as the model fits with the data, it is an acceptable explanation, it still is not "truth"... and if the model doesn’t fit anymore than just discard it, that’s how science progresses

So in light of that, if/when we have sufficient observations, why would a theory that we may be visited by extraterrestrial life, ie. that these UAP may be crafts of extra terrestrial origin, why should such a theory be more problematic or less "scientific" than any other?

The article reminds me of the rejection and resistance even physicists receive as in the Oumuamua story:

https://en.wikipedia.org/wiki/ʻOumuamua#Alien_object_hypothe...

He was on Joe Rogan explaining how much resistance he met even among his peers but thankfully he doesn’t care about social media... because lets call it for what it is : what the author ofthe article does indirectly is continue a long line of shaming others who dare put theories (aka predictions) that are unconventional.

NaN1352 | 4 years ago | on: Trials begin on lozenge that rebuilds tooth enamel

> Brush your teeth for 3 minutes in the morning and in the evening. (apacare site)

When do you do it though? Doesn’t it undermine the brushing if you eat or drink coffee within an hour afterwards?

Or does it not matter and you brush first thing in the morning?

NaN1352 | 4 years ago | on: Why Russians do not smile (2002)

What we call "culture" is often collective trauma, it is history. To be left behind. We are all humans, dysfunctional in different ways we call "culture".... until one can hope, someday the fish sees the water.

There is strictly no sane reason why a human being should withdraw a smile or any kind of positive emotion or spontaneous expression so long as they are emotionally healthy.

At same time the need for boundaries in our relationships (professional , intimate etc.) is universal, not cultural.

NaN1352 | 4 years ago | on: Temptation of the Apple: Dolphin on macOS M1

As an aside I’m thinking voxel based games, and generally games that render via CPU should do really well with a native M1 port, right? (with scaling, because the 4.5k resolution gotta hurt :))
page 3