need to run turbo c without installing stuff/flashdrive

  • Thread starter Deleted User
  • Start date
  • Views 1,053
  • Replies 7
D

Deleted User

Guest
OP
tldr- how to program in C without leaving tracks (no flash drives, no downloading from untrusted sites which is everything but google drive, without installing software), fast (less than 5 mins setup?

PLEASE ANSWER FAST, I NEED TO DO ANOTHER LESSON THIS WEEK

so I'm teaching in an after-school program for gifted kids, and I have a class where I teach programming in C. these are kids of ages 10-12 (sometimes less) but they seem to really like that shit and I like it too.

most of them learned scratch, tho that's a shit thing IMO.

now, we are using the computers of the school they are learning in, so I have to listen to the shit the teachers tell me....

I started teaching a few weeks ago, I chose teaching C (that's the lang I know the best and I know good tools for it...) and I told all the students to bring flash drives. my vision was that everybody comes with their software that I gave them, all the files they saved etc. and I gave them DOSBox configured to run turbo C - it's small (less than a gig, can fit easily on a flash drive), fast (can run on old hardware with almost no compilation time thanks to minimal code optimization) and I know and love that software, that's the first compiler I used...

my students overcame the looks of the compiler and already not saying bad stuff about it (you have to see someone born in the 21'th century react to dos software for the first time! hilarious lol)

we already ran the "hello world" and talked about machine code, compilers etc...

and now I receive a call from the computer's teacher that told me that I cant use flash drives on the computers because viruses and should use google drive or things of that kind (when was that changed? when I was young it was the other way around- use removable media and not internet to avoid viruses for school's computers)

so now I have no idea what to do

I need to run code in a full compiler (or interpreter) with save abilities, without installing any software or using flash drives (idk about CD/DVD but I assume that cant be done cause they will break instantly by the kids lol), being able to download it from g drive and erase traces, and make all that undetectable so the teacher won't notice I run foreign code that he didn't check

I know a little of python, and also maybe lua and (classic) basic, so this is also useful...


I already looked at Dosbox ports to js running from web browser, but all of them cant store files on local drive so the files can be re-uploaded... even if it will run, the computers may not be that powerful, I mean, they are around 10 yrs old, barely running win7 (tho running Dosbox perfectly ofc)

the web compilers I saw till now have some weird bugs, maybe cant use step-by-step running and other utils that are standard in most IDE's for the last few decades...


again, the kids are really gifted, they already learn in 4'th grade whats binary, tho they are still kids. the ones coming to me are very enthusiastic... so don't worry about hard stuff...
each lesson is around 50 min's (+-5) so I cant use something with a long setup

also, the teacher is stupidly stubborn and I don't wanna be responsible for every virus that might come from anything but me but I will be blamed for anyways

maybe this week I will tell them about overflow or some other theoretical cs subjuect if I wont find any solution... but that cant go on more then one week
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,284
Country
United Kingdom
I was banned from computers several times for using floppy discs as removable media might contain such things. Google drive instead features inbuilt scanning and can also be added to the security setup of the school.

Codeblocks has various flavours of no install/portable versions. http://codeblocks.org/downloads/26
An install is preferable but you should be able to compile things at least in it, certainly enough for the inputs, loops, checks and a bit of i/o that you are probably going for.

From the title I wondered if this was going to be one of those install sandboxie occasions but I guess not.

Also pro tip I guess. Have a backup -- can you stick your laptop on a projector and have everybody collaborate on something, you introduce a subtle bug and get them all to discuss and solve it (or optimise it if you reckon that is better).

Also something I like to teach kids with, and should be self contained/portable.
https://sgimenez.github.io/laby/
 

sarkwalvein

There's hope for a Xenosaga port.
Member
Joined
Jun 29, 2007
Messages
8,505
Trophies
2
Age
41
Location
Niedersachsen
XP
11,199
Country
Germany
Why don't you setup a server somewhere where they can actually edit, compile and run the code?

Make this server Linux based, and available with some fixed IP on the internet, or a free domain name on dynamic IP using some service like dyndns.

In each computer in the LAB use SSH to connect to this server, you can create an user with its corresponding home folder for each student.

They just connect to the server, and then edit, compile and run their code remotely. Of course all of this is stored permanently in the remote server you set up.

This way they don't only learn C, but some SSH and Linux.

I think this would be beautiful, but perhaps you don't like my idea because of it being too complicated.

PS: By SSH on Windows I mean of course PUTTY.
PS2: I am old, and DynDNS is not free anymore, but there are alternatives like No-IP.
 
Last edited by sarkwalvein,

CMDreamer

Well-Known Member
Member
Joined
Oct 29, 2014
Messages
1,655
Trophies
1
Age
38
XP
3,411
Country
Mexico
When we think about a non installing option, the first idea that came to my mind was using a so called "portable" application, that's a good option. You just unpack the folder that contains the application and run it, no traces are left once you delete that folder afterwards.

Another option would be to use an online C compiler, such as this one:

https://www.onlinegdb.com/online_c_compiler

Similar options exist, just search for that on G.
 
D

Deleted User

Guest
OP
Why don't you setup a server somewhere where they can actually edit, compile and run the code?

Make this server Linux based, and available with some fixed IP on the internet, or a free domain name on dynamic IP using some service like dyndns.

In each computer in the LAB use SSH to connect to this server, you can create a user with its corresponding home folder for each student.

They just connect to the server, and then edit, compile and run their code remotely. Of course all of this is stored permanently in the remote server you set up.

This way they don't only learn C, but some SSH and Linux.

I think this would be beautiful, but perhaps you don't like my idea because of it being too complicated.

PS: By SSH on Windows I mean of course PUTTY.
PS2: I am old, and DynDNS is not free anymore, but there are alternatives like No-IP.
that's a BEAUTIFUL idea! I would really like to do that!
problems are: I don't have the knowledge of how to setup a Linux server (or Linux, or servers in general) tho I bought a PI just for learning this sorts of things... have any good guide? tho my parents won't allow me to open ports of my home network to the internet... so that's a problem
also cant install putty on the computers in the school
I already started teaching them using DOS commands (to run BTC from DOSBox) tho Linux is ofc superior in every respect

other problem with the idea- I want them to program at home, even after the year is over and I cant run this server forever, and 24/7 for the whole year if that;s gonna be on my pi
 

nIxx

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
1,544
Trophies
0
Location
Germany
Website
Visit site
XP
337
Country
Gambia, The
I think in your case it would be better to use one of the Online Compilers then since they can still work at home with it however if you want to setup Linux just for coding as far as i know Suse does have an extra Setup Profile for that.
Or as mentioned before CodeBlocks as portable version ;)
 

sarkwalvein

There's hope for a Xenosaga port.
Member
Joined
Jun 29, 2007
Messages
8,505
Trophies
2
Age
41
Location
Niedersachsen
XP
11,199
Country
Germany
that's a BEAUTIFUL idea! I would really like to do that!
problems are: I don't have the knowledge of how to setup a Linux server (or Linux, or servers in general) tho I bought a PI just for learning this sorts of things... have any good guide? tho my parents won't allow me to open ports of my home network to the internet... so that's a problem
also cant install putty on the computers in the school
I already started teaching them using DOS commands (to run BTC from DOSBox) tho Linux is ofc superior in every respect

other problem with the idea- I want them to program at home, even after the year is over and I cant run this server forever, and 24/7 for the whole year if that;s gonna be on my pi
I don't have a tutorial, but it is kind of easy to do, I can give you a couple of tips:
  • You have to enable SSH on the Raspberry Pi, you can do this by running the raspi-config tool, and then in "Interfacing options" enable SSH.
  • You should fix the IP of your Raspi inside your local network, you can do that either by:
    • creating a rule to fix an IP to your Raspi MAC in your router, or by
    • setting your Raspi IP to fixed, inside the range allowed by your router, by editing the file /etc/dhcpcd.conf (there are hints inside the file as how to edit it).
  • Unfortunately you must forward port 22 in your router to your Raspi.
  • You can create additional users for each student with the useradd command in the Linux terminal, each of them shall log using their user name and password and they will have an independent home folder (perhaps you should add their users to the ssh group).
  • By default (I think) gcc is installed in Raspbian, if not just apt-get it, and you could use nano to edit source files.
  • Regarding automatically updating your free domain server with your dynamic IP, I saw a script that does it for No-IP, it is intended to be run at boot in a Raspi, I think you can google it (I don't remember where I got it, but sure it is googleable).
PS: Of course, this is not a good solution, because as you said it will be difficult for the kids to continue programming from home unless you keep the server running. Nevertheless I leave this series of hints here in case you are interested to do this some day in the future.
 
D

Deleted User

Guest
OP
When we think about a non installing option, the first idea that came to my mind was using a so called "portable" application, that's a good option. You just unpack the folder that contains the application and run it, no traces are left once you delete that folder afterwards.

Another option would be to use an online C compiler, such as this one:

https://www.onlinegdb.com/online_c_compiler

Similar options exist, just search for that on G.
I know what's that "potable" thing is tho thanks anyways.
as for the site you linked - I just cant look at a site claiming to be a full compiler. maybe stupid but LOOK AT IT! sorry about that.

--------------------- MERGED ---------------------------

I was banned from computers several times for using floppy discs as removable media might contain such things. Google drive instead features inbuilt scanning and can also be added to the security setup of the school.

Codeblocks has various flavours of no install/portable versions. http://codeblocks.org/downloads/26
An install is preferable but you should be able to compile things at least in it, certainly enough for the inputs, loops, checks and a bit of i/o that you are probably going for.

From the title I wondered if this was going to be one of those install sandboxie occasions but I guess not.

Also pro tip I guess. Have a backup -- can you stick your laptop on a projector and have everybody collaborate on something, you introduce a subtle bug and get them all to discuss and solve it (or optimise it if you reckon that is better).

Also something I like to teach kids with, and should be self-contained/portable.
https://sgimenez.github.io/laby/
last time I used codeblox it took me a lot more than 5 min's to setup as it is very heavy compared to (for example) turbo C
I cant stick my laptop to projector as it uses this old parallel port and my (modern) laptop only accepts hdmi... so I have to use the teacher's computer
when I wanna show something interesting I just ask everybody to come to my laptop (on which some kid is coding) and look at what I show. that creates the required atmosphere, they are close to the thing (literally) and can ask me directly and its possible because the group is small...
about the laby thing- I wanna show them *real* programming, as they can already use scratch to make pretty insane things... it's as real a programming lang as what you brought up

--------------------- MERGED ---------------------------

I think in your case it would be better to use one of the Online Compilers then since they can still work at home with it however if you want to setup Linux just for coding as far as i know Suse does have an extra Setup Profile for that.
Or as mentioned before CodeBlocks as portable version ;)
I just have a thing against online compilers... you cant run the EXE, you don't *feel* how close your program is to the metal (or the virtual metal in sandbox...) and they dont contain all the options that any good compiler contains

--------------------- MERGED ---------------------------

I don't have a tutorial, but it is kind of easy to do, I can give you a couple of tips:
  • You have to enable SSH on the Raspberry Pi, you can do this by running the raspi-config tool, and then in "Interfacing options" enable SSH.
  • You should fix the IP of your Raspi inside your local network, you can do that either by:
    • creating a rule to fix an IP to your Raspi MAC in your router, or by
    • setting your Raspi IP to fixed, inside the range allowed by your router, by editing the file /etc/dhcpcd.conf (there are hints inside the file as how to edit it).
  • Unfortunately you must forward port 22 in your router to your Raspi.
  • You can create additional users for each student with the useradd command in the Linux terminal, each of them shall log using their user name and password and they will have an independent home folder (perhaps you should add their users to the ssh group).
  • By default (I think) gcc is installed in Raspbian, if not just apt-get it, and you could use nano to edit source files.
  • Regarding automatically updating your free domain server with your dynamic IP, I saw a script that does it for No-IP, it is intended to be run at boot in a Raspi, I think you can google it (I don't remember where I got it, but sure it is googleable).
PS: Of course, this is not a good solution, because as you said it will be difficult for the kids to continue programming from home unless you keep the server running. Nevertheless I leave this series of hints here in case you are interested to do this some day in the future.
oh I see what you're doing! thx for the hints
but unfortunately it requires me to open a port which my parents wont allow me to do (they hold the password and I respect their word... and I really dont wanna let hackers into my system... if only there was a better solution....

also I want them to have some sort of gui, which gcc lacks sadly... even a basic gui will be enough because I dont wanna hear them ranting about the lack of mouse... and when you have gui then you can also see code highlights etc
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: or did you have to find a used one with the lower firm ware that was not updated