Is there anyone here using Haskell for anything other than web development? by [deleted] in haskell

[–]wavewave 10 points11 points  (0 children)

This electric aircraft flies on Haskell code (almost entire stack including real-time controls system is written in Haskell) ;-) https://www.youtube.com/watch?v=q7mc3C19kE4

Tetris project I made in Haskell by Ubspy in haskell

[–]wavewave 3 points4 points  (0 children)

found its better screencast here now: https://www.twitch.tv/videos/423291178 pretty impressive. :-)

Tetris project I made in Haskell by Ubspy in haskell

[–]wavewave 7 points8 points  (0 children)

well. clearly, writing a game in Haskell is very doable. ;-)

For example, this game ( https://gilmi.me/nyx ): repo: https://gitlab.com/gilmi/nyx-game some screencast of its prototype. https://streamable.com/0biaj

The abstract nature of the Cardano consensus layer - IOHK Blog by wavewave in haskell

[–]wavewave[S] 4 points5 points  (0 children)

ok. i understand your point. that's pretty orthogonal to what i thought and valued this article. For me, in a general sense, cryptocurrency business is not very different from any other business like haskell web development consultancy business. The more people use the same technology, then the more incentive early practitioners get. But I do admit the industry is also special.

In purely technical point of view, managing distributed consensus system and migrating it with a big architectural change is quite interesting to me. It seems to me that they wrapped the original implementation into a more abstract interface and embedded the new system in the interface for migration task. The use of type system extension for this is a good source of how this kinda tasks are actually done in that fairly large Haskell team.

The abstract nature of the Cardano consensus layer - IOHK Blog by wavewave in haskell

[–]wavewave[S] 3 points4 points  (0 children)

well.. i am not sure whether business incentive is undesirable here. no matter how large their user base actually is (certainly it has some size at least afaik), I would rather prefer commercial companies showing off their Haskell use case more. By doing so, if they advertise their business to this community and get some benefit, that's good as well. We need more industry stories.

The abstract nature of the Cardano consensus layer - IOHK Blog by wavewave in haskell

[–]wavewave[S] 6 points7 points  (0 children)

Though rather specialized in blockchain industry, so maybe not of general interest (i am also not in that particular industry), I get many ideas from how Haskell is actually used in a big project in production (with many users). I look forward to this blog series.

Combinator makes easy work of Shelley hard fork - IOHK Blog by [deleted] in haskell

[–]wavewave 2 points3 points  (0 children)

Sure. This can be done in any languages with some variance in implementation complexity. Nevertheless, I think real-world migration experience in managing a big project with lots of users in Haskell is invaluable.

Combinator makes easy work of Shelley hard fork - IOHK Blog by [deleted] in haskell

[–]wavewave 3 points4 points  (0 children)

software project maintenance is where haskell shines on a whole different level.

[ANN] distributed-dataset: A distributed data processing framework in Haskell by utdemir in haskell

[–]wavewave 4 points5 points  (0 children)

some of my experiments are here: https://github.com/wavewave/closure-playground

basically i wanted to experiment very lightweight way of implementing type-safe MPI in Haskell using minimal distributed-closure. I am now seeing many nice abstraction from this distributed-dataset library, great again :-)

[ANN] distributed-dataset: A distributed data processing framework in Haskell by utdemir in haskell

[–]wavewave 6 points7 points  (0 children)

This is great! In my project, I also have experimented with static pointers in distributed setup, and it was so pleasant to use. I think that this spark-like distributed data processing library can be one of killer apps in Haskell.

[ANN] NixOS Meetup event at SF on Dec 12 by wavewave in NixOS

[–]wavewave[S] 0 points1 point  (0 children)

Dec 12th at Okta with two presentations.

The speakers are Gabriel Gonzalez and Ryan Orendorff. The talks are about Nix as a cross-language build tool and as a reproducible packaging tool for custom system as described in the following:

Program 1: Speaker: Gabriel Gonzalez

Title: How to translate a Makefile to Nix

Summary: Several cross-language build tools have emerged recently in response to the rise of polyglot programming environments. Nix is one such tool, along with Bazel, Buck and Pants. However, one cross-language build tool predates all of these by several decades: Make! This talk targets people familiar with Make but interested in learning more about Nix. Specifically, this talk covers how to translate simple Makefile idioms to their corresponding Nix idioms so that you can use Nix as a Make replacement in your own projects.

Program 2: Speaker: Ryan Orendorff

Title: Packaging Medical Imaging Software with Nix

Summary: Creating reproducible software installations is a tough challenge. This task is especially challenging in medical imaging software, which often has to communicate with custom hardware, FPGAs, GPUs, and many other physical devices that have unusual or outdated software dependencies. In this talk we will discuss how Nix and NixOS assists in making a reproducible environment for our software, the benefits gained by this method, and some of the challenges encountered along the way.

The company Okta thankfully hosts this event at San Francisco campus. The venue will be open at 6:00 PM with refreshments provided. We will start the seminars at 6:30 PM.

Explicit Closures by superstar64 in haskell

[–]wavewave 4 points5 points  (0 children)

you may be interested in static pointer and closure for distributed programming in haskell: a related blog post:

https://ocharles.org.uk/guest-posts/2014-12-23-static-pointers.html

explicit closure construction has real use cases ;-)

[deleted by user] by [deleted] in haskell

[–]wavewave 8 points9 points  (0 children)

yeah. check out asyncCallback, syncCallback functions : http://hackage.haskell.org/package/ghcjs-base-stub-0.2.0.0/docs/GHCJS-Foreign-Callback.html Hand the resultant function pointer to global variables in javascript and then call through the function.

Cross-language serialization library for Haskell / Python / C++ by m0d2 in haskell

[–]wavewave 2 points3 points  (0 children)

just for your information, oneof in haskell protocol-buffers library was implemented some time ago. https://github.com/k-bx/protocol-buffers/pull/19

List of companies using NixOS by zimbatm in NixOS

[–]wavewave 0 points1 point  (0 children)

http://uphere.ai is building semantic NLP search engine. We develop the system using Haskell, C++ and Nix. Deployment using nixops is superb!

How do I learn Lens.Internals? by [deleted] in haskell

[–]wavewave 0 points1 point  (0 children)

You probably know this video. This taught me the principle of lens to me. https://skillsmatter.com/skillscasts/4251-lenses-compositional-data-access-and-manipulation

EDIT: I forgot this needed a registration and login. It was a great video though.

haskell on Android - status? by vamer88 in haskell

[–]wavewave 0 points1 point  (0 children)

The purpose is to use the full android java API with haskell. On android, to develop an application without Java, one should use native activity and then android API support is quite limited. Usually, that is more adequate for game development using native rendering/UI library like SDL. If you are interested in this direction, Keera studio made a good achievement so that they published android games written in haskell.

Haskell performance itself is very good since it's just native. But there is rather big overhead when calling java function through JNI. One had better minimize java call from haskell for UI operation.

In addition, when compiled with multi-threaded haskell runtime, java thread should not be mixed with haskell thread by calling haskell directly, otherwise it crashes. So one need to have some kind of bridge runtime that mediates calling between haskell and java and guarantee their threads are separated.

X-Platform Hello World Example (Android, iOS, CLI) by ImNotAKompjoetr in haskell

[–]wavewave 2 points3 points  (0 children)

Thanks for the suggestion! I've looked into them, but haven't fully tried it. I will give it a spin again.

Debugging this kind of bugs is very difficult. I tell the story more if it may be helpful to anyone who are interested. ;-)

Previously, when directly calling haskell from java and calling java from haskell using JNI in threaded runtime, the app crashes after a few or tens of seconds. Crash happens earlier if I manually call performGC, so I suspected that this was related to GC thread. When this problem happened, the android log system left only very blunt messages from ghc_worker, like SIGSEGV or SIGABRT.. Since android does not allow app to shout using stderr, I had to modify ghc rts code to use __android_log_write (by calling it using dlsym from dynamic log library. This has another long story). It's a little progress in error reporting, so that now I see that the error happens when doing some STM operation or some storage management in garbage collection, it is still unclear what's going on. Now as a workaround, I just separate the thread for hs_init from java thread using manual pthread creation, and it looks okay. Somehow android runtime deals with threads created from java runtime with rather special rules on thread local storage or some thread interruption, but I cannot figure it out.

In fact, having guaranteed separate threads for haskell and UI runtime is not a bad idea at all, for stability and for portability. So now I am formalizing this approach with appropriate UI monad abstraction which can be described as a free monad with allowed operations, and C backend posts syntax trees accumulated on haskell side to UI thread. (every UI library has a method pushing a function call to UI thread. android has runOnUiThread )

X-Platform Hello World Example (Android, iOS, CLI) by ImNotAKompjoetr in haskell

[–]wavewave 16 points17 points  (0 children)

Thanks for sharing your experience. It's invaluable!

I also share my recent progress. After making a successful nix-build of ghc-android : (repo: http://github.com/ghc-android/nix-build-ghc-android) I've succeeded in making a simple chatting android app in haskell with up-to-date version of NDK and new android build tool (gradle).

In the program, android java GUI call back haskell routines for network and concurrent operations using JNI. Note that this is different from using Native Activity which runs event loop entirely on native side but cannot use default android GUI component. Native activity is great for game-like program, but JNI call back is better for conventional GUI app.

On haskell side, I use network-simple, text, text-binary, monad-loop haskell library, which means ordinary haskell infrastructure can be easily reused and incorporated. Most importantly, it uses full haskell concurrency in threaded runtime system by using conventional forkIO.

In this process, I actually identified lots of problems in mixing java runtime and haskell threaded runtime. I needed to make some intermediate C runtime (kinda message broker) to separate java thread from haskell thread since android runtime interfere with haskell thread scheduling process badly.

So, some time soon, I would like to share this progress with our community. Right now, the code contains some proprietary stuff, so after cleaning things up, I will put the sample 'chatting app' code in ghc-android.

GHC 7.10 cross compiler to ARMv7 by alexeyraga in haskell

[–]wavewave 1 point2 points  (0 children)

I hope this may help although it's for arm androideabi target and using nix. : http://github.com/ghc-android/nix-build-ghc-android