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 - Kiara87

Pages: [1] 2 3 ... 11
1
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 06:37:17 pm »
Yeah what I am finding is these things are really 100 lines or less:
https://www.vitoco.cl/atari/10liner/MNPUZZLE/

  [ You are not allowed to view this attachment ]  

I say make it 100 lines with no colons and get something as enjoyable to read as to play!

That would be way more educational and inspiring for all levels of hobbiests.

in fact the colon creates illegible code as peter quoted is obfuscated code

like this example you proposed of 100 lines
but maybe other people would put rules each line should not contain more than 100 characters
however in any case as you have mentioned it would not be worth it
as you pointed out in the post everything can be adapted with a sub (subrutine)

2
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 06:28:54 pm »
@bplus You have a lot of tricks up your sleeve, but I'll bet DIMming k$ as "LONG" is not one of them. :D

I completely agree about the line challenge and non-use of colons. Every colon is another line, in my opinion. Oh course, characters could be counted, but that's not entirely fair either, as certain keywords are longer than others.

I use the same approach to most of my larger programs. Make a central hub, and run sub-routines from it. This method allowed me to always know the program flow would continuously be cycled through that hub. Back in the old days, it provided a way to time the program, and evoke a screen saver. Other advantages existed, too.

@Dav Speaking of screen savers, in the paragraph above, I would have loved to have the plasma one you posted! Very cool!

@Kiara87 I get it, more of a discussion concerning optimization of BASIC code, rather than the use of BASIC libraries to develop OOP. Most of what I see of a practical aspect of this is the use of creative algorithms, mostly math formulas, like Dav and Bill posted in their 10-liners. The downside of "optimization" when it comes to limiting lines of code, ironically, results in obfuscation, much the same too many lines of convoluted code produce. Use of GOTO statements, for example, to cut down on a loop line code. I consider that bad coding practice, especially to introduce it, in a positive way, to a beginner. I consider BASIC best for coders who like to build things from the foundation up. All I ever heard from C communities is "You need a library for that." That was their response to me trying to write a keyboard function in C. I eventually accomplished it, because it was possible with C/C++ statements, but I was not too happy that such a large community completely lost track of how to build a program from the foundation up.

Pete

PS @Dimster That was just a typo on Mark's part. He was just giving a skeleton, almost pseudo-code, example of how to set up a 10-line hub to run a program. Sorry for the late reply, you posted while I was writing.

obviously you are right it is all obfuscated and illegible code it is to jump with the goto it is not good to learn about this I agree

3
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 05:02:55 am »
Cool... "10 Liners"...  Back in the mid 80's I ran an Amstrad CPC464... 4mhz cpu with only 64K of ram...  Learning to program efficiently was the thing back then. In the magazines that I purchased were "10 liners". It was amazing, back then, that so much could be done with so little coding. Mind you, the CPC, was capable of having long lines of code... But still... amazing...

magazines came out in Italy  with the name commodore compiuter club
which urged readers to post language code basic with just one line of code

which are small complete programs
obviously they can't be beautiful programs or games but what you can do with just one line
it takes creativity
then many people compete as listed above in the post there is a special site of people who spidano with the most beautiful program and those who use less line of code with lots of rules
the site in the post mentioned above I think they are German programmers

4
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 04:55:43 am »
@Pete Wow nice 3 liner!

@STxAxTIC now I know why money doesn't grow on trees, too busy riding down that river. Nice spontaneous game!

@bplus 
I know that you have a lot of imagination maybe you can show us some complete program less than 10 lines or 2 or 3 lines

happy to see you always active

5
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 04:52:51 am »
nobody ask me why, but i just made a game in 10 lines. keep your mouse on the money to gain it, otherwise you lose it. your total is in the title

Code: QB64: [Select]
  1. 1 i = i + 1
  2.     x = INT((_WIDTH - 1) * (_MOUSEX / _WIDTH))
  3.     y = INT((_HEIGHT - 1) * (_MOUSEY / _HEIGHT))
  4. PRINT SPACE$(INT(_WIDTH / 2 - 10) * (1 + .25 * COS(i / 20) + .25 * SIN(i / 30))); "|"; STRING$(7 * (1 + ABS(COS(i / 10))), "$"); "|"
  5. IF (SCREEN(1 + y, 1 + x, 0) = 36) THEN t = t + 1 ELSE t = t - 1
  6. _TITLE "$:" + STR$(t)

very well with your imagination you have created a program of a few lines what I meant

6
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 21, 2022, 04:50:10 am »
Sure, libraries. For instance, I made a keyboard / mouse routine I can use in any program. Steve has one of a similar nature. I suppose if the community promoted library routines, eventually we would wind up adding OOP support to QB64. The push against that. and count me in as a big pusher, is that the spirit of BASIC is to build these routines, not just utilize them. If the community became divided over such philosophical differences, I would simply recommend doing what PowerBASIC did, simply split the project. Have an OOP version and a BASIC version. In regard to PB, that would be their PowerBASIC for WIndows vs PpwerBASIC for DOS.

Pete

I don't mean object-oriented programming but only creating programs based on the imagination of each user using very few lines of code other people do it for competence but here it could be done without any competence open the imagination using the instructions so that beginners understand what they are for the instructions

7
QB64 Discussion / Re: QB64 10-Liner programs or games
« on: March 20, 2022, 08:14:26 pm »
You mean something like this?

Code: QB64: [Select]
  1. x$ = LTRIM$(STR$(INT(RND * 10 + 1)))
  2.     try = try + 1
  3.     LINE INPUT "Guess a number between 1 and 10. "; num$
  4.     IF x$ < num$ THEN j = 1 ELSE j = 10
  5.     IF num$ = x$ THEN EXIT DO ELSE PRINT MID$("Too high!Too Low!", j, 9)
  6. IF try = 1 THEN PRINT "You guessed it in 1 try!" ELSE PRINT "You guessed it in"; try; "tries!"

Pete

- I'm really more of a one-liner kind of guy.

yes exactly both programs and games of a few lines
that even beginners can understand
and also to reuse the pieces of code in other programs
as well as many people may have other ideas how to use the instructions both qb64 and also in quickbasic 4.5

8
QB64 Discussion / QB64 10-Liner programs or games
« on: March 20, 2022, 07:21:12 pm »
I was checking on google if it is possible to create any program with a few lines of code and the answer is yes
some old BASIC programmers competing link ---> https://gkanold.wixsite.com/homeputerium
other 
https://github.com/Fabrizio-Caruso/10-LINERS-2020
https://github.com/Fabrizio-Caruso/Mines
https://github.com/Fabrizio-Caruso/CBM-BASIC-10-liners
it is also so nice even if you create a page of how to create programs in qb64 with a few lines of code and then reuse it using it as a reference

without any competition

I remember in the years 82 or 85 an Italian magazine was published with the name  Commodore Computer Club from magazine number 20 to number 33
who is Italian remembers this magazine and who used the basic
https://ready64.org/ccc/pagina.php?ccc=20&pag=012.jpg
https://ready64.org/ccc/pagina.php?ccc=20&pag=013.jpg

there was also an encyclopeptia of rutine
https://ready64.org/ccc/pagina.php?ccc=24&pag=017.jpg
https://ready64.org/ccc/pagina.php?ccc=24&pag=018.jpg
with its rules
all using a few code characters
they also explained the rules to be respected
returning to the subject of complete 10-line programs and functioning programs or games  --> https://gkanold.wixsite.com/homeputerium

they cannot use more than 80 characters
and they cannot use more than 10 if conditions
and other rules they use

I don't want to compete with anyone
I would like to create a one page idea in the forum
with small programs of a few lines

as i mentioned in commodore computer club magazine
like this --> https://ready64.org/ccc/pagina.php?ccc=21&pag=012.jpg
https://ready64.org/ccc/pagina.php?ccc=21&pag=013.jpg
here you will find all the magazines to those interested   in Italian language ---> https://ready64.org/ccc/index.php
but the ones that deal with one-line code topic are from number 20 to number 33
all the magazines of Commodore Computer Club n. 20 at the  Commodore Computer Club n. 33

the purpose was to create small programs to use
Is it possible to create a page suitable for creating small programs to be reused as a second qb64 wiki?
What do you think about it?


for those interested in Italian magazines that talk about a line of code, here is the link --> https://www.mediafire.com/folder/8c8emsc0dr6qp/Commodore_compiuter_club

kind regards

9
Ah this book (Ethan Winer's Basic Techniques and Utilities  was not my main QB4.5 trainer, in fact I used less that half the stuff it talks about, advanced and very very DOS and assembler related and I fear most of it has been passed by time. May be more interesting historically and technically of past.

Terry Ritchies is more likely to be helpful with QB64 today.

thanks @bplus
searching for the book on google "Microsoft QuickBasic Bible"  i found this

 

maybe the book i'm looking for nobody posted online i don't know maybe they'll post after i stop searching xd
do you know the books that I posted the link?
are they of good quality?

10
That book by Ethan is probably very dated and you might want to skip certain places and learn modern way.

I will start reviewing (will be fun for my memory) and make recommendations what you might skip or learn modern ways.
Thanks @bplus
Good suggerimenti

11
@Kiara87
ciao spiacente ma quel libro non l'ho mai avuto nè cartaceo nè pdf
da poco ho scoperto quel libro di Ethan Winer e dandogli uno sguardo approfondito per alcuni capitoli ho visto che ho tanto ancora da imparare perchè NON si limita alla sintassi ma affronta vari aspetti e problemi della programmazione in QBasic QuickBasic.
Prova ad usarlo.

Ciao @TempodiBasic
Grazie del consiglio darò anch'io un occhiata essendo che non si limita solo alla sintassi è un buon libro per iniziare
Grazie

12
Hi Kiara87
answering to a generic question "How I can translate a pdf book into another language?" I can say you... look at this website https://deftpdf.com/translate  this tool is avaiable also as Browser extension.

about a good free book avaiable on the web  look at this one https://ethanwiner.com/BTU_BOOK.PDF and  look at the other resources in the webpage https://ethanwiner.com/fullmoon.html
Good Luck

rispondendo a una domanda generica "Come posso tradurre un libro pdf in un'altra lingua?" Posso dire che ... guarda questo sito https://deftpdf.com/translate questo strumento è disponibile anche come estensione del browser.

su un buon libro gratuito disponibile sul web guarda questo https://ethanwiner.com/BTU_BOOK.PDF e guarda le altre risorse nella pagina web https://ethanwiner.com /fullmoon.html
In bocca al lupo

Grazie per il sito di traduzione per i libri
Sono in cerca del libro Microsoft QuickBasic bible nella versione in PDF
Così magari devo solamente fare la traduzione sarebbe una buona idea avere quel libro in italiano vedendo le buone recensioni di quel libro ho visto che molti consigliano quello

13
some of his magazines in pdf to this book I know that it also exists in pdf format it serves me in digital form to translate the words into Italian because buying the paper book I would not understand anything about the content

https://wakuwaku2021.online/book/show/2098630-waite-groups-microsoft-quickbasic-bible

14
Hi Guys
just to give a demonstration of how developing a program starting from a clear goal for beginners like me here a zip with 7 files STEP by STEP from 0 to the complete application. Code is Selfexplainatory. Comments are in my native language (Italian) to give a track for beginners.
The goal is the exercise posted here https://www.qb64.org/forum/index.php?topic=2812.msg120762#msg120762
There are 2 files compressed for who loves ZIP and who loves 7z.
Ciao ragazzi
solo per dare una dimostrazione di come sviluppare un programma partendo da un chiaro obiettivo per i principianti come me qui una zip con 7 file STEP by STEP da 0 all'applicazione completa. Il codice è esplicativo. I commenti sono nella mia lingua madre (italiano) per dare una traccia per i principianti.
Lo scopo è l'esercizio postato qui https://www.qb64.org/forum/index.php?topic=2812.msg120762#msg120762

Ci sono 2 file compressi per chi ama ZIP e chi ama 7z

non mi ero accordo di questo post
daro un occhiata al file
grazie mille per il tuo contributo

15
QB64 Discussion / Re: help vwatch.exe
« on: February 23, 2021, 05:19:54 am »
Hi Kiara87
it seems that there is a guide to vWatch.... untile Fellippe doesn't update it!  :-)
see here
https://www.qb64.org/forum/index.php?topic=3689.0

grazie per la traduzione in italiano che per me è un aiuto in più
grazie mille

Pages: [1] 2 3 ... 11