Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network-transport-0.4.4.0 #47

Open
dpwiz opened this issue Aug 3, 2017 · 3 comments
Open

network-transport-0.4.4.0 #47

dpwiz opened this issue Aug 3, 2017 · 3 comments

Comments

@dpwiz
Copy link

dpwiz commented Aug 3, 2017

Is a dependency for distributed-process.

Offending code:

#ifdef mingw32_HOST_OS

foreign import stdcall unsafe "htonl" htonl :: CInt -> CInt
foreign import stdcall unsafe "ntohl" ntohl :: CInt -> CInt
foreign import stdcall unsafe "htons" htons :: CShort -> CShort
foreign import stdcall unsafe "ntohs" ntohs :: CShort -> CShort
  
#else
  
foreign import ccall unsafe "htonl" htonl :: CInt -> CInt
foreign import ccall unsafe "ntohl" ntohl :: CInt -> CInt
foreign import ccall unsafe "htons" htons :: CShort -> CShort
foreign import ccall unsafe "ntohs" ntohs :: CShort -> CShort
  
#endif

Nothing fancy. It is used to convert numbers to network-order bytestrings.

I've downloaded etlas merely an hour ago, so no PR for now 😉

@rahulmutt
Copy link
Member

Java doesn't really have much of a concept of "network" and "host" byte order. We did tackle this problem in the network package itself. Take a look at the network patch (Note that it's incomplete - we just ported enough to get the wai package working).

@rahulmutt
Copy link
Member

And on another note, Eta has a nice (hidden) feature that all Eta closures are serialisable so you can send closures over the wire w/o static pointers and distributed-process! The functionality is not yet exposed, but I'd be happy to add a bit of documentation if you're interested in playing around with it.

@dpwiz
Copy link
Author

dpwiz commented Aug 4, 2017

Oh... the DP itself has indeed loads of TH for closure magic, so this patch would'n help that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants