Better HN
topnewbestaskshowjobs
Log inSign up

devxpy

515 karma · joined Dec 27, 2017 (8y ago) · 421 submissions

https://github.com/devxpy
Submissions

comment 8y ago · link · parent

*cries in Gnome

comment 8y ago · link · parent

> Cython is a relatively complex and still poorly documented language

Totally agree. I tried some time ago, was quite hard to setup. If they can mypyc just work out of the box, it would be really nice.

Compiling python to C not only has obvious performance advantages but also the fact that it will enable a Web Assembly compilation target to be a thing.

comment 8y ago · link · parent

Also, after doing some research:

The `multiprocessing.Pool` uses a `multiprocessing.Queue` in the background to retrieve the results after completion.

The `multiprocessing.Queue` in turn uses `multiprocessing.connection.Pipe` and sends the pickled objects over to the wire.

So I don't see how this is any better than ZMQ.

Just because stuff has an API that doesn't look like message passing doesn't mean it can't be doing that in the background. Which is funny, because that's the whole point of ZProc.

I realize the subtle difference that Cpython uses pipes, not sockets, unlike ZMQ. But that doesn't really make a difference now, does it?

Proof:

Process Pool worker, returning the result by using `outqueue.put()`

https://github.com/python/cpython/blob/86b89916d1b0a26c1e77f...

multiprocessing Queue, initializing a Pipe

https://github.com/python/cpython/blob/86b89916d1b0a26c1e77f...

multiprocessing Queue serializing data to send it using that Pipe

https://github.com/python/cpython/blob/86b89916d1b0a26c1e77f...

comment 8y ago · link · parent

Did you try doing full p2p? Just curious..

comment 8y ago · link · parent

Is it just me or the community is just filled with packages that have a single page, or nearly single page doc.

Please don't do this. Documentation isn't an rfc. It's meant to be a _content first_ WEBSITE!

- plain html with little styling. Use the standard documentation themes if possible ( like read the docs )

- lots of cross references. Each class/func should be referenced back to it's API. (Sphinx is really good for this)

comment 8y ago · link · parent

Wow, I nearly forgot about it.

Revisiting today, I see you've made a lot of progress. Keep up the good work!

Btw, Anvil uplink works with a non-public IP right?

comment 8y ago · link · parent

Right, that only concerns sending data at startup, which both Python (and zproc) already do.

I thought you were talking about sending data to child processes in constant* time, while it was running.

comment 8y ago · link · parent

Does "we have the answer" equal "solved"?

https://www.youtube.com/watch?v=yhGXJ9Jt3-A

comment 8y ago · link · parent

I'm serious.

The "let it fail" strategy is quite useful

comment 8y ago · link · parent

I don't think he meant it like that.

You could easily interpret that as -

Perfect _implies_ that it's easy to write and understand, but it's not the whole picture. It's just a feature that _he_ thinks is _crucial_ to it being perfect.

You get my point right?

Like sure, you could implemented a _perfect_, I don't know like gnome desktop in assembly language, but it wouldn't be easy to write and understand.

He thinks it's essential that it should be easy to read and write for it to be perfect.

Unfortunately, He's not with us now so can't even confirm :(

comment 8y ago · link · parent

Wait what?

How is catching bugs at runtime and dynamically typed language related?

In fact I've had (a lot) better experience debugging mpy apps than Arduino ones (that's the only low level embedded experience I have)

I mostly just let stuff fail, and have them restart gracefully (like the erlang guys)

comment 8y ago · link · parent

the esp8266 boards are like pretty cheap.

Won't argue about pyboard, because that's more of a gimmick. (Way too expensive for what it does)

I think the cost and time of developing on micropython vs a lower level language like C, would superseded the cost associated with wasted cpu cycles.

However, I agree with the fact that no real product would use mpy right now in production because of the infancy of the project.

It certainly looks promising.

It's definitely NOT a toy.

OTOH JS is just a bad choice for this kind of work IMO. ( I'm a firm believer that JS is just a bad choice for anything in general, but IOT is just madness)

comment 8y ago · link · parent

Is "Crays and weather prediction" really a part of everyday compute?

comment 8y ago · link · parent

Alright, thanks.

It's the internet, so have to make sure.

Most of my stuff is closed source as well.

Iot you say?

I made a couple of stuff myself, mostly using the micropython stack or the raspberry pi.

What do you generally work on?

comment 8y ago · link · parent

Updated readme to be a little better

https://github.com/pycampers/zproc

I use it in a couple of my own stuff which I have open sourced yet.

I do plan to release them, and I hope I can prove the usefulness of the library using those...

professional (corporate) stuff would be a far fetch for me, obviously.

comment 8y ago · link · parent

Well HN I'd say is a pretty good place to raise social awareness

comment 8y ago · link · parent

Update - I hopefully made the language a little better?

https://github.com/pycampers/zproc/blob/master/README.md

comment 8y ago · link · parent

Do you think using this over zmq in my thingy would really bring much improvement?

I use it everyday for some of my home baked apps, and would love if this really made a difference.

comment 8y ago · link · parent

'utterly perfect ' are not my words

http://zguide.zeromq.org/page:all#Multithreading-with-ZeroMQ

Thought linking it there would make it better, but I'll just remove it...

And you do make a good point. It doesn't really solve anything technically. But would you agree that it exposes a better API for doing much of the same stuff?

comment 8y ago · link · parent

Seems like you know quite a lot about this topic. Do you have any projects of your own that I can see?

Or do you only work for your employer or something?

comment 8y ago · link · parent

> That doesn't mean to say its "perfect" or "solves" multithreading, just that its easy to write and understand

Try saying that out loud?

comment 8y ago · link · parent

> C/C++

Got it!

comment 8y ago · link · parent

> I would suggest you don't make dramatic claims

If you could point out some stuff from ZProc's page, that would be nice!

> mpi is the grandfather of message passing libraries

Never heard of it before, but just a simple google search reveals that it _might_ be more performant than zmq, but not as fault-tolerant and flexible. It really looks like a niche thing, from this comment by peter hintjens

> Why smart cloud builders are betting everything on 0MQ. In detail, compare to the alternatives. Hand-rolling your own TCP stack is insane. Using any broker-based product won't scale. Buying licenses from IBM or TIBCO would eat up your capital. Supercomputing products like MPI aren't designed for this scale. There is literally no alternative.

(http://zeromq.org/docs:the-ten-minute-talk)

> Don't get me wrong, message-passing has some advantages, but they certainly aren't that it 'solves' parallelism.

Doesn't it? (For most people)

---

I can't believe I'm hearing words against zmq on HN, its wierd.

Even the guys over at Dask settled on ZMQ over anything - https://github.com/dask/distributed/issues/776

P.S. Seems like you know quite a lot about this topic. Do you have any projects of your own that I can see?

Bottom line, I think most people would be happy doing message passing parallelism in the real world. Sure, it doesn't look that good in theory but works damn good in practicality.

comment 8y ago · link · parent

> https://vorpus.org/blog/notes-on-structured-concurrency-or-g...

Was a damn good read, Thanks!

comment 8y ago · link · parent

> most likely a computationally intensive task to do

Eh, let me stop you there. Everything isn't about performance.

Hardware and UI based things really benefit from parallelism.

comment 8y ago · link · parent

Small correction: It makes the _implementation_ thread-safe.

It also simplifies a lot of CPython code, making it a lot easier to maintain.

comment 8y ago · link · parent

This talk (hopefully) conveys my point across

https://www.youtube.com/watch?v=9zinZmE3Ogk

comment 8y ago · link · parent

Wild Guess: You're not really a python programmer, are you?

Just curious...

comment 8y ago · link · parent

Performance doesn't equal Better software.

In fact, I think Performance centric development is a lesser known evil.

> have all your data before creating your processes/pool

Zproc exposes the required API for this (Nothing new, just the python API) :)

https://zproc.readthedocs.io/en/latest/api.html#zproc.Proces... (args and kwargs)

> a massive dataset

Wouldn't you be better off using a Database for that kind of work?

> Because of copy-on-write fork magic, many multiprocessing configurations (including the default) can "send" that data to child processes in constant

time

Any resources on how to implement that?

comment 8y ago · link · parent

Exactly.
1
101112
15