News for hackers. Stuff that matters.
Re:Simplicity of IRC by dan-robertson on Sunday January 09, 2022 @08:16AM (#29862928)
It’s a real shame how difficult programming is. I don’t mean that it is difficult to write difficult things, but that it is difficult to write simple things. Once upon a time, one could download visual studio, click about to make a new project in (e.g.) Visual Basic, draw a gui in the gui editor, and click the run button. One could then start adding simple functionality (e.g. working through a book). Or even longer ago when a computer might dump you practically straight into BASIC when you turned it on or you might get access to a mainframe/minicomputer with programming tools already set up. Nowadays, an ‘easy’ introduction could involve the horrific process of installing and setting up python on windows (where it is hard to do things other than input/output text) or editing some html/JavaScript files where there are more easily possible interactive things but lots of things are difficult like ‘just drawing things’ or anything that requires a server side.

P.S. if you, like me, were wondering what Libera Chat is, it’s the moral successor of Freenode with Freenode now being a shell of its former self.

Re:Simplicity of IRC by ryandrake on Sunday January 09, 2022 @12:13PM (#29865204)
Reminds me of this visualization[1]. The amount of code it takes to simply draw a triangle in OpenGL 1.x, OpenGL 3+, and Vulcan

The learning curve has been sacrificed. It's now a learning cliff for everything. We've used to have computers that make it simple to do simple things and hard to do complex things. Now, just so it can be slightly less hard to do complex things, we've made it hard to learn and do simple things.

1: https://twitter.com/sol_hsa/status/1174233868536356866

Re:Simplicity of IRC by surajrmal on Sunday January 09, 2022 @12:31PM (#29865388)
In the case of graphics, the only thing that's changed is the abstraction layer which is stable. Most folks won't use Vulkan directly, but rather through a layer which they have control to optimize or fix bugs in if they need to. Learning graphics programming will never start directly with Vulkan programming. I suppose there are benefits to make the standard, stable API easy to work with as a beginner, but there are plenty of great open source projects that fill that niche.
Re:Simplicity of IRC by mdoms on Sunday January 09, 2022 @01:23PM (#29865911)
I have never written for Vulkan and have only done bits and pieces of OpenGL but this can't possibly be an honest representation can it?
Re:Simplicity of IRC by 323 on Sunday January 09, 2022 @02:56PM (#29866763)
Even conceptually using Vulkan is much more complicated.

In old GL it's basically glClear, glBegin, glVertex, glVertex, glVertex, glEnd and a bit of window setup.

In Vulkan you need to know what these things are: queues, command buffers, image/geometry buffers, memory locations (constant, uniform, varying), resources, bindings, shader programs, fences, swap chains, and how they all coordinate together.

And until they are all properly coordinated together, you'll just be staring at a black image or just get errors.

Re:Simplicity of IRC by seoaeu on Sunday January 09, 2022 @01:42PM (#29866094)
No, not entirely. Each version does progressively more error checking / debug output. Also the first two output a static single color triangle, while the Vulkan sample outputs a rotating triangle with different colors for each vertex.
Re:Simplicity of IRC by anthk on Sunday January 09, 2022 @12:45PM (#29865557)
TBH GLIDE was the Vulkan of its era.
Re:Simplicity of IRC by magpi3 on Sunday January 09, 2022 @08:58AM (#29863246)
> Once upon a time, one could download visual studio, click about to make a new project in (e.g.) Visual Basic, draw a gui in the gui editor, and click the run button

The world that lived behind that experience - COM & Active X Controls - was extremely complex. If you needed to build a new active x control for your app, god save you.

It's been said a million times, but in programming there is always complexity. Sometimes it is just well hidden.

Re:Simplicity of IRC by qsort on Sunday January 09, 2022 @12:29PM (#29865360)
I think there's a difference between intrinsic complexity and accidental complexity, though.

You're right to observe that programming involves irreducible complexity (one of the reasons why so many low code/no code tools fail is the refusal to accept this, imo), on the other hand modern toolchains are extremely complicated and could be a little more streamlined.

It's a meme at this point, but there's no way having six different pythons on your machine or whatever the hell modern JS toolchains do -- just to pick two examples -- is the simplest it can possibly be.

Older machines and toolchains certainly had their problems (arguably even worse ones), but I completely understand the complaints.

Re:Simplicity of IRC by Qem on Monday January 10, 2022 @09:37AM (#29875412)
The complexity of modern tool-chains suck, specially when you are just beginning. It gets you very confused, and some people end just giving up. Python is confusing with all the environment juggling if you're at the stage of doing something not trivial. But for the beginner, at least it gives you IDLE, a barebones IDE by default. I think there is a parallel universe where I use Ruby as my main language, instead of Python, as I tried Ruby before Python, several years ago. But in this timeline I got stuck trying to call the Ruby interpreter from Geany, and never came back.

Similarly, I tried to learn Clojure before Pharo. Spent over a hour setting Atom with all dependencies required to convert the editor into a Clojure IDE. But I botched the set-up somewhere, and ended with a dead REPL. Again, never came back.

The best experience I had so far, as a beginner trying a new programming language, was Pharo. You type a couple of lines in the terminal, and gets a full environment with _everything_ you need included in the system image. No need to spending a lot of time wrangling dependencies to get a functional system. I think the image-based development strategy from the Smalltalks is underrated.

Re:Simplicity of IRC by leobg on Tuesday January 11, 2022 @11:05PM (#29902154)
Thank you for posting this. I’ve had the same experience with Clojure and was wondering whether to try Pharo. So I did a search on HN and your comment came up, written no 24 hours before. Jung would have called this a synchronicity, or “meaningful coincidence”.
Re:Simplicity of IRC by ok123456 on Sunday January 09, 2022 @01:49PM (#29866167)
>If you needed to build a new active x control for your app, god save you.

regsvr32 coolcontrol.ocx

Re:Simplicity of IRC by Iv on Sunday January 09, 2022 @09:28AM (#29863500)
> on windows

This is the mistake. Linux and, I believe, OSX come with several tools pre-installed including python.

Re:Simplicity of IRC by young_unixer on Sunday January 09, 2022 @01:35PM (#29866026)
Which creates more problems than solutions.

If the Python version that comes with your OS is not the one you want (e.g. it's outdated), then you'll have to:

1. Install the version you want anyway, and all the tools required (that usually don't come preinstalled in the OS)

2. Try to not make them collide, which, last time I tried, was a PITA, because the OS depends on original version of Python being in the the $PATH or something.

Python on Ubuntu is notoriously misleading for newbies, because even if you apt install python3 and it tells you that it's already installed, it's not fully installed. For example, venv is not installed, you have to `sudo apt install python3-venv` and do that for every Python module that's not installed by default.

It would be easier if Linux didn't come with Python, and then people simply installed the actual, full version of Python they wanted.

Re:Simplicity of IRC by f1refly on Sunday January 09, 2022 @06:13PM (#29868433)
>and then people simply installed the actual, full version of Python they wanted.

Which then wouldn't work for all the repository python programs. The repo's python is what everything is built and tested against, so there is no replacing that.

Re:Simplicity of IRC by young_unixer on Sunday January 09, 2022 @07:12PM (#29868936)
The package manager could install its own version of Python, isolated from the rest of the system, so that it doesn't get in the way of the user, but repository programs know where it is and can use it.
Re:Simplicity of IRC by throwhauser on Sunday January 09, 2022 @01:01PM (#29865720)
Anytime I do anything with python on Linux or MacOS I encounter python, python3, pip, pip3, venv, virtualenv, conda, poetry... so much machinery around the code. Throw in your platform-specifc package manager of choice as well (apt, brew, etc)

EDIT: Oh and pipenv!

Re:Simplicity of IRC by emeth on Sunday January 09, 2022 @10:01AM (#29863768)
> Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages.

https://apple.stackexchange.com/questions/406244/will-macos-...

Re:Simplicity of IRC by pmarreck on Sunday January 09, 2022 @05:02PM (#29867765)
That's probably for the best, as the ones that ship are often old and buggy, and Apple doesn't seem to care for maintaining them (even if they pretend to care about developers). As long as there's a way for actual developers to install these tools themselves (such as Homebrew), things will work out fine.
Re:Simplicity of IRC by enumjorge on Sunday January 09, 2022 @09:53AM (#29863707)
A tool shouldn’t need to come preinstalled with the OS in order to be useable. And “switch to a different OS” is not a good solution especially for cases where you don’t control the OS you run.

For a long time MacOS came with only Python 2.x installed. I looked up what the latest version of MacOS comes with and came across an Apple support forum post with several responses posting conflicting answers [0]. One person got an Xcode related error. Having to install a heavyweight IDE just to get a language to run correctly is the type of needless complication the parent comment is talking about.

[0] https://developer.apple.com/forums/thread/691403

Re:Simplicity of IRC by lloeki on Sunday January 09, 2022 @10:38AM (#29864135)
> Having to install a heavyweight IDE

xcode-select --install pulls in the CLT, which is a fairly reasonably sized download given that it includes various essential dev tools including python3 but without Xcode.

This is hinted at by attempting to run python3 before any install, which calls a stub prompting you to do just that.

py2/ruby/perl/etc... are part of the base OS for backwards compatibility/expectations (because they were so before Xcode/CLT were even a thing) but have been marked as due for removal from base for something like half a decade. My bet is that at some point they will move to the CLT (or some other optional download) as well.

Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @09:53AM (#29863704)
Windows comes with PowerShell, which is a pretty fully featured programming language that can interface directly with the .NET ecosystem.
Re:Simplicity of IRC by fivea on Sunday January 09, 2022 @10:30AM (#29864066)
> Windows comes with PowerShell (...)

It might be just me, but PowerShell feels outright developer-hostile even when compared to Bash. Perhaps it's their approach to rely primarily on .NET stuff which makes things so arcane, but when given the option it's far simpler and better to go with, say, python than PowerShell.

Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @10:43AM (#29864193)
I couldn't disagree more, I think bash is a horrifically bad programming language. Honestly I'm incredibly surprised anyone could compare PowerShell and bash and think that PowerShell is the arcane one.
Re:Simplicity of IRC by fivea on Sunday January 09, 2022 @11:43AM (#29864860)
> I couldn't disagree more, I think bash is a horrifically bad programming language.

Bash is described as a "command language" and not a programming language per se.

Bash is what you use to type in commands, and automate said commands if you need to whip out a quick script that runs what you would otherwise run manually. Bash, scripting-wise, is command line glue.

If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.

Re:Simplicity of IRC by carlhjerpe on Monday January 10, 2022 @07:26AM (#29873746)
> If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.

Expand your views. Everyone aren't you, didn't learn the same things as you and understand different things than you.

I learned some C++ as my first language, therefore I got stuck in an object oriented mindset, this translates really well to PowerShell and really poorly to bash. The thing where everything is text doesn't make sense, text isn't stable and everyone will write their own partially broken parsing implementation. In PowerShell they try to make everything an object, with type checking and other goodies, solid autocomplete for scripts being one.

In PowerShell I can deserialise JSON and perform CRUD operations on the data easily.

I'd say powershell is outright developer friendly as it brings a production grade language to the scripting table.

If powershell could parse bash completion files and integrate sudo better I'd use it as a command shell on all platforms, which right now are limited to MacOS and Linux.

Re:Simplicity of IRC by AnIdiotOnTheNet on Sunday January 09, 2022 @01:21PM (#29865893)
Again, I disagree and regularly use PowerShell as a command language --as do many Windows admins-- and much prefer its object-based pipelining and relatively sensible and consistent command and argument naming to bash's error-prone text pipeline and mixture of 2-letter abbreviations and complete nonsense names. But whatever, to each their own.

This subthread was specifically about programming languages being available out of the box in OSs, so when you brought up bash my natural assumption was that meant as a programming language.

Re:Simplicity of IRC by majkinetor on Sunday January 09, 2022 @01:01PM (#29865716)
Totally. Bash is such nonsense. Its little better then batch on Windows.

PowerShell is such joy that it should be there on any Linux as default interactive shell.

Re:Simplicity of IRC by chungy on Sunday January 09, 2022 @02:23PM (#29866473)
PowerShell is the worst of bash and perl combined. It's like Microsoft took a look at each of those, "We can do that!" and implemented them.... worse.
Re:Simplicity of IRC by mavhc on Sunday January 09, 2022 @06:37PM (#29868636)
What's bad about it specifically? Main thing I don't like is verb-noun, breaks tab complete
Re:Simplicity of IRC by williamtwild on Sunday January 09, 2022 @12:00PM (#29865067)
The problem is that you think bash is a programming language.
Re:Simplicity of IRC by cxr on Sunday January 09, 2022 @01:43PM (#29866107)
The person who you're responding to is engaging with the person who they're responding to in the terms chosen by the latter. If the original commenter hadn't written, "PowerShell feels outright developer-hostile even when compared to Bash", then we might have some reason to find fault with the person who replied. Considering that's what did happen, however, this comment of yours—which is both snarky and implicitly demands the wrong person to take responsibility for the comparison—just comes across as annoying.
Re:Simplicity of IRC by majkinetor on Sunday January 09, 2022 @01:02PM (#29865738)
Its bad even for one liners.
Re:Simplicity of IRC by mavhc on Sunday January 09, 2022 @06:37PM (#29868623)
People complained about Python using whitespace, adding an extra space in bash can break the whole thing
Re:Simplicity of IRC by dan-robertson on Sunday January 09, 2022 @04:22PM (#29867446)
I wanted to focus on a ‘first introduction to programming’ which on average means windows. Obviously installing and running python can be easier on Linux but you still have problems with anything not-just-text.
Re:Simplicity of IRC by ripe on Sunday January 09, 2022 @10:36AM (#29864115)
Yes! I learned BASIC on the BBC Micro. You turned it on, and you got a BASIC interpreter. It was the most painless, most fun experience. Graphics, sound,, etc., were all available by reading the User Guide.

I couldn't have afforded buying one, but my university had half a dozen.

I wish kids today could get that.

Re:Simplicity of IRC by Sophira on Sunday January 09, 2022 @10:57AM (#29864351)
The closest I've found to having a modern experience to programming in that manner is DragonRuby Game Toolkit [0]. It's not free (with some exceptions for eligible users and indie game developers), but it does offer a standard version for a one-off payment, which is the version I have. It's sold as a game dev toolkit but it brings back those same memories of BASIC for me. I firmly believe that it could be a very viable method of introducing programming as well.

If you bought either of the two itch.io bundles "Bundle for Racial Justice and Equality" or "Indie bundle for Palestinian Aid", then you have the Standard license already included in that bundle. It's well worth a look IMO.

(Not affiliated other than a very happy user.)

[0] https://dragonruby.org/toolkit/game

Re:Simplicity of IRC by akkartik on Sunday January 09, 2022 @02:30PM (#29866535)
This was my attempt at providing easy graphics to kids inspired by the BBC Micro: https://github.com/akkartik/mu/tree/main/shell

Here's a 6-minute demo: https://archive.org/details/akkartik-mu-2021-06-09

Requires Qemu, though. And no sound yet, unfortunately. I'd love contributions there or elsewhere.

Re:Simplicity of IRC by anthk on Sunday January 09, 2022 @09:19AM (#29863416)
TCL/TK >>>>>> VB. By a huge margin. VB would work great under Windows, but TCL/TK kits would work everywhere.
Re:Simplicity of IRC by denton-scratch on Sunday January 09, 2022 @03:44PM (#29867150)
I liked VB6 when I first tried it. You drew a UI, then you double-clicked the components to get a menu of stub code-blocks. It was good for making UIs.

Then suddenly there were masses of weird, undocumented APIs, including APIs from any application installed on the machine. Unfortunately I was making my living from VB6 at the time, so I had to learn it all. (And then MS withdrew support for VB6, forcing me to learn a new trade, which is only one driver of my animus against MS)

Long ago I owned a Sinclair QL. That toy had a rather nice BASIC editor. I think their dialect was called QBasic. You selected a function in the left pane, and it appeared for editing in the right pane. (I also loved that it used a 68K processor; that chip had a sweet instruction set)

Re:Simplicity of IRC by rahen on Sunday January 09, 2022 @05:08PM (#29867818)
Indeed, just like VB6, tcl/tk is a great reminder of the late 90s.

Tcl was such an expressive yet minimalist language. Probably the only fast and easy way back then to create GUI applications on *nix systems. I guess Python + QT has killed it now, but with a massively larger footprint and resource usage obviously.

Re:Simplicity of IRC by lambdaba on Sunday January 09, 2022 @09:06AM (#29863306)
Bash is the Basic of our era, the fact that it's so easy to do simple things explains why people are so often ready to use it despite its perceived and real shortcomings. Hopefully one of the new shells gains enough popularity to "flip" usage and give us a renaissance of powerful scripting interfaces.
Re:Simplicity of IRC by cout on Sunday January 09, 2022 @10:27AM (#29864035)
Why bash over the browser javascript console? It is everywhere and allows interactive editing of a "program", much like the BASIC interpreters of old.
Re:Simplicity of IRC by lambdaba on Sunday January 09, 2022 @10:39AM (#29864143)
Yeah but how do I pipe to other programs? How do I schedule something and integrate it with my filesystem? Also the syntax is complicated (don't underestimate this, for many of us trouble parsing syntax is a distant memory). Also easy interop between many programming languages.

Maybe when the browser fully swallows the OS but I hope it won't be JavaScript or it would have morphed into something else.

Re:Simplicity of IRC by mavhc on Sunday January 09, 2022 @06:38PM (#29868649)
Bash is terrible, adding an extra space breaks it

BASIC is smarter than C, it knows when = means assign and when it means equality

Re:Simplicity of IRC by mdrzn on Monday January 10, 2022 @09:11AM (#29875028)
This is how I learned how to code, by downloading Visual Studio and randomly trying stuff out. Visually you can have an immediate feedback about your work, and then you start learning the code.

Nowadays, it's all about interconnecting different microservices just to bootstrap something, let alone build something complete.

Re:Simplicity of IRC by gaws on Monday January 10, 2022 @04:02PM (#29882403)
> Nowadays, it's all about interconnecting different microservices just to bootstrap something

What is an example of this?

Re:Simplicity of IRC by mdrzn on Thursday January 13, 2022 @06:34AM (#29919566)
Here's a great (but comedic) example: https://www.youtube.com/watch?v=y8OnoxKotPQ
Re:Simplicity of IRC by einpoklum on Sunday January 09, 2022 @09:01AM (#29863270)
> ... difficult to write simple things...

and

> Once upon a time, one could download visual studio,

don't seem to agree very well. Visual Studio is a behemoth and usually results in stuff that's non-standard, non-portable and with lots of dependencies.

Re:Simplicity of IRC by layer8 on Sunday January 09, 2022 @09:24AM (#29863446)
That certainly wasn’t the case with Visual Studio VB6 (or earlier) that the GP alluded to.
Re:Simplicity of IRC by dan-robertson on Sunday January 09, 2022 @04:28PM (#29867494)
Visual studio won at the zero-to-interactive-program metric. People who have never programmed are not going to care so much about portability as they are about not getting stuck trying to figure out how to install/make things work properly on their systems. The modern ‘getting started’ choice is often python which doesn’t give you such an easy path to interactivity and has its own portability problems.
Re:Simplicity of IRC by erwincoumans on Sunday January 09, 2022 @11:36AM (#29864790)
Python is just one installer on Windows and there are tons of pip installable packages, for 2d or 3d graphics, GUI, sound/midi, math/data and whatever you can think of. Tons of docs and tutorials or colabs.

How is that not easy?

Re:Simplicity of IRC by gbear605 on Sunday January 09, 2022 @12:10PM (#29865176)
A friend of mine was recently taking a course on machine learning and she had to use Python with some packages for the homework assignments. She downloaded VSCode and installed Python on her machine and then attempted to get the packages installed with pip. They weren’t showing up in the VSCode terminal though. Somehow she had six different installations of Python, one of Python 3 living inside of a VSCode namespace, one each of Python 2 and 3 living in a global location, and one each of Python 2 and 3 living in a user-specific location, and a Python installed by Anaconda. Calling python, python3, pip, and pip3 in all went to different Python installations. The VSCode installation didn’t seem to have pip at all, even with python -m pip. I managed to eventually sort it all out for her, but it took me over two hours to figure it out, and I’m a professional programmer who uses Python in my daily job. I admittedly don’t use Windows everyday, but it was a huge mess and I have no idea how it happened.

Computers are complex, and people who don’t work closely with them daily can easily get very confused.

Re:Simplicity of IRC by erwincoumans on Sunday January 09, 2022 @12:21PM (#29865282)
In such cases, it maybe better to just use Google Colab.
Re:Simplicity of IRC by 323 on Sunday January 09, 2022 @08:53AM (#29863198)
Rose tinted glasses?

Visual Basic (classic) that you mentioned, discontinued in 2008, was not free, unless you pirated it.

> ‘just drawing things’

For that you have much more amazing things today, like Shadertoy, or various artistic programming languages like Processing, ...

Programming is easier than ever, computers are extremely cheap, software is free, documentation on the internet is free, YouTube is full of tutorials, there are literally no obstacles if you want to do it.

Back in my day I had to pay for computers, for programming software, for books, Internet cost a fortune, ...

Re:Simplicity of IRC by layer8 on Sunday January 09, 2022 @09:26AM (#29863475)
However, today there is no VB-like experience for modern development regardless how much you’d be willing to pay for it.
Re:Simplicity of IRC by Mister_Snuggles on Sunday January 09, 2022 @09:41AM (#29863613)
I remember Delphi being pretty close back in the day, and it's still around[0] if you're willing to pay for it. Lazarus[1] is another option.

Apart from the underlying language, the experience is pretty close.

[0] https://www.embarcadero.com/

[1] https://www.lazarus-ide.org/

Re:Simplicity of IRC by 323 on Sunday January 09, 2022 @09:32AM (#29863535)
Delphi still exists:

> Build Native Apps 5x Faster With One Codebase. For Windows, Android, iOS, macOS, and Linux

https://www.embarcadero.com/products/delphi

And it's free if you don't make a lot of money of what you build.

Re:Simplicity of IRC by gavinray on Sunday January 09, 2022 @11:27AM (#29864690)
And if you don't need/want to compile to x64 bit

Delphi Community Edition only allows x32 compilation

I downloaded it to try. It's not a huge limitation for most usecases I would imagine.

Re:Simplicity of IRC by Nextgrid on Sunday January 09, 2022 @02:35PM (#29866576)
Do they make an exception for Mac, considering recent macOS no longer supports 32-bit binaries?
Re:Simplicity of IRC by rahen on Sunday January 09, 2022 @10:51AM (#29864278)
Have you tried Lazarus?

https://www.lazarus-ide.org

Re:Simplicity of IRC by boondaburrah on Sunday January 09, 2022 @08:57AM (#29863237)
I believe there were some visual basic books you could get that would have a CD-ROM with a limited version in the back, but I may not be remembering correctly. Of course, you could also check those books out of the library and online activation wasn't really a thing then, so that's how I remember starting.
Re:Simplicity of IRC by denton-scratch on Sunday January 09, 2022 @04:07PM (#29867342)
> Programming is easier than ever

Really, it's not. This trade has got much, much harder since I started. The languages are harder, because the targets are both more complicated and more various. Computers were mainly used to do sums (I worked on accounting systems written in COBOL).

I mean, it's easier if you take into account the complexity and richness of the modern computing environment, USB, PCI, caches, what have you. You are producing more powerful programs. But the onboarding ramp for modern programming is steep.