/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: 9781852337940.jpg (280x400, 19K)

Other urls found in this thread:

github.com/SamyPesse/devos
i.4cdn.org/wsg/1563464611054.webm
wikihow.com/Make-Anime-Cosplay
danbooru.donmai.us/posts?utf8=✓&tags=hatsune_miku&ms=1
kskedlaya.org/putnam-archive/2018.pdf
hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Util-EZConfig.html#v:removeKeysP
youtu.be/z2aq21lMw40
jetbrains.com/research/devecosystem-2018/c/
twitter.com/SFWRedditVideos

I get stuck putting it all together. I know all the concepts, and how they work, but I have trouble putting them together to form the program.

Get to a tangible issue and post a question here. Or in a relevant language IRC channel.

nth for someone make a hobby OS in C so i can procrastinate by making dumb games for it

github.com/SamyPesse/devos
go nuts

>* Code in C++
ONE JOB

My bad b, github said it was C.
Minix 3 is practically a hobby OS, but like for students.
Get the Minix 3 book and the publication version source code and go nuts

why would you use mysql when postgresql exists?

Attached: 1556783830663.jpg (1464x2048, 181K)

don't be a fucking pussy, just put things together.
If it turns out to be bad you rewrite it and never do it that way again.

Why not just a flatfile?

why use computers? notepad and pencil is all you need

why would you fuck 3dpd pussy when anime feet exist

I wouldn't

Attached: 1558373451214.jpg (1200x888, 201K)

I'm making a few plugins for Minecraft using the Spigot API

new programming language.
cureently enough AST nodes are implemented to solve Project Euler problem #1.

Attached: gfJ5kHk.png (1920x1037, 206K)

Anything is better than a flatfile for compression and ease of use. Even the use of sqlite is surprisingly very good for many applications. People tend to immediately jump straight to server-based databases but you'd be amazed at what sqlite can handle with wal enabled. Even with multiple writers if you ave indexes setup right and you're not into the billions of rows transactions are still pretty fast.

that gui looks like godot

your integer types come with intervals attached?

I've watched a talk on someone detailing security issues in npm/nodejs. What was covered basically boils down to that the culture of having all these deep dependencies with automatic updating. But I'm just wondering how beneficial frequent updates are.

So among you how often do you update a library you use and do you feel like you see benefit from this?
Please mention what language you use as well and stay away from biasing your answer towards rarely because of the contrast to npm/node within this post.

from last thread:
>Given a list of integers, return the 2nd biggest number on that list

I think I've seen this listed as an interview question. Is this a good solution assuming list is at least 2 long?

If list[0] < list[1]
stack.push(list[0])
stack.push(list[1])
else
stack.push(list[1])
stack.push(list[0])

for i = 2; i < Len(list); i++
if list[i] > stack.peek()
stack.push(list[i])

stack.pop() \\biggest element
return stack.pop() \\second biggest element

It's more secure to have fully updated libraries then be completely locked down and stagnate. Your library will get eroded over time by the constant pounding of the digital ocean.

Fixed some parallax bugs and added depth correction.

Attached: parallax2.webm (904x510, 1.5M)

currently working on a self made telnet
what is the best way to encrypt string package's sending by a network socket?

I disagree completely. If security is my concern then I would lock down my code with libraries that are secure to the best of the community's knowledge and only update when a security flaw is found the specifically affects my library. Don't have to worry about depreciation if the library is locked down and nothing is changing and you are just using a compiled binary to run it

fuck math

>It's more secure
My question isn't really about that. node developers have special problems because they fetch the code from github quite irresponsibly (as a group).
I'm wondering about the positive side frequent updates from people with more experience updating libraries.
Libraries that are security sensitive are a bit of different topic and I don't want to suggest it's a good idea to use ancient versions of those.

no u

Greetings, Anone. Now, let us begin with the JavaScript lesson.

Attached: 445934d02b9ce746208015fc22d61aa0.jpg (783x1200, 129K)

Haskell-chads help me, how do I add another argument to this list?
["M-" ++ [n] | n

It uses more memory than necessary
also I think if your list was say [1, 5, 2], you wouldn't push the 2 since 2 < 5, and wrongly output 1

nice tits love

Lisp is the most powerful programming language.

depends, which keybinding do you want to add?

Attached: file.png (841x221, 30K)

what do you want to add? i'm not familiar with xmonad but lists are easy

SIMD is a bit like sucking a bunch of dicks at the same time if you think about it.

ah ya good catch ty for the feedback. Maybe a stack isn't a viable way to do it but I'll keep working at it because its interesting

If you had 4/8/16/32 orifices maybe.

Why thank you.
i.4cdn.org/wsg/1563464611054.webm

Attached: context3.webm (904x510, 956K)

On day 4 of my graduate job with an HPC management company, my first project is to write a pair of scripts to communicate a node's hostname and MAC address over TCP, save it to a file on the server machine, and make it as sophisticated and robust as possible. This is my first time using Ruby, and I'm having lots of fun :)

Attached: 1563437089222.gif (350x255, 1.78M)

the same orifice can fit 4 6.4 inch dicks or 8 3.2 inch dicks

Have you studied algorithms and data structures yet?

were they unit testing before?
does their code work?
did they adopt another way to test?

What is L3 Editor?

i have finally achieved Satori
here's a tip : use C++20

>i have finally achieved Satori
So you finally red SICP?

Attached: wizard.jpg (462x465, 178K)

why different nodes for function call and arugments. looks awful

use (++), it concatenates lists
[1,2,3] ++ [4,5,6] => [1,2,3,4,5,6]

I know Jow Forums aren't my parents but could you guys please give me a task to do today? I don't want to keep pissing away my days not gitting gud.
Any task in C will do, I'm spending a lot of time at the library today and just started CS50x. I won't come back until it's done.

How do I prepare for a programming conference? Heard a lot of big names are going to be there (Google, Jane Street etc) and I want to impress.

wikihow.com/Make-Anime-Cosplay
danbooru.donmai.us/posts?utf8=✓&tags=hatsune_miku&ms=1

in python this is just
max2 = lambda l: sorted(l)[-2]

what's the conference about?

JS? you must know your things inside out

Where should i start to get into AI stuff?
I know a little hit of python

kskedlaya.org/putnam-archive/2018.pdf

get most of those questions right

Please tell me why this wont work
public class BaseClass
{
public virtual void Foo() { Console.WriteLine("BaseClass.Foo"); }
}
public class Overrider : BaseClass
{
public override void Foo()
{
Console.WriteLine("Overrider.Foo");
}
}
public class Hider : BaseClass
{
public new void Foo() { Console.WriteLine("Hider.Foor"); }
}
static void Main(string[] args)
{
Overrider over = new Overrider();
BaseClass b1 = over;
// Hider h = new Hider();
// BaseClass b2 = h;
over.Foo();
b1.Foo();
//h.Foo();
// b2.Foo();
Console.ReadKey();
Console.WriteLine("Hello World!");
}

There is error, ambigous call to Polymorphism.BaseClass.Foo()

in d this is just
[3,1,2].sort[1].writeln;

>[3,1,2,9,8,8,5,4,1,2,5].sort[1].writeln;
nah

jesus i'm a retard.
[3,1,2,9,8,8,5,4,1,2,5].uniq.array.sort.reverse[1].writeln;

it is, tried tons of GUIs libs and Godot's is the best option for this project.

yeah tho I don't have automate range deduction in yet. You can see in the output C++ code that it picks the most minimal int_fast type that can contain the range.
There are more optimizations that can be done by tracking the possible value range, tho haven't implemented them yet.

The editor for the programming language which is called L3 for now.

It's early WIP. Currently the graph pretty much reflects the AST nodes 1:1, and I added argument statement nodes that hold an expression to be able to chain a list of them.

Help Jow Forums I'm using requestsHTML and I'm trying to get a token using

token = r.html.find('[name=csrf-token]') to get the element, then I get this

[]

But how do I extract only zjA2OC1Rkw9mjGg0gPkbL8hQTmcjXNkY3clbV0Lnq9KAsl9S2Y2wUTiU5RsRXmTBADUB/bA6hGkXg0IwZ0n6vA== out of it?

Just simple "M-", this list actually removes keybindings:
hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Util-EZConfig.html#v:removeKeysP

["M-"] ++ ["M-" ++ [n] | n

wait that's just
"M-":["M-" ++ [n] | n

Both variants doesn't work.

Attached: 2019-07-18-195816_1026x1866_scrot.png (1026x1866, 262K)

parenthesise it

test your shit before posting it if you can't get it right

it's not my shit and it uses operators so obviously might need parens you dumb retard

Right, thank you my dude.

Attached: art qt.jpg (1156x1600, 498K)

not me who posted defunct code, so i'm not the retard here but the person who cannot program

you are the only retard here because you're the one who made this post

that's a hard cope for someone that cannot admit he doesn't have what it takes to be a programmer

youtu.be/z2aq21lMw40

Made an introductory neural network video, elaborating on a version of the pure Python implementation in the Nielson book

Attached: of_sorts.gif (899x455, 219K)

>does their code work?
Presumably. Wouldn't that be silly if they abandon a stupid idea and start fucking up for no reason.
>did they adopt another way to test?
Doesn't say. It's jetbrains jetbrains.com/research/devecosystem-2018/c/

Can you recommend me a numerical calculation library for C++, similar to what Numpy is for Python, please?
Bonus points if it lets you operate things with OpenCL.

>boost
>eigen
>xtensor
>armadillo

The problem is when you start getting interrupts, for things like breathing. MMX and 3Dnow had a tendency of blocking the x87.

Attached: dpt.jpg (800x794, 133K)

>Artificial General Intelligence
what

was trying to do it with the complexity of sorting the whole array first. Is this futile?

Sup /dpt/, /v/ermin project dude here.
In older versions of World of Warcraft (WOTLK 3.3.5 for example), the client is normally reading external audio files from Addons like pic related. In the newest version however (Battle for Azerorth, 8.2), this is not the case. Nothing happens when I monitor Wow.exe and just the normal data files are being read just like when I have no Sound Addon with external audio files in use. I also monitored Wow.exe on startup and login, but that didn't change anything. Has anyone an idea how and where they are reading these external .ogg audio files? Or maybe how I could find that out procmon or any other program?

Attached: 19f196edb35556f3505245236e16a5f9.png (252x91, 5K)

i guess the singularity is here already

>Artificial General Intelligence
You have no idea what you're talking about.

Attached: lamport_new-460x305.jpg (460x305, 95K)

I don't have any windows (or WoW) experience but here are some general ideas:
what happens if you move them somewhere else? If it gives you an error message maybe you can find out where the message came from, or maybe the message contains some information. Also check if Wow.exe creates any other processes, they might be reading the files.
Does windows have something that shows you all open files?

thanks for the input. if I move the files or change their names, nothing happens and the addon still works. this probably means they create temp files or load it into an array. I couldn't see Wow create other processes in procmon. As for something from windows to show all open files, I guess procomon with no filters, but it's very hard to get the information I want.

hm, temp files seem more likely if the program starts even when the files are missing. have you looked in the usual temp directories if there's anything interesting there?

Yes and I checked all the created temp files from Wow.exe which I was able to see in procmon.

weird that it still works. does it actually play the sounds?
In any case, I'm out of ideas at this point

yeah it does. those sneaky bastards are really good at hiding what they are doing

SQLite does not support concurrent writes. Your writes aren't actually concurrent then.

Yes the database is locked during a transaction, the point is that unless you have TONs of data or poorly indexed tables those transactions shouldn't take that long to go through nor be an issue. Most SQLite hook ins all have busy_waits for when the database is locked so it'll be completely transparent to you unless you've extended past what sqlite can handle.

Not sure if I posted this here. But as planned I made that introductory neural network video, elaborating on a version of the pure Python implementation in the Nielson book

youtu.be/z2aq21lMw40

Some light Idris is up next

Attached: hqdefault.jpg (480x360, 22K)

Is it possible to implement AVL Trees in Haskell?

sure

literally just google "avl tree haskell"

I'm pretty sure the the standard set implementation is based on AVL trees there.
Funny enough, the Idris clip is gonna be about the power set operation in various languages and for that sake (set theory is my actual interest with all this) I looked into them just recently

Attached: Shadow_the_hedgehog_sa_style_by_shadoukun-d3c7ghe.png (899x722, 224K)

data Tree a = Nil | Node a (Tree a) (Tree a)
deriving (Eq,Ord,Show,Read)

height :: (Ord a, Num a) => Tree a -> a
height Nil = -1
height (Node k l r) = 1 + (max (height l) (height r))

balanced :: (Ord a, Num a) => Tree a -> Bool
balanced Nil = True
balanced (Node k l r) | not (balanced l) = False
| not (balanced r) = False
| abs ((height l) - (height r)) > 1 = False
| otherwise = True

-- balanced (Node 3 (Node 2 (Node 1 Nil Nil) Nil) Nil)

balanced l && balanced r && height l == height r

oops the last one is wrong, you can still adjust the guard into an expression in && though, flip > to

>it's another 'tool/library claims to use very specific formats on input and output but actually severely breaks format standards on both ends so I have to write a complex wrapper just to have sensible interfaces' episode

Attached: ada.jpg (579x329, 45K)