/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

youtube.com/watch?v=gTBCHu0btn8
chrisdone.com/posts/dijkstra-haskell-java
en.cppreference.com/w/Cppreference:Archives
twitter.com/SFWRedditGifs

thank you for posting a 3D image

Is the storm over?

>pattern matching as a language feature

4th for 3d
youtube.com/watch?v=gTBCHu0btn8

creating a bot that listens on Sup Forums for mentions of Java, which then creates a bounty on Fiverr to accomplish a task using foreach on iterators.

Program that can read PDFs, pull serial numbers for computer parts, check warranties on them, and then make a sales ticket to renew the warranty a week before its due

Does Sup Forums have a favorite pair of programming panties?
What color are they?

how do i write deep learning ai from scratch

Commando master race.

Is there a simple way to have an offline copy of websites like cppreference.com and cplusplus.com?

I want to keep those with me for dark times.

not panties, but I do have an 'programming thoughtwave attenuator' that I use to focus my thoughts in a central locii about my upper-most chakra

pic related

yes, use BeautifulSoup with Python. or Scrapy.

should i finish reading K&R all the way through before going through X86 assembly language and C fundamentals, or can i go through them alongside one another?

>tfw no monochrome CRT monitor to program with

y live

Riddle me this /dpt/
Why do all Sup Forums projects fail eventually?

Has anyone got any experience with this book?
Need to read it for school. But it fucking sucks.

systemic and intrinsic autism

linux device drivers are thrilling wtf are you talking about user. read the book

Should I know Ada?

I'm about to get my MSc in compsci. All of my friends who quit after the BSc have jobs where Ada plays a big part. I've focused mostly on C++ and C, although my university basically only teaches Java.

How important is Ada in the industry?

Just program something to emulate this through software, kill 2 birds with 1 stone

I am talking about the book sucking not linux drivers.

You could just get the raw HTML with one line in any high level language.

new WebClient().DownloadFile("

bad logos

... that's not a simple way.

I was hoping somebody already made a scraper or just a dump of website's contents.
And, indeed, there's an HTML book archive of cppreference.com
Works for me.

Well, then you should have clarified what you were looking for.

You said "websites like" and specified an offline copy of the website itself.

then go out and google for one ya pooaloo . why even ask?

I still live at home so I don't dare to order some programing panties and socks, but I think I would like some shimapan.

I should have asked "what's the best way to get offline C++ documentation".
But it's 1:30 AM, so I didn't.

Literally first result of google you brainlet

use a existing deep learning ai and let it build a deep learning ai.

First year comp sci student here, struggling with abstract data types.

Currently struggling with link lists in java would appreciate if someone was to help me out.

I have been given an object of List Node, as well as index of the first node in the list

with these tools how can I find out things like size of the list, or getting the index of last node in the list?

which one?

current ones are too stupid

i can make a better one i just need a tutorial

...

think of a linked list like a rope with knots in it. each knot is a node. when you are given a node, it is like someone put a specific knot in your hand. you also know this is the nth knot and you know you can pull on the rope to get to the next knot. given this information, how can you count the total number of knots?

Ada isn't prevalent in most of the industry, but I would suggest you learn it because, at least for me, teaches you how to write better programs.

>he doesn't use Java

>Visual Basic surge

BASED

>visual basic above js
JAVASCRIPT BTFO
HOW WILL /wdg/ EVER RECOVER?

>scratch
what am i missing here

VISUAL BASIC DOES IT AGAIN

WEBDEVS BTFO ON ALL FRONTS

>question
ive been playing around with python on/off for atleast 2 years can do some cool stuff. just wondering at what point can i actually program? i want to start on more intermediate/advanced level projects
>not just little meme programs that make patterns in a terminal

real talk: why is java so popular?

It's good and has an extensive ecosystem.

you have to reach at least level 15 on code academy to be able to make real programs. hope that helped

It works and is portable.

chrisdone.com/posts/dijkstra-haskell-java

Am I missing something here? I was under the impression that VB was deprecated as a language.

statically typed, well tooled, platform independent, state of the art gc, stable

so is every other compiled language

Anyone good at using cmake?
I have my project in a git repository, with the build dependencies added as submodules. How can I build the dependencies alongside my project?
I already have a file that looks like
add_subdirectory(ExternalDep1)
add_subdirectory(ExternalDep2)
add_subdirectory(MyProject)


However, when I use the makefile that this produces it doesn't include the headers for ExternalDep1 and ExternalDep2, obviously because I'd have to do make install for that. How can I make cmake install ExternalDep1 and ExternalDep2 (preferably to a temporary folder) but not my program?

cppreference.com has a tar file en.cppreference.com/w/Cppreference:Archives

Java is popular because Java is popular.
Every high school class teaches it, many people know it, companies get many cheap Java developers.

whats wrong with that?

No, VB.NET is not deprecated. You may be thinking of VB6.
VB is still actively developed and has near feature parity with C# -- making it basically just C# with less punctuation for the majority of use cases.

>implementing specific language features instead of making the language more expressive in general

Is there a way in Haskell to do something like this:
foo = do
return $ Foo { foo

Foo getValueFromMonad getValueFromMonad -- ...

>tfw you spent hours reinventing the wheel

I love you

you can also do this with the extension
RecordWildcards

-- foo/bar are the exact names of the fields
do foo

still stuck on this.
I need to disable write-protection on shadowed ROM in x86 real-mode. but I have no idea how that's done.
any ideas?

I love you as well.

Some of these more obscure features are impossible to find with Google.

>38 Haskell 0.434%
Is Haskell a meme?

Applicative functors aren't obscure.

maybe using template haskell but its not worth it. the problem is haskell is lazily evaluated so the foo, bar, etc are not be computed until needed. thus the order of the operations is ambiguous in the first case. the second case specifies the procedural order for the monadic operations and leaves no ambiguity

Everyone knows that Tiobe is bullshit, right?

I mean, yes, of course Java is up there, but the fact that Javascript is behind Visual Basic is pretty telling.

There are massive amounts of false positives for C, because it erroneously picks up things for C# and C++.

RecordWildcards is pretty nice

you can use it in two ways

1) in an expression
FB { ... }
builds the type (where the constructor is FB) using variables in scope that have the names of the fields
e.g.

data FB = FB { fizz, foo, bar :: Something }
fun fizz =
let foo = ...
in FB { ... }
where bar = ...


and 2), the opposite, in a pattern
fun FB{...} = ...
this defines all of the fields of FB as variables in the scope of ...


the solution in works with arbitrary functions

How do i use regex to find a specific word with any combination of capital and non capital letters?

^[aA][nN][iI][mM][eE]$

How exactly do I display the value held in the rax register? This is what the book shows but I tried running that and nothing shows (Linux ASM)

section .data

section .text

global _start
_start:
mov rax, 10
add rax, 12
add rax, rdx

Why use regex for this? There are easier, and more performant ways in most languages.

is that the most efficient way?

seriously fuck people like you

...

Fuck regex, and fuck you.

you have to go step by step in some kind of debugger
for example info registers in gdb

(?i)foo or just use the general ignore case flag

>proof that haskell programmers are unemployed

AS3 is best language
const PRIMES:int = 3000000;
function isPrime(n:int):Boolean
{
if(n

I wrote a node.js script for testing whether or not new functions that my developers implemented in our web service behaved according to specs.

What kind of testing is this called?

Do your own homework, Pajeet

>not getting comfy with a bottle of wine on a Sunday writing SQL and fucking with sharepoint

>a person can only use one language

and assembly

...

>a person can use Haskell for their job

>obvious opportunity to use a sieve
>doesn't use a sieve
kys

What do you think they do during the week?

got a shit load of baseball cards, so i'm making a program to automatically look them up and catalogue them and their price from some database

striped pink :3

I can tell you what they don't do

program in Haskell

and c

Is there a zip file for cplusplus, though? If not, should I make one?

What kind of homework would this even be?

The term I'm looking for seems to be functional testing, maybe even specifically smoke testing.

Have fun not having a well-paying job, my friend.

I fucking hate weak typing, makes me literally puke

who thought that it was a good idea

>adult male
>not a polyglot, multi-paradigm software architect
shame

acceptance testing

I am trying to implement a bitcoin roll game in which a pair of players rolls a number and the highest wins the pot. I'm trying to figure out the implementation details now.

1) Do I have both subscribe to one websocket topic and send em a message that the game started and to send them a JSON with who's the winner or the loser after I generate random numbers for them?
2) Do I somehow connect these people to each other and have em directly send events to each other? For ex user A rolls, the even of rolling and the number of the opponent goes to B, B rolls, the server decides who won the game and sends them both a JSON of the results?
3) Do I not wait for any events and simply decide two random numbers for the participants and just show em the results after they click roll?

Another question for Elixir fags, how do I make a socket available in the application generally so the server can relay messages btw the sockets directly?