lainchan / λ
(untitled)
Chani · 2022-06-19 04:37
I have fully free time of a day because I'm neet.
So I decided to make some useful programs like text editor, chat application etc which can be alternatives what I'm using currently. But I don't have any programming experience even though I'm using Linux now. Where should I start? Which language will be good? Learning programming without books is impossible?
Wintermute · 2022-06-19 05:04
>Learning programming without books is impossible?
libgen
pop · 2022-06-19 05:36
>>31529
>Where should I start? Which language will be good?
First you need a good text editor, like GNU Emacs or NeoVim (or VSCodium (sic.) if you don't like Emacs or NeoVim).
Both GNU Emacs and NeoVim contain a tutorial:
>Start emacs and type C-h t
>Start nvim and type :Tutor
Pick a high-level language because they provide you with instant feedback and you can build useful programs quicker. I recommend starting with either Lua or Scheme (use Guile or Chicken) because they are simple and small enough so you can know the whole language:
>https://www.lua.org/pil/contents.html
>https://ds26gte.github.io/tyscheme/
Once you have learned the basics, you should do some exercises at https://projecteuler.net/ and https://exercism.org/
To help you pick a language, compare these two programs that I stole from Internet and pick the language you like more:
;; Scheme (using Guile)
(use-modules (srfi srfi-1))
(define (fizzbuzz n)
(cond
[(zero? (remainder n 15)) 'Fizzbuzz]
[(zero? (remainder n 3)) 'Fizz]
[(zero? (remainder n 5)) 'buzz]
[else n]))
(map fizzbuzz (iota 20 1 1))
-- Lua
-- Also, check out Love2D
for i = 1, 20 do
if i % 15 == 0 then
print("FizzBuzz")
elseif i % 3 == 0 then
print("Fizz")
elseif i % 5 == 0 then
print("buzz")
else
print(i)
end
end
I also recommend you learn to use a version control software, like Git or Fossil:
>Git (the most popular atm): https://git-scm.com/book/en/v2 and https://www.atlassian.com/git/tutorials (<= start with this link)
>Fossil: https://www.fossil-scm.org/home/doc/trunk/www/quickstart.wiki
Vasya Pupkin · 2022-06-19 05:51
>>31531
>scheme
>https://ds26gte.github.io/tyscheme/
Actually, now that I really think about it, I think you might want to read The Little Schemer (and Seasoned Schemer) instead, since they are better at explaining how to get into Scheme. Teach Yourself Scheme in Fixnum Days is not a bad book, though.
Roy Batty · 2022-06-19 11:15
don't get bogged down in language or text editor choice, just get to writing. i'd say python. learn by looking at the source code of already written programs and tinkering with them
Jet Black · 2022-06-20 04:23
>>31534
This. Don't waste energy on text editor choice. Start programming literally whatever. And when you get tired and/or bored, then you can mess around with text editors.
dictionary · 2022-06-20 05:42
A text editor is not a waste of time. Writing and editing text is very common task. And you want to have good tools for programming.
Acid Burn · 2022-06-20 08:21
>>31529
I highly recommend that you pick a project and pick a language based on what you aim to do.
Programming languages are domain-specific, and the ones that "arent domain-specific" are such only because they are so low-level that they can do literally everything...from the ground up.
If you want to write a command-line program, just start with C or Python. If you want to make things with GUIs, get comfortable with C++ and use Qt. For anything complex, you're going to either learn design patterns the easy way or the hard way, so go learn them the easy way.
Agent Jones · 2022-06-20 11:00
>>31554
>A text editor is not a waste of time.
No one claimed the opposite. The claim was that, when faced with a new skill to learn, getting bogged down in choices is wasteful.
I would argue that the problem is worse than a mere waste of time or energy. Learning a new skill is hard, whereas trying out text editors or browsing Rosetta Code are easy, so if you allow yourself to believe that the choices are necessary before the actual learning, you will delude yourself into postponing the learning.
>>31531 was generally good advice, but the clarification provided by >>31534 and >>31547 was important to lead OP away from a potential trap.
Anamika · 2022-10-17 17:05
>>31531
how the fuarrrk do you make UI for lua? or any other language? how do you make your interfaces?
protected · 2022-10-17 18:46
>>31529
Learn D and use Linux. D will give you everything high level and as much low level stuff as you'll need later. Linux will make you a better developer the longer you use it. Have fun lainon.
swap · 2022-10-18 08:46
>>33087
how do you do it lainanons?
Leto Atreides I · 2022-10-18 09:03
>>33087
Look into GTK is has bindings for most languages.
Terzibashjian · 2022-10-21 12:29
>>33087
to show a red pixel to screen:
sceen[x][y] = 0xff000000;
Cypher · 2022-10-21 14:20
>>33105
>hardcoding every pixel of your GUI
Morpheus · 2022-10-21 14:32
>>33087
If I need to make a GUI for something I use Tk. FLTK is another good choice.
>http://lua-users.org/wiki/GraphicalUserInterfaceToolkits