I'm not new to programming. However, my skill set is rather dated (think "pre-internet").
Can anyone recommend any Javascript tutorials that are non-HTML and/or non-CSS driven? More to the point, Javascript tutorials that are drive for text output such as with BBS (not the web version)?
Everything I come across on the net seems to all be tailored for an HTML end result.
Any advice will be greatly appreciated.
Can anyone recommend any Javascript tutorials that are non-HTML and/or non-CSS driven? More to the point, Javascript tutorials that are drive for text output such as with BBS (not the web version)?
Everything I come across on the net seems to all be tailored for an HTML end result.
You're interested in "core JavaScript", https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
And anything that is "text output such as with the BBS" is going to be defined in the Synchronet object model:
https://synchro.net/docs/jsobjs.html
You may find some base JavaScript tutorials that use console.log() to output text and you could just replace those calls with print() when using Synchronet. --
MDN is not what I would call a tutorial, although you will find some sample scripts in many of the articles.
Most JS tutorial content you find will focus on scripts running in a web browser, under node.js, or as part of a particular framework running on one or both of the above. It may be difficult for you to tell what's "core" JS and what's particular to the environment the tutorial is about.
We have the "core" JS stuff from about 10 years ago, and some custom things on top of that:
https://synchro.net/docs/jsobjs.html
I could go on, but the best thing you can do is dive in, refer to the heaps of JS that are included with Synchronet for examples, and ask questions when you get stuck. Find me on IRC if you want to chat; I have an unfortunate amount of knowledge on this subject.
"dated" knowledge. Sure, it won't be spot-on accurate, but at least it will give me a starting point and I can troubleshoot from there.
That's understandable since Javascript was original purpose was intended to be used in conjunction with HTML.
Though to be clear, JS is just a language and there's nothing inherently web-browserey about it. You'll see mention out there that JS is "event driven" and "asynchronous by nature" and this isn't strictly true.
Just be mindful that most of what's written about JS is written with > browsers or node.js in mind, by people who never needed to look beyond
that space.
I think you understand exactly what I'm getting at. It's the JavaScript info that is HTML/CSS-centric that I'm trying to weed my way through.
I think you understand exactly what I'm getting at. It's the JavaScript info that is HTML/CSS-centric that I'm trying to weed my way through.
... or Node.JS, which is often *not* HTML/CSS-centric.
I think you understand exactly what I'm getting at. It's the JavaScript info that is HTML/CSS-centric that I'm trying to weed my way through.
Is there a particular script editor that you guys recommend for writing Javascipt that works best for this purpose? I've been using Visual Code Studio, but it doesn't seem to recognize "console.print" or "prompt" for some reason.
I think you understand exactly what I'm getting at. It's the JavaScript info that is HTML/CSS-centric that I'm trying to weed my way through.
... or Node.JS, which is often *not* HTML/CSS-centric.
Exactly.
Is there a particular script editor that you guys recommend for writing Javascipt that works best for this purpose? I've been using Visual Code Studio, but it doesn't seem to recognize "console.print" or "prompt" for some reason.
Sorry for all the newbie questions.
Re: Javascript for dummies like me
By: Sys64738 to echicken on Mon Dec 06 2021 18:05:26
I think you understand exactly what I'm getting at. It's the
JavaScript info that is HTML/CSS-centric that I'm trying to weed
my way through.
Hate to say it, but you just have to power through it. You'll
eventually get a feel for what information is portable and what is
tied to a certain domain.
I use Visual Studio Code, and I just accept that its language features aren't always going to be accurate. I refer to jsobjs.html when I need to know what parameters a function requires, or what it will return, rather than trust the hints that come up in VS Code.
I use notepad++ on Windows and vim or geany on Linux. The editor doesn't have to recognize an object/method/property for you to use it.
Javascipt that works best for this purpose? I've been using Visual Code Studio
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Mon Dec 06 2021 21:02:33
I use notepad++ on Windows and vim or geany on Linux. The editor doesn't have to recognize an object/method/property for you to use it.
I started out just using plain notepad.
Since this is all new to me, I
thought that I might benefit from the hints/debugging features from an editor.
However, it seems that programming has become less uniform and less certain since the years when I was most involved (80's-90's). The paved roads of years past seem to have not been maintained and people often find themselves cutting their own path to get to where they want to go.
In your opinion, would that be an accurate assessment?
Javascipt that works best for this purpose? I've been using Visual Code Studio
Do you mean Visual Studio Code?
However, it seems that programming has become less uniform and less certain since the years when I was most involved (80's-90's). The paved roads of years past seem to have not been maintained and people often find themselves cutting their own path to get to where they want to go.
In your opinion, would that be an accurate assessment?
I think the tools are far better and more "paved" than they were in the '80s and '90s.
No doubt, the tools are far better. However, there doesn't seem to be as much consistency in the syntax of the programming languages that I've
observed. Such as with "console.print" as an example. I'm not understanding why that command wouldn't be universal and a common command within JavaScript.
No doubt, the tools are far better. However, there doesn't seem to be as much consistency in the syntax of the programming languages that I've observed. Such as with "console.print" as an example. I'm not understanding why that command wouldn't be universal and a common command within JavaScript.
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Tue Dec 07 2021 12:56:02
However, it seems that programming has become less uniform and less certain since the years when I was most involved (80's-90's). The paved roads of years past seem to have not been maintained and people often find themselves cutting their own path to get to where they want to go.
In your opinion, would that be an accurate assessment?
I think the tools are far better and more "paved" than they were in the '80s and '90s.
No doubt, the tools are far better. However, there doesn't seem to be as much consistency in the syntax of the programming languages that I've observed. Such as with "console.print" as an example. I'm not understanding why that command wouldn't be universal and a common command within JavaScript.
For whatever reason, JS has a fairly weak standard library and a lot of stuff is left to the implementor. Depending on where your JS is running, the notion of a 'console' to send output to might have a very different meaning.
MDN says that 'console' appeared in browsers around the era of IE8, Firefox 4, Chrome 1, Safari 3. It probably wasn't widespread until at least 10 years ago. Its purpose is mostly to output debug info to a browser's dev tools console. Even then, it's just a convention and not part of the standard.
Meanwhile Synchronet already had an object by that time which (presumably) DM chose to call 'console'. It has a different purpose entirely, even if it seems superficially similar to the 'console' in browsers or node.js.
The console object defined in Synchronet's JS API might have fairly different requirements than for other contexts. When developing JS for a web browser, there is a 'console' object, but that's a totally different thing. The JS console object for Synchronet is for the text-based interface
This language sounds like a make it up as you go free for all. Sorta like building the bicycle while you ride it. What could go wrong? lol
This language sounds like a make it up as you go free for all. Sorta like building the bicycle while you ride it. What could go wrong? lol
However, the concept of people making up their own commands seems like a taking a long walk on a short pier.
Because JavaScript was designed without a "console" in mind. Core JavaScript makes no assumptions about the I/O capabilities (screen, file, or otherwise) of the environment in which the script is running.
This language sounds like a make it up as you go free for all. Sorta like building the bicycle while you ride it. What could go wrong? lol
isnt that how computing has always been? that's how engineers do things, isn't it?
JS is typically used as a scripting environment embedded in some other application. The 'parent' application might be written in C or Java for example. The parent application might be a BBS, a print accounting system, an authentication provider, the firmware on a radio, a web browser, or a development platform like node.js. (These are places where I've used JS.)
If you've written software, you've probably written a function, and in so doing you've made up a command. Your program can call that function whenever it needs to.
In many ways, this is the same thing. It's just that the function (or object, method, property, etc.) is defined at a lower level. Sort of at a layer between the parent application and the child script.
It's not that implementors are altering JS itself. It's that they're giving scripts an interface to resources outside of the JS core so that they can do something with them. Which is the entire point of embedding a scripting engine into your software.
I hope that clarifies it a bit.
Pardon my dated terms, but I relate "function" in this context to be a "routine" or "subroutine".
It certainly does. I appreciate you taking the time to explain it to me. Suddenly, the world starts to make a little more sense.
The console object defined in Synchronet's JS API might have fairly
different requirements than for other contexts. When developing JS
for a web browser, there is a 'console' object, but that's a totally
different thing. The JS console object for Synchronet is for the
text-based interface
I understand what you're saying. Thanks for explaining.
However, the concept of people making up their own commands seems like a taking a long walk on a short pier.
This language sounds like a make it up as you go free for all. Sorta
like building the bicycle while you ride it. What could go wrong? lol
isnt that how computing has always been? that's how engineers do things, isn't it?
It's not that implementors are altering JS itself. It's that they're giving scripts an interface to resources outside of the JS core so that they can do something with them. Which is the entire point of embedding a scripting engine into your software.
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Thu Dec 09 2021 11:57:08
Because JavaScript was designed without a "console" in mind. Core JavaScript makes no assumptions about the I/O capabilities (screen, file, or otherwise) of the environment in which the script is running.
I see. So, with Core Javascript is there a standard/universal "print" type option?
Re: Javascript for dummies like me
By: Sys64738 to Digital Man on Fri Dec 10 2021 08:36 am
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Thu Dec 09 2021 11:57:08
Because JavaScript was designed without a "console" in mind. Core JavaScript makes no assumptions about the I/O capabilities (screen, file, or otherwise) of the environment in which the script is running.
I see. So, with Core Javascript is there a standard/universal "print" type option?
No, because like I said, Core JavaScript makes no assumptions about the I/O capabilities of the environmnet.
isnt that how computing has always been? that's how engineers do things, isn't it?
It's good to think about at least a bit of the design before building it. I doubt computers such as the IBM PC, Mac, etc. were just thrown together haphazardly.
However, the concept of people making up their own commands seems
like a taking a long walk on a short pier. SYS64738
Pardon my dated terms, but I relate "function" in this context to be a "routine" or "subroutine".
I haven't used those terms since I was a teenager learning BASIC in high school, but it's all close enough for this discussion.
they do, it's a lot easier to proceed with your project. (I usually just dive headfirst into stuff I know nothing about, and come away with slightly, incrementally more understanding each time.)
Yep, I'm old. Not to the point where I scram at kids to get off my lawn or
anything. However, I do cringe every time I hear "programming" termed as "coding". blech!
Exposure therapy is the only thing that really works. Slang comes and goes; you can ignore it or resist it up to a certain point, but language will drift. I am often quite annoyed by stuff like this (eg. referring to the # symbol itself as 'hashtag'), but I eventually get used to it. I just unclench my cringe muscles and move on as many times as it takes until that happens.
However, the concept of people making up their own commands seems like a taking a long walk on a short pier.
How so?
The ability to create your own functions, your own classes, your own API, etc. is the foundation of being able to build software. You need to be able to create your own functions, classes, etc. in order to build software effectively.
Also I rarely see them referred to as "commands".
I see. So, with Core Javascript is there a standard/universal "print" type option?
No, because like I said, Core JavaScript makes no assumptions about the I/O capabilities of the environmnet.
And btw, this attribute is not unique to JavaScript. You've heard of the C and C++ programming languages, I'm sure. C and C++, the languages themselves, don't define a standard/universal "print" type function either.
There *are* "Standard Runtime Libraries" for the C and C++ which add that functionality (e.g. puts, printf), but they're not part of the core language definition. I've worked professionally on C projects where there was no "print" type functionality at all (we did not use a "standard runtime library", nor was there a console to print to in the execution environment).
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Fri Dec 10 2021 10:08:53
And btw, this attribute is not unique to JavaScript. You've heard of the C and C++ programming languages, I'm sure. C and C++, the languages themselves, don't define a standard/universal "print" type function either.
There *are* "Standard Runtime Libraries" for the C and C++ which add that functionality (e.g. puts, printf), but they're not part of the core language definition. I've worked professionally on C projects where there was no "print" type functionality at all (we did not use a "standard runtime library", nor was there a console to print to in the execution environment).
That is odd to me. Even the Eniac and Edvac had the ability to display a readout even if it was on punchcards or some other medieval median.
Never mind me. I was looking at it from the wrong perspective. Echicken set me straight.
Also I rarely see them referred to as "commands".
What? Is this pick on the old programmer day? lol
anything. However, I do cringe every time I hear "programming"
termed as "coding". blech!
Yeah, there's no 'programming' any more, old timer. There are developers and coders and coders who develop and developers who code and probably a bunch of other things I'm not hip enough to know about.
will drift. I am often quite annoyed by stuff like this (eg. referring to the # symbol itself as 'hashtag'), but I eventually get used to it. I just
And btw, this attribute is not unique to JavaScript. You've heard of
the C and C++ programming languages, I'm sure. C and C++, the
languages themselves, don't define a standard/universal "print" type
function either.
There *are* "Standard Runtime Libraries" for the C and C++ which add
that functionality (e.g. puts, printf), but they're not part of the
core language definition. I've worked professionally on C projects
where there was no "print" type functionality at all (we did not use a
"standard runtime
library", nor was there a console to print to in the execution environment)
That is odd to me. Even the Eniac and Edvac had the ability to display a readout even if it was on punchcards or some other medieval median.
Re: Javascript for dummies like me
By: echicken to Sys64738 on Sat Dec 11 2021 05:28 am
will drift. I am often quite annoyed by stuff like this (eg. referring to the # symbol itself as 'hashtag'), but I eventually get used to it. I just
I as well. I also feel annoyed when I see posts where the only text people post with it are #hashtags rather than an actual sentence saying something..
The software embedded in your webcam, for example, likely was written in C or C++. It doesn't have "a console" or anywhere to "print", so any logic to support that function would have been a waste of resources on such a device. It's great that such functions are not requirements of the language itself.
Never mind me. I was looking at it from the wrong perspective. Echicken set me straight.
I think he explained it fairly well.
Also I rarely see them referred to as "commands".
What? Is this pick on the old programmer day? lol
I didn't mean it like that, and sorry it came across that way.
Re: Javascript for dummies like me
By: Digital Man to Sys64738 on Fri Dec 10 2021 22:11:29
The software embedded in your webcam, for example, likely was written in C or C++. It doesn't have "a console" or anywhere to "print", so any logic to support that function would have been a waste of resources on such a device. It's great that such functions are not requirements of the language itself.
I get that. However, at some point someone won't someone want to run a diagnostic on the device to see a report of what it has done and is currently doing? Without a record, they will only be able to see what the device is doing now and no historical record (no matter how short) for use in troubleshooting.
Of course, it is possible to have a device like this, but I anticipate trouble on the horizon when it comes to rectifying problems the device has.
I use notepad++ on Windows and vim or geany on Linux. The editor
doesn't have to recognize an object/method/property for you to
use it.
I started out just using plain notepad. Since this is all new to me,
I thought that I might benefit from the hints/debugging features from
an editor.
However, it seems that programming has become less uniform and less
certain since the years when I was most involved (80's-90's). The
paved roads of years past seem to have not been maintained and people
often find themselves cutting their own path to get to where they want
to go.
In your opinion, would that be an accurate assessment?
No doubt, the tools are far better. However, there doesn't seem to be
as much consistency in the syntax of the programming languages that
I've observed. Such as with "console.print" as an example. I'm not understanding why that command wouldn't be universal and a common
command within JavaScript.
The console object defined in Synchronet's JS API might have fairly
different requirements than for other contexts. When developing JS
for a web browser, there is a 'console' object, but that's a totally
different thing. The JS console object for Synchronet is for the
text-based interface
I understand what you're saying. Thanks for explaining.
However, the concept of people making up their own commands seems like
a taking a long walk on a short pier.
I started out just using plain notepad. Since this is all new to me,I would use at least Notepad++ or another more feature-rich text editor
I thought that I might benefit from the hints/debugging features from
an editor.
over plain notepad...
Re: Re: Javascript for dummies like me
By: Tracker1 to Sys64738 on Mon Dec 13 2021 06:20 pm
I started out just using plain notepad. Since this is all new to me,I would use at least Notepad++ or another more feature-rich text editor over plain notepad...
I thought that I might benefit from the hints/debugging features from an editor.
Also check out sublimetext - https://www.sublimetext.com/
I think that might be up his alley.
I think he explained it fairly well.
Made a believer out of me! :)
By the way, another thing that didn't exist in my day was the concept of a "good" or "white hat" hacker. lol
Sysop: | Retros |
---|---|
Location: | Toronto, Canada |
Users: | 23 |
Nodes: | 8 (0 / 8) |
Uptime: | 249:43:22 |
Calls: | 1,087 |
Files: | 6 |
Messages: | 29,770 |