/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: TSP.jpg (327x499, 25K)

Other urls found in this thread:

github.com/bakape/recache
pastebin.com/kRfNttm9
wiki.multimedia.cx/index.php/Interplay_MVE
nintendolife.com/news/2019/05/mature_visual_novel_yu-no_gets_western_switch_release_date_and_day_1_edition
twitter.com/NSFWRedditGif

why people use clojure when common lisp exists?

Attached: 1545159082294.png (669x652, 311K)

nth for Nim!

why do people use c++ommon lisp when scheme exists?

Because ur a faggito

but doctor, I am pagliacci

Why people use overheadful languages?

Attached: 1544776250542.png (669x652, 248K)

If you wanted to describe the time complexity of a function that found a specific piece on a chess board by scanning the entire board would you just say it's O(1) since there's an upper bound of 64 spaces?

why do people use react when it not faster than js ?

Yes.

Adding consumable component io.Reader trees to my recursive compressed cache library.

yes, you probably would, what would N be anyway?

if you output a std::vector with std::ostream to a file is there any padding or something like that done?
Im trying to read in such a file in java (with doublebuffer) and I get only bullshit values.

Attached: 1477587841385.jpg (600x534, 147K)

Just finished chapter 10 of Haskell from first principles, I'd post the relevant animu girl w/ book but I don't have the pic.

Otherwise doing neuromorphic computing and category theory.

i recently started working on a rudimentary (rt)os for my arduino mega that has been collecting dust for several years and has never seen any proper use
i enjoy the repetitive task of setting up unions and structs for register mapping
also enjoy reading functional descriptions of modules and implementing drivers for those
not sure how i'll do the os yet, still working on getting the board to start properly and stuff, but i expect i'll do some basic online scheduling, probably rate-monotonic, and priority ceiling for semaphores
apart from that im not sure what i'll do with it
i basically do this at work, but i think its a good addition to my non-existing portfolio if ever i would like to work somewhere else

Attached: 1532810191816.jpg (206x226, 20K)

>recursive compressed cache library
explain please

have you got to the haskell bit yet? heard the lc bit is really big

how exactly are you outputting it? how are you reading it?

github.com/bakape/recache
Explained in the readme.

concurrency and java ecosystem.

Webdevs do not care about performance

By page count there are some smaller chapters, but none of them seem too large, which part do you mean exactly?

Hey, user! My interview went smoothly, but only because you helped me with JavaScript! Thank you!

Attached: 3bb7f01e9e13531b46e3efbc2f774e89.jpg (1200x1800, 279K)

build a SPA with vanilla JS is fucking waste of time

the parts on lambda calculus

>SPA
Who even wants this? Just open new tabs in the browser

>let user reloading everything

>java ecosystem
that is a not an upside

Browser already handles caching you fucking idiot

That's the first chapter, and its not even 20 pages. The explanations are really simple and they reference more thorough material if you are interested. But it's a good book, I reccommend going through it :^)

No problem, cutie

>not free

Attached: stallman.jpg (460x276, 10K)

>java ecosystem
>mfw java ecosystem

Attached: 1558565605085.gif (849x458, 150K)

I still don't understand

Attached: 1529533547581.png (352x345, 100K)

There's tons of places where it is free, like *cough* library genesis *cough*

why would you use javascript for desktop programming?

already know h*skell though tbhdesu

What specifically?

You’re the greatest project you’ll ever work on

>///

I don't understand how it's recursive

Attached: 1530688372389.jpg (1280x720, 78K)

React makes it easier, by taking care of figuring out which parts of page rerender. So you specify the render tree and render functions, and they react does figuring out which parts of the render tree need a refresh. This is of course overhead compared to doing things like that by hand, but if you write things in pure js yourself, you'll either have to provide your own "figure out what changed and manipulate DOM" logic which can be complex and a lot of work and error prone code or you have to rerender everything on every change which will be slower than react.

Can someone tell me why the fuck

for (int i = hashedKey; i < hashtable.Length; i++)
{
if (hashtable[i] != null && hashtable[i].name == key) return hashtable[i];
}

for (int i = 0; i < stopIndex; i++)
{
if (hashtable[i] != null && hashtable[i].name == key) return hashtable[i];

}


works but


for (int i = hashedKey; i < hashtable.Length; i++)
{
if (hashtable[i].name == key) return hashtable[i];
}

for (int i = 0; i < stopIndex; i++)
{
if (hashtable[i].name == key) return hashtable[i];

}

Doesn't and it throws an Object reference not set to an instance of an object when going throught the loop? Its the same shit, if hashtable[i].name IS THE SAME as key then that automatically means that its not null so why od i have to say !=null? I dont fucking get it

Attached: 1543570837891.jpg (749x710, 62K)

If the board size is constant then yes, proof:
The number of check needed is bounded by n*n, where n is the size of the board. Since n*n is a constant, finding a specific piece is O(1).

I'm still gonna rape you, you kissass

So far it's been a failure and I'm about to scrap it.

Notice that you're checking hashtable[i].name AFTER you check if hashtable[i] is null in the first one. If hashtable[i] is null and you don't check for that, you're then trying to access hashtable[i].name which is (null).name, which is an attempted null dereference to get a property

>more than 1100 members in a single class room
imagine the smell

Oh, so everytime i check for something that can be null do i have to add the != null && in the front? Thanks

getting "name" from hashtable[i] is when it throws an exception
&& means that if (hashtable[i] != null) returns false it doesn't bother checking if hashtable[i].name == key

That's one way to do it, yes.

>write a big pull request at work for a date driven project
>the team that manages the code goes bonkers and wants the code to be in any system but theirs
>queue all day architecture discussion because everyone can say "no" at this company but no one can say "yes"
fucking kill me

Next time don't name the commits after your favourite child actresses

A cache entry can contain references to other cache entries, that can be retrieved from the cache.

>date driven project
What does it do?

I've been working through Clojure for Brave and True book. It's pretty nice and comfy definitely would recommend.

Attached: dobrogo utrechka.jpg (750x750, 98K)

solves world hunger

Conjuring up a memory model that not only models relaxed memory consistency but also Spectre vulnerabilities.

for a day maybe

start looking for another job

Can you guys imagine a world where every single piece of software is written in C++?

Attached: 1541870685671.png (678x690, 388K)

Imagine all those segfaults and unreasonably long development times for what should be simple scripts

ruby!

Attached: 1543968789697.png (1200x1800, 1.3M)

I'd fuck a C or C++. Clearly best girls.

How to use this script?
pastebin.com/kRfNttm9

Attached: 1558533256998.png (4096x288, 1.05M)

shit.py fuck.mvl

kill yourself

also you might have to install pip and run
pip install Pillow

pip install Pillow
pip Pillow smother-myself-to-death

based java milf

>Visual Basic
>cute
should be ugly and promiscous because brainlets flock to it

perl a cutest, maybe i should learn her language

i like C++ but software should almost never be written in memory-unsafe langs except when it's really necessary for performance reasons
remember that 90% of humans are idiots and the same proportion applies to programmers
nothing will ever be error-free, and C++ allows you to live bigger and more damaging errors in your software much more easily

[ocde]pip install gothgfmilkers
pip gothgfmilkers smother-myself-to-death[/code]

alt+c in the reply window

pip install milkers
pip smother-myself-to-death

nice

Even better, C++23.

>all those segfaults
He said C++ not C.

just because C++ has the OPTION to use safer stuff with RAII and non-nullable references doesnt mean it takes away all the footguns for programmers to shoot themselves with

>139cm
>31kg
Imagine
you can do hashtable[i]?.name instead

As a function of the board size, I'd say the upper bound is O(n^2) for square boards with side length n and O(mn) for rectangular boards.

she's 13 you sick fuck

>Update to GCC 9
>Size of my program decreases by 33%
Woah

compile with -O flags

Even better

I am.
-O2 -flto
gcc 8.3 results in a 303kb executable
gcc 9.1 results in a 191kb executable
They really did improve their inliner huh

Good
Cunt
Connoisseur

Attached: 1545670712828.jpg (571x800, 58K)

is ruby python except with {} instead of whitespace?

i feel for you

she's cute but kind of useless

open up a terminal and run
python script.py file.mvl
you need the .mvl file in the same directory as script. btw where can i get the mvl file. i'm curious.

is it some proprietary game shit? wiki.multimedia.cx/index.php/Interplay_MVE

probably from a game called YUNO for the Switch

yeah, that user is cheeky bastard
nintendolife.com/news/2019/05/mature_visual_novel_yu-no_gets_western_switch_release_date_and_day_1_edition

kind of.

without any stretching, does Neural Machine Translation fall into the AI category?

If I pass a struct by value,in C, will it copy the bytes and hence changing the copy won't change the original?

Tried to implement a fog of war system
Works surprisingly well though still unfinished
Every tile is only checked once, to see if the tile tending towards the player is hidden, going out from the middle in increasing squares

Attached: rogue 23_5_3.webm (1262x748, 1.26M)