Threads for jaypatelani

  1. 0

    This site is more ads than content— is there a better source?

    1. 2

      Sorry I didn’t see ads due to uBlock origin. Tried finding other sources but all have adverts :(

    1. 5

      Yes it matters.

      At least with C++ developers can slowly learn the more arcane part of the language language while they use it. A bit more difficult with Rust.

      Furthermore, it might be possible to implement some form of borrow checking for existing languages.

      Any language should be easy to learn. That’s true for C and python. Language popularity is highly correlated with ease of learning. And this is true for all the new languages out there that try to do fancy things: most developers do not care.

      Personally, all I would ever want, is something mostly like C/C++, with pythonic features, easier to read and use, faster to compile, without a GC, statically compiled, without sophisticated things.

      1. 16

        I wouldn’t call C easy to learn. It probably has less essential complexity than Rust has, but there’s still a lot of fiddly details to learn that wouldn’t come up in languages created decades later with garbage collection and better tooling and syntactic defaults.

        1. 8

          A couple issues I found when wanting to learn C is all of the variation because of its history. What tooling should I use? Which conventions should I follow? Which version is the current version?

          The various C standards are not conveniently discoverable and even when you map them out, they’re written in reference to past standards. So to get the set of rules you have to mentally diff K&R C with a handful of other standards published over 40 years, etc. Starting completely from no knowledge and trying to figure out “What are the complete set of rules for the most modern version of C?” is nearly impossible. At least that has been my experience and biggest struggle when trying to get started with C multiple times over the years.

          Then I constantly see veteran C programmers arguing with each other about correct form, there seems to be far less consensus than with modern languages.

          1. 4

            I’d say C is easy to learn but hard to master. But that could be said about a lot of languages.

            1. 2

              I think there is a big difference to what is the absolute minimum you can learn.

              You can “learn” C with programs that compile and run the happy path mostly correctly. The probably have tons of bugs and security issues but you are using the language.

              Rust forces you to handle these issues up front. This does make the minimal learning longer but the total learning to be a “production ready coder” is probably actually shorter.

            2. 14

              Man, I was terrified when I was learning C++. I would stick to the parts I was “comfortable” with, but when I would call someone else’s code (or a library) I couldn’t reliably know how the features they used would intersect with mine. And the consequences very often were debugging core dumps for hours. I’m no Rust fanboy, but if you’re going to have a language as complicated as Rust or C++, I’d rather learn with one that slaps my hand when doing something I probably oughtn’t do.

              1. 11

                So, Nim once ARC lands?

                1. 2

                  Is that not the case already ? I unfortunately do not use Nim often these days so I might be out of touch, but if I recall correctly arc/orc are available but not the default.

                  EDIT: Yeah, It seems to use ref counting by default currently but the doc advise to use orc for newly written code Cf: https://nim-lang.github.io/Nim/mm.html

                2. 8

                  Any language should be easy to learn. That’s true for C and python. Language popularity is highly correlated with ease of learning.

                  All other things being equal, yes, ease of learning is good. But at some point one may have to sacrifice ease of learning to make the expert’s work easier or more reliable or faster or leaner. Sometimes that’s what has to be done to reach the level of quality we require.

                  If it means some programmers can’t use it, so be it. It’s okay to keep the incompetents out.

                  1. 8

                    I was mostly with you, but “incompetents” is harsh.

                    1. 4

                      Can we at least agree that there is such a thing as incompetent programmers? I’m all for inclusivity, but at some point the job has to get done. Also, people can learn. It’s not always easy, but it’s rarely impossible.

                      1. 4

                        There are, but generally they’re not going to be successful whether they use Rust or another language. There are inexperienced developers who aren’t incompetent but just haven’t learned yet who will have an easier time learning some languages than Rust, and there are also experienced programmers who simply don’t know Rust who will also have an easier time learning other languages than Rust. Since the incompetent programmers will fail with or without Rust, it seemed like you were referring to the other groups as incompetent.

                        1. 5

                          Ah, the permanent connotation of “incompetent” eluded me. I was including people who are not competent yet. You only want to keep them out until they become competent.

                          My original point was the hypothesis that sometimes, being expert friendly means being beginner hostile to some extent. While it is possible (and desirable) to lower the learning curve as much as we reasonably can, it’s rarely possible to flatten it down to zero, and in some cases, it just has to be steep.

                          Take oscilloscopes for instance. The ones I was exposed to in high school were very simple. But the modern stuff I see now is just pouring buttons all over the place like a freaking airliner! That makes them much scarier to me, who have very little skill in electronics. But I also suspect all these buttons are actually valuable to experts, who may have lots of ways to test a wide variety of circuits. And those button give them a more direct access to all that goodness.

                          In the end, the question is, are steep learning curve worth it? I believe that in some cases, they are.

                          1. 3

                            That makes sense. Thanks for clarifying. I don’t know if I have a strong opinion, but I do believe that there are cases that require extreme performance and that often requires expertise. Moreover, having been a C++ programmer for a time, I’m grateful that where C++ would accept a broken program, Rust slaps my hand.

                    2. 2

                      True. Ada Programming language easy to learn but not widely accepted or used

                    3. 4

                      At least with C++ developers can slowly learn the more arcane part of the language language while they use it. A bit more difficult with Rust.

                      I’m not sure what parts of Rust you consider “arcane”. The tough parts to learn, borrow checking and lifetimes, aren’t “arcane” parts of Rust; they are basically it’s raison d’être.

                      Any language should be easy to learn.

                      Ideally languages would be as simple/easy as they can be to meet their goals. But a language might be the easiest-to-learn expression of a particular set of goals and still be tough to learn – it depends on the goals. Some goals might have a lot of inherent complexity.

                      1. 3

                        If carefully aware of escape analyses as a programmer, you might realize that with Go, and, while programming Go for several years, I’m by no means a Go fanboy.

                        In particular, I conjecture that you could write a program in Go that does not use GC, unless the standard library functions you use themselves use GC.

                        I need to learn Rust, i realize, having written that prior sentence, and having been originally a C fan.

                        1. 6

                          Personally, I would strongly recommend the O’Reilly “Programming Rust, 2nd ed.” For me it was a breakthrough that finally allowed me to write Rust and not get stuck. It may not be “perfectly shiny” what I write, but before that, I often stumbled into some situations I just couldn’t get out of. Now I understand enough to be able to at least find some workaround - ugly or not, but it lets me go on writing.

                          Also, coming from Go (with a history of C++ long ago beforehand), one thing I had to get over and understand “philosophically” was the apparent lack of simplicity in Rust. For this, my “a ha” moment was realizing, that the two languages make different choices in a priorities triangle of: simplicity vs. performance vs. security. Go does value all 3, but chooses simplicity as the highest among them (thus GC, nulls, etc; but super approachable lang spec and stdlib APIs and docs). Rust does value all 3 too, but chooses performance AND security as the highest. Thus simplicity necessarily is just forced to the back-seat, with a “sorry, man; yes, we do care about you, but now just please stay there for a sec and let us carry out the quarrel we’re having here; we’ll come back to you soon and really try to look into what you’d like us to hear.” And notably the “AND” here is IMO a rather amazing feat, where before I’d assume it just has to often be an “or”. Also this theory rather nicely explains to me the sparking and heated arguments around the use of unsafe in the community - it would appear to happen around the lines where the “AND” is, or looks like it is, kind of stretching/cracking.

                        2. 2

                          Personally, all I would ever want, is something mostly like C/C++, with pythonic features, easier to read and use, faster to compile, without a GC, statically compiled, without sophisticated things.

                          I think you’re looking for Myddin (still WIP) or possibly Hare. Whether they’re “pythonic” is debatable though.

                          1. 1

                            Any language should be easy to learn.

                            Not only easy to run. Easy. Because why would one make it difficult if it clearly can be made easy? The whole point of programming languages is providing simoler alternatives to the targets of their compilers.

                          1. 3

                            looking forward to it!

                            I have tried to use it as my dev env (for java backend, postgres) – but could not get a typical Java dev toolchain to work on NetBSD 9.x (gradle in our case [1])

                            [1] https://github.com/gradle/gradle/issues/16568

                            1. 3

                              Will try it out once 10.0 is released.

                            1. 4

                              It seems like a fairly sensible direction for their local chip development. The software development toolchains (especially GNU) and QEMU tend to follow closely behind the extension standards. So by the time someone’s got hardware actually shipping, there is already software available for it.

                              The main challenge for India’s SoC development in general will be all the peripherals needed for a modern SoC. DDR memory controllers, PCIe bus implementations, audio, video, and GPU core designs. There been some work on the RISC-V GPUs, but I haven’t heard of a serious push for that yet, open-source or closed source. I’m sure someone will try it at some point.

                              1. 5

                                Fingers crossed. And hope other countries folo similar steps. IIT has been developing Shakti processor based on RISC-V for sometime maybe they will collaborate on the same https://shakti.org.in/software.html

                              1. 3

                                This is a really well-written and interesting 3-part-article. I think Ada gets much less attention than it deserves.

                                1. 2

                                  Agreed :)

                                1. 1
                                  1. 9

                                    The main issue with using a proprietary relicensing scheme is that it means your software becomes nonfree as part of any products you sell that nonfree license to.

                                    Now, if one’s goal with open source is to get some marketing and eventually some money, this is probably fine. But if one’s goal is freedom and flexibility for end users this would run counter to that goal.

                                    1. 15

                                      Flexibility for end users is already a pipe dream. My cablemodem is GPL. This has never once helped me actually change what’s going on in the hardware.

                                      1. 4

                                        Most end users I interact with have more trouble with inflexible mobile or web apps than cable modems. You’re right that for a variety of reasons we are far from the ideal, and may never reach it, of course. But that doesn’t mean I need to personally make the issue worse :)

                                      2. 3

                                        That is why the whole scheme uses a dual-licensing model. Open Source users can still use each software freely as they did before.

                                        1. 1

                                          Not if anyone actually buys the nonfree license and then puts out a product – now this product will be nonfree and contain a nonfree version of the licensed code.

                                          1. 2

                                            It’s true, but it doesn’t take away from FOSS. The non-free product would most likely exist anyway, and just use different libraries or spend the money on reinventing their own.

                                            Overall the situation is still better than OSS, because instead of providing free labor for non-free projects, FOSS developers at least get compensation from non-free projects, and this subsidizes development of more FOSS.

                                            1. 1

                                              or spend the money on reinventing their own

                                              Yes, exactly

                                            2. 2

                                              Most companies don’t care about their product being Open Source anyway. Otherwise they would just the copyleft license from the dual-licensing of the dependency in the first place.

                                              The dual-licensing collective are opt-in. If you want to give you software for free to personal and commercial users alikes so they can do whatever they want (including relicensing) for free, then you keep using MIT or something like that. That’s fine, I respect your choice. If you care about preserving software freedom for everyone and you don’t care much about commercial entities you keep using GPL. But if you are resentful that companies are taking your effort for free, don’t give anything back, treat you like a free customer support, and then repackage your own software and make you pay for it, while you have to go to dayjob just to support yourself, then now you don’t have be upset. You can opt-in into preserving software freedom but also let commercial users use it and pay money for it which is fair and square.

                                              1. 1

                                                Something like this can help indie developers https://prosperitylicense.com/

                                                1. 1

                                                  Also worth checking https://xlcollaborative.com/

                                                  1. 1

                                                    Not GPL-compatible (I think), so I (and many like me) will not touch.

                                          1. 3

                                            Pkgsrc is future.

                                              1. 1

                                                Maybe they should again start using NetBSD

                                                1. 3

                                                  The default version of MySQL as set by the pkgsrc infrastructure was changed from MySQL 5.7 to MariaDB 10.5.

                                                  That’s an interesting choice given they’re not completely compatible. Does anyone know why this happened? I can’t find any relevant posts.

                                                  1. 3

                                                    The short answer to why it was done is that “other open source software distributions have done it already”, so the infrastructure is ready for it (certain other projects don’t even provide MySQL in the first place). Our users mostly wanted to run things like wordpress that already work with MariaDB and saw the MySQL 5.7 package as a bit crufty - though of course it’s still available if you need very exact compatibility.

                                                    MariaDB upstream has been very receptive to accepting my patches for say, NetBSD on ARM, so as a maintainer I’m happy.

                                                    1. 1

                                                      Did you find reason behind the change ?

                                                      1. 2

                                                        No. I was just lazy-web level curious, not actually-go-around-actively-asking-people curious :-D

                                                      2. 1

                                                        I don’t know details of decision but you can ask on #pkgsrc irc for reasons as to why they made that move

                                                      1. 3

                                                        I used the cargo-like Alire instead of gnatmake, but I found Ada to be an enjoyable language to toy around in when I learned it earlier this year.

                                                        1. 2

                                                          I am somewhat interested in Ada, but there is absolutely no way that I’d take a dependency on a language where the only F/OSS implementation is GPLv3. It’s a shame that AdaLabs’ effort to write an LLVM front end for Ada didn’t work out.

                                                          1. 2

                                                            LLVM compiler is still work in progress. Also few more compilers coming up. Foss GPLv3 is now with exception license also

                                                        1. 6

                                                          I suggested the “rant” tag. While I share some of the concerns outlined (phone numbers, crypto currency crap, single-control), I can’t really imagine why this article strays from solid reasoning to accusations and name calling. If the author would read this, I’d recommend rewriting this to be taken more seriously.

                                                          1. 5

                                                            I agree. I find it incredibly disingenuous that the author does not mention Signal’s Sealed Sender. One of the only serious technical critiques in this article is that you leak your social graph to Signal, but Sealed Sender actually makes this false in most cases. Maybe that’s harsh, and maybe they just didn’t know, but I feel like if you’re going to make that one of your core arguments you should have done your homework.

                                                            To be clear, Signal isn’t perfect. E.g. in theory they’ve been making changes to lay the groundwork for username-only accounts for a while, but it’s been a long time - where is it? Patent has listed a lot of these issues. But it’s a lot better than this article implies.

                                                          1. 1

                                                            ada compiler and GUI toolkit

                                                            1. 10

                                                              Please don’t run more ftp servers. Ftp is eol. Use something more modern

                                                              1. 3

                                                                Okay

                                                                1. 1

                                                                  Totally agree. There was a time when FTP had some advantages over the then-standard HTTP when distributing large files. That time is decades in the past.

                                                                1. 5

                                                                  As a NetBSD user and a follower of the Advanced Programming in the UNIX Environment, I am glad to see that; though, I am slightly disappointed it is not available as a manual page as in OpenBSD.

                                                                  EDIT: I particularly started to enjoy the definition of function as in

                                                                  int
                                                                  main(int argc, char *argv[])
                                                                  {
                                                                  	⋮
                                                                  }
                                                                  

                                                                  because a simple [1] egrep -nH '^main\>' *.c is enough to show me exactly where the function I am looking for is.

                                                                  [1]: I actually use a longer trick to find the file I want which that main definition:

                                                                  find $PWD -path '*/.git' -prune -o -type f -regextype egrep -regex '.*\.(c|h)(pp)?' -exec egrep -nH '^main\>' {} \+
                                                                  
                                                                  1. 2

                                                                    This is a good point actually. I always tend to use a search on the function name and then have to find which entry is the definition. Writing the return type a line above the function name actually gives a quick way to find the function location in codebases that use this style. Too bad I hated on this style because of the aesthetic or I would’ve realized on my own. :p

                                                                    1. 2

                                                                      Hi it comes under /usr/share/misc/style in install :)

                                                                      1. 3

                                                                        @jaypatelani, I saw that in your OpenGrok’s link.

                                                                        However, my point is about uniformity: the canonical point for UNIX documentation is man, and if afterboot(8) exists, why not style(9) as in OpenBSD—or, even better, style(7)?

                                                                        I like the style is available in the system. I am disappointed it is not in the man: to find it, one has to know it is here, or egrep / 'style', which is counterintuitive and I think it is never chosen over man -k.

                                                                        EDIT: Given that orders(7) exists, I am shocked style(7) doesn’t.

                                                                        However, I want to state that my opinion is: I really like the existence of it, and I like it very much: it helps a lot to read and find code, and I tried to push such coding style to few companies that I worked for, more than once.

                                                                        1. 1

                                                                          Okay.I will pass your suggestion to developers. :)

                                                                      1. 1

                                                                        Thanks.

                                                                        1. 4

                                                                          TempleOS only only runs one app at a time, the logic being that a human can only concentrate at only one thing at a time. There is no need to have multitasking, but sometimes an app would benefit additional processing power, so TempleOS can do multi-core processing by having a master-slave model: The main CPU can control the other CPU’s and hand out tasks to them.

                                                                          And while we think about crazy OS ideas: Why not run multiple independent kernels - one on every CPU? So while a rouge process could corrupt and take down one kernel the rest of the system would continue working.

                                                                          1. 6

                                                                            TempleOS can do multi-core processing by having a master-slave model: The main CPU can control the other CPU’s and hand out tasks to them.

                                                                            Classic Mac OS did this.

                                                                            And while we think about crazy OS ideas: Why not run multiple independent kernels - one on every CPU? So while a rouge process could corrupt and take down one kernel the rest of the system would continue working.

                                                                            This kinda exists already; galaxies in VMS achieve virtualization this way, I believe. Running multple OS instances could be useful for the Erlang OS mentioned though, especially since the concepts could make it transparent.

                                                                            1. 2

                                                                              Classic Mac OS did this.

                                                                              I forgot that the MDD dual G4 models could still boot Mac OS 9. I’m reasonably certain those shipped after OS X came out of beta, though, and could only boot OS 9 because it was (only slightly) too early to stop that.

                                                                              Were there other multi CPU macs that booted classic Mac OS?

                                                                              1. 7

                                                                                They made a bunch of SMP addons and even systems in the 90s. It was pretty much entirely to speed up gaussian blurs in Photoshop.

                                                                            2. 2

                                                                              You are describing unikernels.

                                                                              From my perspective it’s less about the human and more about the fact that most companies don’t run one computer or even one database - they run thousands. We are long past the “one operating system / computer” phase. Even the smallest companies are load balancing their webservers amongst multiple vms. We need new operating systems to facilitate this.

                                                                              1. 3

                                                                                I think on a personal level, nobody has only one device anymore (desktop/laptop/phone/tablet/smartwatch/e-reader/smart-TV/home-automation-stuff/home-server-possibly) and we need a good unified system for handling this, instead of pretending they’re all islands that just happen to communicate sometimes, with integration an afterthought.

                                                                              2. 2

                                                                                Why not run multiple independent kernels - one on every CPU?

                                                                                This has been explored in research. Check out http://www.barrelfish.org/

                                                                                1. 1

                                                                                  And while we think about crazy OS ideas: Why not run multiple independent kernels - one on every CPU? So while a rouge process could corrupt and take down one kernel the rest of the system would continue working.

                                                                                  Check out rump kernels in NetBSD probably not same idea but it can be achieved

                                                                                  1. 1

                                                                                    And while we think about crazy OS ideas: Why not run multiple independent kernels - one on every CPU? So while a rouge process could corrupt and take down one kernel the rest of the system would continue working.

                                                                                    HydrOS did this (and it was a BEAM OS).