Show newer

@a1batross

Agreed. The thing about prototying is, while python is fine at doing that, it also means if it isnt suited to the full system you are prototying to demonstrate (as in it isnt suited to a more complex application) then your prototype is essentially a throw-away prototype.

In that sense I'd argue it isnt really well suited to prototying at all as one would hope that when you go past the prototype stage you would not need to start completely from scratch. So as a prototype it has less value than a prototype written in another language.

@cy @ccc

@cy

I am using high-level here to include certain ideas such as:

* platform independence

* minimal resource management (memory management)

* implied performance improvements (memory slating, cacheing of certain operations that are repeated, etc)

* automatic handling of by-reference and by-value in a safe way obscured from the coder

and many more other things. while you can wrangle C into doing any of those things, as well as many of the things I didnt mention, it is not intrinsic to the language.

@ccc

@cy

Yes I use the optional typing in python... but it really doesnt solve the problem unless everyone uses it everywhere. Since its optional it tends to not really work out.

@timorl

@cy

While I do agree with your sentiments on python I also wouldnt go so far as writing everything in C. C is not well suited for many things and certainly isnt a good drop in for high level scripted languages. But otherwise your point by point on python seems accurate to me.

@ccc

@trinsec Fair enough. Perhaps I should have been a little less specific with my wording. Though your answer is certainly a unique perspective on this question and a surprising answer honestly. I'd suspect a good portion of people with hearing wouldn't recognize it, so to know it without being able to hear is even more surprising as you'd have less exposure to it I'd imagine. Like if it was in a movie it likely would describe it in that level of detail in the subtitles.

By the way sidenote I often watch shows with subtitles as it isnt always clear what the dialogue says in some places. What I've noticed is the subtitles are generally not very well thought out. they tend to give away details that you wouldnt know from watching it with sound and no subtitles to the point that it can ruin elements of suspense. I often take mental note as to how that is inconsiderate of the deaf when it comes to portraying the artistic intent of a movie, its basically a spoiler for events that are about to happen.

For example I notice a lot of times the captions will give the name of the person speaking if they arent on camera. But often time the movie does it in a way where you arent really suppose to pick up on whose voice yoru hearing, as that is revealed later through context, but the captions ruin that reveal.

How many of you would recognize SOS in morse code if you heard it?

@2ck Yea, normally I can get pretty close to optimal before i actually do performance profiling. But with python I was way off, things that normally would have virtually no cost to it seemed to be quite expensive for me. In the end I relied on the profiler more than an algorithmic understanding to fix it, which I dont like to do but I kinda had to in this case. In the end it worked though, its now fast enough that I can backtest a year worth of day trading in just a few minutes.

Your description of what you find yourself doing when you optimized seemed to match my own expiernce. which makes sense since in python an attribute/property may actually be a method so it really doesnt tell you much about if reading it is atomic or not. But the collections were also a damn mess and really hard to tell what algo backed the various collections I was using since they mostly came from third-party libs. a good example of this being numpy series which seemed to be any of several collection types backing it and the constructor was rather convoluted.

@ccc yea being good for "I slapped this together real fast" means it gets more exposure even if someone may not use it as their primary language, it willb e disproportionately represented.

I have no shortage of complaints about python, in fact I dont code in it too often, just when getting contributors is a top prioority or when its geared towards developers and a lot of adoption means more $$$. In general its actually one of the last languages I will use. So I dont need many reasons to dislike it, the whole python2 nonsense is a **huge** one, I also dont like that it is strict on whitespaces, the lack of true privacy/protected elements, and the other points we discussed.

If i dont get about the size of the user base but I need something that has the advantages of python with fewer of the annoyances I go with Ruby actually. Even then Ruby isnt my top choice of a language for enjoyment or for serious projects.

@timorl I would imagine you dont like any dynamically typed languages then or at the very least weakly typed languages... I can stand dynamic typing but only if its strongly typed... weak and dynamically typed I have the same complaint you do, its hard to know what and if a variable can do what you want. I mean sure yo ucan test for the methods and arguments, and in python you can even check what type an instance is technically, but its very convoluted.

Generally the advice in python is to just assume the type passed in is the type expected and let the exceptions do the rest. But while that works to a point it makes debugging a PITA.

advance?
journals.aps.org/prxquantum/ab

Abstract

Quantum teleportation is essential for many quantum information technologies, including long-distance quantum networks. Using fiber-coupled devices, including state-of-the-art low-noise superconducting nanowire single-photon detectors and off-the-shelf optics, we achieve conditional quantum teleportation of time-bin qubits at the telecommunication wavelength of 1536.5 nm. We measure teleportation fidelities of ≥90% that are consistent with an analytical model of our system, which includes realistic imperfections. To demonstrate the compatibility of our setup with deployed quantum networks, we teleport qubits over 22 km of single-mode fiber while transmitting qubits over an additional 22 km of fiber. Our systems, which are compatible with emerging solid-state quantum devices, provide a realistic foundation for a high-fidelity quantum Internet with practical devices.

Well improving the performance of my algo has been a success. My benchmark used to run in 16.7 minutes, and now it runs in 1.75 minutes. This is single threaded for both so havent even touched multithreading improvements which should be doable as well.

For machine learning analysis of sound, I've found nothing that beats a spectrogram.
While making this post, I wondered, can you make audio from a spectrogram? The answer is, apparently you can. stackoverflow.com/questions/57

@lhackworth Of course you can make audio from a spectrogram, just do a reverse FFT on it and your back in the time domain and have your audio signal :)

Now whats really cool is that you can **manipulate** a spectrogram and meaningfully manipulate audio...

1) convert audio to a spectrogram (FFT used to make it into frequency domain representation essentially).

2) manipulate as you wish, for example if you want to remove a high pitched squeal that happens to ruin the audio just 0 out or otherwise visually remove the squeak from the spectrogram. In its simplest form this would look like just blacking out/0'ing the horizontal line where it shows up.

3) convert the modified spectrogram back into audio (do a reverse FFT).

You will now have audio that should be relatively the same as you started but without the squeel removed.

@ccc I generally opt to use python for the same reason i think many others do, and ultimately why it gets overused.... its popular.

I have a motivation to use the most popular language (of which python is it) because that means a larger audience and more chance of both consumers, clients, and contributors.

The worst part about it is the more it is used where it isnt suited the more pressure there is to use it even when it isnt suited.

@ashwinvis

Yes, as I said in the thread I do beleive pythonc an be written in a performant way. In fact, you can say that about almost any reasonably mature language...

The point here is not if it is capable of being made performant, but rather if it lends itself easily to writing python code that is performant... I's say that it makes writing performant code particularly more complicated than in other languages, even high level languages, even though it can, with enough time and effort, do so.

@ccc

Show older
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.