Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
This week the class dealt mainly with games and strategy. We played Nim together a few times, and then with a little coaching the class worked together to write a version of the game in BASIC, first with two human players and then with an "AI" opponent. We even spontaneously got into a really interesting discussion about elementary game theory and the properties of deterministic perfect-information games.

I was impressed at how easily the students arrived at a sensible program. (Remember, for many students this is their second two-hour class about programming ever!) Compared to previous courses I've taught, they seemed to intuitively grasp how to break program-writing into state (what we need to keep track of in variables) and change (the rules governing those variables). I'm not sure if it's a result of BASIC or the way I've structured the example programs I've given them up to this point. I can say that having all of the BASIC variables in a global scope that persists after a program has stopped (or been interrupted) and that can be inspected with a REPL makes debugging easy. Some other kid-oriented programming systems show all program state visually. The MASICA approach, on the other hand, seems to have just enough friction to encourage the students to think about what the computer is doing in their head first, and then use the REPL to test their guesses.

And since this is a screenshot thread, here's a little teaser of what I've been tinkering with as the "next step" afer MASICA in a few weeks:

Adbot
ADBOT LOVES YOU

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Slowly getting there...

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
It's not completely done yet, but my toy Logo interpreter is essentially feature-complete:







Source (Forth).

This is a fair bit more complicated than MASICA, (since Logo is essentially a dynamically-scoped Lisp with syntactic sugar) but the implementation is still reasonably concise. TCO, at least, would've been quite a bit more difficult to implement if I was using a language other than Forth where I can predictably and easily smash the return stack. Since Logo has no official standard I based my version of the language on Apple ][ Logo, with some minor variations.

I'm hoping that Loko will be an easy step up from MASICA. Logo will allow the kids to learn about breaking their programs up into procedures and writing recursive procedures, and if they do well we can even get into higher-order programming and list processing. We'll just have to see.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
This is pretty cool. When would you say is the average age of your class? I'm becoming part of a homeschooling coop and thinking about whether I can do some programming with the older kids. (mine is 3 1/2 so a while off for him yet)

tef
May 30, 2004

-> some l-system crap ->

Internet Janitor posted:

It's not completely done yet, but my toy Logo interpreter is essentially feature-complete:

:hf: logo implementing buddy

quote:

Source (Forth).

This is a fair bit more complicated than MASICA, (since Logo is essentially a dynamically-scoped Lisp with syntactic sugar) ... Since Logo has no official standard I based my version of the language on Apple ][ Logo, with some minor variations.

Wondering if you did "run-parsing" at all? It is hard to parse logo because you need to know the number of arguments a function takes to parse an invocation of it, but you don't require the function arguments to be known beforehand.

fwiw: UCBLogo is somewhat the defacto implementation of Logo.

quote:

I'm hoping that Loko will be an easy step up from MASICA. Logo will allow the kids to learn about breaking their programs up into procedures and writing recursive procedures, and if they do well we can even get into higher-order programming and list processing. We'll just have to see.

Related: Computer Science Logo Style http://www.cs.berkeley.edu/~bh/v1-toc2.html

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Maluco Marinero: I'm doing this thing as an after-school activity rather than a formal class so we have quite a range. I think my students are roughly between 10 and 15.

tef: Yeah, I realized that parsing was context-sensitive, so I took a lame approach. My parser doesn't validate the number of arguments that a procedure consumes, it just assumes your expressions are well-formed and the interpreter checks everything as it goes along. Since infix expressions are transformed into prefix at parse-time, though, my weaker approach introduces some ambiguities. For this reason, Loko requires infix expressions and prefix expressions to be separated by parentheses. For example:

code:
// valid:
print difference :a 4
print (:a - 4)
print ((sum 1 3) - 4)

// invalid:
print :a - 4
print (sum 1 2 - 3)
That last invalid example highlights the ambiguity- if we don't know that sum consumes two arguments, we don't know whether the '-' should be an infix subtraction operator or a prefix negation operator. Requiring parens is not completely terrible but I do consider it a wart. Could you elaborate a bit on how "run-parsing" is supposed to work?

And yes, I totally plan to crib from Computer Science Logo Style. :)

tef
May 30, 2004

-> some l-system crap ->
Run parsing is a terrible, terrible hack. :3:

When you encounter a function, read the arguments, and read the tokens in, but don't parse the function contents. When you call a function, you parse it, now knowing the values. Alternatively you can two passes to get it to parse.

It's probably entirely unnecessary, and might be a stupid thing I did without understanding the logo grammar properly. I can't remember enough to know.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."


Loko now has Basic documentation up, with fantastic and exciting example programs. If any of you guys feel like fiddling with it I'd love to hear feedback.

movax
Aug 30, 2008

You guys work on some cool stuff, I wish I wasn't so burnt out/tired from work to resume some of my personal stuff.


I haven't done much 3D stuff yet, but writing a ray-tracer sounds like it could be pretty cool. I should probably upgrade my web skills beyond writing PHP + MySQL + ExtJS mini-apps too.

Tres Burritos
Sep 3, 2009

So you've been making a pcb layout program :confused:

At least I'm pretty sure that that is some sort of pcb layout. I think. Could also be a t-shirt design program.

Delta-Wye
Sep 29, 2005

Tres Burritos posted:

So you've been making a pcb layout program :confused:

At least I'm pretty sure that that is some sort of pcb layout. I think. Could also be a t-shirt design program.

Maybe it's an FPGA and he's coding hardware :aaaaa:

movax
Aug 30, 2008

Tres Burritos posted:

So you've been making a pcb layout program :confused:

At least I'm pretty sure that that is some sort of pcb layout. I think. Could also be a t-shirt design program.

Nah, using it. It's fun and cool to create something, but it's a bit stressful knowing how much money goes down the drain if you gently caress something up, so lots of review, review review.

At least when I get to the software side (HDL + device drivers + production test), my chances of permanently wrecking something or otherwise wasting money is greatly lowered.

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED


plays openings pretty well considering i haven't added any opening books yet o_O

MononcQc
May 29, 2007

Pie Colony posted:



plays openings pretty well considering i haven't added any opening books yet o_O

It's possible you could use these Unicode chess characters if your font supports them:

♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜

The user can then zoom in a bit and they get something pretty decent for a terminal chess game.

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

MononcQc posted:

It's possible you could use these Unicode chess characters if your font supports them:

♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜

The user can then zoom in a bit and they get something pretty decent for a terminal chess game.

i'm not making a pretty chess game, i'm making a good chess engine

Physical
Sep 26, 2007

by T. Finninho

MononcQc posted:

It's possible you could use these Unicode chess characters if your font supports them:

♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜

The user can then zoom in a bit and they get something pretty decent for a terminal chess game.
Wow look at that! There's probably a deck of cards icons.

Pie Colony posted:

i'm not making a pretty chess game, i'm making a good chess engine
In fairness to the suggestion, it's the same thing you are already doing, just better easier to understand characters, even while your developing.

Impotence
Nov 8, 2010
Lipstick Apathy

Physical posted:

Wow look at that! There's probably a deck of cards icons.


♥♠♣♦❥💔💘

drat, unicode.

SlightlyMadman
Jan 14, 2005

Physical posted:

Wow look at that! There's probably a deck of cards icons.

http://zachwaugh.com/helveticards/index.html

Modern Pragmatist
Aug 20, 2008

Biowarfare posted:

♥♠♣♦❥💔💘

drat, unicode.

Well if you're going to have Pile of Poo then you'd drat well better have these icons.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Modern Pragmatist posted:

Well if you're going to have Pile of Poo then you'd drat well better have these icons.

Wait... what the hell is that? Backstory? More info?

Mug
Apr 26, 2005
After a HUGE fuckaround with photoshop, finally created my first animated #screenshotsaturday

Lucid Dream
Feb 4, 2003

That boy ain't right.
I was working on equipment stuff tonight, heres what it looks like so far.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Gnack posted:

Wait... what the hell is that? Backstory? More info?

Not even folks who were involved in the Unicode standard are quite willing to talk about where the pile of poo came from: http://blogs.msdn.com/b/michkap/archive/2011/11/17/10238146.aspx

MrMoo
Sep 14, 2000

It's an emoji, the sound of the characters for doggy poo sound like good luck or something similar. You can thus find oodles of toys and charms shaped as doggy poo in an around Japan.



http://www.japantimes.co.jp/text/ek20070320wh.html

MrMoo fucked around with this message at 11:32 on Nov 10, 2012

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

Gnack posted:

Wait... what the hell is that? Backstory? More info?

A lot of the weird stuff in unicode seems to be symbols you might want to put on signs - that's the only explanation I can think of.

shrughes
Oct 11, 2008

(call/cc call/cc)
I have been working on a NoSQL clustered database system called RethinkDB, whose 1.2 release just got publicly announced.

Xik
Mar 10, 2011

Dinosaur Gum
Oh wow, didn't know you were a Goon. Congrats on the release, I saw you recently got quite a bit of attention on HN, well done, I'm happy for you guys.

I wasn't going to say anything about this, but since I didn't want to post here without contributing to the thread:

I had a quick look at what went into creating Greasemonkey scripts and it seemed relatively straight forward so I made a tiny script to add a single link into the SA UserCP to open all the bookmarked threads with new posts. That is how I use SA the majority of the time and I was getting tired of middle clicking every thread.



Here is the project page if you want it for yourself.

Right now I'm playing around with Python for the first time, it's such a delight to use and makes me not want to program in anything else again.

Jewel
May 2, 2009

Xik posted:

Oh wow, didn't know you were a Goon. Congrats on the release, I saw you recently got quite a bit of attention on HN, well done, I'm happy for you guys.

I wasn't going to say anything about this, but since I didn't want to post here without contributing to the thread:

I had a quick look at what went into creating Greasemonkey scripts and it seemed relatively straight forward so I made a tiny script to add a single link into the SA UserCP to open all the bookmarked threads with new posts. That is how I use SA the majority of the time and I was getting tired of middle clicking every thread.



Here is the project page if you want it for yourself.

Right now I'm playing around with Python for the first time, it's such a delight to use and makes me not want to program in anything else again.

That's actually a function in SALastRead and yeah, I use it all the time. Still, good practice regardless, even if it's been done before!

Xik
Mar 10, 2011

Dinosaur Gum

Jewel posted:

That's actually a function in SALastRead and yeah, I use it all the time. Still, good practice regardless, even if it's been done before!

Oh drat, I wish I knew about that before. Oh well, I learned a bit about Greasemonkey from doing it and read quite a bit about the security concerns when writing them so the exercise was worth it.

The Gripper
Sep 14, 2004
i am winner

Xik posted:

Oh drat, I wish I knew about that before. Oh well, I learned a bit about Greasemonkey from doing it and read quite a bit about the security concerns when writing them so the exercise was worth it.
I liked the idea so I changed it to use jQuery and put the unread post count+link at the top of every forum page. Maybe it will be useful for learning how jQuery works with GreaseMonkey/TamperMonkey, too!

https://gist.github.com/4054982

Ferg
May 6, 2007

Lipstick Apathy

The Gripper posted:

I liked the idea so I changed it to use jQuery and put the unread post count+link at the top of every forum page. Maybe it will be useful for learning how jQuery works with GreaseMonkey/TamperMonkey, too!

https://gist.github.com/4054982

This is a feature I've wanted to add to SALR for Chrome for ages but :effort:

I'll see about getting your jQuery method in there.

Programmer Humor
Nov 27, 2008

Lipstick Apathy
Here are some early graphics for my roguelike Dwarf Fortress clone.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Programmer Humor posted:

Here are some early graphics for my roguelike Dwarf Fortress clone.



If you figure out how to do tunneling/interior spaces well, let us all know. I have yet to play a 3D game that has been able to do this decently.

Programmer Humor
Nov 27, 2008

Lipstick Apathy

Pfhreak posted:

If you figure out how to do tunneling/interior spaces well, let us all know. I have yet to play a 3D game that has been able to do this decently.

Yeah, that's certainly a thing I want to get right before continuing. I was thinking I should start with cutting away everything above a certain plane and see where that takes me. Do you have any examples of what people have tried and what didn't work?

SlightlyMadman
Jan 14, 2005

Pfhreak posted:

If you figure out how to do tunneling/interior spaces well, let us all know. I have yet to play a 3D game that has been able to do this decently.

Dungeon Keeper 2?

edit: As an example that did work, I mean. Also, Evil Genius.

Jewel
May 2, 2009

Pfhreak posted:

If you figure out how to do tunneling/interior spaces well, let us all know. I have yet to play a 3D game that has been able to do this decently.

I think Castle Story's doing this pretty well from what I remember. Go check it out and see, I think there was at least one picture or news post about it on their site.

ZombieApostate
Mar 13, 2011
Sorry, I didn't read your post.

I'm too busy replying to what I wish you said

:allears:
The buildings in the new X-Com game and Silent Storm come to mind, although they didn't have to dynamically figure out where the floor breaks were.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Gnack posted:

Wait... what the hell is that? Backstory? More info?

It's an emoji.

multivac
Nov 8, 2011

You're a wizard Harry
Implemented marching cubes in Unity engine. I'm truly surprised at the raw horsepower today's GPU's actually have, my old Ati 3800 series card still manages to push 15 million tris at 60 fps.
It mainly seems to come down to a compromise between large batches of tris versus manageable update speeds on said batches.


Adbot
ADBOT LOVES YOU

akadajet
Sep 14, 2003

multivac posted:

Implemented marching cubes in Unity engine.

Second link is broken. Which is too bad because I get off on 3D cubes.

Edit: Works now. Guess Imgur was just being bad. Looks great!

akadajet fucked around with this message at 02:07 on Nov 15, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply