[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1711262286811277.jpg (71 KB, 720x889)
71 KB
71 KB JPG
is learning to program not possible for some people? ive been trying to make a calculator that parses more than 2 numbers and i cant fucking understand how to implement the shunting yard algorithm/recursive descent parsing to do it. I AM A FUCKING RETARD.
>>
>>103234217
yep you should kill yourself asap, hope this helps
>>
>>103234361
yeah i fuckin should. im gonna go cut my arms open like a retarded foid.
>>
>>103234217
>read how to do thing
>*huh*?
>read it again and again
its that easy. read the fucking manual
>>
>>103234217
Just keep doing it until you get good
>>
>>103234217
>is learning to program not possible for some people?
This is true essentially axiomatically. Obviously someone with mental retardation and an IQ of 70 can't program.

So what you're really asking is something more like "Can the average person learn to program?" to which the answer is probably yes, but they'll never be good at it.

>i cant fucking understand how to implement the shunting yard algorithm/recursive descent parsing to do it
Make sure you understand the stack data structure. It's been a while since I studied this, but I remember having two stacks: one for numbers and one for operations. Parse left to right and when you reach an operator, keep popping the stacks until you reach an operator of higher precedence. Besides that just follow the instructions on Wikipedia.
>>
>>103234217
> is learning to program not possible for some people?
Yes, imbeciles exist, those poor people can't/barely can read, they're incapable of learning to program.
But most people can write down a sequence of actions.
Programming is nothing but writing procedures and figuring out what should happen, there is no magic in it.
>>
>>103234217
Probably a garbage language like Rust and garbage educational resources, like reading a severe autists blog tutorials. Just pay for some Udemy shit by a white man with high ratings.
>>
wtf are you talking about a calculator is a class with a bunch of function.
func sum(a,b):
return a+b
what is this shonen jumppity shif youre talking about
>>
>>103235143
>imbeciles
even 105 IQ people struggle with it. It's possible that people of average intelligence can become codemonkeys but even then they will fuck shit up spectacularly occasionally.
>>
>>103234217
post your code
>>
>>103234217
hehe baka
>>103234380
nooo don't do that it's gay
>>
>>103234217
if you're going with the recursive parser method, I recommend writing a parser for S-expressions first, or any other mini "language" with nesting
when you write the recursive descent parser functions, you need to advance the position when something matched, but the entire function fails, you need to reset the position to the value it was at the function start. this means you need to save the position at function entry in a local variable and use it to restore the parser position if the function failed
>>
>>103234217
>shunting yard algorithm/recursive descent parsing
If you're just starting to program it's perfectly normal to have trouble implementing those. In fact this is more intermedite programming level stuff, you need to be very comfortable with the fundamentals to tackle them and to tackle recursion.

Besides, truth is a lot of so called professioal programmers, even or especially those that have a CS degree, would have a bit of trouble implementing them.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.