[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 329
Thread images: 31

File: dpt_flat.png (102KB, 1000x1071px) Image search: [Google]
dpt_flat.png
102KB, 1000x1071px
Old thread: >>56904235

What are you working on /g/?
>>
>>56912619
First for D
>>
>>56912619

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.
>>
>>56912619
>flat
rude
>>
File: t-thanks microsoft.png (404KB, 640x582px) Image search: [Google]
t-thanks microsoft.png
404KB, 640x582px
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"?
>>
>>56912619
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?
>>
>>56912689

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
>>
>>56912722

>which can all be dynamically calculated
How much time do you want to spend calculating that shit?
>>
>>56912689
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.
>>
>>56912748

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.
>>
>>56912722
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.
>>
>>56912823
Learn to program before you learn an IDE and a framework. Also, learn to google.
>>
>>56912823
If you want something basic you might want to start by Unity or Game Maker.
Also >>>/vg/agdg
>>
anime vs kpop

who makes better coders
>>
>>56913462

Neither.
>>
>>56913462
Certainly not racemixing.
>>
>>56913540

Hybrid vigor!
>>
post you're programming jams

https://www.youtube.com/watch?v=k6LCykRfXL8
>>
File: output-0013.png (10KB, 640x576px) Image search: [Google]
output-0013.png
10KB, 640x576px
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.
>>
>>56913891

import lxml

shit = lxml.cssselect.CSSSelector(some, shit, goes, here, what the fuck is this shit anyway)
>>
>>56913797
https://www.youtube.com/watch?v=3M9RFtziALc
>>
>>56913906
>he doesn't use lxml for web scraping
pleb
>>
>>56913797
https://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?
>>
>>56913965
http://lmgtfy.com/?q=learn+java
>>
>>56913965
Where you learning at
>>
>>56913943
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
>>
>>56914001
>I've never used CSSSelect
It's pretty comfy.
import lxml.html
from lxml.cssselect import CSSSelector
import requests
theurl = "http://www.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
>>
>>56914118
>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.
>>
>>56914232
You using 21st Century C?
>>
>>56914232

And this after your long winded rants against CMake.
>>
>>56914242

Is that a book? Because if so, no.
>>
>>56914232
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
>>
>>56914251

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.

>>56914271

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.
>>
>>56914286

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

Developing with C on Windows is still AIDS, though.
>>
>>56914307

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.
>>
File: windows (2).png (5KB, 376x121px) Image search: [Google]
windows (2).png
5KB, 376x121px
>>56914349

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.
>>
>>56914349
>>56914396
GENTOO
E
N
T
O
O
>>
>>56914396

What hobby language? Also, that just looks like someone forgetting their fucking LDFLAGS.
>>
>>56914431
>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.

http://www.cs.ecu.edu/karl/cinnameg/9-0/lin/Overview/overview.html
>>
>>56914396
For SDL you need these three things in I forget which order IIRC:
-lSDL2 -lSDL2main -lmingw32


Not as bad as Allegro 4, but still.

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


>>56914413
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 /g/ who use Windows
>>
File: sdl jest werks.gif (66KB, 524x416px) Image search: [Google]
sdl jest werks.gif
66KB, 524x416px
>>56914506
>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.
>>
>>56914506
Doesn't even have to be Gentoo, but I feel people would have an easier time with some programming languages on Linux
>>
>>56914307
pellesC

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

What aboot pellesC? I'm already using mingw64.
>>
>>56914552
>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.
>>
>>56914262
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
>>
>>56914563

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

>>56914617

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.
>>
>>56914262
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.
>>
>>56914642
>Pretty much every system function needed to implement libc on Windows is in kernel32.dll and well-documented.
then use them directly.
>>
>>56914640

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

Also, I don't even know you, Anon.
>>
>>56914661

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.
>>
File: bf1beta.png (3MB, 1752x938px) Image search: [Google]
bf1beta.png
3MB, 1752x938px
>>56914642
>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
>>
>>56914682
then use the crt library
>>
>>56914691

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.

>>56914754

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.
>>
>>56914771

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.
>>
>>56914663
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. https://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?
>>
File: Untitled.png (6KB, 500x140px) Image search: [Google]
Untitled.png
6KB, 500x140px
>>56914933
Why don't you just use the package manager?
>>
>>56914968
I have. It doesn't come up after installing.
>>
>>56914899

Hello Anon. Do I know you at all?
>>
>>56915110
Probably not but we interface here all the time.
>>
>>56915110
I mean, of course, Anon. It's me! Anon.
>>
>>56915163

I can imagine. I'm just wondering if you are a specific Anon I might remember for some reason.
>>
reminder that it's the same ~100 of us shitposting every thread
>>
>>56915230

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.
>>
>>56912637
haha ur gay
>>
>>56915261
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?
>>
>>56915261
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.
>>
>>56913926
Supreme taste my friend.
>>
>>56915261
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.
>>
>>56915261

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.
>>
>>56915398
I just answered my own fucking question retard
see: >>56915342
>>
>>56912619

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
>>
>>56915419

Why would you ask if you already knew the answer?
>>
>>56915443
Why are you using a fucking tripcode?
>>
>>56915440
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.
>>
>>56915440
Stop begin a fag and use snake_case.

>>56915449
Ruby has severe autism. Just leave him be.
>>
>>56915440

>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.

>>56915449

Why do you suck dick, Anon?
>>
>>56915440
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
>>
>>56915440
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.
>>
>>56915679
tl;dr
>>
>>56915641
>>56915679
You're using entirely too many "chain links".

I guarantee 90% of that is verbatim from posts.
>>
>>56915679
Is this pasta?
>>
>>56915440
There might be no standards, but there are guidelines.
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#S-naming
>>
>>56915756
> 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.
>>
>>56915259
I sure as shit haven't.
>>
File: nig smile elf.png (32KB, 114x136px) Image search: [Google]
nig smile elf.png
32KB, 114x136px
>>56915470
>Why do you suck dick, Anon?
>says tripfag
>>
File: 1369537141643.jpg (49KB, 414x465px) Image search: [Google]
1369537141643.jpg
49KB, 414x465px
>>56915757
>The language is so bloated and full of shit, they had to write "guidelines" to try keep their rampant shittiness under control.
>>
>>56915775
Fuck, I feel retarded.
>>
File: current year.jpg (21KB, 240x255px) Image search: [Google]
current year.jpg
21KB, 240x255px
>>56915801
>It's 2016.
>Twenty
>Fucking
>Sixteen.
>>
>>56915449
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.
>>
>>56915801
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?
>>
File: triggered aids skrillex.jpg (19KB, 193x269px) Image search: [Google]
triggered aids skrillex.jpg
19KB, 193x269px
>>56915826
>her
*triggered*
Xir pronouns are xe/xi/xo/xum. Get it right shitlord.
>>
>>56915841
>Xir pronouns are xylophone

Got it
>>
>>56915801
It's 2016.
Twenty
Fucking
Sixteen.

..

And POST still doesn't use advanced processing features to improve boot time.
>>
>>56915817
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.

>>56915828
>...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.
>>
>>56912689
The latter.

>>56912722
>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.
>>
File: current year kike.png (343KB, 692x630px) Image search: [Google]
current year kike.png
343KB, 692x630px
>>56915864
>It's 2016.
>Twenty
>Fucking
>Sixteen.
>>
>>56915880
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.
>>
>>56915981
>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.
>>
File: sexdreamtrump.jpg (1MB, 1219x2813px) Image search: [Google]
sexdreamtrump.jpg
1MB, 1219x2813px
can someone please give me feature idea for this?

https://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?
>>
>>56915981
Also, VBE and every other BIOS service has already been ripped away from us, UEFI is now the standard, and it's even worse.
>>
>>56916030
More like pic related please.
>>
>>56916030
A function that decides if the input is a valid mathematical expression.
>>
html fucking sucks.
Is there gui library for webgl?
>>
>>56916023

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;
}
}
}
>>
>>56916068
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.
>>
>>56916078

Whatever you're planning on doing, don't do it.
>>
>>56916112
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.
>>
>>56916078
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
>>
>>56912619
Pic related 100% finds smallest prime factor for any int up to 2^128
(smallest prime must be above or equal to 37).
>>
>>56916138
I'm going to need a formal proof of that.
>>
>>56916109
Yep, I like it. Where are you going with this though? do you actually plan on making a proposal or something?
>>
File: 1474910015307.gif (722KB, 245x245px) Image search: [Google]
1474910015307.gif
722KB, 245x245px
>>56916133
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
>>
>>56916148
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)
>>
>>56916007
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.
>>
>>56916117
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.
>>
>>56916206
>faggot race traitor nigger loving cuck with the worst possible taste in existence.

This is very rude, to be honest.
>>
>>56916170
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)
>>
>>56916213
But it's true.
>>
>>56916226

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.
>>
>>56916188
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?
>>
>>56916243
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)
>>
>>56916193
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)
>>
>>56916078
Yep, you can use react to render on the canvas thanks to the devs who got fed lsd and cocaine at flipboard

https://github.com/Flipboard/react-canvas
>>
File: dman.png (14KB, 160x301px) Image search: [Google]
dman.png
14KB, 160x301px
>>56912637
muh nig
>>
>>56916243
>synchronicity of data
I have no idea what you're trying to say with this phrase.
>>
>>56916288
Nevermind. got it. I was assigning the key (row number), and not the value (record).
>>
>>56916032
step 1
uninstall league of legends
step 2
kill yourself
>>
File: Untitled.png (65KB, 979x852px) Image search: [Google]
Untitled.png
65KB, 979x852px
>>56916030
Nigger what are you doing?
>>
>>56916381
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.
>>
>>56912619
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
>>
>>56916624
Lot of math if you're really ballsdeep in, but fun and games if your just brushing surfaces.
>>
>>56916668
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
>>
>>56916696
Jobs in the field are mainly for people with a degree though - at least in Europe.
>>
>>56916624
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.

>>56912689
The latter, jesus christ. Did they not teach you database normalization? The former becomes a nightmare if you try and change the model.
>>
>>56915398
>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.
>>
>>56916793
>Kun-chan, do you know about Sudoku?
>>
>>56916793
>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.
>>
>>56916932
Europe, and this is still only in education, thank god.
>>
>>56916793
At my friend's workplace they basically force the person that fucks up the repo to buy a pizza for everyone.
>>
parametricity is overrated
>>
>>56916949
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.
>>
>>56916549
well, i think the last step was a bummer.

>>56916949
>>56916959
>>56916969
>digits pattern
>>
>>56916969
>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.
>>
>>56917041
https://www.reddit.com/r/Showerthoughts/
>>
>>56917041
A ASCIIZ string reverser
>>
>>56917067
>>56917102
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 <hash>;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.
>>
>>56917129
Meth
>>
git was a mistake
>>
>>56917165
I sincerely don't think so. Imagine what these people would be doing if they DIDN'T have git.
>>
>>56917217
Fair point.
>>
File: 161017757_44042348.jpg (67KB, 590x632px) Image search: [Google]
161017757_44042348.jpg
67KB, 590x632px
>>56917217
>git is the only existing version control system
>>
File: uhhpepe.jpg (7KB, 192x185px) Image search: [Google]
uhhpepe.jpg
7KB, 192x185px
>>56916381
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
>>
>>56917246
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?
>>
>>56917276
>git is github
this is the worst part
>>
>>56917291
Dude, listen. You can't expect people who cant read a manpage to set up their own servers.
>>
>>56917276
Mercurial (bitbucket, pikacode, codeplex, ...)
Fossil (Chisel)
>>
>>56917322
Counterpoint, though- are any of them easier for a person who can't read a manpage to use?
>>
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.nq2w7ihjs

Kek
>>
>>56917364
https://www.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
http://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.
>>
>>56917419
http://www.cplusplus.com/reference/fstream/fstream/
>>
>>56917276
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.
>>
>>56917439
thanks
>>
>>56917419
http://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.
>>
>>56917442
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.
>>
File: 2016 reeeeeeeee.png (108KB, 719x823px) Image search: [Google]
2016 reeeeeeeee.png
108KB, 719x823px
>>56917410
>>
>>56917246
only existing good version control system*
>>
>>56917410
>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.
>>
>>56917506
People are making joke of JS, with all this frameworks and libraries.
Probably while im typing this commend we got 1 new framework
>>
>>56917410
>>56917506
what a terrible attempt at trying to imitate the style of http://harmful.cat-v.org/software/xml/soap/simple
>>
>>56917526
I'm not gonna lie, I'd bother to learn Javascript if there was a framework that was just Fieri catchphrase synonyms for "delicious"
>>
>>56917559
Write one.
>>
>>56917666
No, satan.
>>
>>56917690
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

https://www.youtube.com/watch?v=WWhohGNjvJI&feature=share
>>
File: 008.png (42KB, 296x344px) Image search: [Google]
008.png
42KB, 296x344px
>>56917889
Trying to get shit done with that seems like it would be like a fever nightmare.
>>
>>56917884
2015 was faster for me, not sure what your issue is.
>>
>tfw you're spending your last hours on twitter
https://twitter.com/hintjens
>>
>>56917913
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?
>>
>>56918090
Did you allocate the memory for the node?
>>
>>56918003
c++ literally gave him cancer
>>
>>56918121
yea, so I should free it i'd guess. Thanks
>>
>>56918003
why should i care
>>
File: 1288014809458.jpg (173KB, 400x433px) Image search: [Google]
1288014809458.jpg
173KB, 400x433px
>>56917410
I got a headache while reading that.

How... accurate is that article? How exaggerated is it? Is that really what JavaScript is today?
>>
>>56918333
Yes.
>>
>>56912689
This is a case where a document model works best. Relational requires multiple table lookups and joins.
>>
>>56917410
Please tell me WebAssembly is a joke, and not a real thing.
>>
>>56918579
Sorry, son.

https://webassembly.github.io/
>>
>>56918003
Poor fuck. What was wrong with him?
>>
>>56918579
welcome to the future
https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
>>
>>56918618
Cancer. :(
>>
>>56918618
http://hintjens.com/blog:115
>>
>>56918676
he survived the Cancer, just not the Cancer++
>>
>>56918751
Fucking savage, m8.
>>
>>56918602
>>56918659
How is that even supposed to work?
>>
>>56918991
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
>>
>>56920222
based voevodsky
>>
https://github.com/jwasham/google-interview-university
>>
>>56913876
Good luck man, what are you using to make it?
>>
>>56920312
It was Gödel, actually.
See https://en.wikipedia.org/wiki/G%C3%B6del%27s_ontological_proof
>>
>>56920274
Raytrace the simulation results.
>>
>>56920544
Thanks. I was thinking of using genetic algorithms to calculate critical mass for a radioactive isotope sample
>>
File: 0oafY1R.png (455KB, 698x767px) Image search: [Google]
0oafY1R.png
455KB, 698x767px
>>56913876
http://gbdk.sourceforge.net/

write an actual gameboy game in C
>>
>>>/vip/catalog

>>>/vip/catalog
>>
>>56920907
wtf lmao
fuck you hiroshit
>>
>>56920222
>>56920430
>defining God as the most positive being, therefore God trivially must exist
That's a big goal post move.
>>
>>56921075
God being a most positive being is not that controversial really.
>>
>>56921139
It's kind of meaningless, though.
>>
File: yui cry.gif (309KB, 400x300px) Image search: [Google]
yui cry.gif
309KB, 400x300px
>>56920907
>tfw nobody gifts you 4chan gold
>>
>>56915810
you realize that like literally every programming language which people actually use requires standards and guidelines, in the same way that countries have laws
>>
>>56921301
>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
>>
>>56920430
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

>>56920325
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
>>
>>56921370
Google
>>
>>56921370
C
>>
>>56921370
http://htdp.org/
https://www.edx.org/xseries/systematic-program-design-0

or

http://www.cs.hmc.edu/csforall/
https://www.edx.org/course/cs-all-introduction-computer-science-harveymuddx-cs005x
>>
>>56921469
where ?
>>
>>56921139
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.
>>
>>56921378
>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.

>>56921525
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.
>>
>>56921630
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.
>>
>>56921347
who said it was?

can't insult anything these days jeez
>>
>>56921783
>papers
show me
>>
>>56920907
It is immediately apparent that the true supporters of 4chan like anime, looking at the catalog.

>>56921850
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.
>>
>>56921847
Well the videos are mp4s and I don't have time to convert one at the moment but heres the code.

http://pastebin.com/Ek2WFWwv
>>
>>56921630
>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?
>>
>>56921981
Here's one that I can remember: http://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?
>>
>>56922187
This is the file in question: https://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
>>
>>56922341
no
>>
>>56922391
you could easily decode the files with the "base64" linux utility. if you are on windows, use https://frippery.org/busybox/ or powershell if it provides a way to decode b64 inputs...
>>
>>56922402
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!
>>
>>56922519
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
>>
>>56922444
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?
>>
>>56922627
when you stop being a dirty weeb
>>
>>56922540
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'.
>>
>>56922519
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.
>>
>>56922723
>you will never be a texan tycoon cowboy's eager, otacon-like assistant as he delves into artificial intelligence
>>
Does Javascript teach bad habits?
>>
>>56922784
stupid frogposter
>>
>>56921515
thanks, started cs-5x
>>
>>56922766
>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?
>>
>>56922723

Never worked with any of those things, 2bh.
>>
>>56922799
Javascript is a programming language.
>>
>>56922799
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?
>>
>>56922723
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; ?
>>
File: 1459761582123.jpg (60KB, 556x625px) Image search: [Google]
1459761582123.jpg
60KB, 556x625px
what's the difference between splitting your vim session and creating a new tab and loading the file there?
>>
>>56923437

#2, #2
>>
Which programming style is best for python? Functional programming?
>>
>>56922655
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

>>56922446
well, that's sad
>>
>>56923344
How so?
>>
>>56923437
honk *Node
go is the future
>>
>>56923437

typedef struct Node node;

node *honk;
>>
>>56923425
You can try California for that.

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

>>56923511
Whatever suits the team, project, and task.
>>
how do i use latex
>>
>>56923606
I am white. But ok, I'll try california -- or seattle works too, I hear.
>>
really boggles the mind that no one's made a programming language that consists of a DFA and 2 counters honestly, why would you need more anything else is bloat
>>
>>56923660

You stackoverflow until you memorize all of the commands you need to get the job done.
>>
>>56923711

That's how I'm learning Rails for my senior project. :^)
>>
>>56923668
>seattle works too, I hear.
That, and more specifically, Redmond, if all you care about is getting the H1B.

The other option would be to try one of those mid-market firms in nice smaller towns.

I almost took a job in Idaho Falls, ID because of this. Nice rural town full of rich people.

In any case, any tech-centric town that skyrockets in prosperity is going to be quickly inundated with undesirables. See: San Francisco, Seattle, Austin
>>
Anyone here familiar with Excel VBA?

I need to copy the first ten values from a row and then display those values in the next row using an array and a For/Next loop. The book actually shows you how to exactly how to do this with columns, but I'm a fucking moron so I'm completely lost on how to do it with rows.

Thanks in advance!
>>
>>56923731

That's terrible... why are you using Rails?
>>
File: 1475254940130.jpg (23KB, 480x318px) Image search: [Google]
1475254940130.jpg
23KB, 480x318px
>>56922078
>Your markov chains are shit.
I'm just scanning 4chan as a whole, the prefix size is only 4. I think it might be suffering because posts are so short and there's so much unique terminology. That, and I'm forcing it to start sentences with sentence beginnings (if it couldn't form a chain from the end of the last one) and to end with sentence ends.

I'm going to move to a new model soon where it just takes words with no regard for sentences and then ensures that they follow legitimate grammar formats. Would that likely produce better results?
>>
>>56923867

Well, pretty much everyone does web apps for senior project, and one guy in the group said "Okay, we're gonna use rails!" and I was like "whatever, duderino." and that's how it happened.
>>
>>56923838
>The book actually shows you how to exactly how to do this with columns
If you're using Walkenbach's book, give it the old trial and error and just substitute column for row in his macro. There should have been a CD/DVD of samples he provided, too. All of his macro code is actually really portable.

Do you know how to program outside of VBA?
>>
>>56923927
It kinda sucks that everything has to be a webapp these days, but it makes sense.
Most people never leave their web browser anymore.
>>
What would be the correct way to handle a gigantic amount of parameters being passed to objects that run in a threaded manner? Here's the params
[quote]
private final String threadName, crawlDomain, crawlPattern, imagePattern, startURL, textPattern;
private String workingURL;
private final WebTrie urlTrie, mediaTrie;
private final int maxDepth, assistDepth, id, iteratorStart;
private int workingDepth, pagesCrawled, delay, iteratorLocation;
private final boolean sidedness, backCrawl, gallery, verbose, downloadImages, downloadHtml, downloadText, includeLinks, iterative;
private boolean isFinished;
private final int linkAssist = 5;
private final WebStringUtils webStringUtils;[/quote]

What I'm currently doing is setting these params in the main class as static, then I have public static (synchronized) accessors that each thread pulls from to save into its local variables for accessing without worrying about threads colliding on attempting to access the variables, slowing them down
I used to pass it as a constructor but that got retarded fast
>>
>>56923973
fugg
private final String threadName, crawlDomain, crawlPattern, imagePattern, startURL, textPattern;
private String workingURL;
private final WebTrie urlTrie, mediaTrie;
private final int maxDepth, assistDepth, id, iteratorStart;
private int workingDepth, pagesCrawled, delay, iteratorLocation;
private final boolean sidedness, backCrawl, gallery, verbose, downloadImages, downloadHtml, downloadText, includeLinks, iterative;
private boolean isFinished;
private final int linkAssist = 5;
private final WebStringUtils webStringUtils;
>>
File: anal beads.png (32KB, 713x367px) Image search: [Google]
anal beads.png
32KB, 713x367px
>>56923838
>Excel VBA
I'll pray for you.

>>56923884
>words

Take it to the next level, anon. Use letters, but auto-correct the words as they are generated if they get mangled.

Then, analyze the sentence for structure add conditionally add helper words like "to", "the", and "of".

After that, analyze each sentence and evaluate how bad the grammar is and throw out anything below a threshold.
>>
>>56923973
Structs exist for this very purpose.
You group relevant variables together and pass a single pointer to a function instead of 20.
This also enables your functions to work on multiple contexts, simply by making an array of structs.
>>
>>56916969
Subtype polymorphism is far more overrated.
>>
struct Expr;

struct ExprOp {
char op;
Expr* l,r;
};

struct Expr {
ExprT type;
union {
ExprNum _num;
ExprStr _str;
ExprOp _op;
};
};

This gives the error:
 error: field ‘r’ has incomplete type ‘Expr’
note: forward declaration of ‘struct Expr’

I have to make an AST. what do?
>>
>>56923973
>objects that run in a threaded manner?
Nani?
>>
>>56924037
You're missing an asterisk.
Expr *l, *l;


Will work fine.
>>
new thread kpop edition please
>>
>>56923973
>>56923997
That's too much fucking exposed information for a single object.

I would bet my liver that you really REALLY need to refactor.

An object should represent a single concept, and can certainly be comprised of smaller objects or structs, if it makes sense to do so.
>>
>>56924061
Err obviously that was meant to be:
Expr *l, *r;


Not l twice.
>>
>>56924037
In a variable declaration, the * binds to the name, not the type. So you need to write:
Expr *l, *r;

In C and C++, "Type*" is sometimes a type and sometimes not.
>>
NEW THREAD!

>>56924121
>>
>>56912619
https://github.com/Floctioncers/Fi
Working on a little 4chan image downloader written in Prolog.
>>
Building a secure chat client for local network in C. Might be useful in uni
>>
>>56917009
In layman's terms, it allows you to reason about the possible inhabitants of a type, usually a function type. This is important for e.g. optimization.
>>
>>56923999
That sounds like reducing the problem to the point of obscurity but it's a cool concept. I don't think I want to put that much effort into a toy program.

>>56924013
Java doesn't have structs, would passing references to a bean be what I'm looking for? as far as I can tell that's the closest thing to structs that exist.

>>56924054
poor wording. The Objects operate on threads.

>>56924082
All of the params are just flags that the user sets in the command line for the search- they only affect the crawl and the data returned. The object does one single thing, and that thing is access web pages according to the rules that you've set. There actually are several classes in there- Tries, and there's a separate class for actually downloading images (The threads make calls to a manager that spawns download threads), but that's called from within the crawler objects themselves. as far as I can tell, I'm following OOP methodology correctly.
>>
>>56917410
Le 2016
>>
Just started university this fall, they teach C# in the first class, supposedly Java in the second. Learning arrays and loops and whatnot now.

using System;

public class Shitposter
{
public static void Main()
{
Console.Write("What do you want to shitpost: ");
String shitpost = Console.ReadLine();
String bigShitpost = shitpost.ToUpper();
for (int j = 0; j < bigShitpost.Length; j++)
Console.Write(bigShitpost[j] + " ");

Console.WriteLine();

int i;
int spaceAmount = 1;
for (i = 1; i < bigShitpost.Length; i++)
{
Console.WriteLine(bigShitpost[i] + new String(' ', spaceAmount) + bigShitpost[i]);
spaceAmount += 2;
}
}
}


Maybe one day I'll actually know what I want to do with my life.
>>
>>56924277
>using for loops in C#

Embrace LINQ, anon.
>>
>>56924308
do people actually use linq as a total loop replacement?
>>
>>56924414
Nah.

>they teach C# in the first class, supposedly Java in the second
What a downgrade, good luck man.
>>
>>56924494
Thanks. Maths is fucking me up the arse (first course that is actually a preparing course is giving me trouble already), guess I'm just retarded. But one can dream on becoming a productive member of the society.
>>
>>56924121
>>56924121
>>56924121
>>
How do I print out a character every Nth time I scan in some input?
>>
>>56924961
if you're in a loop just have a counter variable every time you read something in
 if(count % N == 0){ print();}
>>
>>56916793
In general the best way to handle it would be to show the guy what he should of done and walk him through the steps to do it right. Chances are he just doesn't know the correct way to go about it. Keep the feedback constructive, no reason to get mad
Thread posts: 329
Thread images: 31


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.