by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 20 05:04

    ocramz on gh-pages

    Add `sampling` (compare)

  • May 19 09:03

    ocramz on gh-pages

    Add kdt, Supervised Learning se… (compare)

  • Apr 14 01:32
    tonyday567 removed as member
  • Jan 30 07:37

    ocramz on gh-pages

    Add arrayfire (compare)

  • Jan 02 12:51

    ocramz on gh-pages

    add inliterate (compare)

  • Jan 02 12:43

    ocramz on gh-pages

    update hvega entry (compare)

  • Jul 01 2019 09:43
    dmvianna added as member
  • Jun 15 2019 04:55

    ocramz on gh-pages

    Add pcg-random (compare)

  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz labeled #42
  • Jun 14 2019 16:08
    ocramz opened #42
  • Jun 14 2019 16:08
    ocramz opened #42
  • Jun 06 2019 18:21

    ocramz on gh-pages

    Fix graphite link Merge pull request #41 from alx… (compare)

  • Jun 06 2019 18:21
    ocramz closed #41
  • Jun 06 2019 18:21
    ocramz closed #41
  • Jun 06 2019 17:32
    alx741 opened #41
Bryan Buecking
@buecking
Anyone have experience with porcupine?
buecking @buecking reading whatever docs he can find
Yves Parès
@YPares
@buecking I do
@buecking if you have questions, here or the gitter https://gitter.im/tweag/porcupine are good places :)
Alexey Kuleshevich
@lehins
This seems like a crowd that could potentially find use for this new library that I created: https://github.com/lehins/Color
Let me know what you guys think.
Gregory Schwartz
@GregorySchwartz
@lehins Interesting! How does it differ from http://hackage.haskell.org/package/colour-2.3.5 ?
Alexey Kuleshevich
@lehins
@GregorySchwartz Color has quite a bit more functionality, more type safety and is much-much faster than colour. There is a benchmark section in the library in case you are curious to see for yourself. Also I couldn't find a repo where colour package is maintained, which I think is a serious drawback.
And most importantly one is capitalized and has American spelling , where the other one is named with lower case and is spelled in British English. :D
Just as a sanity check I have tests that compare the values between the two libraries for the intersecting functionality.
RajaramRajamani
@RajaramRajamani
anybody is there from Bangalore?
Here..
Marco Z
@ocramz
hi @RajaramRajamani , welcome!
RajaramRajamani
@RajaramRajamani
Hi..happy to be here!
Stefan Dresselhaus
@Drezil
Anyone knows a good KNN-Implementation in haskell? Preferably just using indices into an hmatrix as i want to do other computations as well..
ideally some cover-tree-algorithm .. ;)
Stefan Dresselhaus
@Drezil
welp ... i tried https://hackage.haskell.org/package/KdTree but it is painfully slow ... i would have to rewrite it (no bangs, no optimizations anywhere..)
Kevin Brubeck Unhammer
@unhammer
Stefan Dresselhaus
@Drezil
both same author, HMM:2.0.1 looks identical to hmm:2.0.1 .. so maybe just an errernous upload?
Kevin Brubeck Unhammer
@unhammer
probably :/
Kevin Brubeck Unhammer
@unhammer
apparently the hackage version is deprecated though
Stefan Dresselhaus
@Drezil
@unhammer i know that one. It uses subhask and a lot of other things under the hood i would rather not have as a dependency in my work-projects..
after mike finished his phd (in 2015 or so) the project went dead anyway.
Kevin Brubeck Unhammer
@unhammer
:/
Jonathan Reeve
@JonathanReeve
I have a crazy question for you guys. I'm trying to extract a color map, mapping a word to a color value, from this old book. I'm thinking maybe extract columns of pixels using JuicyPixels, then cluster them with K-means? Just a guess. How would you go about this, in terms of the Haskell libraries you'd use?
Alexey Kuleshevich
@lehins
@JonathanReeve I can suggest using an array library massiv: https://github.com/lehins/massiv for doing the processing, Color+massiv-io (https://www.stackage.org/haddock/nightly-2020-02-22/massiv-io-0.2.0.0/Graphics-ColorModel.html) packages for handling pixels in desired color models/spaces and then use massiv-io for reading/writing massiv arrays by the means of JuicyPixels
That is my suggestion, but I am a bit biased towards those libraries ;)
Jonathan Reeve
@JonathanReeve
:thumbsup:
Stefan Dresselhaus
@Drezil
i would go for that route as well.. so a +1 from me ;)
Stefan Dresselhaus
@Drezil
Anyone know how i could realize syncpoints in a thread-pool? Where i have n threads & want to sync them on distinct points (i.e. all wait untill all other threads have reached that point in the calculation)? On GPU you have such things for the local thread-pool
ahh.. "barrier" is the keyword
Alexey Kuleshevich
@lehins
@Drezil Checkout scheduler package, see the section on nested parallelism: https://github.com/lehins/haskell-scheduler#nested-parallelism
Any time you call withScheduler it will not exit until all worker threads are done.
Stefan Dresselhaus
@Drezil
@lehins thx
in the meantime i built a Work-stealing TQueue by myself ;)
Alexey Kuleshevich
@lehins
TQueue, will be much slower, there is serious overhead with STM. That is if care about performance of course
@Drezil In your solution how are handling concurrency, put in other words, how do you spin off your worker threads?
Stefan Dresselhaus
@Drezil
just some forkIO & MVar () for the critical section.
with ThreadGroups from a library i found
  q <- newTQueueIO
  atomically $ mapM_ (writeTQueue q) $ go mutex iolog h nodes anz <$> [0..iter]
  let doWork queue = do
        next <- atomically $ tryReadTQueue queue
        case next of
          Nothing   -> return ()
          Just work -> work >> doWork queue
  group <- TG.new
  sequence_ [TG.forkIO group (doWork q) | _ <- [1..16]]
  TG.wait group
Alexey Kuleshevich
@lehins
This code is buggy. You are not ensuring proper exception handling. Namely if one thread throws an exception or is killed by an async exception, other threads are not being cleaned up properly
Stefan Dresselhaus
@Drezil
i know.
it is just a batch-calculation (optimizing a SOM)
Alexey Kuleshevich
@lehins
proper concurrency is not that trivial. I seriously recommend using scheduler for what you are trying to do, it was build precisely for the workflow you are trying to do
Stefan Dresselhaus
@Drezil
there is a lot of unsafePerformIO under the hood anyway. And i don't WANT proper concurrency. All ops are pure or read-ops on shared mutable memory.
only mutation is in the critical section
Alexey Kuleshevich
@lehins
The code above is literally two lines of code with scheduler
Stefan Dresselhaus
@Drezil
but yes. in the future i would reach out for scheduler or things :)
Alexey Kuleshevich
@lehins
suit yourself
Stefan Dresselhaus
@Drezil
hmpf .. i just realised i was stupid anyway in another part of the algorithm -.-
Alexey Kuleshevich
@lehins
Sorry I was wrong, one line of code
withScheduler_ (ParN 16) $\ scheduler -> mapM_ (scheduleWork_ scheduler . go mutex iolog h nodes anz) [0..iter]
Stefan Dresselhaus
@Drezil
thx :)
Magalame
@Magalame
Is there a tutorial on how to get started with linear haskell somewhere? I'd love to experiment with a (mutable) Vector implementation close to the Rust one. I'm particularly excited about having a simple write :: Vector a -> Int -> a -> Maybe (Vector a) function without copying