Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

FP win

Name: Anonymous 2015-11-28 13:31

3D flocking simulation in Haskell. It's boids that flock together, all in 3D OpenGL and pure Haskell. FP for the win!!

https://github.com/Chase-C/Flocking-Simulation

Name: Anonymous 2015-11-28 13:32

go home haskell nigger

Name: Anonymous 2015-11-28 17:23

dude they spelled "Building" wrong on the README.md

it says "Bulding"

Name: Anonymous 2015-11-28 20:58

>>3
What programming language is this?

Name: Anonymous 2015-11-28 21:39

>>4
Markdown isn't a programming language, cretin.

Name: Anonymous 2015-11-29 8:04

>>1
Runs slow. Is this all Haskell can do? It's garbage. Also, OpenGL is pretty much obsolete. All of the cool kids are switching to Flash and node.js.

Name: Anonymous 2015-11-29 8:28

>>6
Is this all Haskell can do
No, just look at his to-do list:

* Replace lists with vectors
* Integrate with the Repa library to exploit GPU parallelization
* Optimizations!

OpenGL is pretty much obsolete
IHBT

Name: Anonymous 2015-11-29 11:17

>>7
Check my super fast Knapsack solver!

import Data.List
import Data.Function

type Item = (Int,Int)
value = fst
cost = snd

knapsack :: [Item] -> Int -> [Item]
knapsack kinds limit = maximumBy (compare `on` (sum . map value)) . filter valid .
generate limit $ filter valid (map return kinds)
where generate _ [] = []
generate limit xss = let new = xss >>= (\items -> map (:items) kinds) in
xss ++ generate limit (filter valid new)
valid = (limit >=) . sum . map cost


TODO:
* Constraints on amount of boxes
* GPU parallelization
* Optimizations!

Name: Anonymous 2015-11-29 12:21

What's the point of using Haskell if deep down, everything is C?
In this case, not even that deep. OpenGL itself is in C.
Using Haskell is pointless, unless you have your Haskell kernel, Haskell windowing system, etc
Otherwise you're just working on top of C and all your arguments are trashed.

Name: Anonymous 2015-11-29 13:21

>>9
why are you writing in english instead of binary?

Name: Anonymous 2015-11-29 13:55

>>9
What's the point of using C if deep down, everything is machine code?
In this case, not even that deep. OS kernels are themselves in machine code.
Using C is pointless, unless you have your C CPU, C CPU motherboard, etc
Otherwise you're just working on top of machine code and all your arguments are trashed.

Don't change these.
Name: Email:
Entire Thread Thread List