Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Colonel_Panic

Pages: 1 2 [3] 4
31
InForm-based programs / Re: Text Fetch with InForm v1.0
« on: November 07, 2021, 09:13:40 pm »
Nice clean interface.
very professional looking.
I'm impressed.

32
Programs / Space Invaders
« on: November 07, 2021, 08:27:16 pm »
pretty sure "CLOCK" was my first "graphics program".
I wanted to see if I could do a retro video game.

SPACE INVADERS
 
NOTES:
linux has sound issues (for me) so, no sound
press ENTER when it starts; I forgot I would ever deploy it.
Z and X are left and right, SPACEbar to fire
I'm on LINUX MINT? and... it's a little faster than the original.

33
Programs / Re: RANDOM and URANDOM bytes on demand
« on: November 07, 2021, 07:06:51 pm »
LINUX guys already know this, so,
this is for the people like ME...
BASIC programmers, who want to "play" on LINUX !

in DOS and BASIC.EXE terms?

in LINUX, the OS makes "special files"... its not really a FILE file, like a text file.
but... it can LOOK just like one.
sometimes? you can "open it up" and even "read" it just LIKE a regular text file?
sometimes? it says "0 bytes", but, if the G-spot is tickled just right?

it magically will poop out BYTES like you want.

PROBLEM: you can *not* OPEN the file, and read in bytes
                 you HAVE to SHELL out a "weird command" to accomplish it.

After a VERY long time beating my head against a wall, I got online, and slowly found an example...
in programming terms? I am COPYing the "magic file" to a REAL text file, and THEN I can do what I want.
here? you cant copy an empty "file", but, this command tickles the G spot correctly it poops bytes out.

(you can obviously STR$ assemble a string to designate the exact # of bytes you require per poop, in code before the SHELL)
============================================
the *rest* of my cryptology program(s)?

"run like BASIC programs"... this thing was just a way to get new pool-bytes on demand

34
Programs / RANDOM and URANDOM bytes on demand
« on: November 07, 2021, 06:53:56 pm »
About a year ago, I got into a cryptology suite program.

I had FITS trying to make LINUX give me "CPU random bytes" that I *knew* were there, and all the big cryptology progs run off of the same bytes I am going to get...

I only needed to, periodically, stop and get a "new key pool".
IE, I need "x" bytes of completely random, mathematically random, distribution.
(software can bust you immediately, if you only PRETEND and use a RND statement, BTW)

so, this little GEM? took me *longer* than I will admit to publicly, to get
(learning LINUX as I go)

yeah, I know, your AI is *fine* with RND*256 random choices, yields 0-255;
this is for when you need "mathematically pure" random bytes. on demand.

PROGRAM:
1) runs perfect on LINUX MINT
2) most LINUX's should be okay
3) creates a couple files:

ddd, eee, fff, ggg

these contain the 1k / 4k / 64k / 1,000,000    bytes (respectively)

NOTE: if you are like me? and want to open and SEE the bytes are indeed "changing" each run?
          use "ddd" or "eee".....
          if you click on ggg, and open up 1,000,000 random bytes of gobbledygook? your little text editor might complain (mine does)

linux MINT executable :
 

got code?
Code: QB64: [Select]
  1. Print "attempting to extract 1k+4k+64k+1mb of bytes...": Print
  2. Shell "head -c 1024 /dev/urandom > ddd.dat"
  3. Print "1k successful; attempting 4k..."
  4. Shell "head -c 4096 /dev/urandom > eee.dat"
  5. Print "4k successful; attempting 64k..."
  6. Shell "head -c 65536 /dev/urandom > fff.dat"
  7. Print "64k successful; attempting 1,000,000 bytes..."
  8. Shell "head -c 1000000 /dev/urandom > ggg.dat"
  9. Print "1,000,000 bytes successful...": Print
  10. Print "check the file(s) now; program will terminate."
  11.  

NOTE: it goes w/o saying, this is LINUX only...  some windows API guy can explain how to do this in windows, please have them make a post

35
Programs / Re: watchcat --- LINUX "fun-tility"
« on: November 07, 2021, 05:31:58 pm »
PROGRAM NOTES:
================

--- this little program makes a FILE, named 'procbase'
--- it will always make this tiny text database right in the same folder
--- it makes, and re-makes, the same little file constantly

--- this is not, repeat: *NOT* how this is supposed to be done!
--- next time i go over this? I will change the format, to where I will SHELL out a CAT/dd with >
-------- this will essentially copy and reformat this file, relocating it at the same time
-------- whats the big deal? I am not supposed to be OPENing this file and LINE INPUTing out of it like this
-------- if you follow this example, you will run into spots where you get weird EOF and other errors
-------- once i CAT and dd the relocated copy up front? *then* I will have a file I can "prance around in" w/o weird errors


what you are seeing? is a BASIC programmer (me) slowly fumbling around, learning to program in a LINUX environment
I am trying to get used to "playing with" special files. Just dont get the idea you *should* do this, this way...
you should (probably) CAT/dd > the file, then play.

36
Programs / Re: watchcat --- LINUX "fun-tility"
« on: November 07, 2021, 05:07:15 pm »
coolness...

got code ?

Code: QB64: [Select]
  1. Screen _NewImage(80 * 8, 45 * 16, 32)
  2. Color _RGB32(255, 255, 0)
  3. dlay = 1
  4. Dim fil$(1024)
  5. workingDirectory$ = _CWD$ + "/"
  6. ChDir "/proc/"
  7. 'Input "strip="; strip
  8. iterate:
  9. t = 0
  10. Open "cpuinfo" For Input As #3
  11. For c = 1 To 8
  12.   Line Input #3, x$
  13.   cp$ = Right$(x$, Len(x$) - InStr(x$, ":"))
  14.   Print cp$
  15.   'If c = 8 Then Print Using "###### Mhz"; Int(Val(cp$))
  16. '_Delay dlay ': Cls
  17. S$ = "dir -p --format=single-column > " + workingDirectory$ + "procbase"
  18. t7 = Shell(S$)
  19. Open workingDirectory$ + "procbase" For Input As #3
  20. again1:
  21.   Line Input #3, x$
  22.   If Val(x$) > 0 Then t = t + 1: fil$(t) = x$
  23.   GoTo again1:
  24.   Close #3
  25. 'Print t
  26. _Delay dlay: Cls
  27. Print Using "###### Mhz"; Int(Val(cp$))
  28. Print "       Name:           Umask:  State:          Tgid:   Ngid:   Pid:    PPid:"
  29. Print "       -----           ------  ------          -----   -----   ----    -----"
  30. For v = 1 To t
  31.   'Print fil$(v);
  32.   'On Error GoTo around_this:
  33.   If _FileExists(fil$(v) + "status") Then
  34.     Open fil$(v) + "status" For Input As #3
  35.     For w = 1 To 7
  36.       Line Input #3, d$
  37.       d$ = Right$(d$, Len(d$) - InStr(d$, ":"))
  38.       If w = 1 Then
  39.         If Len(d$) < 15 Then d$ = d$ + String$(15 - Len(d$), " ")
  40.         If Len(d$) > 15 Then d$ = Left$(d$, 15)
  41.         Print d$; " ";
  42.       End If
  43.       If w > 1 Then Print _Trim$(d$); " ";
  44.     Next w: Print
  45.   End If
  46.   '  around_this:
  47.   Close #3
  48.   If v / 39 = Int(v / 39) Then
  49.     _Delay dlay
  50.     Cls
  51.     Print Using "###### Mhz"; Int(Val(cp$))
  52.     Print "       Name:           Umask:  State:          Tgid:   Ngid:   Pid:    PPid:"
  53.     Print "       -----           ------  ------          -----   -----   ----    -----"
  54.   End If
  55.  
  56. _Delay dlay
  57. If InKey$ = "" Then GoTo iterate:
  58.  

37
Programs / Re: watchcat --- LINUX "fun-tility"
« on: November 07, 2021, 04:28:24 pm »
I *think* I fixed the original post attachment download.

38
Programs / Re: watchcat --- LINUX "fun-tility"
« on: November 07, 2021, 04:07:34 pm »
oopsie.

these are my first few "deploys".
apologies.

this is funny...

Code: QB64: [Select]
  1.  
  2. Open "/home/sedstar/Desktop/qb64/programs/CONKY/procbase" For Input As #3
  3.  
  4.  
==========================
ha, was up late, forgot it has a file dependency.
let me re-deploy like I do my other one...

39
QB64 Discussion / Re: Bizzarre error with $include
« on: November 07, 2021, 04:04:27 pm »
hi eekee.

I ran into the $INCLUDE statement fairly recently as well.
My best tip for always being able to stop and figure out whats going wrong?

I go and PHYSICALLY cut and paste into code that section, and replace the include.
Problems? easier to see now.
go BACK and physically cut and paste and put the INCLUDE back in.
=====================================
physically cut and pasting back and forth several times? quickly cured my issues with $INCLUDE
(at least for now)

40
QB64 Discussion / Re: differences between LINUX and WINDOZE mouse routines?
« on: November 07, 2021, 03:59:18 pm »
McNeill-----> kudos
Bplus-------> kudos

hopefully, I can help back or help forward over time.

its funny to me, when I was a "cool programmer" way back when?
honestly, someone else always did...

1) mouse
2) high end screen stuff
3) everyone's fun game "where the &^%$ is my FILE !!!" ("MAPped" network drive(s) ??)

I basically "unplugged" those 2 sections of code (mouse/screen), and "worked" with a very basic text list.
I sort of "plugged back in" the mouse and screen, so to speak, when i was done "working" for the day.

I am "circling around" and picking up graphics and mouse and stuff to go with "everything" I want to do now.

41
QB64 Discussion / Re: differences between LINUX and WINDOZE mouse routines?
« on: November 07, 2021, 02:22:14 pm »
awesome!

thanks mcneil, and everyone else who chimed in...
I just figured I wasn't alone. great.

FINAL ANALYSIS:
 loose nut on my keyboard.
 tightened up.
 
Yeah, I really dont know what goes on in the Mouse routines
I... "fiddle" with mouse code... it gets working... and i try not to TOUCH IT when its working.

I *suppose* its about time, I took a break and "played" with the mouse for something SMALL,
until I can get past "first base" with the MOUSE.

see how many OS's I can satisfy at once, for a tiny non-game.

42
Programs / watchcat --- LINUX "fun-tility"
« on: November 07, 2021, 02:07:18 am »
I think any Linux guy has seen or heard of (or runs, lol) "conky"

its a cool... "thing to watch" that people "design" cool looks for.
really neat, like a executive magnetic sculpture.

anyways, I couldnt figure out where CONKY "gets" the thermal temperatures and stuff like that.
so... I found "CPU stuff" and PROCesses ifo and stuff, so, I made a little...
in WINDOWS it would be similar to a task VIEWer I suppose.

EDIT: I plan to add stuff if i can later on. I plan on the user can enter "watch these" entries, and...

those ones? I want to HIGHLIGHT with either color or graphics, or... both?
anyways, this is just silly fun, and, I am learning to get bytes out of "weird special linux files"
which is why I am doing this. Learning where stuff is in Linux. Cant hurt I figure.

LINUX executable...
 

43
Programs / Re: CODENAME:Takky
« on: November 07, 2021, 01:53:33 am »
missed a night of sleep, must go nap time now.

PS - I'm tickled pink to be here.

tiny problem: I work "cutting grass" with a big machine on a little crew? early spring thru late fall.
I *just* got off work season. WHEN working? I am living and working in a true "dead zone". IE, no cell phones work.
(remote location)
I am only on the internet? this weekend.

plus? I work in the off season, and *thats* starting soon...
B-U-T... I can have a cell phone at *that* job... so I am going to buy a cheap cell phone, mainly for just THIS website.

END RESULT: I will be *gone* for a *while*... but I will be back. When I get my phone.

44
Programs / Re: CODENAME:Takky
« on: November 07, 2021, 01:19:05 am »
attachment? maybe I can put together a "care package" and try to deploy the 'example'
fingers crossed...

why can't I "attach" a folder?? the whole folder is only several MB.
maybe i can zip it or some such thing, that would make it "one file"...
hold on...
Linux has, like, 87 different formats... okay, heres a "zip"... I *think*
try this...

 

PS - instructions...
just... unzip the folder anywhere you want to...
1. the executable in there? is a LINUX executable
2. windows? you can compile and run, but, "the mouse is drunk" in WINders
3. *shrugs* run in LINUX (developed on LinuxMINT)

RUNNING instructions:
==============
this is a "one form" demo.
the 3 labels? let you see text files, also demonstrates the "PrintForm" command
the listbox? is the "manual" (and its ghetto like everything else, but, its *there*)

the manual listbox? uses PringForm() too

NOTE: this demo contains a "windowing test". IE, screen buffering.
          to test windowing a "one form" project? easy... right-click on open background of form (not on a control)
                                                                                     and you will instantly see a "screenshot" appear all wonky.
                                                                                     do a couple more, and have fun... PAINT all you want
                                                                                     if you only click FORM and dont hit CTRLS? you can do it as much as you like
                                                                                     the ore the better...
 because... when you LEFT-click on open background of the form? it BUFFERS and its instantaneous in LINUX.

what does this prove? everything!
you *could* have blobbed the screen up with an INPUT BOX, or a MESSAGE BOX, or.....???
BLINK! and its GONE... and you are RIGHT back at your main form, ready to go again.

you can dance freaking ZEBRAS in 3D across the screen; the buffer is BANG, right back.

*almost home, baby*

45
Programs / Re: CODENAME:Takky
« on: November 07, 2021, 01:08:29 am »
here's the "auto-generated"  code to make use of the "mouse trapping" module... (TAKKY wrote this code)

Code: QB64: [Select]
  1. 'Sub PerformMouseClicks
  2. 'End Sub
  3. 'TAKKY INSET BEGIN
  4. Sub PerformMouseClicks ()
  5.   Select Case found_lc
  6.     Case 1: form001.labelclik1.CLICK
  7.     Case 2: form001.labelclik2.CLICK
  8.     Case 3: form001.labelclik3.CLICK
  9.     Case 4: form001.labelclik4.CLICK
  10.     Case 5: form001.labelclik5.CLICK
  11.     Case 6: form001.listboxTOPICS.CLICK
  12.     Case 7: form001.picture001.CLICK
  13.     Case 8: form001.CLICK
  14.  

and? here's the only real "coding" the programmer had to do, to make the one form "example.bas" run...
NOTE: appropriately named SUBs and ENDs were created,,, you just fill in the blanks.

Code: QB64: [Select]
  1.  
  2.  
  3. Sub form001.labelclik1.CLICK ()
  4.  
  5.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  6.   TXT$(0) = "@projects/example/example"
  7.   PrintForm "form001"
  8.  
  9.  
  10. Sub form001.labelclik2.CLICK ()
  11.  
  12.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  13.   TXT$(0) = "@projects/example/LastRun"
  14.   PrintForm "form001"
  15.  
  16.  
  17. Sub form001.labelclik3.CLICK ()
  18.  
  19.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  20.   TXT$(0) = "@projects/example/SampleCode"
  21.   PrintForm "form001"
  22.  
  23.  
  24. Sub form001.labelclik4.CLICK ()
  25.  
  26.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  27.  
  28.  
  29. Sub form001.labelclik5.CLICK ()
  30.  
  31.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  32.  
  33.  
  34. Sub form001.listboxTOPICS.CLICK ()
  35.  
  36.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  37.  
  38.   ListPick "form001", "listboxTOPICS"
  39.   TXT$(0) = "@projects/example/manual/" + GetProperty$("form001.listboxTOPICS.text")
  40.   PrintForm "form001"
  41.  
  42.  
  43.  
  44. Sub form001.picture001.CLICK ()
  45.  
  46.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  47.  
  48.  
  49. Sub form001.CLICK ()
  50.  
  51.   'your code goes here - remember: LR$ = 'L', 'R', or 'LR'
  52.   If LR$ = "L" Then
  53.     _PutImage , scrn_buff&, handle&
  54.     'tit$ = GetProperty$("example.form001.title")
  55.     'noth$ = PutProperty$("example.form001.title", "MESSAGE from Takky :")
  56.     'PaintOneForm "form001", "Y"
  57.     'TXT$(0) = "3"
  58.     'TXT$(1) = "Using PrintForm"
  59.     'TXT$(2) = "As A"
  60.     'TXT$(3) = "MessageBox"
  61.     'PrintForm "form001"
  62.     'noth$ = PutProperty$("example.form001.title", tit$)
  63.     'PaintOneForm "form001", "Y"
  64.   End If
  65.   If LR$ = "R" Then
  66.     _PutImage (Mx + 0, My + 0)-(Mx + 188 * 4, My + 114 * 4), handle& 'back_splash&
  67.  
  68.   End If
  69.  
  70. Sub SplashDemo
  71.   Cls
  72.   offs = 357
  73.   _PutImage (offs, 0)-(_DesktopWidth - offs, _DesktopHeight), back_splash&, handle&
  74.   temp_font& = _LoadFont("fonts3/Karumbi.ttf", 99)
  75.   x = 10
  76.   y = 10
  77.   _Font temp_font&
  78.   _PrintString (x, y), "Welcome...": y = y + _FontHeight + 1
  79.   _PrintString (x, y), "to CodeName:TAKKY": y = y + _FontHeight * 2 + 1
  80.   _PrintString (x, y), "press <enter> to see '" + proj$ + "'": y = y + _FontHeight + 1
  81.   Locate 5
  82.   Print "T>";: Line Input nothing$
  83.   _Font fhand&
  84.  
  85.  
  86. 'TAKKY INSET END
  87.  
  88.  

PS - the 3 "label click events" coding? those couple lines use PrintForm() command to pretty-print
      any text file (with *more* pauses automatically) printed/painted onto the FORM of your choice,
     automatically. Its "font aware", I personally like to use a 32 font size, i like the typewriter fonts

using "@" and the file name? is analogous to using the $INCLUDE: 'FileNameHere' command in QB64

Pages: 1 2 [3] 4