Hacker Newsnew | past | comments | ask | show | jobs | submit | eerimoq's commentslogin

The CPU usage sky rockets when showing the world SVG in my Chromium browser. Is there any trick to make the animated SVG be less CPU intensive?


Right, the animated SVG can be demanding for the browser. I will try to solve this in the upcoming days :)


Thanks!

I use a slightly modified version of your beautiful map on my website (https://mys-lang.org/statistics.html). No animations and the green circles are not quite aligned to the hexagons. Works well enough for my use case anyway.


This looks promising indeed. Thanks for sharing.


For me it's pretty simple. I love Python. I like speed. I like embedded. This is an attempt to take advantage of Python's type hints to create fast and hopefully small binaries that can be executed on embedded devices limited amount of resources (both CPU and RAM).

There are probably other languages that would serve the same purpose, but oh well, I can't resist creating another. =)


Have you look at mypyc?

https://github.com/python/mypy

Its a compiler that support subset of python and mypy's team including Guido work on it. It would be great if this kind of efforts have been done on more realistic project.


It compiles statically typed Python modules to CPython C extension modules. I do not know the details, but it sounds like that's a major difference to Mys.


Well, probably not. Nim is similar, but I prefer Mys' Python-like syntax. Mys' toolchain will probably be similar to Nim. That is, generating C/C++ code.

Sorry about the confusion. Mys is statically typed. I changed the HN post from strongly to statically to make it clear.


Nice job.

I don't understand the question. Can you rephrase it? =)


It might make sense to try to support the same subset of Python in both projects. On the other hand, this might make experimentation harder... And there seem to be many differences, for instance I am trying to move towards async/await... But there might also be areas that could be easy to get consistent, e.g. how local variables are declared...

p.s. And I wasn't aware of Cocopy either. Having a list of similarities and differences of all three might be useful...


I like the idea. If our languages are similar it could even make sense to stop developing one of them and focus on the other, but that's probably far fetched. I'll have a look at yours to get a better understanding of what it looks like and where it shines. Maybe we meet again =)


Do you have any objections against using google drive for an initial list of similarities / differences? I think the comment function could be useful....


Please do, but I won't promise I will contribute a lot, so don't be disappointed. =)


No, I am not aware of ChocoPy. Thanks for letting me know.

Shedskin uses the Python interpreter if I remember correctly. I aim not to.


It can make both standalone executables as well as extension modules that can be loaded into cpython2.7


Updated the GitHub repo and the HN post. Thanks.


It's a wide question, and I don't have a good answer. One obvious difference is the syntax. I prefer Python's syntax over Nim's, but at the same time I find Python slow sometimes and hard to use in embedded systems. I'm aiming to create something similar to Nim's toolchain to address that.


P.S. Since you’re using C++ shared pointers, you might want a cycle detection. But like Nim’s new ARC you can let the programmer beware and ensure their programs don’t produce cycles. It seems handy to allow pure RC’ing for embedded devices.


I'll keep this in mind.


Of course the language can help the programmer to write better code. High level constructs and easily available libraries that are well tested and widely used helps a lot. However, the biggest problem is not the language, it's that the programmer simply writes faulty code.


So you have two main solutions for this problem : have all programmers to never ever write faulty code, or design and use programming languages that are safer and less error prone.

One is impossible, while the other is already applied.


In my experience most bugs are due to misunderstanding requirements and simply writing faulty logic. Just a few bugs are related to the language itself.


In highr-level languages you can make a lot of faulty logic inexpressible in your code, which eliminates a ton of bugs.


That's pretty much what I wrote in the first post.


The goal is to not configure the MMC at all in Linux, but just rely on the bootloader has already configured it.

Btw, where can I find the spec? And where in the spec can I read about this? Is this true even if we know the MMC supports 52 MHz?


https://www.jedec.org/sites/default/files/docs/JESD84-B451.p...

You can use http://bugmenot.com/view/jedec.org to get free-to-use credentials.

The section in point is "A.6.1Bus initialization".

I'd say that if your MMC works fine going full-speed out of the gate and the IC on the board supports this speed, then you unlikely to encounter any issues.


Thank you very much. Very helpful answer. I'll continue to use 52 MHz until I encounter problems (if any).


Spec says initialization shall be done at 400KHz or less. You can Google for sd spec


Will fix it at some point =)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: