I have been trying to install a free programming language on Win7 so that I can keep my skills up, but it appears to be much harder to install one than to actually write programs.
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
I tried C++ and created a few arrays and populated them with data, but I couldn’t get it to display the contents of the array as coloured pixels in a window.
Yesterday in desperation, I tried FreeBasic. Also way too hard to install and run a “Hello World” program.
Each one of these took at least a day wasted just trying to do a simple task.
Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
I have been trying to install a free programming language on Win7 so that I can keep my skills up, but it appears to be much harder to install one than to actually write programs.
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
I tried C++ and created a few arrays and populated them with data, but I couldn’t get it to display the contents of the array as coloured pixels in a window.
Yesterday in desperation, I tried FreeBasic. Also way too hard to install and run a “Hello World” program.
Each one of these took at least a day wasted just trying to do a simple task.
Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
If you have Excel it comes with VBA so it’s free.
The free office programs also have built in programming languages; a different variety of Basic, or Javascript for the Google spreadsheet.
You can also do Javascript in Excel, but I wouldn’t recommend it.
Also installing Python shouldn’t be that hard.
You know if you want to work with arrays in Python you should install Numpy?
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
Well that’s weird but yeah the solution is to sort out your environment issues and still use Python…
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
I have been trying to install a free programming language on Win7 so that I can keep my skills up, but it appears to be much harder to install one than to actually write programs.
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
I tried C++ and created a few arrays and populated them with data, but I couldn’t get it to display the contents of the array as coloured pixels in a window.
Yesterday in desperation, I tried FreeBasic. Also way too hard to install and run a “Hello World” program.
Each one of these took at least a day wasted just trying to do a simple task.
Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
Some people have just way too much time on their hands, hey what but.
How bout you try basket weaving instead. Much more productive.
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
Well that’s weird but yeah the solution is to sort out your environment issues and still use Python…
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
Well that’s weird but yeah the solution is to sort out your environment issues and still use Python…
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
I’ve found Anaconda a PitA. Yes, I’d suggest uninstalling then install Numpy with pip.
Well that’s weird but yeah the solution is to sort out your environment issues and still use Python…
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
Why wouldn’t you upgrade windows?
While all you clever people are here I have two computer problems which I can’t seem to resolve.
1) How do I exclude a word in a Bing search.
2) My old Vista machine shows that the alternate drive contains about 8GB of data which I can’t access.
Any help would be appreciated.
Well that’s weird but yeah the solution is to sort out your environment issues and still use Python…
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
I’ve found Anaconda a PitA. Yes, I’d suggest uninstalling then install Numpy with pip.
Or save yourself the trouble and use VBA from Excel :)
I need “numpy” to use arrays, and I can’t import numpy until I install “Anaconda” which needs Win8 or above, or “Pip” and I wasted most of yesterday arvo trying to get that working.
Should I uninstall the lot and try installing Pip first?
Why wouldn’t you upgrade windows?
While all you clever people are here I have two computer problems which I can’t seem to resolve.
1) How do I exclude a word in a Bing search.
2) My old Vista machine shows that the alternate drive contains about 8GB of data which I can’t access.
Any help would be appreciated.
To upgrade costs time and money. I already have a nicely setup Win7 desktop system that has everything I need on it. I just want to do some programming, like I used to do 35 years ago on a 256kb 286.
I mistakenly assumed that it would be easier to achieve by now.
While all you clever people are here I have two computer problems which I can’t seem to resolve.
1) How do I exclude a word in a Bing search.
2) My old Vista machine shows that the alternate drive contains about 8GB of data which I can’t access.
Any help would be appreciated.
To upgrade costs time and money. I already have a nicely setup Win7 desktop system that has everything I need on it. I just want to do some programming, like I used to do 35 years ago on a 256kb 286.
I mistakenly assumed that it would be easier to achieve by now.
To upgrade costs time and money. I already have a nicely setup Win7 desktop system that has everything I need on it. I just want to do some programming, like I used to do 35 years ago on a 256kb 286.
I mistakenly assumed that it would be easier to achieve by now.
Can’t use Visual Studio Code or Atom or maybe Arduino IDE?
I got VSC running Python, and did a few test programs. Then I tried arrays and found that I needed numpy, which is where the problems started. Apparently it’s easier if you have Win10, but with only Win7, the various installers won’t work.
Can’t use Visual Studio Code or Atom or maybe Arduino IDE?
I got VSC running Python, and did a few test programs. Then I tried arrays and found that I needed numpy, which is where the problems started. Apparently it’s easier if you have Win10, but with only Win7, the various installers won’t work.
Weird.
I must say for an expert hacker you’re not going well with this mate.
Can’t use Visual Studio Code or Atom or maybe Arduino IDE?
I got VSC running Python, and did a few test programs. Then I tried arrays and found that I needed numpy, which is where the problems started. Apparently it’s easier if you have Win10, but with only Win7, the various installers won’t work.
Weird.
I must say for an expert hacker you’re not going well with this mate.
Can’t use Visual Studio Code or Atom or maybe Arduino IDE?
I got VSC running Python, and did a few test programs. Then I tried arrays and found that I needed numpy, which is where the problems started. Apparently it’s easier if you have Win10, but with only Win7, the various installers won’t work.
Weird.
I must say for an expert hacker you’re not going well with this mate.
I have been trying to install a free programming language on Win7 so that I can keep my skills up, but it appears to be much harder to install one than to actually write programs.
Python is my first preference, but it doesn’t seem to play nicely with arrays on win7, and arrays are what I want to play with.
I tried C++ and created a few arrays and populated them with data, but I couldn’t get it to display the contents of the array as coloured pixels in a window.
Yesterday in desperation, I tried FreeBasic. Also way too hard to install and run a “Hello World” program.
Each one of these took at least a day wasted just trying to do a simple task.
Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
Sorry, Kingy. I’ve given up on programming in Win7.
Nowdays I do all my programming on Linux, where it is so much easier.
> Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
The last time I managed to that in Win7 was using Java 1.0. Java doesn’t like 2-D arrays, so I had to loop over 1-D arrays to do it.
Can anyone suggest a free package that allows me to write a program to create a (X * Y) array, randomise the contents, and display that array as coloured pixels in a separate window, with a menu bar at the top?
We suggest a text editor such as NOTEPAD.EXE and a modern browser such as Mozilla Firefox or Google Chrome.
Shortly we will contribute a listing for a program that does some of the above requested, with the following interpretations:
the array will be a XY block rather than true multidimensional array of arrays
the pixels will be in a canvas on a page
the menu bar at the top will be that of the browser, but as you know, any other content may be included in the HTML at the discretion of the coder.
Note that we did not include buffering in our code here, and pixel manipulation in HTML5Canvas was inefficient last time we checked some years ago.
Thank you kind sir, that is a great help and I shall start learning javascript and make the appropriate modifications in order to achieve what I wanted.
It took me several hours to get my head around javascript, but I have managed to modify the original program to create a box with a blue border, a sine wave of colours across it, and a modified randomiser effect.
Tomorrow I’ll try to increase the size and change the colour effects.
It took me several hours to get my head around javascript, but I have managed to modify the original program to create a box with a blue border, a sine wave of colours across it, and a modified randomiser effect.
Tomorrow I’ll try to increase the size and change the colour effects.
nice one, we’ll try to strip out the best of our double buffering code so it will actually run at a decent speed, you may find that necessary when you increase the size
It took me several hours to get my head around javascript, but I have managed to modify the original program to create a box with a blue border, a sine wave of colours across it, and a modified randomiser effect.
Tomorrow I’ll try to increase the size and change the colour effects.
nice one, we’ll try to strip out the best of our double buffering code so it will actually run at a decent speed, you may find that necessary when you increase the size
Not sure if this will be of interest if everybody is off doing Javascript, but here are some examples of graphics generated with Python code (connected to Excel, but you don’t have to do that if you dont want to):
It took me several hours to get my head around javascript, but I have managed to modify the original program to create a box with a blue border, a sine wave of colours across it, and a modified randomiser effect.
Tomorrow I’ll try to increase the size and change the colour effects.
nice one, we’ll try to strip out the best of our double buffering code so it will actually run at a decent speed, you may find that necessary when you increase the size
Not sure if this will be of interest if everybody is off doing Javascript, but here are some examples of graphics generated with Python code (connected to Excel, but you don’t have to do that if you dont want to):
Interesting that you have mentioned the Mandelbrot set.
I got myself into a lot of shit in the 80’s at Uni when I wrote a program to calculate the Mandelbrot.
The university 80286 that I was using was way too slow, so I “borrowed” some processor time from every other computer on the network, and left it to calculate the numbers overnight.
When I arrived at Uni next day, I was called into the Sysadmins office. He was not amused. My program had accidentally taken over the 80286 that ran all of the admin and payroll. None of the staff got paid that day. :(
They did get paid the next day. :)
My Mandelbrot set did do a small zoom, but I wasn’t allowed to do another one.
nice one, we’ll try to strip out the best of our double buffering code so it will actually run at a decent speed, you may find that necessary when you increase the size
Not sure if this will be of interest if everybody is off doing Javascript, but here are some examples of graphics generated with Python code (connected to Excel, but you don’t have to do that if you dont want to):
Interesting that you have mentioned the Mandelbrot set.
I got myself into a lot of shit in the 80’s at Uni when I wrote a program to calculate the Mandelbrot.
The university 80286 that I was using was way too slow, so I “borrowed” some processor time from every other computer on the network, and left it to calculate the numbers overnight.
When I arrived at Uni next day, I was called into the Sysadmins office. He was not amused. My program had accidentally taken over the 80286 that ran all of the admin and payroll. None of the staff got paid that day. :(
They did get paid the next day. :)
My Mandelbrot set did do a small zoom, but I wasn’t allowed to do another one.
I had no idea you were such a computer nerd. :)
But the increase in computing power available to everyone with a few hundred dollars to spare is indeed amazing.
_ = {
el: document.getElementById(CanvasID),
c: null,
getpixel: function (x, y) {
return this.c.getImageData(x, y, 1, 1).data;
},
putpixel: function (x, y, r, g, b) {
var id, d;
d = (id = this.c.getImageData(x, y, 1, 1)).data;
d[0] = r;
d[1] = g;
d[2] = b;
d[3] = 255;
this.c.putImageData(id, x, y);
},
rect: function (x1, y1, x2, y2, r, g, b) {
var id, d;
var n, N;
var x, y;
x = (x1 < x2? x1: x2);
y = (y1 < y2? y1: y2);
d = (id = this.c.getImageData(x, y, (x1 > x2? x1 - x: x2 - x) + 1, (y1 > y2? y1 - y: y2 - y) + 1)).data;
N = d.length;
for (n = 0; n < N; n += 4) {
d[n] = r;
}
for (n = 1; n < N; n += 4) {
d[n] = g;
}
for (n = 2; n < N; n += 4) {
d[n] = b;
}
for (n = 3; n < N; n += 4) {
d[n] = 255;
}
this.c.putImageData(id, x, y);
},
_: null
};
_.c = _.el.getContext("2d");
return _;
};
/* Populates 3 "size" by "size" arrays with R G B values */
var cp;
var x, y, a, aa, aaa, pie, size, rads;
cp = attachInterface("c");
a = []
aa = []
aaa = []
pie = 3.14159268
size = 40
rads = 40
height = 1.8;
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
//Test Text
// <button>Hello</button>
// Const btn = document.querySelector('button');
// btn.addEventListener('click', () => {
// Do This;
// });
//While hasn't clicked exit
//Await button click
/* Draws "size" by "size" square with colours from above code */
cp.rect(0, 0, size, size, 0,0,0);
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
cp.putpixel(x, y, Math.floor(a[x + size * y] * 255), Math.floor(aa[x + size * y] * 255), Math.floor(aaa[x + size * y] * 255));
}
}
//--></script>
</body>
</html>
oh yeah that happens if you paste HTML directly into the box, it says HTML markup allowed so we had to write another bit of code to convert it all to entities
we’ve made ourselves a code packaging application to let us smuggle code into display for your viewing pleasure (curing the whitespace problem) so in future we’ll be able to respond to any other computational exercises in a more aesthetically appealing fashion
_ = {
el: document.getElementById(CanvasID),
c: null,
getpixel: function (x, y) {
return this.c.getImageData(x, y, 1, 1).data;
},
putpixel: function (x, y, r, g, b) {
var id, d;
d = (id = this.c.getImageData(x, y, 1, 1)).data;
d[0] = r;
d[1] = g;
d[2] = b;
d[3] = 255;
this.c.putImageData(id, x, y);
},
rect: function (x1, y1, x2, y2, r, g, b) {
var id, d;
var n, N;
var x, y;
x = (x1 < x2? x1: x2);
y = (y1 < y2? y1: y2);
d = (id = this.c.getImageData(x, y, (x1 > x2? x1 - x: x2 - x) + 1, (y1 > y2? y1 - y: y2 - y) + 1)).data;
N = d.length;
for (n = 0; n < N; n += 4) {
d[n] = r;
}
for (n = 1; n < N; n += 4) {
d[n] = g;
}
for (n = 2; n < N; n += 4) {
d[n] = b;
}
for (n = 3; n < N; n += 4) {
d[n] = 255;
}
this.c.putImageData(id, x, y);
},
_: null
};
_.c = _.el.getContext("2d");
return _;
};
/* Populates 3 "size" by "size" arrays with R G B values */
var cp;
var x, y, a, aa, aaa, pie, size, rads;
cp = attachInterface("c");
a = []
aa = []
aaa = []
pie = 3.14159268
size = 40
rads = 40
height = 1.8;
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
//Test Text
// <button>Hello</button>
// Const btn = document.querySelector('button');
// btn.addEventListener('click', () => {
// Do This;
// });
//While hasn't clicked exit
//Await button click
/* Draws "size" by "size" square with colours from above code */
cp.rect(0, 0, size, size, 0,0,0);
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
cp.putpixel(x, y, Math.floor(a[x + size * y] * 255), Math.floor(aa[x + size * y] * 255), Math.floor(aaa[x + size * y] * 255));
}
}
//--></script>
</body>
</html>
oh yeah that happens if you paste HTML directly into the box, it says HTML markup allowed so we had to write another bit of code to convert it all to entities
we’ll have a look in a bit
This bit
function checkOption(){
var height = Number(optionField.value);
It took me several hours to get my head around javascript, but I have managed to modify the original program to create a box with a blue border, a sine wave of colours across it, and a modified randomiser effect.
Tomorrow I’ll try to increase the size and change the colour effects.
nice one, we’ll try to strip out the best of our double buffering code so it will actually run at a decent speed, you may find that necessary when you increase the size
here you go we copied the double buffering code out from some of our existing libraries and it is delivered below
a HTML contained JS powered utility for posting code in a readable format
simply paste our code into a file and open it as HTML in your JS enabled browser (easiest if you give it a HTML type extension when saved), and you too will have the power
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>code for https://tokyo3.org/forums/holiday/</title></head><body>
<h1>code for <a href="https://tokyo3.org/forums/holiday/">https://tokyo3.org/forums/holiday/</a></h1>
<div>
<textarea id="i" cols="80" rows="25">paste code here to cure the whitespace problem, then select the output from the other box to copy and paste it to forum</textarea>
<textarea id="o" cols="80" rows="25"></textarea>
</div>
<div id="f">
</div>
<script type="text/javascript"><!--
"use strict";
(function () {
document.getElementById("i").focus();
document.getElementById("o").addEventListener("focus", function () {
var i, n, o = "";
i = document.getElementById("i").value;
for (n = 0; n < i.length; n++) {
switch (i[n]) {
case " ": case "\xA0": {
o += " ";
} break;
case "\r": case "\n": {
o += "<br>\n";
} break;
default: {
o += "&#x" + i.charCodeAt(n).toString(16) + ";";
}
}
}
o = o.replace(/(\r|\n)/g, "");
document.getElementById("f").innerHTML = document.getElementById("o").value = "<div style=\"font-family: Consolas, Lucida Console, Courier New, monospace;\">\n" + o + "\n</div>\n";
document.getElementById("o").select();
}, false);
})();
//--></script>
</body></html>