Readit News logoReadit News
joeyaiello commented on PhotoPrism: AI-powered photos app for the decentralized web   github.com/photoprism/pho... · Posted by u/pretext
faitswulff · 2 years ago
Has anyone tried the Nix package?
joeyaiello · 2 years ago
Yup, and it actually wasn't working until fairly recently (maybe a few months ago? I was keeping an eye on it for a while).

But yeah, it's even fully integrated into NixOS options now. You can set up a default install with one line: https://search.nixos.org/options?query=photoprism

joeyaiello commented on Ask HN: How is the job search coming along for people who got laid off?    · Posted by u/taauji
oneplane · 3 years ago
I doubt that you can make an absolute "this is false and ageist" statement in any context, but here on HN, I would have at least expected you to supply information on what location in the world and level of institutional schooling you have.

Here in north-west EU C and C++ haven't been a part of the core curriculum for over 25 years (unless you do embedded work), and code with side-effects in desktop-class systems has been frowned upon for nearly as long due to the need for more cookie-cutter engineers to fill positions and write code that might still be OOP but has to be almost as side-effect free as functional code.

Basic/core languages are still (last time I checked when doing guest lectures ~ 6mo ago) Java, C#, Python and the mixed bag that is web languages.

This is also influenced by the core program required to be an accredited institution and the large amount of consultancies people end up working at straight out of college/school/uni. This even still happens in infrastructure-centric programs where you do lean a bit about TCP/IP and OSI layers, but then essentially get dumped into Juniper/Cisco/vmware/microsoft school which almost always gets them vendor-locked and unaware of the actual concepts and abstractions they implement.

So no, not knowing the difference between passing references or values, or pointers and dereferencing them is not as strange as you seem to think it is. It is not a piece of knowledge or experience that is seen as valuable enough by the people that create the curriculum or the companies that employ the largest quantities of inexperienced workers in this part of the world.

joeyaiello · 3 years ago
I'm a PM and I ended up graduating with an econ BA instead of a CS degree, but I took a few intro CS classes at UCLA in...2011/2012.

Intro to Programming 1 and 2 were taught in C++. Can't remember which one taught pass by reference, but it was definitely in one of those two.

Third class I took was Intro to Systems or something like that. The whole class was C and x86 ASM. Lots of binary operations in that one, used K&R a fair amount in that class (also learned debugging assembly in GDB and some other "low-level"-ish stuff).

Just looked it up, can't say 100% it's still C++, but the syllabus looks about the same as I remember for both class. It gets to pointers by week 7, and then in the second class goes deeper:

* https://web.cs.ucla.edu/classes/spring22/cs31/syllabus.html#...

* https://web.cs.ucla.edu/classes/spring22/cs32/syllabus.html#...

And again, I didn't even get a CS degree. This was all lower-div CS work at a public university, and I'm not even a career engineer.

> So no, not knowing the difference between passing references or values, or pointers and dereferencing them is not as strange as you seem to think it is. It is not a piece of knowledge or experience that is seen as valuable enough by the people that create the curriculum or the companies that employ the largest quantities of inexperienced workers in this part of the world.

This attitude is why you're getting flak in this thread. Your claim that "We don't teach pass by reference these days" was too absolute, and not accurate for a ton of people. Then someone came back and told you that, and you told them that their claim was too absolute.

I'll also say that it's something that was absolutely valued around the orgs I worked in at Microsoft (Azure, DevDiv, Windows, very roughly bottom half of the stack teams). If not C/C++ pointers, than __absolutely__ passing by reference in C#.

Point being: __knowing__ about pointers, passing by ref vs. value, etc. is not as strange as __you__ seem to think it is.

Deleted Comment

joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
southerntofu · 4 years ago
> I'll take "isn't the worst". ;)

You should! It was definitely a compliment.

> I'd love to get more of your thoughts

On a technical level, i would say PowerShell is a breakthrough because it democratized the concept of structured data REPL as a shell. This pattern was well-known to GNU (and other LISP) hackers but not very popular otherwise, so thank you very much for that. Despite that, having telemetry in a shell is a serious problem in my view. That, and other technical criticisms others have mentioned (see previous HN discussions about PowerShell) is why i don't use PowerShell more.

On a more meta level, i'd say the biggest missing feature of the software is self-organization (or democracy if you'd rather call it that). The idea is great but the realization is far from perfect. Like most products pushed by a company, PowerShell is being developed by a team who has their own agenda/way and does not take time/energy to gather community feedback on language design. I believe no single group of humans can figure out the best solutions for everyone else, and that's why community involvement/criticism is important. For this reason, despite being much more modest in the current implementation, i believe NuShell being the child of many minds has more potential to evolve into a more consistent and user-friendly design in the future.

Beyond that, i have a strong political criticism of Microsoft as part of the military industrial complex, as a long-standing enemy to free-software (still no Github or Microsoft XP source code in sight despite all the ongoing openwashing) and user-controled hardware (remember when MS tried to push for SecureBoot to not be removable in BIOS settings?), as an unfair commercial actor abusing its monopoly (forced sale of Windows with computers is NOT ok, and is by law illegal in many countries) and more generally as one among many corporations in this capitalist nightmare profiting from the misery of others and contributing its fair share the destruction of our environment.

This is not a personal criticism (i don't even know you yet! :)) so please don't take it personally. We all make questionable ethical choices at some point in life to make a living (myself included), and i'm no judge of any kind (i'll let you be your own judge if you let me be mine). In my personal reflection about my own life, I found some really good points in this talk by Nabil Hassein called "Computing, Climate Change, and All our Relationships", about the human/political consequences of our trade as global-north technologists. I strongly recommend anyone to watch it: https://nabilhassein.github.io/blog/computing-climate-change...

> how PowerShell might be more useful for the kinds of scenarios you're thinking about

I don't think i've seen any form of doctests in PowerShell. I think that would be a great addition for many people. A test suite in separate files is fine when you're cloning a repo, but scripts are great precisely because they're single files that can be passed around as needed.

> Structured shells have so much potential outside of that, though.

Indeed! If they're portable enough, have some notion of permissions/capabilities and have a good type system they'd make good candidates as scripting languages to embed in other applications because these applications usually expose structured data and some form of DSL, so having a whole shell ecosystem to develop/debug scripts would be amazing.

I sometimes wonder what a modern, lightweight and consistent Excel/PowerShell frankensteinish child would look like. Both tools are excellent for less experienced users and very functional from a language perspective. From a spreadsheet perspective, a structured shell would for example enable better integration with other data sources (at a cost of security/reproducibility but the tradeoff is worthwhile in many cases i think). From a structured shell perspective, having spreadsheet features to lay data around (for later reuse, instead of linear command history) and graph it easily would be priceless.

> I'd love to get to a place one day where we could treat arbitrary datasets like that, sort of like a generalized SQL/JSON/whatever REPL.

Well that's precisely what nushell's "from" command is doing, supporting CSV, JSON, YAML, and many more! https://www.nushell.sh/book/command_reference.html no SQL there yet ;-)

PS: I wish you the best and hope you can find some time to reflect on your role/status in this world. And i hope i don't sound too condescending, because if you'd asked me yesterday what i would tell a microsoft higher-up given the occasion, it would have been full of expletives :o... so here's me trying to be friendly and constructive as much as possible, hoping we can build a better future for the next generation. Long live the Commune (150th birthday this year)!

joeyaiello · 4 years ago
I read all of it, as well as some more of your writings that I found, and I very much appreciate your thoughtfulness. I don't agree with everything you've said here, but you raise some very good points. Thanks, friend. :)
joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
zaat · 4 years ago
Don't return everything, return what I specifically returned (yeah, I know about objects, talking about everywhere else). I know it will never happen, but one can dream. Painpoints aside, you and your team are doing excellent job. Thank you

Edit: unless you are also responsible for DSC, than I'll take it back. It's terrible.

joeyaiello · 4 years ago
Unfortunately, we can't ever change that one, or the whole world of existing stuff will break.

It's intended as a shell semantic where anything bare on the command line just gets run, no matter your scope.

However when we introduced classes, we thought it was a more "dev-oriented" semantic, so we changed return there.

This will only return 'this will return':

  class foo {
    [string] ReturnTest() {
      'this will not return'
      return 'this will return'
    }
  }
  
  ([foo]::new()).ReturnTest()

joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
hiq · 4 years ago
> we're always looking to lower the barrier of entry to get into PowerShell, as it can be quite jarring to someone who's used Bash their whole life (myself included).

apt search powershell returns no meaningful result on Debian unstable. I think that's a big barrier to entry, at least for me and people who deploy using docker images based on Debian and Ubuntu.

joeyaiello · 4 years ago
Good to know! I've generally understood that the bar for package inclusion for both Debian and Ubuntu is fairly high (where Debian wants you to push to them and Ubuntu will pull from you).

Our setup today is simply to add an apt repo[1] (of which there is just one domain for all Microsoft Linux packages), and then you can `apt install`.

We also ship pretty minimal Ubuntu and Debian (and Alpine and a bunch of other) container images here.[2]

Oh, and we ship on the Snap Store if you're using Snapcraft stuff.

[1]: http://aka.ms/install-pslinux

[2]: https://hub.docker.com/_/microsoft-powershell

joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
flower-giraffe · 4 years ago
> we're always looking to lower the barrier of entry to get into PowerShell

I’ve used powershell regularly since way back when (it was still called monad when I first tied it).

I’m extremely comfortable in the Windows environment but even yesterday I found it easiest to shell out to cmd.exe to pipe the output of git fast-export to stop powershell from messing with stdout (line feeds)

I really like the idea of a pipeline that can pass more than text streams but it absolutely has to be zero friction to pipe the output of jq, git (and awk, sed etc for oldies like me) without breaking things.

joeyaiello · 4 years ago
We've fixed a ton of these in PowerShell 7 (pwsh.exe, as opposed to Windows PowerShell / powershell.exe), particularly because we needed to support Linux and more of its semantics.

If you're seeing issues within PowerShell 7, please file issues against us at github.com/powershell/powershell

joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
jiggawatts · 4 years ago
Stop shipping your org chart!

Microsoft has always had this problem, but with PowerShell -- which is supposed to be this unified interface to all things Microsoft -- it is glaringly obvious that teams at Microsoft do not talk to each other.

To this day, the ActiveDirectory commands throw exceptions instead of returning Errors. Are you not allowed to talk to them?

The Exchange "Set" commands, if failing to match the provided user name, helpfully overwrite the first 1,000 users instead because... admins don't need weekends, am I right? Who doesn't enjoy a disaster recovery instead of going to the beach?

I'm what you'd categorise as a power user of PS 5.1, having written many PS1 modules and several C# modules for customers to use at scale. I've barely touched PowerShell Core because support for it within Microsoft is more miss than hit.

For example, .NET Core has caused serious issues. PowerShell needs dynamic DLL loading to work, but .NET Core hasn't prioritised that, because web apps don't need it. The runtime introduced EXE-level flags that should have been DLL-level, making certain categories of PowerShell modules impossible to develop. I gave up. I no longer develop for PowerShell at all. It's just too hard.

It's nice that Out-GridView and Show-Command are back, but they launch under the shell window, which makes them hard to find at the best of times and very irritating when the shell is embedded (E.g.: in VS Code)

The Azure commandlets are generally a pain to work with, so I've switched to ARM Templates for most things because PowerShell resource provisioning scripts cannot be re-run, unlike scripts based on the "az" command line or templates. Graph is a monstrosity, and most of my customers are still using MSOnline and are firmly tied to PS 5.1 for the foreseeable future.

Heaven help you if you need to manage a full suite of Hybrid Office 365 backoffice applications. The connection time alone is a solid 2 minutes. Commands fail regularly due to network or throttling reasons, and scripts in general aren't retry-able as mentioned above. This is a usability disaster.

Last, but not least: Who thought it was a good idea to strip the help content out and force users to jump through hoops to install it? There ought to be a guild of programmers so people like him can be summarily ejected from it!

joeyaiello · 4 years ago
Thanks for the thoughtful response! Many of these are totally legitimate: in particular, we're making steady progress to centralize module design, release, documentation, and modernization, or at least to bring many teams closer together. In many cases, we're at a transition point between moving from traditional PS remoting modules and filling out PS coverage for newer OAuth / REST API flows.

I don't know how recently you've tried PS7, but the back-compat (particularly on Windows) is much, much better[1]. And for those places where compatibility isn't there yet, if you're running on Windows, you can just `Import-Module -UseWindowsPowerShell FooModule` and it'll secretly load out-of-proc in Windows PS.

Unfortunately, the .NET problems are outside my area. I'm definitely not the expert, but I believe many of the decisions around the default assembly load context are integral to the refactoring of .NET Core/5+. We are looking into building a generalized assembly load context that allows for "module isolation", and I'd love to get a sense in the issue tracking that[2] whether or not fixing that would help solve some of the difficulties you're having in building modules.

For Azure, you should check out the PSArm[3] module that we just started shipping experimentally. It's basically a PS DSL around ARM templates, as someone who uses PS and writes the Azure JSON, you sound like the ideal target for it.

As for the help content, that's a very funny story for another time :D

[1]: https://aka.ms/psmodulecompat

[2]: https://github.com/PowerShell/PowerShell/issues/2083

[3]: https://github.com/powershell/psarm

joeyaiello commented on Ask HN: What under-the-radar technology are you excited about?    · Posted by u/ilmoi
southerntofu · 4 years ago
1. GNU Name System to replace the DNS in a backwards-compatible manner, with delegation to cryptographic public keys (instead of IP addresses) and with strong guarantees against known attacks against the DNS (DNSSEC doesn't solve everything). https://gnunet.org/en/gns.html

2. Semantic sysadmin to declare your intent in regards to your infrastructure no matter how it is implemented (i.e. with a standard specification, interoperability/migration becomes possible) https://ttm.sh/dVy.md

3. GUI/WebUI CMS for contributing to a shared versioned repository. Sort of what netlify is doing, but using a standard so you can use the client of your choice and we tech folks can hold onto our CLI while our less-techie friends can enjoy a great UI/UX for publishing articles to collective websites.

4. Structured shell for the masses. Powershell isn't the worst, but in my view nushell has a bright future ahead. For the people who don't need portability, it may well entirely replace bash, Python and perl for writing more maintainable and user-friendly shell scripts. https://nushell.sh/

5. A desktop environment toolkit that focuses on empowering to build more opinionated desktops while mutualizing the burden of maintenance of core components. Most desktop environments should have a common base/library (freedesktop?) where features/bugs can be dealt with once and for all and we don't have to reinvent the wheel every single time. Last week i learnt some DE folks want to fork the whole of GTK because it's becoming too opinionated for their usage, and GNOME is nowadays really bloated and buggy thanks to javascript hell. Can't we have a user-friendly desktop with solid foundations and customizability?

joeyaiello · 4 years ago
PM lead for PowerShell here, thanks for the callout! I'll take "isn't the worst". ;)

I'd love to get more of your thoughts around how PowerShell might be more useful for the kinds of scenarios you're thinking about. We see a lot of folks writing portable CI/CD build/test/deploy scripts for cross-platform apps (or to support cross-platform development), but we're always looking to lower the barrier of entry to get into PowerShell, as it can be quite jarring to someone who's used Bash their whole life (myself included).

Structured shells have so much potential outside of that, though. I find myself using PowerShell to "explore" REST APIs, and then it's easy to translate that into something scripted and portable. But I'd love to get to a place one day where we could treat arbitrary datasets like that, sort of like a generalized SQL/JSON/whatever REPL.

Plus, PS enables me to Google regex less :D

joeyaiello commented on Nintendo has reportedly suffered a significant legacy console leak   videogameschronicle.com/n... · Posted by u/synthecypher
Timpy · 5 years ago
Bryan Cantrill gave a talk that included how difficult it was to take something that wasn't originally intended to be open source and then open source it. I think it was something at Sun before they were acquired by Oracle (iirc Cantrill laments how Oracle effectively un-open-sourced the project). I've watched hours of Cantrill on youtube, I'm having trouble finding which video it was. I can't explain it myself but I remember my takeaway was "wow that's a lot more complicated than I thought."

Edit: Child comment has the video. Starting at 20:17, "We wanted to open source the system. So why didn't we? What was the problem? Well, the problem was that it's a deeply proprietary system."

joeyaiello · 5 years ago
I'm a PM at Microsoft that worked on open-sourcing PowerShell. As Windows PowerShell, it's a built-in Windows component, and the number of assumptions that could be made because it was both closed-source and part of the OS were immense. Even getting it to build outside of the rest of the operating system was crazy hard. Then figuring out to install it in a supported way was hard, and only then did we get to start figuring out how to eliminate usage of private APIs and start doing legal reviews.

And we're "just" a language runtime and a shell shipped in the OS. I can't imagine how hard it would be to unwind the proprietary bits of something like a GPU architecture running in a tightly integrated SoC with multiple vendors who are all deeply protective of their IP.

I say this all as someone who has been a proponent of open source for 15 years. And all the work was absolutely worth it, and deeply rewarding from a personal perspective.

But I can't say it would probably make the same sense for Nintendo to go through that effort with Pokemon or the N64 architecture.

u/joeyaiello

KarmaCake day230June 18, 2015
About
PM at Netlify, formerly at Microsoft on PowerShell [ my public key: https://keybase.io/joeyaiello; my proof: https://keybase.io/joeyaiello/sigs/vP8crtmKz3N7FOGbsbMc6rTWicL_0JeP4d66dVRRabY ]
View Original