/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?


Previous thread:

Other urls found in this thread:

en.wikipedia.org/wiki/Engineering_tolerance
robovm.com/robovm-winding-down/
arewewebyet.org/
docs.oracle.com/javase/tutorial/
twitter.com/SFWRedditImages

First for Go sucks.

Is it worse than Rust?

Nth for Haskell

>What are you working on, Sup Forums?
Fun CRUD project for data storage.

I thought CRUD was supposed to be lame, but I'm enjoying it so far.

Have you thought about adding a Pi option?
You just have to store the index of when your data occurs (and the size)

Why do people keep parroting SICP? I'm 10 mins into the mit lectures and this shit hits. This is literally insane.

>SICP
It's a meme.

No one sane actually uses this to learn.

>limitations of our own minds

And algorithmic complexity

Yeah, what is wrong with that?

REAL THREAD:

>posted before bump limit
Yeah, nah

I keep re-reading and can't believe someone is saying this. It's like this shit gave me PTSD.
>It's the king of engineering where you ignore the constraints that are imposed by reality.

>Have you thought about adding a Pi option?
I'm not sure what you mean by this.

Maybe I misconveyed what I'm actually building. I'm not doing data storage so much as "Take this data and store it over here in a specific format." except it's hundreds of GB at a time.

He means tolerance as in en.wikipedia.org/wiki/Engineering_tolerance

which is a central concept in many engineering disciplines. What's wrong with it?

delusional C# shart in marts think this can't happen to them

robovm.com/robovm-winding-down/

xamarin is a fucking pointless bloated layer on top of the java android api

>when you realize you're doing something completely insane and you cut runtime in half with the fix

Well, shit.

At least I caught it, right?

I was joking, Pi is a transcendental number so you could "store" whatever data in it (only the index would be as big as or bigger than the data you're storing)

e.g.

3.1415

i want to store "14"
so I store 1:2d
i want to store "141"
so I store
1:3d

3.1415...................x:32857238957235778932579235
32857238957235778932579235
x:26ish-d

Programming is not magic. Your shit doesn't float in a magical ether fueled by CS grad dreams.

How many threads are you going to say this in?
Why do you like saying "magical aether" so much?

Oh yeah.

Didn't they use that for a TV show or something? The whole idea that all data eventually exists in Pi (that we know of).

the code runs exactly how it is written. there is no "tolerance" to worry about.

That was someone else

I didn't highlight tolerance. That was just the browser search. I've heard that "magical abstractions" bullshit in the video, couldn't believe what I was hearing and looked it up in the transcript by "tolerance".

There is undefined behavior, which is (surprise) not defined. Therefore making heisenbugs possible etc.

>That was someone else
So what, you need to pass the baton?

No, I just liked how the original guy put it and it stuck in the back of my mind. Also didn't hear it from here.

if your code has UB you're doing it wrong

my master's degree

kill me now

Do you use C?
If so, you are programming in a magical aether that does not exist at the hardware level

>my master's degree
In what?

Did you have work experience or straight out of undergrad?

I never disputed that, just wanting to add it's existence for the sake of being exact.

That's the case for all languages. Even C.

>In what?
Gender Studies and Black History

>Did you have work experience or straight out of undergrad?
No

>What are you working on, Sup Forums?
Started implementing parts of the C standard library for my kernel.

>C standard library
Why?

>This is the first post from this IP in this thread.

Come on, user. We can see that shit.

>Undefined behavior

I prefer to call it "dynamic features".

I'm gonna be doing an android application. Is react native a meme or should I stay with vanilla android development?

You can build web apps with it. Not so much with Rust arewewebyet.org/

stay with vanilla android development

especially avoid anything called 'react', 'agile', 'angular', 'node' or whatever the shit

use xamarin

I use Xamarin, but I would certainly not recommend it to someone that doesn't already know C#.

I do know C#, is it much different from working vanilla android development?

They are very different, and unfortunately, both are quite painful.

That being said, Xamarin can be pretty comfy, especially if you're doing a multiplatform app (write once, deploy to iOS, Android, and WinPhone).

Personally, I'm extremely comfortable with Visual Studio, so that makes the development that much more accessible to me.

Rate my UTF-8 converter!
char hex_value(char c)
{
c -= (c >= 'a' && c = '0' && c = 'A' && c 初音ミク */
unsigned i, j;
for (i = 0; str[i]; i++)
{
if (str[i] == '%')
{
for (j = 1; j

It's shit

>blankposting

> >=,

let's write our own universal IDE that would support all meme languages and all the error codes are Sup Forums insults.
>parameter missing, faggot
>no value set, manlet
>invalid syntax, kys

>the code runs exactly how it is written
the C standard (and by implication everything built on C) doesn't require a particular implementation of e.g. floating point numbers, which means e.g. numerical stability is permitted to vary cross targets

>if your code has UB you're doing it wrong
i'm skeptical that there exists any significant C project without UB

Or instead of wasting time, we only make it for relevant languages, i.e C/++. And give people the option to extend it with their gimmick languages.

libstdc usually ships with the kernel because it needs to work with system calls

> >kys

I thought you said Sup Forums insults

I think you can already do this in Visual Studio.

undefined behaviour

What would happen if stack overflow suddenly vanished?

because Abelson's "computer science is not as science" shtick depends on the rejection of computing as a phenomenon that occurs in reality

if computing is a real phenomenon then it can be measured empirically, and in fact people do this every time they run a benchmark, which are radically more accurate than the spherical chickens in a vacuum turned out by complexity theorists

the point was to distribute it to losers who think they are coders. fresh graduate, pajeets, etc
but we praise in blogs and reviews. oh it's my fav thing.

/dpt/ gets gayer

We get 100 SO clones

>coders
Fuck off "coder"

Where?

This sounds genuinely lame.
Please refrain from posting again.

boost C++ would lose all its users

SICP is masturbatory wank imo, it really is a meme

...

what should i read if i want to jump from C# to java?

also any prolog fags here? im curious as to whether anyone uses it for anything other than AI

kek - even the mods do something right once in a while

"java for dummies" by barry burd or "head first java"

friendly reminder that the people who unironically hate java are fantastically incompentent and like to delude themselves into thinking similar/worse languages like C# are somehow infinitely better

D kicks both their ass

This triggers the pajeet.

Is there a reason why C bitfields are almost completely ignored in favor of bitwise masks?

>C bitfields
you mean uint32_t?

That's the way of the Pajeet.

This puts the poo in the loo.

>confusing terms

This designates the shitting street.

will that get me up and running faster than any other book?

its rather easy to hate java when youve only got limited experience of how terrible programming languages can be

This makes the son's stomach hurt.

This throws a poo party at the loo.

docs.oracle.com/javase/tutorial/

you can run through this really fast

Another one would be created.

Why do you ask?

So I wanted to make simple multiplayer card game (inspired by Duelyst and Magic Duels), but I'd like to avoid using external server. Is there any possibility to connect two players over the Internet behind routers? I heard about UDP hole punching but it uses external server anyway.

>Is there any possibility to connect two players over the Internet behind routers?
Tor. Make each user publish a hidden service.
This gets you built-in encryption automatically.
Look at Ricochet, a chat program that works like that.

One player acts as the server and everyone else is a client.
For games where latency isn't a problem, like fucking card games, it's perfectly fine.

...

>One player acts as the server and everyone else is a client.
No shit.
The problem is reaching the socket behind the NAT.

Wouldn't that be extremly slow as for video game?

Don't.
If you make all your 'duels' server-side it's probably the only type of game you can make hacker-/cheater-proof.

im looking for detailed info on the language, best practices with it, and its best tools. not beginner tutorials are not what im looking for.

link?

>double negative
fug

I feel like you shouldn't have to code defensively against improperly configured network connections.

Let them figure it out.

>Wouldn't that be extremly slow as for video game?
You can expect a latency of under a second. Enough for turn based games.
The plus side is that Tor can work through almost any firewall.

P.S. Just try the Ricochet chat program on 2 computers. You could even use its code.
Another advantage of Tor hidden services: built-in authentication between the users.
Try Ricochet and you will see.

You don't know what he'll is, /dpt/. I thought I liked programming. That was before I entered this shit fuck of a project. Now my biggest concerns are micromanaging bosses, shifting requirements, siloed teams and terrible communication. I'll be lucky if I don't kill myself before this project launches.

Don't get into professional programing, /dpt/. Just trust me on this.

>don't work for shitty companies

thank you captain obvious

Oh, I know. I'm currently NEET because I couldn't take it anymore.

OMGosh why is android studio sofa king slooooooooooooooooooooooooooooooooooooooooooooooooooooooooow?
fucking makes even notepad unresponsive
plz help. i think it's some gradle shit idk

use ndk/native activity with c++

look for mike acton cppcon

visual studio + c++ + opengl + ndk

>visual studio + c++ + opengl + ndk
huh?

>tfw I'm really interested in type/category theory as it applies to writing efficient code
For instance, a type system powerful enough where you can easily write code that automatically transposes your data from AoS to SoA.