Posts by Anderson Torres • 182 points
13 posts
-
1
votes2
answers476
viewsA: How can Rule 110 be a good way to know if a language is Turing-complete? Why?
I would like to know more about the Rule from a practical point of view. Well, Automaton 110 is, in short, a cellular automaton with very simple rules, and yet it’s quite versatile - after all, it’s…
computer-scienceanswered Anderson Torres 182 -
-5
votes4
answers35777
viewsA: Is HTML a programming language?
Um ... although resurrecting an old question is a dubious attitude, I will answer and disagree with the current: yes, HTML is programming language. I’ll just copy snippets of a reply I already gave…
-
1
votes1
answer62
viewsA: How do I publish my library to a linux repository?
What you need then is a software automation system. There are several ways this can be done, but I myself have never dealt with any of them seriously, hehe! This is a really vast subject - just the…
-
0
votes1
answer64
viewsA: Retrieve arguments passed via ARGV in the terminal
I found a similar post in Stackoverflow in English. The idea is to use an auxiliary variable that will contain the arguments: run: ./executavel $(ARGS) On the command line: $> make run ARGS="12 +…
-
0
votes3
answers196
viewsA: Is it possible to store values without using static vectors?
Each cell would have two (or four) pointers: one for the next element in the row and the other for the next element in the column. (The two extras would be for the previous element, if it is…
-
0
votes3
answers1686
viewsA: Are there safer languages than others?
"Both". If the language exposes certain things to the attack, such as the possibility of null pointers being referenced and giving segfaults, then the language is insecure. It even requires you to…
-
-1
votes2
answers331
viewsA: Save list in file
What do you want with this job anyway? What good is that lcam* noatual on the second line? It Serves to scroll through the list **cabeça? And, of course, I can’t help but notice the small error…
-
1
votes2
answers89
viewsA: Difference in calls on main
If it’s the kind of thing I’m thinking about, the reason is "reference emulation". As you may know, functions in C pass their parameters by value/copy. To emulate the reference pass, you need to…
canswered Anderson Torres 182 -
0
votes1
answer88
viewsA: I cannot make a vector point correctly to a function it belongs to
I told you how much I hate printf and scanf? Anyway, ignore. The message that the Clang displays is much more enlightening: list. c:24:5: Warning: ignoring Return value of Function declared with…
-
2
votes1
answer348
viewsA: Reading txt file in C and data interpretation
I believe the main problem here is dynamic allocation. Obviously the only way to know how much space is needed is to go through the archive to the end. As it is ugly and counterproductive to go…
-
1
votes1
answer931
viewsA: How to calculate the distance between two points and calculate distance ABC, CAB, BAC? in C
The tip I give, then, is about style. Do you already have any notion of data structure? It would be interesting to make this code cleaner by using structs and encapsulating some repeated actions in…
canswered Anderson Torres 182 -
1
votes2
answers334
viewsA: C: Use two gets() in a row (player names)?
I would be even more reticent about the indiscriminate use of scanf. In particular, this same scanf("%s",&p) may be targeted at buffer overflow. It would be important to limit the size of the…
canswered Anderson Torres 182 -
0
votes2
answers402
viewsA: Operation to release a circular list
For now I’m going to assume that your list is something like typedef struct list{ int ID; struct list *next; } list, *listp; And also that it be purely circular, and not something like a linear base…