Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Cute!
C# über alles
This JavaScript things looks very nice! Can you show me some more?
>
Anyone?
Show me your cunny first.
>
>forced OOP
>superior
meguca.org
ocaml
The S programming language to kill Rust
Haskell for supercomputing
Retardedly wasteful.
god i wish that were me
Is that what it takes for Haskell to compete with C++ on low end hardware?
Ich stimme dir oder jedem anderen zu Der mehr von OPs bildern posted
English:Post more pics like OPs and we can start taqlking
...
anime ist eigene scheisse
Zeig mir 3D Frauen die erwachsen sind aber den Körper einer 14 jährigen haben die aus dem Himmel hinabsteigt.
Am besten steigt sie so ausm Himmel hinab das ihre 14 jährigen unverbrauchten göttlichen Füße direkt in meinem Mund landen.
anime website
3D fuss > 2D fuss
C# thread
Dumb nazis
>g*rman
la luz extinguido...
What do I have to do in order to look like the guy on the right? I like his look (besides the stroke he's having).
Did people make fun of the degenerate lower station of jesters the same way we scoff at these clowns for debasing themselves?
Be jewish
u want to be a neck beard onions faggot?
multi-paradigm language you nigger.
I'm writing a machine learning library in Haskell utilising dependent types.. and right now I'm ripping my hair out trying to understand why compiling with -O2 makes some floating number calculations all messed up
You can't opt out of OOP though.
drink onions twice a day
This might be a long shot, but have you compiled it with "-O2 -fexcess-precision"?
In python I have a global (shudder) variable that I need to set at startup and access from other files in the project. Stackoverflow stackoverflow.com
t1.py
def myFunc():
print("inside myFunc")
global hello
hello = "helloworld"
t2.py
import t1
t1.myFunc()
print(hello)
But it says that hello is undefined. I could, to make it work, just place hello in the global scope and then assign it in the function, but that would make hello run each time I import the file, which is not helpful. I actually had a way to fix this, which is to set something like
hello = myFunc()
and have myFunc return hello if hello is already set, or do some calculations otherwise. The problem with this is that the function is ran whenever the file is exported, instead of when I want it to run.
Any suggestions on how to do this? Or any other solutions for my problem?
Again: The problem is that I need to do a check on program startup (it's just a distance measurement which sets a multiplier), and then use that multiplier in other parts of my program. I don't want to have to pass it around in functions because I would have to refactor the entire codebase, and it would just make a mess out of things since pretty much every function would have it.
print(t1.hello)
oh my god I'm so FUCKING stupid
What static analysis tools do you use and for what languages?
it's retarded tho
Sounds like python.
I only did this in python because I needed pyautogui and couldn't find a similar library for any other language, but I really am not enjoying this.
none because i dont make mistakes
My brain does sophisticated borrow-checking and type-checking automatically.
does this mean if more programmers had brains we wouldn't need to use rust and haskell anymore?
Correct. Types are crutches for bad programmers and brainlets, just like variable names and documentation.
Rust and Haskell are limited by what the language designers feel is suitable for the average retard's brain-power. So yes.
If more programmers had brains then we would rule the world.
*social skills
I second this.
This is why all of the smartest programmers use C. They don't need some compiler to baby them.
All of the dumbasses complain that "C is unsafe", but the reality of it that they are just too stupid to use it properly.
>This is why all of the smartest programmers use C++
No, only the most retarded of programmers use C++.
>This is why all of the smartest programmers use C
Forth*
The smarter programmers use C++ to speed up their development time with the same or better performance.
The smartest programmers don't program
>there are actual Cniles that unironically have this opinion
>They don't need some compiler to baby them.
Yeah, the C standard doesn't baby the programmer at all.
Who decided on the multipart/form-data encoding?
It's fucking retarded.
Everything about HTTP is just fucking retarded.
probably someone smarter than you
Anybody try making their own primitive OS ? Should I buy a raspi so i can run it on real hardware ? Or is it just as satisfying running on a VM ?
>grug no understand thing
>thing must be stupid because grug is not stupid
Ask stack overflow
lmoa rek
How did you know my name was Grug?
If you do
from t1 import *
Instead of just
import t1
Maybe print(hello) will work
yeah, I've tried that already, and every other optimization flag vaguely related to numeric computing. I found some GHC ticket which mentions problems relating to -O2 when it comes to realToFrac, but I'm not using that anywhere. possibly the underlying array library..
Trying to figure out how to write a hello world program on an old-ass borland compiler
What size are your floating point numbers? Are you using -ffloat-store?
Accidentally posted in other thread
gitlab.com/ryukoposting
(Some of my repos are private so it might look different for you)
this
I read through the OCaml runtime and the GHC runtime in order to build my runtime :) I'm now almost to 20,000 lines of C in my sexy managed system
Try rewriting it in JavaScript. JavaScript numbers work pretty well.
>ryuko
based
>Who decided on the multipart/form-data encoding?
The same people that invented SMTP and early 2000s banking protocols. You only understand how shit they are because there are examples of better protocols now.
too fat
faggot
Making a silly neofetch-like thing for my operating system. I should have gone to sleep but instead I am doing this. :)
Earlier today I added window maximization which turned out pretty good.
i made a small program that replaces one or multiple bytes in a number.
you give it starting point,replacement bytes and it will generate the new number.
pic related
I fucking love Endro.
cute
Can someone help a brainlet with gdb? How do I watch all the value changes of a variable in a random source file in the program. I feel like watch path/to/file.c::var_name should work but I just keep getting the "no symbol in current context" message.
It's not about babying yourself it is about babying other people so they don't make your life a living hell.
I work in open-source software, so that is far less of an issue. If your code isn't up to the usually harsh standards of the maintainers, it's just not going to get merged.
Okay well types are also just cleaner and they look sexier.
I have yet to see a language with sane syntax for types.
I have. It is Haskell, the most perfect language of all time there is no reason to code in any other language anymore. Eventually programming will just be synonymous with Haskell we will call it Haskelling.
I don't speak Nazi but if you said 3D Feet > 2D Feet you must be a raging gay homosexual with a huge black ape cock inside your anus.
There is literally nothing better in this universe than cute young 2D feet apart from maybe Heroin mixed with Cocaine
It's definitely not Kotlin
import kotlin.experimental.shr
import kotlin.experimental.and
var i : Int?
object : HandlerThread() {
companion object {
const val foo : String = "bar"
}
override fun run()
{
if (i != null and i!! < 100) {
i!! shr 8
} else {
i = 1
}
var baz : String? = foo
Log.d("Info", baz)
}
}
I don't see what is wrong with c
int i = 0;
Reads, "My integer named `i`, is equal to 0"
yes
haskell and nim
1. int i = 0;
"Integer `i` is equal to 0"
2. i: int = 0;
"variable `i` of type `integer` is equal to 0"
Personally i prefer the second way since i can find variable name first and then determine type from that (also it looks more formal and mathy). The other way i have to look for type first and then determine variable name. They both compile to the same thing anyways though so its not like it makes much of a difference.
void* myFunc()
{
return something();
}
...
int i = myFunc();
Now that is freedom
Rate my implementation of the game of Nim
#include
int
main()
{
int total = 12;
int ptake, btake;
while (true)
{
printf("P: ");
scanf(" %d", &ptake);
total -= ptake;
if (total
It takes you longer to type 2 and thus it is less intuitive. I wonder if you come from a spanish speaking background or speak some other language that puts the noun before the adjectives if that makes type 2 more preferable.
I prefer the latter too, because you actually get to declare functions with the word function, instead of just a tiny parenthesis after the name of a variable.
>switch (ptake) { ... }
Gross
>1: -= 3
>2: -= 2
>3: -= 1
why would you do this
C really is the JavaScript of systems development.
Jesus christ user, work on your coding style.
I seriously hope you weren't mixing tabs and spaces for indentation.
Every language that uses the second syntax I know (Rust, Typescript, Kotlin, Swift, Go) has type inference, so, not really.
int i = 0;
var i = 0 //4 bytes integer by default
A compiler would warn for that, idiot.
Assigning a pointer to an integer (without an explicit cast) is an error.
>tfw your language allows you to get work done and assumes you are competent and aware of consequences of your coding decision.