/dpt/ - daily programming thread

prev what are you working on Any Forums?

Attached: sicp.jpg (1280x720, 113.15K)

Alright Any Forums, I've decided on my modus operandi. I will write in Python, however, whenever I need something that performs very well, I will write it in C and use that API thingy to extend Python with my C code.
I will literally never need to learn an other language, holy poggers.

Attached: 647ef270-b11a-11ec-8adb-4f54bfc1e733.gif (498x498, 626.86K)

Good job.
The next level of enlightenment is realizing that modern interprters are godlike and dropping down to C is never necessary.

>numpy and many other "base" libraries are literally written in C and sepples
sir

>Python
>modern interprters are godlike
kek

>Also you should make sure that your buffer is properly terminated with a zero byte
Do you mean something like
if (i == buffer_length) buffer[i] = '\0';

why dothey say it takes 5 to 6 months to become a web dev but it takes 6-7 months to learn javascript (alone)

Doesn't web dev include javascript?

Is Python required by POSIX or at least LSB? Can I be sure it should be installed?

they're already written, are you planning on doing it again for fun or something?

Attached: 1620934022815.jpg (648x506, 63.41K)

kinda. The zero byte still has to be inside the buffer, so be careful that you don't write it just outside of it. You'll probably want to make your buffer one byte bigger so there's space for the zero.
You should also just do it after the loop, instead of checking inside it every iteration. If you adjusted your loop to go until i < buffer_length, you'd never hit that condition anyway.

No and no.
It's not installed in most machines by default.
Hello pajeet
Not only do you have any clue on how any of this works to the point you have no idea what it's called or what it does, you clearly haven't seen the absolutely appalling specific situation of python ffi's. At least try it before declaring these things (protip: as soon as you try it, you'll go back on your decision).

>modern interprters are godlike
only true for the JVM

My modus operandi:
>Need a quick script
Ruby, or if a library is required to do the leg work, Python (purely because of the ecosystem. not because of the language)
>Need to work with data or do a statistical test
R. I can't imagine doing data analysis in anything else. Numpy is horrendous for statistics. MATLAB is disgusting. Never tried Julia.
>Need to solve a puzzle or recreational problem
Haskell. Imperative languages are absolutely awful for writing these kinds of algorithms. Haskell is structured like mathematical notation somewhat so that helps.
>Need to do web
TypeScript. Unfortunately we're stuck with JavaScript, and TypeScript makes it bearable especially using Deno instead of Node.
>Need performance
Java. Let's be honest, these days Java performs virtually the same as C for 99.99% of use cases. You (You) are not writing matrix multiplication libraries or working with terabytes of data.
>Need to jerk myself
Lisp. I've only ever used Lisp as a mental masturbation tool.

That's the whole fucking point. You're still writing Python to use them.

Is it possible to learn coding when you're over 30?

yeah, but only boomer languages

>le me installing different versions of java because every single pajeetware here refuses to work with another version
Currently playing around with PATH so Oracle + OpenJDK x86 + x64 play nice with each other. Each one on some older update.

JVM is a jit compiler, not quite the same thing as when people say interpreters (even though JIT compilers perform interpretation at least in part most of the time). Luajit would be a better callout anyway.

I don't necessarily accept the numbers, but you can absolutely be a productive web frontend dev with only rudimentary knowledge of JS. Sure, you won't be the tech lead on Google Sheets, but you can absolutely write slick frontends.

It's all about proficiency levels, and if you only ever need to script the basics of opening a menu when you press a button, you don't need to know the performance implications of hidden classes.

I'm aiming for javascript and react native

I'm 36. I started when I was 15 using BASIC and C. I have tried to teach some older friends programming in way simpler languages (like Python) and it takes a long time to get basic concepts across. It's like learning a second language - much easier when you're younger. But yes it's still possible.

what do you think wizard powers are

I use containers or environment-management tools, so I never have to deal with any of those problems desu. But you're right, it's not ideal.

React Native is not a basic framework. I would say stick to JavaScript basics first, with some HTML/CSS so at least you can do something interesting like making your own website.

When is Haskell getting dependent types

here is where the money is

Attached: 1618574910386.png (720x549, 36.56K)

When is tactics supporting 9.2
"soon" (never)

That's a good workflow. My personal workflow is great too IMHO, but managing machines for dumb^Wother people is a whole different game, probably out of /dPt/ scope.

>money
>no COBOL
Did the boomers lie to me?

This is true for most langs, except Python, because CPython still doesn't have a JIT compiler.

real talk... when was the last time you actually needed low-level performance?

go on. explain what you were doing that a high level lang like python was too slow for

posting language benchmarks in /dpt/

i never understood the cobol meme

How does the IDE know where the errors are when Java is compiled?

There aren't any because you're a good programmer

It parses the filenames and line numbers out of the compiler output.

Weirdest response I've seen in a long time. Actually threw me off.

What is this graph data depicting? Their salary, how many people use it, or which language is most in demand? Is this 2020 graph accurate?

Attached: C-niles BTFO.jpg (1080x661, 103.81K)

based

4 days ago, when I was generating ~billion of samples from a custom probability distribution.
That being said, @numba.njit was fast enough.

>posting propaganda made by the python jew