News for hackers. Stuff that matters.
Re:A 100x speedup with unsafe Python by bongodongobob on Monday May 06, 2024 @10:29PM (#40281715)
I don't use Python because of type safety, I use it because it's easy to write. I couldn't give a single fuck about some missed pointers that weren't cleaned up in the 2.5 seconds my program ran. I'm not deploying public code.

I tend to prototype in Python and then just rewrite the whole thing in C with classes if I need the 10000x speedup.

Re:A 100x speedup with unsafe Python by SunlitCat on Tuesday May 07, 2024 @12:16AM (#40282276)
That easy to write part is something, I am not so sure about. It took me ages to understand why my first try at writing a blender plugin didn't work.

It was because of white spaces not lining up. I was like, really? Using white spaces as a way to denote the body of a function? Really?

Re:A 100x speedup with unsafe Python by nottorp on Tuesday May 07, 2024 @04:26AM (#40283467)
I'm curious... what rock have you been living under in the past 33 years since python was launched?
Re:A 100x speedup with unsafe Python by SunlitCat on Tuesday May 07, 2024 @01:32PM (#40288854)
Let's see, I was living under the:

- Amiga E - Assembler (on Amiga) - perl - tcl/tk - javascript - vbscript - java - vba - c - c++ - python

rock. Granted at some of those rocks, I just took a quick peek (more like a glance), but a rock with whitespaces being important was, at that moment, new to me!

Re:A 100x speedup with unsafe Python by nottorp on Tuesday May 07, 2024 @01:45PM (#40289019)
Oh cmon, I can still write some z80 assembly from memory and remember the zx spectrum memory layout somewhat, but I check new programming languages now and then :)
Re:A 100x speedup with unsafe Python by SunlitCat on Tuesday May 07, 2024 @01:52PM (#40289152)
:)

I just meant that for someone coming from a language(s) where different kinds of delimiters are used to denote function bodies, a language that puts such a huge emphasis on whitespace was kinda throwing me off to get an error message slapped at me even though I was replicating the example letter by letter (although, obviously, I missed the importance of whitespace).

Re:A 100x speedup with unsafe Python by nottorp on Tuesday May 07, 2024 @02:00PM (#40289242)
It's all fuzzy, but I'm sure I knew about the importance of whitespace in python long before I actually tried python.

Even Raymond's article which was one of the first whined about it [1]. I definitely remember reading that one and thinking I have to check out that language later.

[1] https://www.linuxjournal.com/article/3882

Re:A 100x speedup with unsafe Python by SunlitCat on Tuesday May 07, 2024 @02:10PM (#40289384)
Thank you for the article. I have to put it on my "to read" pile! :)
Re:A 100x speedup with unsafe Python by nottorp on Wednesday May 08, 2024 @06:47AM (#40296473)
It's from 2000, python has grown up in the mean time and it has added complexity. Put a (small) grain of salt on Raymond's praise.