/dpt/ - Daily Programming Thread

Old thread: What are you working on Cred Forums?

Other urls found in this thread:

youtube.com/watch?v=k6LCykRfXL8
youtube.com/watch?v=3M9RFtziALc
youtu.be/qDSyoDNZLMI
lmgtfy.com/?q=learn java
cs.ecu.edu/karl/cinnameg/9-0/lin/Overview/overview.html
github.com/oubiwann/vim-blackboard-sublime-theme/blob/master/README.md
github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#S-naming
github.com/nick-gits/calcupy
github.com/Flipboard/react-canvas
reddit.com/r/Showerthoughts/
hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.nq2w7ihjs
mercurial-scm.org/wiki/OtherTools#Graphical_user_interfaces
pastebin.com/fJkj3uT8
cplusplus.com/reference/fstream/fstream/
stackoverflow.com/questions/478075/creating-files-in-c#478088
harmful.cat-v.org/software/xml/soap/simple
youtube.com/watch?v=WWhohGNjvJI&feature=share
twitter.com/hintjens
webassembly.github.io/
destroyallsoftware.com/talks/the-birth-and-death-of-javascript
hintjens.com/blog:115
github.com/jwasham/google-interview-university
en.wikipedia.org/wiki/Gödel's_ontological_proof
gbdk.sourceforge.net/
htdp.org/
edx.org/xseries/systematic-program-design-0
cs.hmc.edu/csforall/
edx.org/course/cs-all-introduction-computer-science-harveymuddx-cs005x
pastebin.com/Ek2WFWwv
arxiv.org/abs/1607.04822
cryptopals.com/static/challenge-data/6.txt
frippery.org/busybox/
twitter.com/NSFWRedditVideo

First for D

Working on a site that captures and keeps up to date Youtube channels and videos. Displayed chronologically, sortable by country, gender, popularity etc. The next step after capture/display is solid is to integrate youtube-dl for automatic archival.

On second thought, I may be able to use CMake comfortably for building Java shit... as long as that Java shit isn't running on Android.

>flat
rude

When writing a database schema for an *chan site, would you keep a single table holding all the posts along with the columns "is_parent", "parent_id"?

Or would you rather have "threads" and "posts" as separate tables and every row in "posts" has a "parent_id" pointing to a thread in "threads"?

I was going to spend the week learning python but I was just thinking if it was better to get into web dev, I learned programming basics in college, I know basic C, C++ and Java and basic python syntax that I learned by myself. What would be better to invest my time into?

What data does a thread have that can't be expressed through posts?

Some I can think of are number of posters/posts/images/pages, which can all be dynamically calculated

>which can all be dynamically calculated
How much time do you want to spend calculating that shit?

if you use normie software, you should expect it to think you're a normie taking pictures with your friends partying on the weekend

Are coding bootcamps a scam? I'm thinking about applying to App Academy because "free" tuition, but I have some social anxiety and they require two interviews.

Either when the page is loaded/cached, or each time you update a thread table. Since it's useless data (imo), you could even push calculations client side.

I'm thinking it would be easier to prune posts and/or move them to an archive.
To move to an archive, I can just move the thread entry to an "archive" table, leaving the posts in post untouched until it's time to prune.

How do I into Unity and Android studio? I want to write some gaymes and apps, preferably in some shit that's easy for someone with no experience to start.

Learn to program before you learn an IDE and a framework. Also, learn to google.

If you want something basic you might want to start by Unity or Game Maker.
Also

anime vs kpop

who makes better coders

Neither.

Certainly not racemixing.

Hybrid vigor!

post you're programming jams

youtube.com/watch?v=k6LCykRfXL8

Was wondering where the fuck this thread was

GBJam's on, rules are make a gameboy-styled game, res is 160x144, use 4 colours

So I'm writing an actual GB roguelike which abuses the shittiness of the LCD in order to get 7 colours

Pictured: Haven't got the actual world gen in place so it just randomly selects between floor and wall

Compiling python programs, shit like
from lxml.cssselect import CSSSelector
gives me problems
How do I use this but with only import lxml

EVERY single tutorial has the from import statement..
Sorry for being retarded.

import lxml

shit = lxml.cssselect.CSSSelector(some, shit, goes, here, what the fuck is this shit anyway)

youtube.com/watch?v=3M9RFtziALc

>he doesn't use lxml for web scraping
pleb

youtu.be/qDSyoDNZLMI

I'm currently learning Java and I'm a freshman in college. There's a project due soon and my professor knows fuck-all about how to teach it. Is there a place where I can understand some Java concepts easier or a site that can help out with projects?

lmgtfy.com/?q=learn java

Where you learning at

I've never used CSSSelect

I've used some XML lib that comes with Python in order to implement an XML-based serial protocol which is actually used in a real piece of hardware

Honestly what the fuck were they smoking when they came up with that protocol

>I've never used CSSSelect
It's pretty comfy.
import lxml.html
from lxml.cssselect import CSSSelector
import requests
theurl = "ipaddresslocation.org/ip-address-locator.php?lookup={0}".format(ip_address)
r = requests.get(theurl)# get some html
tree = lxml.html.fromstring(r.text)# build the DOM Tree
sel = CSSSelector('div.iploc b')# construct a CSS Selector
results = sel(tree)# Apply the selector to the DOM tree
data = [result.text for result in results]#list all matches
data = ['unknown' if x is None else x for x in data]#change None to unknown so error doesn't occur if no data
print(data)
domain,IP,host,IP_C,IP_CC,IP_CON,STATE,CITY,long,lat,ISP,ISP_Provider = data

>ISP_Provider
kek

The more I look into how CMake works and what it can do, the more I find myself willing to use it. Even if the outputted makefiles are atrocious.

You using 21st Century C?

And this after your long winded rants against CMake.

Is that a book? Because if so, no.

I can confirm it's better than autotools

I've also heard you don't need to do any fancy build shit to make stuff work on Windows, so you can focus on keeping your copious buckets of #ifdef WIN32 in your actual code

I never really ranted that hard against it. I just found it way too fucking complicated. And it is kind of a fucking weird tool to work with, but it's less weird the more you work with it.

You do need a little bit of work to make things correct on Windows, because the default is MSVC, and MSVC is always the wrong choice.

By virtue of CLion using it, I've come to love it.

Developing with C on Windows is still AIDS, though.

It's less AIDS with MinGW-w64, but then you're left with

>msvcrt.dll dependency

Honestly, it really should come with its own statically linked libc, even if it does mean applications will be a bit bigger.

Even with MinGW, it's a motherfucking headache. Rarely, if ever, does it jest werk. Trying to get SDL working was bad enough.

The guy here whose professor wrote a hobby language, there was no way for me to get the compiler to compile on Windows.

GENTOO
E
N
T
O
O

What hobby language? Also, that just looks like someone forgetting their fucking LDFLAGS.

>that just looks like someone forgetting their fucking LDFLAGS.

That wasn't it, just so we're clear.

>What hobby language?

Cinnameg. I've got the compiler running on a virtual machine.

He's been developing it for a while, it seems, and it does a bit of everything.

cs.ecu.edu/karl/cinnameg/9-0/lin/Overview/overview.html

For SDL you need these three things in I forget which order IIRC:
-lSDL2 -lSDL2main -lmingw32

Not as bad as Allegro 4, but still.

On real OSes you tend to use this in your Makefile:
`sdl2-config --libs`

You'd need to preach that pretty fucking hard and far, the problem isn't the people here, the problem is the faggots outside of Cred Forums who use Windows

>For SDL you need these three things in I forget which order IIRC:

That build issue had nothing to do with the flags, trust me. It was more to do with which version of the lib was actually going to work, and there's about 300 different setup guides on the SDL site and forums alone that give differing suggestions.

In any case, I eventually got it working with some minor trial and error.

Doesn't even have to be Gentoo, but I feel people would have an easier time with some programming languages on Linux

pellesC

>it really should come with its own statically linked libc
windows system procedures are secrets.

What aboot pellesC? I'm already using mingw64.

>I feel people would have an easier time with some programming languages on Linux

Package managers streamline programming to an unbelievable degree. That shit just works.

Consider taking a peek at it on google books or something. There's maybe a small section with some C code in it and the rest is literally going through the grind of setting up CMake and the toolset to which it would belong.

Also, will your marry me

Pretty much every system function needed to implement libc on Windows is in kernel32.dll and well-documented.

Makes me glad I'm no longer using Windows on my main laptop :)

But I still have to use Windows for my research, and VMs are a bitch to work with.

Oh yeah, I don't mean to shill but I do feel that book is part of the C trifecta. K&R, ANSI C and 21st Century C.

>Pretty much every system function needed to implement libc on Windows is in kernel32.dll and well-documented.
then use them directly.

So it's pretty much just a CMake book disguised as a C book?

Also, I don't even know you, user.

The purpose of the C standard library is to abstract away the operating system for the basic tasks of I/O and memory management. If the user program is directly interfacing kernel32.dll, the program is more or less locked into using Windows.

Also, the Win32 API is fucking nasty, and should be avoided for application programmers.

>Makes me glad I'm no longer using Windows on my main laptop :)

If it weren't for vidya, I'd have no reason to use Windows.

>inb4 QEMU

then use the crt library

QEMU runs like ass, GTP. It's good for OS development, because of its support for shit tons of languages, but if you want to run Windows in a VM, use either VirtualBox or VMWare.

Actually, don't do VMWare. I tried getting Windows 10 installed on VMWare today (in hopes that it won't be as much of a pain in the ass to get networking working on as VirtualBox was), and regardless of whether I used the ISO from Dreamspark or the one downloaded through Microsoft's Windows 10 download utility (and there was a 1.2 GB difference in these files, so I assume one of them is more up to date), the result was the same: KMODE_EXCEPTION_NOT_HANDLED boot loop of death.

Yeah, that's what mingw-w64 already uses. The problem is that it uses msvcrt.dll for portability or some shit, but that version is frozen in fucking time and as such does not have the ability to do some C99 and C11 things that mingw-w64 is capable of doing. What I'm suggesting is that they should implement their own libc, rather than using Microsoft's.

That's sort of my point. I'm not going to go through the effort of setting up passthrough when I can just use Windows.

yes and he's got your style of speak and spack. I think you'd get a kick out of it.

Also, Hi Ruby!

Trying to install this theme in Sublime. github.com/oubiwann/vim-blackboard-sublime-theme/blob/master/README.md
Can't for the life of me seem to figure it out. Can someone please prove to me how retarded I am?

Why don't you just use the package manager?

I have. It doesn't come up after installing.

Hello user. Do I know you at all?

Probably not but we interface here all the time.

I mean, of course, user. It's me! user.

I can imagine. I'm just wondering if you are a specific user I might remember for some reason.

reminder that it's the same ~100 of us shitposting every thread

That seems like it might be an accurate number if you don't take into account the number of novice programmers that seem to ask the same questions every time. Surely, it is not all one dumbass that never learns.

What kinds of maths are involved with programming, also what are all the types of programming styles. Please give links, thank you.

haha ur gay

There's a lot of stuff, if there's one thing that's particularly "programmer-y" it's discrete math, which I *think* covers the bitwise logic shit that doesn't really show up elsewhere

But it all boils down to what you're trying to do

So the question is, what are you trying to do?

It really depends on what you're trying to do.
For example, if you're doing anything graphics related, you need to know linear algebra.

Supreme taste my friend.

In a more concrete sense: you use graph and queue theory in networks, linear algebra in 3d graphics, information theory in compression, number theory in cryptography, category theory(I think) in programming language design(specifically for data types), statistical and high-level algebraic methods in AI... the list goes on and on.

Programming on its own is just algebra. You will likely need more depending on what you are doing. At my university, a Bachelor's Degree in Computer Science requires 45 credits of math and science, of which, some will be satisfied by certain mandatory mathematics classes in linear algebra, probability theory, discrete mathematics, and calculus. I never found much use for calculus. Certain other types of mathematics are also taught as computer science theory (though we do not count them for mathematics credits), which includes complexity theory and graph theory, among others. Beyond that, I know that....

Any subject that involves learning algorithms, whether it be artificial intelligence, natural language processing, data mining, etc... requires knowledge covered in some higher level statistics classes. I took more statistics than I needed for the degree requirements, and it certainly has helped out in a number of elective classes I've taken.

Encryption is all just applied number theory, and consequently, is when math starts to get fun (at least in my opinion).

Computer graphics requires one's knowledge of linear algebra, and I think calculus to be rather air tight.

And other subjects will have their various requirements.

I just answered my own fucking question retard
see:

in Meme++, what's the normal case style you guys use for most things?

atm i'm just lost and i wish this language had some kind of fucking standard

i come from java which is a language full of pajeet standards but in C and C++ you'll grab some framework which uses camelCase and then another that's like snake_case and then you have some stupid bullshit that i see in microsoft pajeet code where EVERYTHING is PascalCase

what do i do

i've been thinking of:
namespace::Class::onFunction()
namespace::Class::STATIC

or
Namespace::Class::OnFunction()
Namespace::Class::Static

but then the latter looks like shit when you just call something regularly like m_thing.Draw();

why aRE THERE NO STANDARDS

Why would you ask if you already knew the answer?

Why are you using a fucking tripcode?

I've seen literally evey possible style in C++

It doesn't matter. Just pick one you like, be consistent and don't be prescious about it. If you're working on a certain project just adopt that style.

Stop begin a fag and use snake_case.

Ruby has severe autism. Just leave him be.

>normal
Nothing in C++ is normal, and none of its users can agree on standards. Hence why it is perfectly acceptable for it to be a kitchen sink language.

Pick a case standard you like and try to stay consistent with it, at least within your own code.

Why do you suck dick, user?

Just use whatever you think is alright and stick with it.

Personally:
NameSpace::ClassName::memberFunction
NameSpace::ClassName::StaticFunction
NameSpace::ClassName::STATIC_VAR
CONSTANT
no m_ prefixes for private vars

ClassName::MemberFunction
ClassName::StaticFunction
ClassName::staticVariable_s
ClassName::memberVariable_
CONSTANT
EnumName::LABEL
globalVar_g

Postfixes > prefixes imhi.

mmm, markov chains

As you are posting on chan you certainly dont have the third. I still remember
playing Doom back in the early s when I was still a kid. ECC RAM consumer grade
Yes consumer grade. Get a XPS or whateverlake Macbook Pro when it comes out. At
least it recovers instantly. Next time I will just format the fucking disk.
Storage is per TB cheap The journey is likely to really piss you off though.
Better yet just quit jerking off on specs altogether and get something cheap
that actually works like a Moto G. The case and the keyboard Im just linking him
to give him an idea on pricing then letting him choose his own hideous riced out
bullshit. is it any good here in Canada. You should always try to post
anonymously unless your identity is absolutely vital to the post that youre
making. We also get VMWare Pro for like You could also get a nylon zulu strap.
BTW What kind of job do you do now. mm connector its just a different form
factor for balanced audio with power. WE DID IT REDDITnice blog Run it in a
virtual machine and you can browse while windows does this although it hasnt
since Ive running it virtually. Get unlock permission for my Redmeme Note I
think its honestly the kind of think youd D print and then gloss paint. I have
no sound on my kali what do. Follow all of the guides to disable all of the
phone home shit w does and make sure it only does updates when you say so and
its better than com You can also search the catalog for a specific term by using
httpsboards. Even if it isnt its still retarded to have knick knacks. Then when
you start installing a linux to try out keep notes on what you did along the
way. So I deleted Fagbook now what. That way you could work on your latest
project with SSDlike speeds but still have the capacity of a HDD. Adds NOTHING
over windows i will be finding a job no matter what before winter begins.

tl;dr

You're using entirely too many "chain links".

I guarantee 90% of that is verbatim from posts.

Is this pasta?

There might be no standards, but there are guidelines.
github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#S-naming

> markov chains

It's 2016.

Twenty

Fucking

Sixteen.

..

And we still don't have a standard (standard as in every modern card implements it) 32/64bit protected mode interface to change the video mode on the PC platform.
VBE3 PMID is fucking optional. FUCKING OPTIONAL FEATURES IN A FUCKING _STANDARD_ PISSES ME OFF TO NO END.
WHY THE FUCK MAKE A FEATURE OPTIONAL WHEN YOU CAN JUST REMOVE IT COMPLETELY, IT WON'T MAKE A FUCKING DIFFERENCE BECAUSE THE AMOUNT OF CARDS SUPPORTING IT WILL STILL BE THE SAME ANYWAY, FUCKING ZERO.

Seriously, what the fuck?
I am pissed off.

I sure as shit haven't.

>Why do you suck dick, user?
>says tripfag

>The language is so bloated and full of shit, they had to write "guidelines" to try keep their rampant shittiness under control.

Fuck, I feel retarded.

>It's 2016.
>Twenty
>Fucking
>Sixteen.

Ruby happens to hold herself very much accountable; and, I, with my 10+ year license to say fuck you, don't very much mind her. So fuck you. She's informative as fuck.

If you think that's bad, AC'97 was supposed to standardise sound cards/chips but there's several AC'97 chips that require completely different drivers no matter what mode the CPU is in, so the only standard sound output we have is the PC speaker oh wait that's pretty much deprecated now.

...does EFI provide a standard way of setting a video mode?

>her
*triggered*
Xir pronouns are xe/xi/xo/xum. Get it right shitlord.

>Xir pronouns are xylophone

Got it

It's 2016.
Twenty
Fucking
Sixteen.

..

And POST still doesn't use advanced processing features to improve boot time.

But it's fucking true.
We have all these fancy features and interfaces and shit, but something as BASIC as switching the fucking video mode has been neglected for so fucking long, and will probably never be fixed thanks to FUCKING UEFI.

Instead they fucking force you to write a driver for every single card, which is fucking impossible.
I swear to fucking god, THIS IS ALL A FUCKING CONSPIRACY TO MAKE WINDOWS OR OSX THE ONLY POSSIBLE OS YOU CAN RUN ON YOUR SYSTEM.

>...does EFI provide a standard way of setting a video mode?
Yes but you can't use it after calling ExitBootServices, which is around the time where you jump to your actual kernel. so, 100% useless.
You could not call ExitBootServices, but then your OS remains a "UEFI application" and you do not own the system, the UEFI does.

The latter.

>What data does a thread have that can't be expressed through posts?
Whether the thread is a sticky, for one. You could tag that as yet another flag on an OP post, but at what point do you say that it's fine for you to have 19 trailing null values on every non-OP post?

There's also the consideration of performance.

With thread and post tables you can add clustered indexes on each one, so that the data is stored sequentially on the hard drive (faster reads than a non-clustered index).

Due to the sequential nature of post numbers, and the lack of editing, the advantage in nonsequential insert and update that a non-clustered index has is nullified in the case of an image board.

>It's 2016.
>Twenty
>Fucking
>Sixteen.

I'd almost propose a simple API, one call to return a pointer to a scannable list of valid modes, and another to set that mode...

But then I'd probably end up just reinventing VBE.

The issue here is most likely that DOS is hardly used these days - VBE was important purely because DOS programs tap the hardware directly. That, and there aren't a dickload of x86 graphics chip manufacturers these days.

Until even VBE gets ripped away from us, though, we'll have to keep using V86 monitors.

Learning PHP. Messing with PDO for the first time.

So I fetch all rows from my table, right? and now I want to sort those rows by type into two arrays.

$result_set = selectAll();
$item_data = array( 'Books' => array(), 'BoardGames' => array() );

foreach( $result_set as $row )
{
if( $row['ItemType'] == 'Book' )
{
$item_data['Books'] = $row;
} else if( $row['ItemType'] == 'BoardGame' )
{
$item_data['BoardGames'] = $row;
}
}


Am I being retarded? Please tell me what's wrong with my logic.

>I'd almost propose a simple API, one call to return a pointer to a scannable list of valid modes, and another to set that mode...
Absolutely perfect.

>But then I'd probably end up just reinventing VBE.
VBE doesn't fucking have it (it's optional, which means it basically doesn't have it). so you wouldn't be.

But actually getting your proposal accepted (and implemented on most cards) is probably a pipe dream, unfortunately.

can someone please give me feature idea for this?

github.com/nick-gits/calcupy

I will literally make it just 4 u

>day off
>was going to work out and code today
>friends get on Ventrilo
>playing mon-hun and Hearts of Iron 4
>decide to play league of legends and talk with them
>lose entire day
>sleep schedule is fucked up because stayed up until 4-am

Every time I don't talk with friends I have a 5am -> 9pm sleep schedule and I'm productive every day.

Should I just be alone?

Also, VBE and every other BIOS service has already been ripped away from us, UEFI is now the standard, and it's even worse.

More like pic related please.

A function that decides if the input is a valid mathematical expression.

html fucking sucks.
Is there gui library for webgl?

Basic idea
typedef struct {
unsigned int mode_id;
unsigned int format;
unsigned int width, height;
unsigned int pitch;
unsigned int refresh_rate; // fixed 16.16
} video_mode;

size_t vmode_count = 0;
video_mode *vmodes = video_mode_get_valid(&vmode_count);
for(int i = 0; i < vmode_count; i++) {
if(vmodes[i]->format == VIDEO_FORMAT_RGBA8) {
vpixels = video_mode_set(&vmode_current, vmodes[i]->mode_id);
if(vpixels != NULL) {
break;
}
}
}

There are different parts of the code where input can go wrong, I just raise an error if it goes wrong there. If I go through a function first AND go through everything else it has to anyway it would be a waste of cpu cycles.

Whatever you're planning on doing, don't do it.

Motherfucker, you asked for features.

I might want to see if it's valid input without performing an expensive operation, much like anything else that checks syntax without caring about the meaning.

You should absolutely have a way of checking validity as a standalone operation.

Use regular canvas stuff instead

WebGL is not something to be handled directly unless you know how to set up a GL3 or GLES2 pipeline and that involves writing shaders and shit

Pic related 100% finds smallest prime factor for any int up to 2^128
(smallest prime must be above or equal to 37).

I'm going to need a formal proof of that.

Yep, I like it. Where are you going with this though? do you actually plan on making a proposal or something?

I have no idea how i would do that without it being at least almost as expensive as what I'm already doing to solve it m8

It's not hard to prove but I can't be bothered explaining the code to you (and I struggle with formal proofs).

I'll give you a hint:
x = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]
x_remove = x * x[0] = [4, 6, 8, 10, ...]

x_remaining = x.remove(x[0]) - x_remove = [3, 5, 7, 9, 11, ...]

Repeat the same procedure using x = x_remove
(when you get to x[0] == 7 you will find those magic numbers)

You are setting the index 'Books' equal to each new row that you get. What you want to do is append each row to the index 'Books'.

Try
$item_data['Books'][] = $row;

Assigning to an empty index like [] appends an item to an array.

The only time I can agree with this faggot race traitor nigger loving cuck with the worst possible taste in existence.
A webpage in WebGL sounds like a horrible and retarded idea.

>faggot race traitor nigger loving cuck with the worst possible taste in existence.

This is very rude, to be honest.

Probably not, was wondering if I could produce an API which doesn't suck though

Although maybe I'll implement this in a library one day

Then again, TinyPTC exists... but it might be a wee bit too basic (it appears to only support one pixel format, doesn't handle the pitch, and only allows for a full screen update from a given back buffer)

But it's true.

There's nothing 'cuck' about wanting to bone brown women, though. Wanting to the be the person doing the fucking is, quite literally, the opposite of cuckoldry.

Have to correct
>Repeat the same procedure using x = x_remaining

@ x[0] == 7 You will have the following pattern:

x[1] = x[0] + 4
x[2] = x[0] + 6
x[3] = x[0] + 10
...

The pattern repeats every 30 values, the loop starts at 37 because it is faster to pre-check (before doing other optimization things) for primes between 0..37

Am I correct in saying that atomic operations on a database ensures synchronicity of data?

It depends on whether those atomic operations are performed on the data that you want to maintain 'synchronicity' (I would prefer to maintain data validity and prevent erroneous implementations due to read-write conflicts where data is changed shortly after a separate thread reads it)

hmm, thanks that helps a little. however when I print_r, I get:


( [Books] => Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 ) [BoardGames] => Array ( [0] => 10 [1] => 11 [2] => 12 [3] => 13 [4] => 14 [5] => 15 [6] => 16 [7] => 17 [8] => 18 [9] => 19 ) )

when I'd like to have an array of arrays (all book records, and all boardgame records)

Yep, you can use react to render on the canvas thanks to the devs who got fed lsd and cocaine at flipboard

github.com/Flipboard/react-canvas

muh nig

>synchronicity of data
I have no idea what you're trying to say with this phrase.

Nevermind. got it. I was assigning the key (row number), and not the value (record).

step 1
uninstall league of legends
step 2
kill yourself

Nigger what are you doing?

She's updating her readme, clearly.

Does anyone have any experiences with hybrid app dev? Ionic/onsen UI?
How painful is it for a non web dev to use them?

I looked at my problem and said "no".
That's all the coding I did today.

Optimizing my dogfed kNN-algorithm for speed.

I'm content so far.
>Cutting corners
>still same output on randomised sets as the reference but way faster
yay!

Working over eshopper html theme to make a retro games app where you can buy stuff and consoles... meh fuck the database its for school

what's the artificial intelligence field like?

i dont know much about programming but it looks interesting

Lot of math if you're really ballsdeep in, but fun and games if your just brushing surfaces.

hard to get into without a degree? i know there are courses specifically for it

i figure with everything being taken over by computers then i mayaswell be the one making them

Jobs in the field are mainly for people with a degree though - at least in Europe.

take andrew ng's online machine learning course. it's free and not super hard

Adventures with scrum & git 2: electric boogaloo

Asked a developer to pull in a library. They make a pull request. In this pull request, he has added the link to a CDN which provides the minified version of the library. Since this is a project that will be abandoned, but the CDN/library will change, this isn't acceptable. I request that they import the developer version, with plaintext javascript and css.

Next thing I know, a single css file is now added to the MASTER branch. They merged it to master, without creating a pull request first.

They tell me that they will revert it. After a bit, I see a new pull request. The request is to add a new commit which simply deletes the offending files, without actually reverting the merge.

If anyone has practical advice on how to deal with this in a good, positive way, please respond. Please, please respond.

The latter, jesus christ. Did they not teach you database normalization? The former becomes a nightmare if you try and change the model.

>Programming on its own is just algebra
lel, k tard.

Found out today it's really easy to convert from Python to C# and vice versa. The code is actually really similar.

>Kun-chan, do you know about Sudoku?

>If anyone has practical advice on how to deal with this in a good, positive way, please respond. Please, please respond.

What country are you from? Hard to give advice with it really depends on your country and company's culture.

Personally, I'd just have a quick breakout meeting and go over every single thing you just posted here (along with who did it!), and then show the correct way to do those tasks.

I work at a shop that is brutally honest, and when people fuck up, there's accountability combined with the potential to learn and do better.

Europe, and this is still only in education, thank god.

At my friend's workplace they basically force the person that fucks up the repo to buy a pizza for everyone.

parametricity is overrated

Oh, if it's a team project in school, good fucking luck.

>getting it done right
>not hurting everyone feelings

Pick one.

I literally had to ask the professor to work on a project alone once because my team was clinically retarded. I ended up getting the best grade in the class, but it was a fuckton of tedious work on my end.

well, i think the last step was a bummer.

>digits pattern

>an abstract uniformity property enjoyed by parametrically polymorphic functions, which captures the intuition that all instances of a polymorphic function act the same way

jesus christ

I'm tired. I need something that will really make me think.

reddit.com/r/Showerthoughts/

A ASCIIZ string reverser

My neurons aren't even firing.

After much fiddling with git manuals and guides, I realize that it is not my fault that I cannot do git revert ;git push;

The reason why I can't do this is because the branch is protected. It is protected for me, but not for the guy who merged a feature straight into master.

God fucking help me.

Meth

git was a mistake

I sincerely don't think so. Imagine what these people would be doing if they DIDN'T have git.

Fair point.

>git is the only existing version control system

This is my first github project, i have no idea what im doing, i don't even know what you're pointing out

help pleas

Fair point, I suppose. What other VCSes are there that have a free hosting site? Because you don't expect people to set up their own servers, do you?

>git is github
this is the worst part

Dude, listen. You can't expect people who cant read a manpage to set up their own servers.

Mercurial (bitbucket, pikacode, codeplex, ...)
Fossil (Chisel)

Counterpoint, though- are any of them easier for a person who can't read a manpage to use?

hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.nq2w7ihjs

Kek

mercurial-scm.org/wiki/OtherTools#Graphical_user_interfaces

Alright fellas.

I'm working on a program. I managed to scrape together an algorithm.
Task is:
Given a set of integers and a sum N - calculate whether any subset of these integers equals the sum, then print out that subset which satisfies the condition.
So If I have an array {5,10,20, 50} and I want to check for 70, it should give me back 20 and 50.

The code is here
pastebin.com/fJkj3uT8

My problem is I know fuckall about C++, coming from Java so it's practice.

What I got down is the algorithm but the way it is implemented is
>put in the array length
>put in all the ints for the array
>put in the desired sum
>run

I want to make it so
>there is an int.txt somwhere (empty or not)
>program asks whether I want to input numbers
>if yes, writes those ints to the file
>else proceeds to the algorithm READING the ints from the file (I though about pushing ints from file to vector but dont know how to)
>prints in console all possible solutions

now i've been all over SO or google but I can;t find anything concrete on actually integrating the file thing in the program.
Where does the file go if it gets created? (default directory)
Like say I want to compile this program into an EXE, have it execute, console window pops up, there is no file yet - I say I want to input ints, put in the ints, save them to a file, run algorithm, give results.
Another time open the EXE, want to add another set of ints to the already existing int set in file - so append some more ints and then run it.

cplusplus.com/reference/fstream/fstream/

You can use VSTS if you're working with Visual Studio. Easier to work with than git by a long shot, or you can just use git with the GUI.

You get a free website for projects, so you could have richardstallman.visualstudio.com if you wanted.

I presume he hasn't reserved his name on that particular service.

thanks

stackoverflow.com/questions/478075/creating-files-in-c#478088

Pretty sure that if given no absolute path, it's going to be in the same folder as the program. I might be wrong, though! Only one, very straighforward way to find out.

We're fairly bound to git at this point. They won't be open to a suggestion that we switch to another VCS. I appreciate the helpful suggestions though! If only I could take them.

...

only existing good version control system*

>It’s JavaScript. There has to be thousands of libraries that all do the same thing. We know libraries, in fact, we have the best libraries. Our libraries are huuuge, and sometimes we include pictures of Guy Fieri in them.

People are making joke of JS, with all this frameworks and libraries.
Probably while im typing this commend we got 1 new framework

what a terrible attempt at trying to imitate the style of harmful.cat-v.org/software/xml/soap/simple

I'm not gonna lie, I'd bother to learn Javascript if there was a framework that was just Fieri catchphrase synonyms for "delicious"

Write one.

No, satan.

Do as i say.

I recently switched from VS 2013 to 2015. Now everything runs x5 slower. Is there an easy fix?

VR coding, I want to die

youtube.com/watch?v=WWhohGNjvJI&feature=share

Trying to get shit done with that seems like it would be like a fever nightmare.

2015 was faster for me, not sure what your issue is.

>tfw you're spending your last hours on twitter
twitter.com/hintjens

I also found 2015 to be an improvement over 2013

When I remove an entry from a linked list, should I delete it and free the memory used by it?

Did you allocate the memory for the node?

c++ literally gave him cancer

yea, so I should free it i'd guess. Thanks

why should i care

I got a headache while reading that.

How... accurate is that article? How exaggerated is it? Is that really what JavaScript is today?

Yes.

This is a case where a document model works best. Relational requires multiple table lookups and joins.

Please tell me WebAssembly is a joke, and not a real thing.

Sorry, son.

webassembly.github.io/

Poor fuck. What was wrong with him?

welcome to the future
destroyallsoftware.com/talks/the-birth-and-death-of-javascript

Cancer. :(

hintjens.com/blog:115

he survived the Cancer, just not the Cancer++

Fucking savage, m8.

How is that even supposed to work?

with asm.js, which builds right on top of normal Javascript and already works, you take a small efficient subset of Javascript and use it as a compilation target in the same way that you target any other platform.

For example, instead of translating C code to x86 assembly, you translate it to this Javascript-based "assembly" syntax.

The "trick" is in how this small subset is much easier to optimise for than full-fledged Javascript while still running on top of normal Javascript VMs.

Just proved the existence of God in Coq.

Working on raytracing. Also working on simulating uranium 235 fission

based voevodsky

github.com/jwasham/google-interview-university

Good luck man, what are you using to make it?

It was Gödel, actually.
See en.wikipedia.org/wiki/Gödel's_ontological_proof

Raytrace the simulation results.

Thanks. I was thinking of using genetic algorithms to calculate critical mass for a radioactive isotope sample

gbdk.sourceforge.net/

write an actual gameboy game in C

...

wtf lmao
fuck you hiroshit

>defining God as the most positive being, therefore God trivially must exist
That's a big goal post move.

God being a most positive being is not that controversial really.

It's kind of meaningless, though.

>tfw nobody gifts you Cred Forums gold

you realize that like literally every programming language which people actually use requires standards and guidelines, in the same way that countries have laws

>which people actually use
Calling counter-examples to your argument "meme languages" is not an argument.

What should I learn first ? I'm a noob but want to get into programming, have a new build. Please halp

i just associate him with coq that's all
it's a shame that finding an error in a paper made him lose his shit. i don't think he'll ever see the fruits of this labor

lol best of luck to him
i'm kinda doing this but from a different background
i don't know why people love making huge lists like this. it doesn't seem helpful

Google

C

htdp.org/
edx.org/xseries/systematic-program-design-0

or

cs.hmc.edu/csforall/
edx.org/course/cs-all-introduction-computer-science-harveymuddx-cs005x

where ?

It's also arbitrary like all religious arguments

>Finished instagram scrapper
>Spent the whole morning fapping to twerk videos
>The codebase is nice and cozy

I think this was a pretty productive morning.

>i don't think he'll ever see the fruits of this labor
Actually, I think it's coming along quite well. The progress is slow, but there have been interesting developments after he came up with the UA. Cubical type theory is one such thing, and I've even read a few non-type theoretical papers that used HoTT as a foundational framework for its proofs.

You're right. I disagree with pretty much all of the axioms, but it's cool that such a thing can be proved in modern logic in quite a slick manner.

post webms and code fgt

It feels like propaganda designed to lure people to their deaths. Something
along the lines of youre the target of my love. They nuke the board or spam
banes up until they have they net the combo. Or maybe you dont even fill in the
captcha. That is allITT We rate each others gf CONTINUED . Too dumb to even look
at a link they got provided and without any clue jumping to wrong conclusions.
Ruining game atmosphere by accepting pretty much every insane shit anyone cared
to write. i dont really feel a tripcode is necessary for myself i prefer to make
myself stand out with my devotion to her. I think its time to put the hurt on
the Ukraine. Also it would be cool if you could play SpaceX and unlock an
orbital arcology for use in New Game whyd you quit. This is the first one that
cant be considered a reflection of Japans taste. mpa should just be merged to
lgbt for having literal gay retardsHes still so cute. My only hope now is to
transfer somewhere so I have an excuse for having not having any friends yet.
Hope you enjoy what little time you guys have left together. climax of this show
is when they do tribadism together.

who said it was?

can't insult anything these days jeez

>papers
show me

It is immediately apparent that the true supporters of Cred Forums like anime, looking at the catalog.

Your markov chains are shit.

You have too much of a grouping, because this is clearly verbatim from actual posts, not even somewhat procedurally generated text.

Well the videos are mp4s and I don't have time to convert one at the moment but heres the code.

pastebin.com/Ek2WFWwv

>twerk
You have OSGTP's shitty taste
I'll pray for you

Has anyone done the cyptopals (matasano) crypto challenge? I'm on challenge 6 in the first set. I have no problem understanding how to solve the problem in general, but the text file that you're supposed to decrypt confuses me. It's supposed to be base64 encoded but there are line breaks in the file. Am I just supposed to remove the line breaks and then decode? Why even put the line breaks in the file in the first place?

Here's one that I can remember: arxiv.org/abs/1607.04822
I'm not at my main right now, but I may have printouts or links to some others.

Can I reliably store bit fields as integers in a database without losing information?

This is the file in question: cryptopals.com/static/challenge-data/6.txt

Do I just remove the line breaks before decoding? I don't want to get started on the rest just to fail because I corrupted the file at the start...

what do you people do when shit doesn't work, when you want to start something and the libraries/compiler/... don't help?
how do you deal with frustration?
I guess what characterizes programmers is the obsessiveness... because this shit could easily drive someone crazy (and it actually does make people crazy), and if you give up easily, you don't get anywhere

no

you could easily decode the files with the "base64" linux utility. if you are on windows, use frippery.org/busybox/ or powershell if it provides a way to decode b64 inputs...

I usually shoot myself in the head and swallow a couple bottles of Adderall.

New to c++ and trying to print multi-dimensional arrays using recursion.
A 3D vector with dimension sizes 2x3x2 would look like [[[a,b],[c,d],[e,f]],[[g,h],[i,j],[k,l]]]
But i keep seg faulting out. is there a workaround someone could help me with?
Pic is just a bit of the full recursive solution.

Career fair tomorrow. Time to beg for jobs!

just as a followup, I know that the problem is with line 16, but I'm not sure how I could alter it.

dimensions is an int, dimList and ElementList are both int vectors

new thread when ? :3

Thank you for replying. I have no problem decoding from base64. Since the line break character isn't a valid character in base64 I was wondering why it was in the file in the first place and if it should be ignored (removed before decoding). Is it it maybe common to put line breaks in base64 encoded files for readability?

when you stop being a dirty weeb

Come to Houston, you can help me with the C# projects I'm working on.

>Xamarin app
>Power BI integrations
>Natural language learning analyzing customer mood and demographics based on their text and recordings of their phone calls
>UWP app soon, maybe

Only downside is the few websites that need the occasional maintainin'.

You are probably erasing more elements than you have. Did you mean
for (int i = 0; i < dimList.size(); i++) {
?

Incidentally, while I have no idea what your code is supposed to accomplish, if you are continuously erasing the start of a vector you should probably use a different data structure.

>you will never be a texan tycoon cowboy's eager, otacon-like assistant as he delves into artificial intelligence

Does Javascript teach bad habits?

stupid frogposter

thanks, started cs-5x

>use a different data structure.
So I took dimList and converted it to an array like
int *pointer_to_dim_list = &list_of_dimension_sizes[0];
and passed the recursive function that, which fixed it, thanks.

As a side note, are there any unintended side effects with declaring the pointer like that?

What's the judgement on Julia?

Never worked with any of those things, 2bh.

Javascript is a programming language.

yes

What should I make to get experience in a full stack? A website where you can put in some stuff and display it back out?

I'll accept the offer if you get me an H1B.

Node* honk;
Node *honk;
Or Node * honk;


Node& honk;
Node &honk;
Or Node & honk; ?

what's the difference between splitting your vim session and creating a new tab and loading the file there?

#2, #2

Which programming style is best for python? Functional programming?

I don't really know much about the topic, but my guess is that, yes, you could simply remove the newlines. in fact, you could do some little test:
$ python -c 'print("D"*10)' | base64 -w 0; echo
RERERERERERERAo=
$ python -c 'print("D"*10)' | base64 -w 5; echo
RERER
ERERE
RERAo
=
as you can see, these things are equal, except for the newlines
and yeah, it's probably done for readability

well, that's sad

How so?

honk *Node
go is the future

typedef struct Node node;

node *honk;

You can try California for that.

We don't do H1B's here unless you're white or asian.

Whatever suits the team, project, and task.