116 karma · joined November 7, 2014
No one is forcing you to learn Rust. You don't have to bring yourself spend time learning it. You can keep writing those other languages.
Those languages have been around for a while and they'll continue to be around for a while more. Rust is just getting some time on that stage as well now.
From my vantage point their work fits the definition nicely.
"A collective body" [1] ... "Collectivized or characterized by collectivism" [1] ... "A political or economic theory advocating collective control especially over production and distribution" [2]
[1]: https://www.merriam-webster.com/dictionary/collective [2]: https://www.merriam-webster.com/dictionary/collectivism
This blog post is just a personal journey winding through the thought process it took to replicate that PHP in Rust, something I did because I thought I might learn something.
I have been thinking about and trying to work with this paradigm for a few years now. To be honest, it's been a struggle. Partly because it requires unlearning some habits and partly because there's limited opportunity to practice in my $DAYJOB where I'm working in codebases heavily invested in other paradigms.
I've seen and read many, many videos, blog posts, etc. on this topic. Everyone loves to introduce the concept with a contrived example and then stop there. What I would love to see more of are complete examples for everything from simple to complex applications.
I think there's potentially a lot of value in thinking this way (or at least taking as much from it as you can), but it's hard to learn and then to teach others without more examples to draw on.
I try to keep it simple, HTML, Sass (but really just vanilla CSS), and no JS. I generate the site with Zola (https://www.getzola.org/), which has been fantastic. Nothing fancy here, probably write a post once a year, but I have fun doing so.
Yes, the intent of the title is to get your attention, but I'm not trying to get you to buy anything, collecting or selling user data, etc.
I really just wrote the post to share a debugging experience I had this year. It doesn't have to do with IPv{4,6} addresses themselves or any specification thereof, but it does relate to the Python 2 `ipaddress` library's handling of them and a pitfall you can accidentally find yourself in.
A dry, but more accurate title might have been
> Python 2's ipaddress library considers "node.example.com" an IPv6 Address
That said, how would you propose to do syntax highlighting instead of
> just a wall of <div>s and <span>s, for every single visible character
? Rather than being a wall, it looks to me like it's actually a tree of <divs> and <span>s for every line and every _token_.
I think the author has used Prism[1], so I assume the highlighting was done client-side, but even if you were to do the task server-side I think you'd end up with similar HTML/CSS, no?
What would be a better approach to solving the same problem?
[1]: https://prismjs.com/
Some equivalent Python 3.7+ would be
import subprocess
listing = subprocess.run(("ls", "-oh"), capture_output=True, encoding="utf-8")
print(listing.stdout)
print(listing.returncode)
As an experienced Ruby programmer I imagine the code you provided looks like a no-brainer. To a Ruby neophyte the backticks, $? sigil, and .to_i method don't strike me as intuitive (but maybe they would be do someone else). We may just have to disagree about the nicety of syntax.As cle mentioned[1], the strongest criteria is
> what would the majority of people on the team prefer to use?
and I'd agree that ultimately that's what makes the most sense.
[1]: https://docs.microsoft.com/en-us/visualstudio/liveshare/use/...
I think there's genuine cause for concern here, especially if technologies like these are candidates for inclusion in any real law enforcement decision-making.
When I'm ready to publish I just copy the public directory right to my webserver, but I could just as easily publish to GitHub or the like if I didn't enjoy maintaining my own domain.
[0]: https://tmuxp.git-pull.com/en/latest/ [1]: http://www.teamocil.com