Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

0 Members and 3 Guests are viewing this topic.

the-pi-guy

Quote from: Legend on Jan 21, 2017, 12:52 AMWhat's your end goal?
Make some sort of vocabulary game.  
Either flashcards or make one of those falling word games.  I'm not sure exactly yet.  

Quote from: Legend on Jan 21, 2017, 12:52 AMI use monodevelop with Unity and so far it has every foreign character. Can also change its font if you need support for something specific.
The IDE itself utilizes unicode, but it doesn't output in the console part of it.  
System.out.println( "漢");
Would work fine, but it would output a "?"

Quote from: Legend on Jan 21, 2017, 12:52 AMWhen you mention hexadecimal, are you talking about Unicode encoding? Like 6F22 being the code for 漢?
Yeah, unicode encoding.
In java, you have to do it like \u6F22, but it wasn't working through the text file.  
But there's an easy way to just cast it into a character.  (char)6F22
Except I had to change to decimal, because the integer parser worked only for decimal.  

Legend

#46
Quote from: the-Pi-guy on Jan 21, 2017, 05:26 AMThe IDE itself utilizes unicode, but it doesn't output in the console part of it.  
System.out.println( "漢");
Would work fine, but it would output a "?"
Did the ? look like this REMOVED or � ? (I have no idea what that will look like to you) In my experience the problem is that the font doesn't support that character.

Quote from: the-Pi-guy on Jan 21, 2017, 05:26 AMYeah, unicode encoding.
In java, you have to do it like \u6F22, but it wasn't working through the text file.  
But there's an easy way to just cast it into a character.  (char)6F22
Except I had to change to decimal, because the integer parser worked only for decimal.  

Clever solution. ;D  I was doing some testing a long while back and came up with such a convoluted mess to get the job done. I'd be embarrassed having to show my code to others.


EDT: had to remove the first symbol. It confused the forum and erased the rest of my post.

the-pi-guy

Quote from: Legend on Jan 21, 2017, 07:21 AMDid the ? look like this REMOVED or � ? (I have no idea what that will look like to you) In my experience the problem is that the font doesn't support that character.
It is literally just the ? mark.  
Might have been that something wasn't working quite right or that there's a setting that needed to be changed in eclipse.  Not exactly sure, I tried messing with a few.

Quote from: Legend on Jan 21, 2017, 07:21 AMClever solution. ;D
Thanks!  

the-pi-guy

We are using Python for my Artificial Intelligence class.  
Did a little over view the past 2 class periods of python.  
It's kind of ludicrous.  

No semicolons, use indentation instead of braces for things.
Loosely typed madness.

Declare two variables like this:
x,y=50,100

Swap statement:
x,y=y,x

return a,b,c

def method(a,b=10,c=12)

call the method in any of these ways:
method(c = 15, a=16)
method(12, b=15,c=17)
method(c=12,b=12,a=7)

Legend

Quote from: the-Pi-guy on Feb 03, 2017, 01:08 AMWe are using Python for my Artificial Intelligence class.  
Did a little over view the past 2 class periods of python.  
It's kind of ludicrous.  

No semicolons, use indentation instead of braces for things.
Loosely typed madness.

Declare two variables like this:
x,y=50,100

Swap statement:
x,y=y,x

return a,b,c

def method(a,b=10,c=12)

call the method in any of these ways:
method(c = 15, a=16)
method(12, b=15,c=17)
method(c=12,b=12,a=7)

I used python a few times in college. Their method system is something I liked a lot  ::)

the-pi-guy

Quote from: Legend on Feb 03, 2017, 02:13 AMI used python a few times in college. Their method system is something I liked a lot  ::)

The language is like mystical.  A lot of features that seem like bad ideas in other languages.  
Totally different from Java, C++.  

Xevross

My tutors said we used python because it's clear and tidy

the-pi-guy

Quote from: Xevross on Feb 03, 2017, 10:17 PMMy tutors said we used python because it's clear and tidy

It is.  

P = "hello world"
Print(P)


Java:
String P= "hello world";
System.out.print(P);

Xevross

Quote from: the-Pi-guy on Feb 15, 2017, 04:30 PMIt is.  

P = "hello world"
Print(P)


Java:
String P= "hello world";
System.out.print(P);
Yeah when I used it for our project it was super easy to pick up different concepts and use them. I'm quite happy with it.

the-pi-guy


darkknightkryta

I wanted to use Python to teach, but the lack of braces and semi colons put me off.  I don't want my students coding like bedsprings.  I want them to get gud, so I'm teaching them Java.  I'm actually contemplating teaching them C next year.

the-pi-guy

I am starting to really hate python.  

Code that I haven't touched in the past 8 runs of my program just randomly decided that the spacings were wrong.  

darkknightkryta

Quote from: the-Pi-guy on May 12, 2017, 02:07 PMI am starting to really hate python.  

Code that I haven't touched in the past 8 runs of my program just randomly decided that the spacings were wrong.  
I don't like Python's structure.  It's why I'm not really teaching with it.

Legend

I made a time tracker for Unity. Now I can know every 10-millisecond I spend working.

Time to track my non-productivity!

the-pi-guy