515 karma · joined Dec 27, 2017 (8y ago) · 421 submissions
comment 8y ago · link · parent
http://zguide.zeromq.org/page:all#Multithreading-with-ZeroMQ
Maybe I should've just linked it there,sorry!
Okay, I will take that course and get back, thanks for the suggestion.
P.S. You just implied Pieter Hintjens is naive. You have to live with that now :(
comment 8y ago · link · parent
I never claimed it to be performant!
"Above all, ZProc is written for safety and the ease of use."
(Read here - https://github.com/pycampers/zproc?files=1#faq)
> It's not a revolution
I totally agree. It's just a better way of doing things zmq already perfected. Like, tell me if you've ever seen a python object that has a `dict` API, but does message passing in the background.
> central (pubsub?) server.
Central server, yes. It uses PUB-SUB for state watching and REQ-REP for everything else.
> you've just "discovered" message-passing
Guess you're right? 2 years is a peanut on the time scale...
P.S. Thanks for all the feedback, I've been dying to hear something for a while now.
comment 8y ago · link · parent
The problem is that its _hard_ to get right.
For example - It's not trivial to use locks when you're working at an abstraction level higher than operating systems. Most people don't even realise there is a race in their application, because locks are inherently non-enforcing. Code written in locks is also really hard to read and reason by.
Message passing just makes it a little more trivial to avoid the pitfalls associated with parallel programming.
I also found that it lets you avoid busy waiting in certain places, which is always a performance advantage :)
Can you shed some light on those "idiot-proof thread-safe datastructures"?
comment 8y ago · link · parent
I thought a lot about this problem, for over 2 years, and came up with zproc
https://github.com/pycampers/zproc
Basically,
> It lets you do message passing parallelism without the effort of tedious wiring.
You'll be doing message passing without ever dealing with sockets!
Also, Shared memory parallelism is hard to get right irregardless of which language you use. I would recommend strongly against it, unless you're writing some really really really niche thing where message passing is a bottleneck (it isn't most of the time)
comment 8y ago · link · parent
Albeit it uses portaudio (python-soundevice) for the audio IO which is not written in python, and opus which isn't written in Python either. But all the glue and udp communication is pure python.
And P.S. - pulseaudio uses more CPU than my thingy.
Talking about production, I suspect the guys at OnBeep are making use of python a lot, just looking at their GitHub repo
(The python opus bindings are created by them)
I'm just tired of people underestimating the speed of python. Its often a matter of not using it correctly...
comment 8y ago · link · parent
I work on a parallel programming framework for python myself. Not geared towards performance, but the ease of use. http://zproc.readthedocs.io/en/latest/
comment 8y ago · link · parent
I have made some really dynamic stuff (like 100 domains running off a single server with each of their data separate, and to add a new domain is a click away) . I can't imagine doing that with other frameworks
> get_attr
What the fuck is that?
Also, you might be interested in webpy
> “Django lets you write web apps in Django. TurboGears lets you write web apps in TurboGears. Web.py lets you write web apps in Python.” — Adam Atlas
comment 8y ago · link · parent
* Developing plugins (to use native code functionality) is fairly easy. I recently created a PDF viewer plugin for Android without any prior knowledge of java, in 2 days.
* Dart has smaller ecosystem but dart is a real language with a batteries included std library. I don't think I need to state the superiority of dart as a language.
* Flutter's non native components make it easier for you to customize them
* Flutter doesn't have an obvious way to use native views in apps. You can launch native views but compositing native and flutter views is a bit weird right now.
* The ease of use in the development cycle is phenomenal. Nothing like I've ever seen in UI dev.
comment 8y ago · link · parent
Anyway, is there any reason as to why one would not use more mature languages like erlang and recently, dart? They also have the concept of isolates, that can't share memory.
Apart from the written in rust part which is really cool.
comment 8y ago · link · parent
You're looking for click
It's the best framework across any programming language that I have found for building command line user interfaces.
I instantly know how to use an application made using click because it prevents you from making non-obvious GMO interfaces.
Even as a developer, I love using it. I often create CLIs for common chores in my projects using click. The applications always come out perfect, with little to no effort.
I wish there was something like this for GUI.
This makes me want to make a GUI framework like click, where you don't deal with the bare components, but "compose" your UI by just providing data
comment 8y ago · link · parent
Knowledge, maybe. But when you put them in front of a computer, they can't write code. (Your mileage may vary though)
I'm in my 2nd year, and it's incredible how these teachers teach computer science without computers. The ironic thing is that they have projectors in classes. They even have laptops. Most of my peers have laptops, I think. And still they teach with a blackboard.
Just yesterday, my shell programming teacher wrote out the output of `ls -l` manually, by hand. She literally had it memorized. And said that we have to memorize it too, because of course, computer science is a written exam :)
I never expected to see this kind of response on HN. Some of these people don't know how to turn on a computer, and keyboard typing is a long stretch. You really don't know what you're dealing with here!
The admission process is fully exam based (physics/chem/math). I wasn't asked once, in the entire admission process whether I had ever used a computer in my life. Most parents don't let their kids use computers because they think it will spoil their childhood. I was fortunate enough to have good access to Internet and computers in my home. I admit that I spent a lot of time playing games, but I totally have a better understanding of how computers work. At least I'll be a cs major who actually knows how to code...