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
ToxicFrog
Apr 26, 2008


Sirocco posted:

I've just got to a part of my electrical engineering course which is assembly language programming for microprocessers. I have next to zero experience with any kind of programming and it's a big class so there's no one-on-one tuition going on. I know my binary arithmetic and I know my boolean logic, but I'll need to have designed and written a program by the end of this semester and it seems quite daunting because I don't know how to revise this stuff at home. Has anyone got any general advice for how to approach learning this stuff in a more structured way? Any sticky points that I should keep an eye out for?

:stare:

I have no idea what to recommend for someone starting assembly programming with no prior programming experience, but I can at least help with the "at home" part: depending on what microprocessor you're using, there's probably a freely available emulator and documentation for it that you can use for experimentation at home rather than needing to schlep onto campus and find a working test board.

I picked up 68k ASM in class and i386 ASM by disassembling old DOS programs, but by then I already knew half a dozen languages (of which the most helpful by far, for this, was probably C). Actually, there's a thought - learning C might be helpful. It is basically a processor-agnostic, somewhat more structured asm, and you can often do the C <-> asm translation in your head. I don't know if that's something you want to do at the same time as this course, though.

For a gentle introduction to programming in general I like the UW CSC Python course, or something like MIT's Structure and Interpretation of Computer Programs if you're feeling a bit more hardcore, but both of those operate at a much higher level of abstraction than what you'll be working in.

How big a program are you talking about here?

Adbot
ADBOT LOVES YOU

tarepanda
Mar 26, 2011

Living the Dream

Sirocco posted:

I've just got to a part of my electrical engineering course which is assembly language programming for microprocessers. I have next to zero experience with any kind of programming and it's a big class so there's no one-on-one tuition going on. I know my binary arithmetic and I know my boolean logic, but I'll need to have designed and written a program by the end of this semester and it seems quite daunting because I don't know how to revise this stuff at home. Has anyone got any general advice for how to approach learning this stuff in a more structured way? Any sticky points that I should keep an eye out for?

Isn't there anything in your textbook? Did you happen to overlook some kind of supplementary reading? That seems like a HUGE oversight in prereqs...

Xerophyte
Mar 17, 2008

This space intentionally left blank

Sirocco posted:

I've just got to a part of my electrical engineering course which is assembly language programming for microprocessers. I have next to zero experience with any kind of programming and it's a big class so there's no one-on-one tuition going on. I know my binary arithmetic and I know my boolean logic, but I'll need to have designed and written a program by the end of this semester and it seems quite daunting because I don't know how to revise this stuff at home. Has anyone got any general advice for how to approach learning this stuff in a more structured way? Any sticky points that I should keep an eye out for?

Others posted:

:stare:
Sheesh. In spite of what a lot of people here apparently think there's no rule saying your brain will explode unless you start at an abstract language and work your way down to the metal, especially if you're in EE. Spending a bunch of time learning python would have a pretty minimal effect on your ability to figure out ASM in the immediate future; going logic gates > flip-flops and registers > ALUs > CPUs > machine language > assembly dialect > C > glorious Haskell or whatever works just as well as the other way around. That said, if this course of yours just tossed in x86 assembly as an afterthought that's still nuts.

We probably need some details on what, exactly, this is about and what you know from earlier. Has the course covered how a CPU works with machine code? What assembly is it, what's the course like beyond that part? What, exactly, do you mean by a "program" to design/write? "Connect gadget to serial port, make the pretty lights blink" or something serious?

Tres Burritos
Sep 3, 2009

Xerophyte posted:

Sheesh. In spite of what a lot of people here apparently think there's no rule saying your brain will explode unless you start at an abstract language and work your way down to the metal, especially if you're in EE. Spending a bunch of time learning python would have a pretty minimal effect on your ability to figure out ASM in the immediate future; going logic gates > flip-flops and registers > ALUs > CPUs

Yeah, If you're doing the EE stuff and you're aware how the registers and ALU work, it shouldn't be too difficult to get up and running on a hello world. The problem is finding resources / tutorials / whatever online. You may have to read a *gasp!* book to get your answers.

Bunny Cuddlin
Dec 12, 2004
lol at all the web programmers making GBS threads their pants at the thought of writing something in assembly

Anyway, I'm looking for a .NET forms control for an IDE type thing. At minimum I want the ability to do arbitrary syntax highlighting and annotations (something like the little squigglies that underline words in VS). I'd like to be able to set line number text arbitrarily but that's not a necessity. I've found AvalonEdit, which is the new editor in SharpDevelop, but it's a WPF control. The old version from SharpDevelop 3 is also available, and it's a forms control, but it's poorly documented and the last activity on it seems to be from 4 or 5 years ago. Scintilla's editor control also has a .NET adapter but the features are severely lacking, and also almost completely undocumented. I can get by with either one, but I was hoping someone knew of a better option out there.

tarepanda
Mar 26, 2011

Living the Dream

Bunny Cuddlin posted:

lol at all the web programmers making GBS threads their pants at the thought of writing something in assembly

It's not so much that as the idea of someone with zero programming experience writing an OS in assembly without help in nine weeks.

Bunny Cuddlin
Dec 12, 2004

tarepanda posted:

It's not so much that as the idea of someone with zero programming experience writing an OS in assembly without help in nine weeks.

It says he has to write a program, not an OS.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Yeah there's not a whole lot to assembly. Understand how data is stored in registers, endianness, unsigned and signed(twos complement), sign extension, pointers, how to mov in and out of RAM, bitwise and shift operators, program counters, stacks, jumps, subroutines, interrupts, and that's about it.

Bunny Cuddlin
Dec 12, 2004

peepsalot posted:

Yeah there's not a whole lot to assembly. Understand how data is stored in registers, endianness, unsigned and signed(twos complement), sign extension, pointers, how to mov in and out of RAM, bitwise and shift operators, program counters, stacks, jumps, subroutines, interrupts, and that's about it.

You can really get by with understanding half of that, too, as long as what you're writing is fairly simple.

tarepanda
Mar 26, 2011

Living the Dream

Bunny Cuddlin posted:

It says he has to write a program, not an OS.

oh, oops. I must have conflated something.

Sirocco
Jan 27, 2009

HEY DIARY! HA HA HA!

JawnV6 posted:

:stare: How was there not a prereq to have some programming before this course? I'll type more later but wtf

Technically we only learned how to make files and scan them for viruses last semester, ha ha. I don't know what kind of program we're supposed to be writing, there's no reference to it in the notes. All the lecturer said was that it should be "fairly complex" which is pretty nebulous but I expect the program writing will be a few months down the line.

Mostly so far we've been looking at the internals of a microprocessor and the fetch-decode-execute cycle and how data gets moved around, after we went over binary and hexadecimal and logic gates (yes, some in the class had never touched that stuff before). We haven't really done anything much on the programming side yet.

tarepanda posted:

Isn't there anything in your textbook? Did you happen to overlook some kind of supplementary reading? That seems like a HUGE oversight in prereqs...

All we've got is stuff the lecturer puts on blackboard. I do have a book of my own which covers assembly language (in part) but it was published in 1994 so I'm not sure how applicable it is.

ToxicFrog posted:

:stare:

I have no idea what to recommend for someone starting assembly programming with no prior programming experience, but I can at least help with the "at home" part: depending on what microprocessor you're using, there's probably a freely available emulator and documentation for it that you can use for experimentation at home rather than needing to schlep onto campus and find a working test board.

I picked up 68k ASM in class and i386 ASM by disassembling old DOS programs, but by then I already knew half a dozen languages (of which the most helpful by far, for this, was probably C). Actually, there's a thought - learning C might be helpful. It is basically a processor-agnostic, somewhat more structured asm, and you can often do the C <-> asm translation in your head. I don't know if that's something you want to do at the same time as this course, though.

For a gentle introduction to programming in general I like the UW CSC Python course, or something like MIT's Structure and Interpretation of Computer Programs if you're feeling a bit more hardcore, but both of those operate at a much higher level of abstraction than what you'll be working in.

How big a program are you talking about here?

Thanks, I'll look into that. As alien as the subject is to me, I do find it quite intriguing and a lot of it is definitely clicking so I think it's something I'll study in my spare time in the future.

nielsm
Jun 1, 2009



For a program, I would suggest a basic four-function calculator that works with integers only. You can start out writing some small programs to transform between machine integers and a printable string of the number in decimal, then add text input and printing for it, and then add the calculator logic. Start out not bothering with order of operands (pretend addition and multiplication have the same precedence, so you can just work left to right) and then figure out how to do that properly if you have extra time.

armorer
Aug 6, 2012

I like metal.

Sirocco posted:

Technically we only learned how to make files and scan them for viruses last semester, ha ha. I don't know what kind of program we're supposed to be writing, there's no reference to it in the notes. All the lecturer said was that it should be "fairly complex" which is pretty nebulous but I expect the program writing will be a few months down the line.

Mostly so far we've been looking at the internals of a microprocessor and the fetch-decode-execute cycle and how data gets moved around, after we went over binary and hexadecimal and logic gates (yes, some in the class had never touched that stuff before). We haven't really done anything much on the programming side yet.


All we've got is stuff the lecturer puts on blackboard. I do have a book of my own which covers assembly language (in part) but it was published in 1994 so I'm not sure how applicable it is.



I suspect that you will get more out of this class than you might think, and by the time you have to write that program it won't seem so daunting. Your book from 1994 is probably still useful, assuming that it uses the same assembly language. Hell it'll probably be useful even if it doesn't, since there should be analogous operations for all the basic stuff. I wouldn't take its advice on what tools to use, but if it has code snippets that show how to approach certain common tasks those should still be useful.

Having prior experience writing in a higher level language might have helped with this task. I say that primarily because you would have prior experience formalizing a given process and writing it out as a series of instructions. A large part of being able to write good code is being able to logically deconstruct a task into smaller, more manageable parts. You get better at that the more you do it. When you are writing something in assembly, where even a simple task can take a lot of lines and be difficult to read at a glance, this is even more important.

I had a class in college where we learned SPARC assembly, and the class started with us writing small programs in C and then analyzing the generated assembly code. After that though we just dove in and wrote assembly. I think that approach made it a bit easier for me to grasp what the assembly was doing at first, but there's no reason why you have to start with a higher level language and dive down.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
I've got a process question that I need help with. How do you guys go from higher level, general requirements like "we need this type of component" to discreet, low level tasks?

JawnV6
Jul 4, 2004

So hot ...

Xerophyte posted:

Sheesh. In spite of what a lot of people here apparently think there's no rule saying your brain will explode unless you start at an abstract language and work your way down to the metal, especially if you're in EE.
I'm not saying it's impossible or whatever that cute strawman is, I'm saying that coursework arranged that way is less effective than if a higher level programming course had been taught first. Assembly is an API between hardware and software, coming at it from just one side is going to be confusing. Teaching assembly first is like jamming OOP into an intro course. I'm sure you can get a big chunk of the concepts across but the *why* behind them and the reasoning behind tradeoffs is going to be taught as a matter of faith.

As an aside, have you ever worked with someone who learned from assembly? In my perl class there was a guy who'd only written x86 asm for 20 years. I think he choked back tears when he understood the complexity being swept up behind "if" statements. Just imagine "programming languages teach you to not want what they don't provide" taken to the extreme.

Sirocco posted:

Technically we only learned how to make files and scan them for viruses last semester, ha ha. I don't know what kind of program we're supposed to be writing, there's no reference to it in the notes. All the lecturer said was that it should be "fairly complex" which is pretty nebulous but I expect the program writing will be a few months down the line.
I'm sure a college program isn't going to leave someone high and dry and the content will be geared for first time programmers, it just doesn't make sense why they'd want to structure a program like this in the first place. I don't think you should go off and learn python, focus your learning effort on the class itself.

Xerophyte
Mar 17, 2008

This space intentionally left blank

JawnV6 posted:

I'm not saying it's impossible or whatever that cute strawman is, I'm saying that coursework arranged that way is less effective than if a higher level programming course had been taught first. Assembly is an API between hardware and software, coming at it from just one side is going to be confusing. Teaching assembly first is like jamming OOP into an intro course. I'm sure you can get a big chunk of the concepts across but the *why* behind them and the reasoning behind tradeoffs is going to be taught as a matter of faith.

You might as well say that higher level programming languages are an API between humans and assembly and coming at them from just one side will be confusing. Which it is, but you have to start somewhere and for an electrical engineer building a CPU from the ground up and then introducing assembly mnemonics as a way to interface with it is probably among the more intuitive options.

Sure, he'd be writing better assembly if he'd learnt a higher level language first. He's also going to write better high level code from learning assembly first when he starts with that. It's not terribly important where you start as long as it's structured and follows from previous work; the course described sounds like it does that. I don't think Sirocco has much to worry about.

Above Our Own
Jun 24, 2009

by Shine
I'm a dyed in the wool OOP .NET programmer that would like to learn functional programming. Can anyone recommend any good languages/introductory textbooks/other resources?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


This one's easy: F#.

Bunny Cuddlin
Dec 12, 2004

JawnV6 posted:

I'm not saying it's impossible or whatever that cute strawman is, I'm saying that coursework arranged that way is less effective than if a higher level programming course had been taught first. Assembly is an API between hardware and software, coming at it from just one side is going to be confusing. Teaching assembly first is like jamming OOP into an intro course. I'm sure you can get a big chunk of the concepts across but the *why* behind them and the reasoning behind tradeoffs is going to be taught as a matter of faith.

This is ridiculous. Learning assembly on the heels of learning hardware organization is a completely natural progression, it's nothing like trying to teach OOP before teaching basic programming skills.

Opinion Haver
Apr 9, 2007

Above Our Own posted:

I'm a dyed in the wool OOP .NET programmer that would like to learn functional programming. Can anyone recommend any good languages/introductory textbooks/other resources?

If you want to do something similar but different, F# is good like ultrafilter said. If you want something completely different from anything you've ever done before, go through Learn You A Haskell. It's sort of like learning to program all over again.

JawnV6
Jul 4, 2004

So hot ...

Xerophyte posted:

You might as well say that higher level programming languages are an API between humans and assembly and coming at them from just one side will be confusing. Which it is, but you have to start somewhere and for an electrical engineer building a CPU from the ground up and then introducing assembly mnemonics as a way to interface with it is probably among the more intuitive options.
That's the stupidest description of a HLL I've seen in recent memory. How many hundreds of thousands of programmers get by just fine without ever being aware of assembly without confusion? Versus how many HW engineers get by without knowing another language apart from the ISA? Zero, at the very least they're competent in an HDL.

Xerophyte posted:

Sure, he'd be writing better assembly if he'd learnt a higher level language first. He's also going to write better high level code from learning assembly first when he starts with that.
Entirely disagreed with the second. I brought up an example of exactly this in my previous post. You can write FORTRAN in anything, and asm-in-perl is horribly by perl standards.

Going HLL->asm is a way to bypass compilers in understanding computing by jumping down to that abstraction. Programmers get to see the atomic operations that all their HLL statements must be broken down into

Going asm->HLL gives you nothing. You're better off ignoring the asm learnings entirely until you're on solid footing with the HLL abstraction.

Bunny Cuddlin posted:

This is ridiculous. Learning assembly on the heels of learning hardware organization is a completely natural progression, it's nothing like trying to teach OOP before teaching basic programming skills.
Basic programming should have come before both. Throwing someone into Verilog/VHDL as their first exposure to a large structured language that gets read by a computer is cruel. I'd rather risk someone thinking of HDL's as C since that's easy enough to dispel.

Above Our Own
Jun 24, 2009

by Shine

ultrafilter posted:

This one's easy: F#.

yaoi prophet posted:

If you want to do something similar but different, F# is good like ultrafilter said. If you want something completely different from anything you've ever done before, go through Learn You A Haskell. It's sort of like learning to program all over again.
Thanks for the responses. F# looks right up my alley and I'll probably end up using it for production, but for learning I want something that is going to force me away from OOP so I can really get my head around a different paradigm. I'll check out that Haskell guide, which looks hilarious.

Mr. Crow
May 22, 2008

Snap City mayor for life
As an idiot, what can you do with Haskell, practically? I hear people sing it's praises but have never really seen any applications for it (or remembered them at least).

raminasi
Jan 25, 2005

a last drink with no ice

Above Our Own posted:

Thanks for the responses. F# looks right up my alley and I'll probably end up using it for production, but for learning I want something that is going to force me away from OOP so I can really get my head around a different paradigm. I'll check out that Haskell guide, which looks hilarious.

F# is great for when you think and work functionally but sometimes just need to mutate something, goddamnit. I love F#. I wish it had the tool support that C# does though.

Mr. Crow posted:

As an idiot, what can you do with Haskell, practically? I hear people sing it's praises but have never really seen any applications for it (or remembered them at least).

The only large-scale non-academic thing I've heard of Haskell being used for is high-frequency trading. Interestingly, I think this domain is being threatened by F# because of the ease with which you can glue your HFT algorithm (written in F#) to your Enterprise Business Infrastructure (that uses whatever other .NET).

Xerophyte
Mar 17, 2008

This space intentionally left blank

GrumpyDoctor posted:

The only large-scale non-academic thing I've heard of Haskell being used for is high-frequency trading. Interestingly, I think this domain is being threatened by F# because of the ease with which you can glue your HFT algorithm (written in F#) to your Enterprise Business Infrastructure (that uses whatever other .NET).

It seems popular in banking; I know a guy who works on a distributed Monte Carlo simulator that valuates derivatives written in Haskell. Standard Chartered have their own dialect of the language (Mu Haskell), apparently it maps well to whatever the finance mathematicians do with their time.

E: To sort of answer the question, although the level of quality varies there are enough libraries around in hackage that you can do pretty much whatever you want in Haskell nowadays. Last time I coded much of anything in it I wrote a turtle graphics/L-system dsl and GTK frontend to draw stuff with it which turned out pretty ok, that was decently amusing. It's a good language for messing around with language itself, so something like a brainfuck interpreter could be a good way to get your feet wet. I dunno. Working through Learn You A Haskell until comfortable is probably a good idea before taking on any kind of project, functional programming takes a while to get used to.

Xerophyte fucked around with this message at 21:11 on Feb 28, 2013

pigdog
Apr 23, 2004

by Smythe

Blinkz0rz posted:

I've got a process question that I need help with. How do you guys go from higher level, general requirements like "we need this type of component" to discreet, low level tasks?

You'd split the most general requirements of your application into feature areas. Ask "in one sentence, describe the 5 things this application should do" and you have your feature areas. For each feature area ask "what are the 5 things I need to accomplish this", and you have the 5 major user stories for each.

Create first version of the application with the least functionality possible, and bring it to production quality making sure, with automated tests, that it does that least possible functionality flawlessly. Then start adding features, always keeping it tested, one by one until it's release ready.

Opinion Haver
Apr 9, 2007

Mr. Crow posted:

As an idiot, what can you do with Haskell, practically? I hear people sing it's praises but have never really seen any applications for it (or remembered them at least).

I'm sort-of working on a game written in it; referential transparency is really good at making sure you can't influence other objects in ways that you don't want, or that your object update code can't bug out and start changing your graphics state.

It's got really good support for writing parsers, and Pandoc, a multiformat document converter, is written entirely in Haskel.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


There are some Haskell web frameworks out there. That's pretty far removed from my area of expertise, so I'd be interested to see from more knowledgeable folks how they compare to the standard web frameworks.

Workaday Wizard
Oct 23, 2009

by Pragmatica
Is there a tree structure search, replace, and manipulation framework for C?

I am trying to make a toy linear equation solver and I need to search for nodes, apply some manipulation functions on them, and replace them constantly. Doing things manually is getting old not to mention it's very easy to introduce bugs (forgetting to fix the tree, fixing the tree wrong, forgetting to clone/free memory, etc.) and I don't have a second person to catch my gently caress ups (I know unit tests exist but I need to get the ball rolling before I lose interest).

Here is my tree structure by the way:
C code:
typedef struct N {
    NodeType type;
    struct N *children[]; /* note1: i am using the struct trick
    note2: children is overwritten by leaf
    nodes to store their data (value or variable name) (ugly but eh..)*/
} N;

Cabal Ties
Feb 28, 2004
Yam Slacker
Google App Engine questions. Think this belongs here....

Is it possible to edit the stylesheet or template files after you've launched your App onto Google servers? The documentation I was following didn't mention customisation until the very end of the tutorial.

turn it up TURN ME ON
Mar 19, 2012

In the Grim Darkness of the Future, there is only war.

...and delicious ice cream.
I have to learn some basic programming concepts quickly, while learning Ruby. The thingy is going to be interacting with a very complex SQL db. Anyone have any good things to share to help me learn the higher concepts? I'm getting lost on such simple concepts as classes, controllers, views, etc. and none of my SQL experience is helping me.

turn it up TURN ME ON fucked around with this message at 19:55 on Mar 1, 2013

Catalyst-proof
May 11, 2011

better waste some time with you

CareyB posted:

Google App Engine questions. Think this belongs here....

Is it possible to edit the stylesheet or template files after you've launched your App onto Google servers? The documentation I was following didn't mention customisation until the very end of the tutorial.

The only things you can modify post deploy are datastore indices, task queue configurations, DoS protection, cron, and datastore data. If you need to modify the template, you have to re-deploy. Use the dev server locally, which does live reloading, to get your templates right before deploying.

Alternatively, store your templates in the datastore. This is probably retarded though, don't do this.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
I'm not sure whether this is worth it's own thread so I'll go here first.

Been thinking a little after the Evernote breach how, their user data is not compromised but the user list is. I'm pretty much used to working with an ORM like Django's for Python, and realistically if someone gets a hold of your database they pretty much have all the data available to them, and they'll be able to reconstruct all the relations based on user ids and what not.

My question is what are good resources for learning about encrypting user data for web applications. What options are there to ensure a user's private data stays that way when it's on a web app with an API?

mahill
Dec 29, 2006
I'm curious...how do high performance websites (large social networking sites, video sites, etc.) use multiple languages to interface with each other? I've seen HipHop and Thrift developed by Facebook, so that gives a LITTLE bit of insight, but I'd really like to know the internals of how that works.

For example, I've heard that Youtube's whole user interface is developed in Python. How are they getting the data? Are they using Google Protocol Buffers to retrieve data from the database? Or do they call databases directly with python and just do video processing with C++?

If you look at job applications for, say, Google, they'll require experience in C++, Java and Python at a minimum.

I've heard at Facebook, they develop with PHP and convert it to C++ and compile with HipHop. Anyone with more insight care to share how they actually use the various programming languages?

Thanks

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies
So I'm working on implementing an AI to solve a 8 block puzzle. While I've written the implementations in MATLAB, they're running slow, and I wanted to see if it was because of a mess up in my queue, or something else. I found this which solves the issue in Ruby (which I've never used and know nothing about). Installed ruby on my machine, and while I can run the BFS one, I can't seem to run the Uniform Cost with PQueue gem instead of his implementation.

Only change is requiring pqueue gem at the top, and then changing PriorityQueue.new {|s| s.cost} to PQueue {|s| s.cost}.

e: my code

e2: Also, why would Uniform Cost find something quicker than Breadth first? Since all paths have the same cost (previous node cost+1), it'll always add the new nodes on the frontier to the end of the queue (like BFS), so there's no point running it really? Well the example has a lower step cost, but I really don't know why. Guess it wouldn't actually and it has to do with the insertion into the Priority Queue.

Master_Odin fucked around with this message at 07:53 on Mar 3, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Does anybody have some good beginner lessons for basic 2D and 3D geometry? I feel really behind whenever I see somebody use dot products and determinants and that sort of stuff. I know the algorithms, and I know how to compute these things, but I don't grok what they are or what they're telling me, or how I could apply them myself. I work in 2D graphics myself, so I really feel bad about not knowing this stuff.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Haven't really viewed the content but forums user Vino has been posting Math for Game Developers videos in the Game Dev thread. Might be useful?

https://www.youtube.com/user/BSVino?feature=watch

The Gripper
Sep 14, 2004
i am winner

Suspicious Dish posted:

Does anybody have some good beginner lessons for basic 2D and 3D geometry? I feel really behind whenever I see somebody use dot products and determinants and that sort of stuff. I know the algorithms, and I know how to compute these things, but I don't grok what they are or what they're telling me, or how I could apply them myself. I work in 2D graphics myself, so I really feel bad about not knowing this stuff.
The Arcsynthesis GL tutorial actually has fairly good primers in vector and matrix math (and how they apply practically to transformations like scale, translation and rotation) as well as sections on coordinate systems etc. Chapters 1 and 6 are probably the most useful and you don't necessarily need to know openGL to grasp what they're talking about, though it's a good tutorial as a whole and is worth following if you have the time or inclination.

Wolfgang Pauli
Mar 26, 2008

One Three Seven

Master_Odin posted:

So I'm working on implementing an AI to solve a 8 block puzzle. While I've written the implementations in MATLAB, they're running slow, and I wanted to see if it was because of a mess up in my queue, or something else. I found this which solves the issue in Ruby (which I've never used and know nothing about). Installed ruby on my machine, and while I can run the BFS one, I can't seem to run the Uniform Cost with PQueue gem instead of his implementation.

Only change is requiring pqueue gem at the top, and then changing PriorityQueue.new {|s| s.cost} to PQueue {|s| s.cost}.

e: my code

e2: Also, why would Uniform Cost find something quicker than Breadth first? Since all paths have the same cost (previous node cost+1), it'll always add the new nodes on the frontier to the end of the queue (like BFS), so there's no point running it really? Well the example has a lower step cost, but I really don't know why. Guess it wouldn't actually and it has to do with the insertion into the Priority Queue.
Are you doing the edX AI course, too, or is it just coincidence? That's part of the first Project assignment.

Adbot
ADBOT LOVES YOU

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies

Wolfgang Pauli posted:

Are you doing the edX AI course, too, or is it just coincidence? That's part of the first Project assignment.
Coincidence I'm sure. I've finished an implementation in Matlab, it's just using purely Matlab has made the thing run horribly as I'm forced to try and use a fake priority queue instead of a real good one in Java or the like.

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