Page 6 of 9
Re: Ruby (learning and language comparisons)
Posted: Sat Mar 07, 2020 11:35 pm
by MichaelBenjamin
.
Re: Ruby (learning and language comparisons)
Posted: Sat Mar 07, 2020 11:39 pm
by MichaelBenjamin
.
Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 1:06 am
by trogluddite
MichaelBenjamin wrote:i just keep wondering why the english do not use f.e.
Partly, our infamously snobby class system!
During the early years of English having it's spelling and grammar made formal, the academics doing it had a big hard-on for Latin. Knowing some Latin was how you proved to other people that you were well educated at a "posh" school, so we have some really stupid grammar rules from trying to force English to be more like Latin instead of like its Germanic roots.
The same is a bit true of the French words we got from when the Normans invaded us and became the rulers. For example; most farm animals have names with Germanic roots like the Anglo-Saxon farmers would have used; e.g. "swine". But the posh food cooked for the Lords and Ladies got the French versions; e.g. "pork".
Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 2:25 am
by lalalandsynth
MichaelBenjamin wrote:what would i need to write in a ruby codebox, to accept a string array from a FS primitive, search through that string array to find some string and then return the index i've found it at?
my guess, probably wrong:
Code: Select all
input flowstone_string_array
input string_to_look_for
output found_index// not needed since ruby returns last stuff automagically?
def find_first_occasion_of_string_in_string_array_by_idx(flowstone_string_array, string_to_look_for)
for i in flowstone_string_array:
if flowstone_string_array[i] == string_to_look_for
return i
end// lol forgot that
find_first_occasion_of_string_in_string_array_by_idx(flowstone_string_array, string_to_look_for)
and as output i would get the matching string?
I would love to know

Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 3:55 am
by MichaelBenjamin
.
Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 6:47 am
by MichaelBenjamin
.
Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 12:27 pm
by lalalandsynth
I will

Re: Ruby (learning and language comparisons)
Posted: Sun Mar 08, 2020 1:20 pm
by MichaelBenjamin
.
Re: Ruby (learning and language comparisons)
Posted: Mon Mar 09, 2020 2:22 pm
by tulamide
After a few days, it came to my mind, why there might be another difficulty understanding OOP.
And that's from the conceptual part. OOP was not created to do lighter programming than before. It was created to shift a language away from the machine instruction base and towards human thinking. It's a high layer language.
If you're out on the streets and forgot your watch, you approach someone and ask: "Excuse me, could you please tell me the time?"
You would not do
01 shift x until x == xr
02 string_to_say = possible_sentences[3]
03 string_to_say.each { |chr| sync_mouth(chr) }
04 do_speak(mood_polite)
And so oop tries to hide the above, and lets you use what you know.
tulamide = Human.new(no_watch)
stranger = Human.new
tulamide.walk_to(stranger)
tulamide.ask_for_time(stranger)
It's just one aspect, but a conceptual one, that might confuse if you're used to try thinking like a processor works.
Re: Ruby (learning and language comparisons)
Posted: Tue Mar 10, 2020 5:29 pm
by MichaelBenjamin
.