1. 1

    Is there anything interesting to be done with a jailbroken Echo Dot? It’s basically a speaker, microphone, and wifi chip?

    1.  

      So as useful as a laptop while you have grease on your hands and are watching a pot boil.

      1.  

        it might be easier to just wash your hands than jailbreak one of these and run something useful on it.

    1. 2

      MDN says

      The Symbol.isConcatSpreadable well-known symbol is used to configure if an object should be flattened to its array elements when using the Array.prototype.concat() method.

      I was like: “‘well-known’? I’ve never heard of this”. Then I went to the spec

      Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification

      So, uhh, not probably most people’s definition of “well-known”, but it didn’t answer my real question: why does this exist? Who needs this? It just seems like a good source of surprising behaviour. Has anyone here ever had cause to use this symbol?

      1. 2

        If I had to guess, it’s probably an obscure part of the spec that was implemented in V8 just for completeness and the reason why it’s implemented so sloppily is exactly because it’s not well known in the literal sense. Maybe other JS engines implement it per-object rather than globally.

        1. 1

          FWIW “well-known” has a technical meaning in a few other places (e.g. “well-known” URLs are a subset of URLs that have certain implications if present, as used in domain validation for example) so it isn’t like the spec made that definition up.

        1. 2

          I’d always assumed that Twitter had some magical in-house system running for full-text search. But if the data is backed by BigTable then I wonder how it works? They have a bunch of operators that they support both in the Search API and in their GNIP/Powertrack rules, such as “[term 1] within [n words] of [term 2]”.

          1. 4

            I was waiting the end to scream materialize.io, pipelinedb or postgres 15, and then realized it was written in 2016.

            1. 4

              What do you see in Postgres 15 that’s relevant? I did a quick search and couldn’t find much of a roadmap.

              1. 3
                1. 1

                  Wow, never knew something like this were coming to Postgres, can be a game changer for some applications.

            1. 6

              What would an ideal JavaScript dependency management system look like?

              1. 6

                It’s a good question. I’m not sure that npm is all that different from most other dependency managers. My feeling is that it’s more cultural than anything – why do JS developers like to create such small packages, and why do they use so many of them? The install script problem is exacerbated because of this, but really the same issue applies to RubyGems, PyPI, etc.

                There are some interesting statistics in Veracode’s State of Software Security - Open Source Edition report (PDF link). Especially the chart on page 15!

                Deno’s use of permissions looks very interesting too, but I haven’t tried it myself.

                1. 9

                  I’m not sure that npm is all that different from most other dependency managers. My feeling is that it’s more cultural than anything – why do JS developers like to create such small packages, and why do they use so many of them?

                  I thought this was fairly-well understood, certainly it’s been discussed plenty: JS has no standard library, and so it has been filled-in over many years by various people. Some of these libraries are really quite tiny, because someone was scratching their own itch and published the thing to npm to help others. Sometimes there are multiple packages doing essentially the same thing, because people had different opinions about how to do it, and no canonical std lib to refer to. Sometimes it’s just the original maintainers gave up, or evolved their package in a way that people didn’t like, and other packages moved in to fill the void.

                  I’m also pretty sure most people developing applications rather than libraries aren’t directly using massive numbers of dependencies, and the ones they pulling in aren’t “small”. Looking around at some projects I’m involved with, the common themes are libraries like react, lodash, typescript, tailwind, material-ui, ORMs, testing libraries like Cypress, or enzyme, client libraries eg for Elasticsearch or AWS, etc… The same stuff you find in any language.

                  1. 4

                    It’s more than just library maintainers wanting to “scratch their own itch.” Users must download the js code over the wire everytime they navigate to a website. Small bundle sizes is a unique problem that only JS and embedded systems need to worry about. Large utility libraries like lodash are not preferred without treeshaking — which is easy to mess up and non-trivial.

                    People writing python code don’t have to worry about numpy being 30MB, they just install it an move on with their lives. Can you imagine if a website required 30MB for a single library? There would be riots.

                    I wrote more about it in blog article:

                    https://erock.io/2021/03/27/my-love-letter-to-front-end-web-development.html

                    1. 1

                      Sure, but that’s just the way it is? There is no standard library available in the browser, so you have to download all the stuff. It’s not the fault of JS devs, and it’s not a cultural thing. At first people tried to solve it with common CDNs and caching. Now people use tree-shaking, minification, compression etc, and many try pretty hard to reduce their bundle size.

                  2. 3

                    I was thinking about Deno as well. The permission model is great. I’m less sure about URL-based dependencies. They’ve been intentionally avoiding package management altogether.

                  3. 2

                    It’s at least interesting to consider that with deno, a package might opt to require limited access - and the installer/user might opt to invoke (a hypothetical js/deno powered dependency resolver/build system) with limited permissions. It won’t fix everything, but might at least make it easier for a package to avoid permissions it does not need?

                    1. 0

                      hideous, I assume

                      1. 1

                        What would an ideal JavaScript dependency management system look like?

                        apt

                        1. 4

                          apt also has install scripts

                          1. 1

                            with restrictions to ensure they are from a trusted source

                            1. 4

                              You mean policy restrictions? Because that only applies if you don’t add any repos or install random downloaded Debs, both of which many routinely do

                              1. 1

                                yeah

                      1. 3

                        We’ve introduced “relative locators”. These allow you to specify where on the page an element can be found using language that people use too; things like “above that element”, or “to the right of this other element”. This will hopefully provide you all with a tool to fight against incredibly complex locators, making your tests read a little more clearly, and being more resilient to changes in the page’s DOM

                        This sounds pretty neat, IMO selectors are one of the worst parts of browser automation

                        1. 1

                          Every time you see an open-source rewrite of a system from a Google paper, you should keep in mind that Google wouldn’t have published the system unless it had already been replaced by something better.

                          1. 16

                            This is not true at all.

                            1. 7

                              Spanner, Zanzibar and Borg among outers are proof that this isn’t true. GRPC is even a little different that they are still adopting it as it was released publicly.

                              Systems are going to change over time, so in the long term there will be outdated papers, but that is just a fact that papers are a snapshot of knowledge at the time of authorship.

                              1. 5

                                Even if they have, so what? If the concept is one that (when implemented) works well, and there isn’t an obviously better alternative publicly available, who cares whether or not it’s not pulled straight from Google’s latest stack?

                                1. 4

                                  Though, even if Google’s moved on internally, these implementations can have a big impact - Hadoop comes to mind.

                                1. 8

                                  I’m never one to advocate for a web stack given an alternative but I wonder how much of this is down to using the GPU, rather than anything to do with C++ vs JavaScript part. If you use WebGL / WebGPU to do the transitions / animation then I’d expect that this should be completely fine in the browser. If you write CPU-side C++ to do the transitions then the RPI 4’s CPU might struggle at 4K.

                                  1. 2

                                    I suspect you’re right. My gut feeling is that you could achieve these affects with CSS transitions, and the performance would be good. Probably wouldn’t amount to much code, or take very long, either.

                                    1. 3

                                      I tried to do this in the browser with CSS transitions and animations first. Nothing seems to be GPU accelerated on the pi. Performance was really bad and CPU usage very high.

                                      I didn’t try webgl. At the time I thought it would be easy to do with native OpenGL. It’s just 2 triangles and a texture right?

                                      It turned out to be a little bit more involved than that but I ended up sticking with it.

                                      1. 2

                                        You probably didn’t do anything to ensure the browser is accelerated. Firefox wouldn’t enable it automatically because the GPU is not on the qualified list. For good reason – WebRender is still glitchy on v3d. But you can use the old GL layers backend with layers.acceleration.force-enable, that would run CSS transforms on the GPU just fine. (That backend will be gone eventually but for now it still exists.)

                                        1. 1

                                          I tried to do this in the browser with CSS transitions and animations first. Nothing seems to be GPU accelerated on the pi. Performance was really bad and CPU usage very high.

                                          Oh, cool, I didn’t see CSS mentioned in your post. I don’t think that CSS effects really turned out to be the big deal they were introduced as, but they have been around for probably ten years. They’re very standard, so I’m surprised they’re not GPU accelerated on the Pi.

                                      2. 1

                                        WebGl / WebGPU does tend to be impressively performant and quite viable for many projects — as long as the target is a platform that doesn’t have any trouble running a browser in the first place. In this case you’d still have the overhead of a browser just to get to your app, and even if the platform could run your code just fine you’ve lost access to all the resources the browser itself is hogging. For the Pi and other embedded platforms that’s often a deal breaker.

                                      1. 7

                                        I am confused by a statement: This Inverted Index comes at a cost however - it has to be updated on every insert, and takes up disk space and RAM to keep in memory (don’t @ me about mmap).

                                        Lucene stores data in immutable segments that it slowly and continuously merges into larger segments. Each of those segments carries and index. You can switch of indexing for many fields (which is done in ELK scenarios) and a lot of queries exploit the immutability of the segments for really aggressive and cheap caches.

                                        https://lucene.apache.org/core/3_0_3/fileformats.html#Segments

                                        1. 1

                                          How does Lucene segment merging relate to the memory and disk requirements of the inverted index?

                                          Also, segment merging can be quite heavyweight, and with ES (this is about to change!) you can end up with 20% of your index being deleted documents that merging will never reclaim

                                          1. 6

                                            I was referring to the update. Yes, deleted documents are a problem, but not in the logging case, where you usually don’t delete.

                                            I just don’t get a good feeling what exact problem they are pointing out in context. I agree with the general sentiment that Lucene is an okay storage for the log usecase, but will be beaten by something more specific..

                                            1. 1

                                              That makes sense. I wasn’t thinking about how you don’t usually delete for logging (it’s not what I use ES for - though in our case most of our deleted documents from from updates, not “real” deletes).

                                        1. 3

                                          Should I continue learning Django or is it better to move to the likes of Rocket and Actix? (0 experience in Rust , btw)

                                          And what’s the consensus on SSR vs REST + SPA?

                                          1. 6

                                            Play with rust and see if you like it first. No sense in discussing frameworks if you don’t even like working in the language.

                                            1. 4

                                              Should I continue learning Django or is it better to move to the likes of Rocket and Actix? (0 experience in Rust , btw)

                                              It depends on what you want to achieve. I can tell you billion dollar companies out there running on Django Python (e.g. Clubhouse). Rust itself has a higher learning curve and requires almost a rewire if you are traditional programmer, but gets a lot of things right, and makes you think through a lot you used to ignore. So pick what you want.

                                              what’s the consensus on SSR vs REST + SPA

                                              It’s hilarious that we keep doing these cycles between server heavy vs client heavy views. I’ve seen it 3 times in my life already. So learn it but don’t make it a religion.

                                              1. 2

                                                I’m late to the party, but if you’re familiar with Python it’s probably worth starting here. If you’re not very experienced with webapp development Django is pretty nice (at least last few times I’ve used it).

                                                I haven’t tried any of the web frameworks for Rust, but I imagine that the learning curve is steep with a new language, a new framework which is in heavy development and isn’t as well known as say Django. That means searching for help when running into problems is a lot harder.

                                                1. 1

                                                  And what’s the consensus on SSR vs REST + SPA?

                                                  I’m not sure there is a consensus, but in the React world there seems to be solid momentum around “why not both?”. Next JS (and Gatsby?) will let you mix SSR, static, and client-side/SPA fairly seamlessly. Making a page static or SSR is often just a matter of moving your query to a specially-named function. Combined with Typescript it’s a pretty nice place to be. But, as with many things in JS-land, there can be rather a lot of complexity under the hood.

                                                1. 1

                                                  I would like to keep poking at a combo of Turbo with server-rendered React as the templating language.

                                                  In reality we have a newborn in the house so I’ll be supporting my wife with whatever she needs. I also have trees I need to get planted and other chores to do. At least I will get outside a bit.

                                                  1. 2

                                                    I’m going out partying tonight with some friends, maybe hit a casino later. Tomorrow I’m having a full-day motorbike trip with some biker friends. And then in the evening I’m going to a Drum’n’Bass concert. And on Sunday I’ll most probably chill, have some brunch with some friends and maybe spend some time learning Golang in the evening.

                                                    1. 2

                                                      I’m impressed that you are able to learn a programming language after a weekend like that - I think I would be on the couch :)

                                                    1. 3

                                                      If you think blooms are cool, check out Vacuum Filters[1]

                                                      [1] https://www.vldb.org/pvldb/vol13/p197-wang.pdf

                                                      1. 3

                                                        Thanks! From your link I ended up finding yet-another-filter, the Morton Filter

                                                        1. 4

                                                          Wow, never imagined what a rabbit hole this topic is. I was starting with Bloom, went over to Ribbon, then to Cuckoo and now to Vacuum and Morton filters.

                                                      1. 1

                                                        Is there anyone working on some better (verifiable?) approaches to crypto contracts? Or is the SotA still “you write solidity very very carefully”? I can’t imagine this approach will survive very long with various services/companies getting hacked or imploding every few weeks. Or at least don’t expect it to grow out of the on/cross chain defi speculation and pyramid schemes without changes.

                                                        1. 1

                                                          At agoric.com, we’re working on smart contracts based on object capabilities, which pretty much takes the onlyOwner confused deputy risk off the table.

                                                          Partitioning risks is pretty natural with ocaps. The Zoe API with offer safety takes another huge class of risks off the table.

                                                          External security reviews, including some formal verification, is in progress.

                                                          1. 1

                                                            Is there anyone working on some better (verifiable?) approaches to crypto contracts?

                                                            I think the Libra Diem people are working on this

                                                            Move is a next generation language for secure, sandboxed, and formally verified programming. Its first use case is for the Diem blockchain, where Move provides the foundation for its implementation. However, Move has been developed with use cases in mind outside a blockchain context as well.

                                                          1. 12

                                                            QA is one of the most under-respected disciplines in Software development. A good QA person can find bugs that you never would have imagined, and save you thousands of hours of stress by catching defects before release, yet to a person they get no respect, and are constantly told they need to become “programmers” to keep their jobs.

                                                            Most QA people I’ve met are just as good as anyone else at programming, they just prefer QA.

                                                            1. 1

                                                              Yeah, huge agree. I have a QA person reporting to me, and my boss is against him doing any manual testing [0], and wants him to just review automated Cypress tests written by my engineers. But my engineers hate writing Cypress tests [1]. They suck away velocity, and they’ve never actually caught an issue or prevented a bug (we have unit tests already, and well-established components).

                                                              All the bugs we find come from manual testing by this one guy who’s been here longer than just about anyone.

                                                              [0] No, this doesn’t make sense to me, either

                                                              [1] this is not really a slam against Cypress, we’ve been trying to fit it into an old an creaky application, and it’s just a PITA. We’d be better off spending time on the real problem, which is the old code, but I haven’t been able to sell that 😔

                                                            1. 16

                                                              cached content is no longer shared between domains. This is known as cache partitioning and has been the default in Chrome since October 2020 (v86), Firefox since January 2021 (v85), and Safari since 2013 (v6.1). That means if a visitor visits site A and site B, and both of them load https://public-cdn.example/my-script.js, the script will be loaded from scratch both times.

                                                              This means the primary benefit of shared public CDNs is no longer relevant for any modern browsers.

                                                              Huh, interesting, I didn’t know about that. I assumed the reason that would be given was that many people bundle their dependencies together, which has made public CDNs redundant because you’re not trying to load many individual <script>s anymore.

                                                              1. 10

                                                                Another very tertiary reason is there are so many different versions of libraries that the hit rate wasn’t that high anyway.

                                                              1. 3

                                                                Recovering from a corrupted filesystem that ate all my files (yeah, all of them, except for some empty root directories: /media, /proc, etc) and half of my life.

                                                                And no, my backups were not up to date.

                                                                This time I will keep my backups up to date. This time I will keep my backups up to date. This time I will keep my backups up to date.

                                                                No, I really will this time. I swear.

                                                                1. 5

                                                                  I’m gonna take a nubbin out of Amazon culture that I’ve found super useful in cases like this: Rely on mechanisms. Not best intentions.

                                                                  Telling yourself that if your backup strategy requires discipline and manual intervention is a recipe for self disappointment and failure. Make it effortless and you win big today and into the future.

                                                                  There’s something to be said here for having some kind of central file store (I use a NAS, YMMV) and backing that up to at least 2 additional places.

                                                                  My NAS backs up to a local USB disk as well as to Baclblaze, and I’ve made actually using it for my regular work trivial with things like using autofs on the Linux side (It’s easier than you think to set up, but in true Linux fashion you’d never know that from the docs. Blog post incoming) and on the Mac/Windows side the very first thing I do is set up a persistent fileshare and do all important work there.

                                                                  It’s all work for sure but it’s a one time investment that’s allowed me to make continual iterative forward progress rather than having to start from scratch every few months when my laptop gets blown away :)

                                                                  1. 3

                                                                    Inspiring. My backup setup is pretty good, using borg to back up several computers onto a dedicated drive on my home server/NAS, but… Maybe what I should do with my weekend is get notifications for failed backups working properly and automate restore tests.

                                                                    1. 3

                                                                      I’ve found borgmatic to be great for automating my borg backups and sending me notifications when there are problems.

                                                                      1. 2

                                                                        You’re already well ahead of the game from most people :) I should look into borg.

                                                                        I’m using a Synology NAS at this point because when I bought it ~3 years ago I wasn’t confident enough in my own skills to be sure that I could manage a server of my own without losing data.

                                                                        Were I to do it again today I’d definitely look REALLY hard at using FreeNAS or UnRAID or … Something :)

                                                                      2. 2

                                                                        My NAS backs up to a local USB disk as well as to Baclblaze

                                                                        Backblaze is so simple to setup and forget about that I think it should be the first step in most anyone’s back-up strategy.

                                                                      3. 1

                                                                        I have a folder on my desktop. I have the same folder on my laptop. And my NAS. I run backups from my NAS only.

                                                                        Syncthing is really nice like that.

                                                                      1. 3

                                                                        This should be interesting - are OpenSearch and regular Elasticsearch going to end up with meaningfully divergent feature sets? Or will OpenSearch just go along behind / beside ES and generally keep parity? If it gets to the point where you need to re-index all your data in order to move between them, or rewrite complex searches, that’ll raise the barrier to entry on both sides.

                                                                        1. 1

                                                                          Apologies if this is off-topic: are you aware that “Sasquach” doesn’t appear to be the traditional spelling of the word?

                                                                          It seems that it’s usually spelled “Sasquatch” (with a “t”). Google asks “did you mean sasquatch?”; Wikipedia only uses “Sasquatch”, etc…

                                                                          Obviously the name and spelling are your decision alone, and it doesn’t matter what Google suggests :)

                                                                          1. 5

                                                                            This seems fun, and maybe a good tool for build proof of concepts. But I hardly see it as being useful for large projects. Or have I become old and grumpy?

                                                                            1. 13

                                                                              As a stranger on the internet, I can be the one to tell you that you are old and grumpy.

                                                                              Ruby is definitely unusable without syntax highlighting… (Sadists excepted) Java is definitely unusable without code completion… (Sadists excepted) Whatever comes next will probably be unusable without this thing or something like it.

                                                                              1. 9

                                                                                I’m confused… Ruby has one of the best syntaxes to read without highlighting. Not as good as forth, but definitely above-average

                                                                                1. 3

                                                                                  Well, this is the internet. Good luck trying to make sense of every take.

                                                                                  1. 2

                                                                                    I used to think this way. Then I learned Python and now I no longer do.

                                                                                    When I learned Ruby I was coming from Perl, so the Perl syntactic sugar (Which the Ruby community now seems to be rightly fleeing from in abject terror) made the transition much easier for me.

                                                                                    I guess this is my wind-baggy way of saying that relative programming language readability is a highly subjective thing, so I would caution anyone against making absolute statements on this topic.

                                                                                    For instance, many programmers not used to the syntax find FORTH to be an unreadable morass of words and punctuation, whereas folks who love it inherently grok its stack based nature and find it eminently readable.

                                                                                    1. 1

                                                                                      Oh, sure, I wasn’t trying to make a statement about general readability, but about syntax highlighting.

                                                                                      For example, forth is basically king of being the same with and without highlighting because it’s just a stream of words. What would you even highlight? That doesn’t mean the code is readable to you, only that adding colour does the least of any syntax possible, really.

                                                                                      Ruby has sigils for everything important and very few commonly-used keywords, so it comes pretty close also here. Sure you can highlight the few words (class, def, do, end, if) that are in common use, you could highlight the kinds of vars but they already have sigils anyway. Everything else is a method call.

                                                                                      Basically I’m saying that highlighting shines when there are a lot of different kinds of syntax, because it helps you visually tell them apart. A language with a lot of common keywords, or uncommon kinds of literal expressions, or many built-in operators (which are effectively keywords), that kind of thing.

                                                                                      Which is not to say no one uses syntax highlighting in ruby of course, some people find that just highlighting comments and string literals makes highlighting worth it in any syntax family, I just felt it was a weird top example for “syntax highlighting helps here”.

                                                                                      1. 3

                                                                                        Thank you for the clarification I understand more fully now.

                                                                                        Unfortunately, while I can see where you’re coming from in the general case, I must respectfully disagree at least for myself. I’m partially blind, and syntax highlighting saves my bacon all the time no matter what programming language I’m using :)

                                                                                        I do agree that Ruby perhaps has visual cues that other programming languages lack.

                                                                                        1. 1

                                                                                          ’m partially blind, and syntax highlighting saves my bacon all the time no matter what programming language I’m using :)

                                                                                          If you don’t mind me asking - have you tried any Lisps, and if so, how was your experience with those? I’m curious as to whether the relative lack of syntax is an advantage or a disadvantage from an accessibility perspective.

                                                                                          1. 1

                                                                                            Don’t mind you asking at all.

                                                                                            So, first off I Am Not A LISP Hacker, so my response will be limited to the years I ran and hacked emacs (I was an inveterate elisp twiddler. I wasted WAY too much time on it which is why I migrated back to Vim and now Vim+VSCode :)

                                                                                            It was a disadvantage. Super smart parens matching helped, but having very clear visual disambiguation between blocks and other code flow altering constructs like loops and conditionals is incredibly helpful for me.

                                                                                            It’s also one of the reasons I favor Python versus any other language where braces denote blocks rather than indentation.

                                                                                            In Python, I can literally draw a veritcal line down from the construct and discern the boundaries of the code it effects. That’s a huge win for me.

                                                                                            Note that this won’t eventually keep me from learning Scheme, which I’d love to do. I’m super impressed by the Racket community :)

                                                                                        2. 1

                                                                                          For example, forth is basically king of being the same with and without highlighting because it’s just a stream of words. What would you even highlight? That doesn’t mean the code is readable to you, only that adding colour does the least of any syntax possible, really.

                                                                                          You could use stack effect comments to highlight the arguments to a word.

                                                                                          : squared ( n -- n*n ) 
                                                                                               dup * ;
                                                                                           squared 3 .  
                                                                                          

                                                                                          For example, if squared is selected then the 3 should be highlighted. There’s also Chuck Moore’s ColorForth which uses color as part of the syntax.

                                                                                    2. 6

                                                                                      Masochists (people that love pain on themselves), not sadists (people that love inflicting pain on others).

                                                                                      1. 2

                                                                                        Ah, thank you for the correction.

                                                                                        I did once have a coworker who started programming ruby in hungarian notation so that they could code without any syntax highlighting, does that work?

                                                                                        1. 4

                                                                                          That count as both ;)

                                                                                        2. 2

                                                                                          Go to source is probably the only reason I use IDEs. Syntax highlighting does nothing for me. I could code entirely in monochrome and it wouldn’t affect the outcome in the slightest.

                                                                                          On the other hand, you’re right. Tools create languages that depend on those tools. Intellij is infamous for that.

                                                                                        3. 6

                                                                                          You’re old and grumpy :) But seriously, the fact that it’s restricted to Github Codespaces right now limits its usefulness for a bunch of us.

                                                                                          However, I think this kind of guided assistance is going to be huge as the rough edges are polished away.

                                                                                          Will the grizzled veterans coding exclusively with M-x butterflies and flipping magnetic cores with their teeth benefit? Probably not, but they don’t represent the masses of people laboring in the code mines every day either :)

                                                                                          1. 4

                                                                                            I don’t do those things, I use languages with rich type information along with an IDE that basically writes the code for me already. I just don’t understand who would use these kinds of snippets regularly other than people building example apps or PoCs. The vast majority of code I write on a daily basis calls into internal APIs that are part of the product I work on, those won’t be in the snippet catalog this things uses.

                                                                                            1. 4

                                                                                              I don’t doubt it but I would also posit that there are vast groups of people churning out Java/.Net/PHP/Python code every day who would benefit enormously from an AI saying:

                                                                                              Hey, I see you have 5 nested for loops here. Why don’t we re-write this as a nested list comprehension. See? MUCH more readable now!

                                                                                              1. 4

                                                                                                The vast majority of code I write on a daily basis calls into internal APIs that are part of the product I work on, those won’t be in the snippet catalog this things uses.

                                                                                                Well, not yet. Not until they come up with a way to ingest and train based on private, internal codebases. I can’t see any reason to think that won’t be coming.

                                                                                                1. 2

                                                                                                  Oh sure, I agree that’s potentially (very) useful, even for me! I guess maybe the problem is that the examples I’ve seen (and admittedly I haven’t looked at it very hard) seem to be more like conventional “snippets”, whereas what you’re describing feels more like a AST-based lint that we have for certain languages and in certain IDEs already (though they could absolutely be smarter).

                                                                                                  1. 2

                                                                                                    Visual studio (the full ide) has something like this at the moment and it’s honestly terrible. Always suggests inverting if statements which break the logic, or another one that I haven’t taken the time to figure out how to disable is it ‘highlights’ with a little grey line at the side of the ide (where breakpoints would be) and suggests changes such as condensing your catch blocks from try/catches onto one line instead of nice and readable.

                                                                                                    Could be great in the future if could get to what you suggested!

                                                                                                  2. 3

                                                                                                    Given that GH already has an enterprise offering, I can’t see a reason why they can’t enable the copilot feature and perform some transfer learning on a private codebase.

                                                                                                    1. 1

                                                                                                      Is your code in GitHub? All my employer’s code that I work on is in our GitHub org, some repos public, some private. That seems like the use case here. Yeah, if your code isn’t in GitHub, this GitHub tool is probably not for you.

                                                                                                      I’d love to see what this looks like trained on a GitHub-wide MIT licensed corpus, then a tiny per-org transfer learning layer on top, with just our code.

                                                                                                      1. 1

                                                                                                        Yeah, although, to me, the more interesting use-case is a CI tool that attempts to detect duplicate code / effort across the organization. Not sure how often I’d need / want it to write a bunch of boilerplate for me.

                                                                                                  3. 1

                                                                                                    it feels like a niftier autocomplete/intellisense. kind of like how gmail provides suggestions for completing sentences. I don’t think it’s world-changing, but I can imagine it being useful when slogging through writing basic code structures. of course you could do the same thing with macros in your IDE but this doesn’t require any configuration.