[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]

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: 327
Thread images: 37

File: shot0033.jpg (310KB, 1920x1080px) Image search: [Google]
shot0033.jpg
310KB, 1920x1080px
/dpt/ Daily Programming Thread

Daisuki~ edition

Previous thread: >>56988452

What are you working on, anon?
>>
thank you for using an anime image
>>
would you cum in akari?
>>
If I weren't such a useless piece of shit I'd write a cool program and name it after Akarin so people have to click on "Akarin" when they launch it.
>>
File: 1427568927580.jpg (136KB, 960x1280px) Image search: [Google]
1427568927580.jpg
136KB, 960x1280px
Rate my fizz buzz generator generator
{-# LANGUAGE TypeApplications #-}

import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import Control.Monad (when)

main = do
args <- getArgs
when (length args /= 1) $ do
progName <- getProgName
putStrLn ("Usage: " ++ progName ++ " <upper bound>")
exitFailure

let n = read @ Integer (head args)

putStr . unlines $
"if __name__ == '__main__':" :
indent (
"print('#include <stdio.h>\\nint main(void) {\\n')" :
("for i in range(" ++ show n ++ "):") :
indent (
"s = ''" :
"if i % 3 == 0: s += 'Fizz'" :
"if i % 5 == 0: s += 'Buzz'" :
"if s: print(' puts(\"{}\");'.format(s))" :
"else: print(' printf(\"%d\\\\n\", {});'.format(i))" : [])) ++
["print(' return 0;\\n}')"]
where
tab = replicate 4 ' '
indent = map (tab ++)
>>
Programming is pretty fun
>>
>>56994031
nice, but why don't you store the strings in a tree then flatten it by indentation
>>
>>56994078
pls no bully
>>
File: cake.webm (447KB, 900x506px) Image search: [Google]
cake.webm
447KB, 900x506px
>>56994049
"There are people who actually like programming. I don't understand why they like programming."
-- Rasmus Lerdorf, creator of PHP.

>>56994031
>The c part has more than one IO call
Into the trash it goes.

>>56994026
http://akaribbs.mooo.com/

>>56994021
No
>>
File: 1453537401215.png (9KB, 210x72px) Image search: [Google]
1453537401215.png
9KB, 210x72px
is there a purpose to setup.py when I am making an application and not just a module?

Someone asked me to do setup.py for my shitty little linux program. And I am not sure what benefits it brings over just simple bash script that places files where they belong...

or can I actually kinda "upload" my setup.py to pip or somewhere and in the future just use pip to distribute? Is pip like AUR? Nah, that cant be, that be crazy... or is it?
>>
>>56994096
>"There are people who actually like programming. I don't understand why they like programming."
>-- Rasmus Lerdorf, creator of PHP.
That really explains a lot
>>
>>56994106
http://axonflux.com/5-quotes-by-the-creator-of-php-rasmus-lerdorf

"""
I really don't like programming. I built this tool to program less so that I could just reuse code.

PHP is about as exciting as your toothbrush. You use it every day, it does the job, it is a simple tool, so what? Who would want to read about toothbrushes?

I was really, really bad at writing parsers. I still am really bad at writing parsers. We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you should be using. I don't care about this crap at all.

There are people who actually like programming. I don't understand why they like programming.

I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I'll just restart apache every 10 requests.
"""
>>
>>56994102
this post made me smile
>>
>>56994127
The fact that people unironically like and defend PHP will always make me cry
>>
>>56994096
>http://akaribbs.mooo.com/
Image attach when
Seperate boards when
>>
>>56994150
After the donation button.
>>
>>56994127
>http://axonflux.com/5-quotes-by-the-creator-of-php-rasmus-lerdorf
>those comments
just fucking kill me
>>
>>56994150
>http://akaribbs.mooo.com/
Those drop shadows are disgusting
>>
Have been reading up on assembly programming, it seemed pretty fascinating at first
>>
Single use functions
y/n?
>>
File: sad.jpg (50KB, 500x333px) Image search: [Google]
sad.jpg
50KB, 500x333px
>>56994130
>>
>>56994197
of course
>>
>>56994197
yes.
>>
>>56994096

>Implying there is anything wrong with more than one I/O call.
Most programs are heavily focused around I/O by necessity.
>>
>>56994209
i only said that because i dont use python and i dont know what a setup py is as well, it was just amusing

>>56994197
ya
>>
>>56994096
>The c part has more than one IO call
How would you do it? I don't really want to deal with strcat etc.
>>
>>56994197
Multi use are cancer. All implicit parameters are signs of design flaws
>>
>>56994150
Waiting for your pull requests.

https://github.com/microsounds/akari-bbs

GPLv3 licensed!
>>
>>56994197

Acceptable as a way of organizing code. No one likes seeing a super long main, so it can be logical to divide tasks into separate functions that are easy to maintain in their own right.

You can always inline them anyways to avoid any cost from function calls.
>>
>>56994242
>800 LOC function
>don't break it up into sub functions
k
>>
>>56994243
>GPLv3
dropped
>>
File: n.png (150KB, 587x855px) Image search: [Google]
n.png
150KB, 587x855px
>>56994239
puts("1\n"
"2\n"
"Fizz\n"
"4\n"
"Buzz\n"
...);
>>
Hi I'm learning javascript. What would be a good beginner project?
>>
>>56994266
But that does something different. I do the number formatting in C.
>>
>>56994279
Fizzbuzz
>>
Any books that explain how a programming language virtual machine is implemented? I really like that stuff and want to create one, but I don't know where to start. For now I'm just studying the code of the JVM, CPython, YARV...
>>
>>56994303
fizzbuzz generator generator generator.
>>
>>56994303
then

printf("%d\n"
"%d\n"
"Fizz\n"
"%d\n"
"Buzz\n"
...,
1, 2, 4, ...);
>>
>>56994323
How many args can printf handle?
>>
>>56994310
Virtual Machines: Versatile Platforms for Systems and Processes

It does cover both system and language VMs.
>>
>>56994243

Why are you using fprintf with stdout? Why not simply use printf? Do you expect your program to be printing to a different file in the future?
>>
File: 1471712271702.jpg (689KB, 1000x769px) Image search: [Google]
1471712271702.jpg
689KB, 1000x769px
>>56994180
>>56994096
Flat is JUSTICE. Drop the shadows!
>>
>>56994335
Thanks!
>>
Why the fuck won't this compile?
http://ix.io/1uxH
>>
>>56994332
as many as you can put on the stack. i think you can pass the arguments as a buffer with vprintf
>>
>>56994243
>>56994265
>not AGPLv3
>>
>>56994332

As many as will fit on the stack. Varargs is a weird thing, and I would not abuse the fuck out of it.
>>
>>56994373
>>56994382
Nice. I'll look into that.
>>
Theres so many books on c, which do i want? what i want it to avoid developing bad habits
>>
>>56994266
Fuck you notch you fraud
>>
>>56994167
Why did you make me look? Fuck this.
>>
>>56994398
K&R 2nd ed is the gold standard in C literature.
>>
>>56994398
c primer plus
>>
>>56994423
what splits it from the competition? Is it like a uni standard book (similar to how that bluej thing is used everywhere)?
>>
>>56994423
If K&R is the golden standard, then the other books must be shit as well :DD
>>
>>56994265
Just like ur mum did at your birth
>>
>>56994398
C++ Programming by Bjarne Stroustrup
>>
>>56994472
shut up dad :(
>>
>>56994323
The C standard says a function must be able to have at least 127 arguments to a function call, so you're good on any implementation.
>>
>>56994398

C Primer Plus. Probably the best if you want to learn the latest standard of C.
>>
>>56994437
It's short, concise and co-authored by the creator of the language itself.

Of course, it doesn't take into account later developments of the C standard.
>>
>>56994564
>>56994549
Hmm, so i guess either CPP or K&R. They both look good. Ive also seen Computer Systems: A Programmer’s Perspective suggested, and it seems to be the one used in universities. Those 3 are the shortlist i guess, are they all the same content in the end though?
>>
>>56994096
nice box shadows NERD
>>
>>56994639
You should also read Algorithms and Data Structures.
>>
it triggers me how much C is talked about here
>>
writing a vector math library for python, but having issues with floating point accuracy
Vec2(sqrt(2), sqrt(2)).length() returns 1.9999999999998 instead of 2 for example

do other libraries deal with that correctly, or is it "close enough"?
>>
>>56994859
https://en.wikipedia.org/wiki/Machine_epsilon
>>
>>56994841

And what language would you prefer we talk about, Haskell?

>>56994859

Aside from the fact that floating point operations are pretty much always inaccurate, you should consider also that any representation of the square root of 2 with a finite number of bits will be inaccurate, because the square root of 2 is irrational.
>>
>>56994841
It triggers me how much C++ is talked about here.
It's pretty clear that all of the proponents of C++ are complete beginners though.
>>
>>56994150
>>56994359
>>56994824
>>56994354
I am not microsounds
>>
I'm gonna program scheme for a whole semester. How fucked am I /g/ ?
>>
>>56994963
not at all you fucking cunt

scheme is easy and so is programming
>>
uh, did anyone elses ubuntu system change a bunch of icons and colors in the desktop enverimont after booting today?
>>
>>56994976
I have programmed for more than 5 months on C you retard. Scheme is fucking useless and inefficient. I have to lose 30 minutes thinking on how to do soemthing without using loops that I could do with 5 minutes in C.
>>
>>56994902
>And what language would you prefer we talk about, Haskell?
yes, please :3
>>
File: 1400436996079.jpg (117KB, 937x1072px) Image search: [Google]
1400436996079.jpg
117KB, 937x1072px
>>56995004
>I have to lose 30 minutes thinking on how to do soemthing
Welcome to programming you sodding freshman kid.
>>
>>56994979
No, because loonix is fucking shit trash
>>
>>56994979

I'm on Ubuntu, but I haven't rebooted in 42 days.
>>
File: anri_okita.jpg (80KB, 1080x1349px) Image search: [Google]
anri_okita.jpg
80KB, 1080x1349px
!!! ACHTUNG !!!
Write a program that prints the directory listing for a given path.

Solution in Python:
#!/usr/bin/env python3

import os, sys

path = sys.argv[1]
for name in os.listdir(path):
print(name, end=' ')
print()
>>
#!/bin/sh
ls $1
>>
>>56995025
Holy shit you're retarded. Have fun shilling your stupid meme language. Doing something that takes more effort for no gain is stupid and so are you if you haven't realized that
>>
>>56994305
http://javascriptcodeexample.x10host.com/cgi-bin/fizzbuzz.html

<button onclick="function1()">Count 1 more!</button>

<p id="text1">0.</p>

<script>
var count=0
var result="0."
var next=""
function function1() {

count++
next=""

if(count%3===0){
next="fizz"
}
if(count%5===0){
next+="buzz"
}
if(count%3!=0 && count%5!=0){
next=count
}

result=result.substring(0,result.length-1)+", "+next+"."

document.getElementById("text1").innerHTML=result
}
</script>


Thoughts? Suggestions? Was thinking of going... if(result.length===0){result=next+"." ... so it wouldn't have to start at 0 to be grammatically correct but that would make the calculation take longer.
>>
How much does /dpt/ value test driven development?
>>
>>56995038
Hasklel
import System.Directory (listDirectory)
import System.Environment (getArgs)

main = getArgs >>= listDirectory . head >>= putStrLn . unwords
>>
>>56995038
ls
>>
>>56995050
Enjoy you're code monkey jobs brainlet.
>>
>>56995068
I only value code driven development.
>>
want to learn scripting language to avoid bash scripting, but can't decide between python and perl. perl seems so attractive and "l33t" but python seems like autism. what do?
>>
>>56995088
>im so smart everyone is a code monkey xd google accept me
mcfucking kys
>>
>>56995098
Python
>>
>>56995108
I'm not saying I'm smart, but if you're not willing to spend 30 minutes on thoroughly thinking out the design of your code to make it elegant and efficient, you're never going to land a decent and enjoyable job.
>>
Is 5 months enough to learn C and C++?
>>
>>56995132
C yes, C++ no
>>
>>56995132
>C
Assuming you've got previous programming experience, you should be able to get somewhat decent at C in that time.

>C++
That will require at least 10 years, and probably another 5 of therapy.
>>
>>56995132
Depends how smart you are and how much time you spend at it. C++ is a clusterfuck to remember though.
>>
>>56995068
Probably the most retarded movement in programming in the past 10 years.

Nearly as dumb as dynamically typed langugaes.
>>
>>56994841
>>56994929
It triggers me how little Haskell is shat on here.
>>
>>56995153
>>56995151
what makes c++ so different?

>>56995151
My programming experience is basically nill. Ill start uni 5 months and from what i can tell the first year is focused on oop in java for the first semerster. I dont really want to learn java so i figured C would be better to learn first since you actually learn optimization and stuff.
>>
>>56995172
I guess you're new here.
>>
>>56995068
Like putting the cart in front of the horse.
>>
>>56995130
Its not about making good code, as I've said I have coded for a short time but I have improved it, I try to not make shit code. It's about wasting time doing something with recursiveness instead of a simple loop.
>>
>>56995204
Optimization is platform specific.
If you're serious about being able to do it well, I suggest you learn about your target platform at the architecture level in addition to how the operating system you plan to use manages any available resources (MMIO/PMIO for example), maps virtual memory (if applicable) and understanding your program's execution flow in detail, including the loading and execution of shared/dynamically linked libraries.
In other words, if you haven't programmed before, don't even consider optimization before building up your knowledge and understanding in computer architecture.
>>
>>56995004
c is disgusting, it does miss a lot of basic programming concepts while scheme is decent for both applying and implementing these.
>>
>>56995285

what are you saying, mate? are you some kind of fgt? C is the shiznit.
>>
>>56995282
so c then architecture then optimization? By architecture isnt it basically just 86_64 or ARM
>>
>>56995068
tdd is great but also somewhat difficult thus the hate from the non-experienced programmers who abound on dpt. it's superiority has been demonstrated by empiric proofs.

>>56995282
>Optimization is platform specific.
the most important optimizations are about algorithm design and abstraction.
>>
>>56995204
>what makes c++ so different?
There's just so much shit. A lot of learning C++ is learning what parts of C++ to avoid.
>>
>>56995312
That is usually the natural order of things. Computer architecture can vary from system to system as it encompasses the individual components at a fundamental level, but the CPU provides the abstraction required to communicate with them over various buses. So yes, generally understanding the CPU architecture you are working with in some detail is sufficient.

>>56995335
I would argue that algorithm design is a completely different subject but implementing one truly efficiently requires a solid understanding of how your specific hardware works.
>>
>>56995054
It works
>>
This gave me aids.
https://thebestmotherfuckingwebsite.co/
>>
>>56995427
http://adventurega.me/bootstrap/
>>
>>56995427
looks fine to me
>>
>>56995427
Jesus Christ.
The #1 of all those sites is definitely
http://bettermotherfuckingwebsite.com/
>>
>>56995427
At least it doesn't force smooth scrolling.
>>
>>56995459
How foolish. The true best is ultimately
https://bestmotherfucking.website/
>>
>>56995427
I actually quite like it.

But clicking the arrow circle flashes a dotted square around it, which is unacceptable for something that's purportedly the best motherfucking website.

>>56995451
Who cares if it's creative if it looks good.
>>
>>56995490
>Who cares if it's creative if it looks good.
Autistic self important web designers
>>
>>56995427
>https://thebestmotherfuckingwebsite.co/
>>
Is there a way to get nodejs with express to update files without restarting the server?
Is it due to caching or something?
Having to Ctrl-C every time is kinda annoying...
>>
I've done C++ on Windows for a bit, I now want to dev/compile my projects on Linux too. My linux experience is some command line stuff, I've never used make.

I've got a VM set up with Debian and a desktop environment. Where do I go from here? I'm preferably looking for a graphical IDE similar to Visual Studio. Do I compile libraries just with a few make commands?
>>
File: Screenshot_2016-10-09_15-13-43.png (71KB, 645x655px) Image search: [Google]
Screenshot_2016-10-09_15-13-43.png
71KB, 645x655px
>>56995518
Holy shit. Is this satire?

>The guy is from Indonesia.
>Pajeet meme is real
Kill me
>>
>>56995546
If you're going with an IDE, you don't really need to use make desu, it just does that for you.
If ya wanna work with GUIs and stuff, get the Qt IDE, otherwise get something like CodeBlocks.
When you're ready to give up IDEs, get vim or emacs.
>>
>>56995546
I'd recommend porting your Windows build over to CMake.
It'll generate VS project files for Windows and Makefiles for *nix by default.

It'll get you started with cross platform builds.
>>
>>56995546
fuck make, use bazel, it's so much easier to use.
>>
>>56995567
>https://thebestmotherfuckingwebsite.co/
>Holy shit. Is this satire?
Click 'Epilogue'
>>
File: Screenshot_1.png (87KB, 1211x393px) Image search: [Google]
Screenshot_1.png
87KB, 1211x393px
>>56995567
>>
>>56995572
Why would you want to give up IDEs?
>>
>>56995592
Because some languages don't have their own IDEs.
Because vim and emacs are awesome once ya get used to them.
etc. etc.
>>
>>56995585
>>56995592
Still want to die though

>http://www.forbes.com/
>http://www.reddit.com/
>>
>>56995567
Indonesia != India
>>
>>56995623
>Because some languages don't have their own IDEs.
Fair enough. If you necessarily feel the need to be an avant garde hipster working in the latests shitty memelang.

>Because vim and emacs are awesome once ya get used to them.
In what way could the possibly be more awesome than a good IDE?
>>
>>56995459
>>56995484
Both wrong. Bets one is http://motherfuckingwebsite.com/
>>
i thought satire was supposed to be funny
>>
File: Screenshot_2016-10-09_15-34-07.png (26KB, 684x163px) Image search: [Google]
Screenshot_2016-10-09_15-34-07.png
26KB, 684x163px
>>56995684
No. It should be as simple as possible, but not simpler.
>>
>>56995541
File watchers.
>>
File: Screenshot_2.png (30KB, 475x429px) Image search: [Google]
Screenshot_2.png
30KB, 475x429px
>>56995672
I mean, maybe I could find an IDE for them, but I'm a student who likes to fuck about in different languages, so having 20-ish IDEs installed is kind of silly.

As far st the vim and emacs things go, though.
There's the fact that they're keyboard only, the macro systems, the plugin support they have, that you can make your own easily, since they're decently simple editors, and also emacs goes along really well with lisps, especially with SLIME et all installed...

I can't guarantee that it'd make you that much more productive, but if you have the time, it's certainly fun to mess around with.
>>
>>56995803
>likes to fuck about in different languages
>no Haskell
>>
>>56995759
Tried nodemon, it takes 5-10s to actually restart, and doing it manually with the rs commands crashes randomly...
>>
>>56995815
I don't have THAT much free time, anon...
>>
>>56995823
Then don't use node.
>>
>>56995835
It's fucking easy
>>
>>56995839
Fair enough, but I'm just doing a small 'fucking around' project, so getting out C or Java was out of the question, and it was faster than either Python or Ruby, soo...
I mean, maybe I could've done it in Scheme with chicken and awful, but I've done one too many lisp projects lately...

>>56995849
Maybe, but most tutorials/books I've found made it sound kind of boring and hard to get into.
>>
>>56995883
Go is a good middle ground.
>>
>>56995883
>Maybe, but most tutorials/books I've found made it sound kind of boring and hard to get into.
how
it is really straight forward

f x y = x + y

f 3 4 -- guess what this is
>>
C# or C++?
>>
Just finished this little piece of code:

/* Compute the greatest common divisor of two integer numbers */
int
Gcd(int m, int n) {
int remainder = 0;
int gcd = 0;

/* Euclid's method */
while (n not_eq 0) {
remainder = m % n;

m = n;

n = remainder;

}

gcd = m;

return gcd;

}
>>
File: Screenshot_3.png (58KB, 631x473px) Image search: [Google]
Screenshot_3.png
58KB, 631x473px
>>56995897
Oh, yeah, fair enough, I often forget about that one.
I'll see if it's any better.

>>56995899
>pic related
I mean, I'll give it a go eventually, I just wanna go through OpenGL and AI stuff atm.
>>
>>56995940
oh dear god that formatting
>>
>>56995923
c++
>>
>>56995923
C++, why would you want only be able to make programs for .NET?
>>
>>56995923
C, otherwise C#.
C++ is a horrid mess, and most people confuse that for "difficulty" and "challenge", so don't listen to them.
>>
>>56995923
Objective C is objectively better than both.
>>
>>56995949
>worker :: Int -> TQueue Int -> TQueue Int -> MVar () -> IO ()
worker takes an int, a TQueue Int, another, and an MVar () and produces an IO ()

>forever do
pretty straightforward

>j <- atomically $ readTQueue jobs
atomically read from jobs, assign that to j

>withMVar lock $ \_ -> do
with the M Variable "lock" do

>putStrLn $ ...
print that string

>threadDelay (1 * 1000000)
1 second delay

>atomically $ writeTQueue results (2*j)
Write 2*j to "results" (atomically)
>>
What would you suggest me for android development?
Android studio works like shit, i cant handle it anymore, it makes me punch my laptop.
Few years ago i used eclipse but and i dont know how it is working now.

I need to see output for design instant, that is like most important for me.
>>
>>56995923
Depends on the task. If you don't need extremely high performance, then C# every time.
>>
>>56996014
>I need to see output for design instant
Android Studio has a WYSIWYG designer
>>
>>56995991
>>56995949

desu this is some straightforward code

>jobs <- atomically $ newTQueue
Assign a new TQueue to jobs (atomically)
>results ...
Above

>lock <- newMVar ()
assign a new M Var to lock

>forM_ [1..3]
Perform a monadic action (M) and discard the result (_) for every item in [1..3] (1, 2 and 3)
>forM_ [1..3] $ \w -> do
For every w in [1..3] do this action:
>forkIO $ worker ...
On a new haskell thread, call worker with those args

>forM_ [1..9] $ atomically . writeTQueue jobs
For every element in [1..9], atomically write it to jobs
>forM_ [1..9] $ \_ -> atomically $ readTQueue results
For every element in [1..9], atomically read from from results
>>
>>56995991
>>56996046
Fair enough... No more excuses...
I'll give it a go when I'm done with my current stuff.
The examples I found while looking for that actually looked decently clean...
>>
>>56996041
I know that, but i have problem with android studio speed.
1st when i start it, i need to wait like 5 min to load everything
2nd it has delay when i type
3rd when i click right click on something, i need to wait like 5 sec to show options
4th when i run code, damn, i can go take a shit, and when i come back it is almost done

I heard that real problem is in java version, not in android studio, but fucked, i couldn't fix it.
I'm using linux btw
>>
>>56996094
What are your system specs?
>>
>>56996094
Maybe try connecting your phone and using it instead of a VM?
It should reduce the load on your computer by a lot.
>>
>>56996075
\x -> e

is a lambda

f $ x
is f x, which might seem useless except that it's like putting parentheses around the latter

f $ 3 + 4
=
f (3 + 4)


_
just indicates to ignore that value, e.g. \_ -> e (or
const e
) is a lambda that ignores its argument


do
begins a do-block, which is sugar for some monad operations
>>
File: Избор_084.png (42KB, 627x291px) Image search: [Google]
Избор_084.png
42KB, 627x291px
>>56996113
I have same problem with all JetBrains IDEs, not only android-studio.

>>56996120
I am using galaxy s3 phone for running apps, sometimes genymotion.
>>
>>56996150
>Intel Celeron
aren't those the carbage CPU's that are meant for office computers that are used for nothing but sending emails?

I'd expect it would run faster on windows too. Better optimization etc.
>>
>>56996175
This is cheap lenovo laptop, i think lancer A50-30 or a30-50, something like that
>>
>>56996189
Yeah, you need something better for using a heavyweight IDE.
>>
>>56996210
Well that why i'm asking for some alternatives. Eclipse worked fine in past, but i dont know how it works now
>>
>>56996189
i hate to suggest it but have you looked at any online ides? usually these are based on eclipse che. i have no idea how good it is for gui stuff but most everything else ought to be faster. there will surely be new annoyances though
>>
>>56996246
>Eclipse worked fine in past
Isn't Android Studio built on top of Eclipse? Eclipse was always dog slow to me.

I don't know. I'd bet doing android dev in anything but Android Studio is pain.

You can try Xamarin Studio if you don't mind C#.
>>
>>56996268
>Isn't Android Studio built on top of Eclipse?
I dont think so, it is is made completely by JetBrains.
>>
Database-relations related question - I came up with a couple of solutions and I'd like to know what you think of them, which is best or if there is a better option.

There is a pool of images described in a table. We want to make arbitrary collections of images, so that a user can select a number of images and create a collection out of them they can retrieve. Sounds basic, right?

create table IMAGE (PK, FILE);
create table COLLECTION_HAS_IMAGE(IMAGE_PK, COLLECTION_PK, PAGE);
create table COLLECTION(PK, NAME);


For example, where the "page" field in the many-to-many table is what page the image is in the collection. For ordering.

But here's the part I'm confused about how to proceed:
We want to determine which of the pages in the collection is the "cover" - the image used to represent the collection and the one users will see. So one collection only has one cover, right?

I came up with the following solutions:
-Nullable Foreign key to COLLECTION_HAS_PAGE on COLLECTION. Sounds weird, but it'd solve the issue.
-Boolean "is_cover" on COLLECTION_HAS_PAGE
-Third table, COLLECTION_HAS_COVER with a reference to possibly any arbitrary FILE .

I prefer the first option, as it avoids having to re-set the "is_cover" field when you e.g reorder pages.
>>
>>56996292
the first doesn't sound weird to me at all
>>
>>56996317
oh wait you're doing a foreign key to the second table
why not just to an image
>>
>>56996326
Because I'd like to constrain the images to the ones in the collection.
>>
>>56996356
>>56996326
>>56996317
Also, for some collections I wish to preserve "an original order", which means I can't simply put what I want as the "cover" to page 0.
>>
>>56996356
your table names are confusing me! HAS_PAGE comes outta nowhere
it seems to me like all of your solutions have similar drawbacks in that the schema isn't enforcing everything you're describing. this sort of thing doesn't bother me at all; i'd be more worried about speed
>>
Why is cross-compiling such a miserable experience?
>>
>>56994001
/hbg/-chan, daisuki~
>>
File: last.png (23KB, 522x695px) Image search: [Google]
last.png
23KB, 522x695px
Working on my terminal emulator, currently working on a better design for the cell handling to improve the marking of dirty cells, to make the rendering faster.
>>
>>56996653
Wondering the same thing. Why can't there be compiler which could just easily compile to targeted arch and why must every build tool suck?
>>
>>56996668
That looks cool. How are you rendering it currently? Any interesting implementation details you could share?
>>
>>56996668
What are you using for rendering?
>>
>>56994127
I think it's pretty brave/cool of him to just be honest like that. Most people with his level of unexpected success would've just fed you a bunch of marketing bullshit.

I wouldn't say it's his fault that PHP was a bunch of Perl scripts that got out of hand.
>>
>>56996741
I thought CMake was going to be alright, until the exact same project built fine on Linux and then refused to link on Windows for no good reason.
>>
>>56996783
>>56996792
I'm using Cairo and Pango for rendering, the plan is to make it cross-platform, so that will help a lot.

Currently it just uses the XCB backend for rendering and windowing and xkbcommon for keyboard handling.

I guess the only interesting implementation detail right now is it doesn't render what it doesn't have to.

Each operation on the terminal object (handling the output from the pty [i.e. parsing and handling the control codes], key inputs and string input) return an iterator over the dirty cells, then the renderer only renders those dirty cells, leaving the rest untouched.

Instead of a loop with an FPS limit to do the rendering it listens to EXPOSE events from X11 and only renders the cells within the damaged area that the event provides, this allows very fast rendering since only what needs to be rendered actually is rendered.
>>
>>56996831
>Cairo and Pango
neat.

Have you looked into Skia? It's a bit faster, especially for software rendering. Though I'm sure Cairo is plenty fast.
>>
>>56996915
I don't think it would make any difference, all I'm using are rectangles, lines and glyph rendering (which is handled by Pango).

And Skia has the problem of being written in C++ and not having a stable C API, which means I can't use it without having to kill myself.
>>
>>56996949
>not having a stable C API
I think they do now actually. But yeah, no point using it at this point anyways.
>>
File: Untitled-3.png (47KB, 987x794px) Image search: [Google]
Untitled-3.png
47KB, 987x794px
What's a good algorithm for finding the largest common subtree in a tree? I have an expression like pic related that I basically want to make more readable by having it say something like

e^at
where a = blah blah blah

The subtree I'd hope it would find in this case is Sqrt[(-1 + Zeta^2) Omega^2]
>>
http://ircv3.net/
>>
File: 1355318949556.jpg (100KB, 588x720px) Image search: [Google]
1355318949556.jpg
100KB, 588x720px
#include <vector>
#include <functional>

struct Person {};

class Group {
std::vector<std::reference_wrapper<const Person>> persons;
public:
const std::vector<std::reference_wrapper<const Person>> &getPersons() const;
};


>this is legal C++
What went wrong?
>>
>>56997087
With Classes
>>
>>56997071
Common to what?
The largest subtree in a tree is the tree.
The largest proper subtree in a tree is the tree with one leaf removed.
>>
>>56997087
Your mom.
>>
>>56997071
Try dynamic programming.
>>
File: Untitled-4.png (8KB, 360x360px) Image search: [Google]
Untitled-4.png
8KB, 360x360px
>>56997119
Right my bad. Basically the largest subtree that's repeated more than once.

In this case pic related.
>>
>>56997166
S and omega are different free variables, so they aren't equivalent
>>
>>56997176
That's zeta and no, they aren't distinct. They're all bound at the top level.
>>
>>56997190
How does the algorithm know?
>>
>>56997166
http://sco.h-its.org/exelixis/pubs/Exelixis-RRDR-2013-5.pdf
Does this help?
>>
>>56997217
Translation: They're not free variables. It's a fixed structure. He's not looking for a unification algorithm.
>>
>>56997234
But if they're equal, why use different symbols?
And if they aren't, how are they common subtrees?
>>
>>56997220
Yeah probably, thanks.
>>
>>56997263
Zeta is not equal to omega, but any Zeta in that tree is equal to any other Zeta, and so on, and so on.
>>
>>56997299

Oh shit, I missed the bigger picture
>>
I'm working on a quiz web app for some students of mine. Eventually I'll have the questions in MongoDB but for now I'm putting them in a JSON file so that I can test the functionality of the site.

The questions are "fill in the blank" style. I've got an array of questions each with a question and an answer. My question is: I really need to be able to set multiple answers for some, but not all, questions. For example, if the answer is "Octave" I need to allow it to also accept "Octaves." If the answer is "Alaska and Hawaii" it should count "Hawaii and Alaska," "Alaska Hawaii" and "Alaska, Hawaii."

How do I need to set up my questions file, and the Javascript logic for this?
>>
>>56997375
Are the answers entered at text?
>>
>>56997662
Yes. Some of the questions are math but all answers and input are strings.
>>
File: Избор_084.png (37KB, 450x544px) Image search: [Google]
Избор_084.png
37KB, 450x544px
How can i disable tittle bar in android app?
This is how it looks in design preview, but when i run app, it has tittle bar on top.
>>
File: 1474139068785.jpg (68KB, 594x598px) Image search: [Google]
1474139068785.jpg
68KB, 594x598px
>>56997375
>MongoDB

>>56997979
>tittie bar
>>
>>56997979
Immersive mode
>>
>>56997990

That's a man.
>>
>>56997818
so just have a string array of valid answers for each question
>>
>>56998108
ur a nigger
>>
>>56997375
>MongoDB
/dev/null is both faster and provides more consistent behaviour.
>>
File: ethan.png (574KB, 1321x1238px) Image search: [Google]
ethan.png
574KB, 1321x1238px
whats the deal with computer science students always bitching about how they're not learning "practical" stuff? it seems like everyone in a csci program always complains about how they don't want to learn theory and just want to learn web and app development.

spending thousands of dollars and 4 years of your life to learn HTML is the most retarded thing i've ever heard in my life
>>
>>56997990
who is this semen demen
>>
File: 1459228391034.jpg (770KB, 1500x1109px) Image search: [Google]
1459228391034.jpg
770KB, 1500x1109px
>>56998344
anzu, the Purest Queens of the T*rks
>>
>>56997990
>>56998242
I'm in a code boot camp and Mongo is the requirement for this specific assignment.

>>56998176
That's what I was thinking (set a loop to the length of each question object's answer array, loop through looking for a correct answer) but I'm not familiar enough with this to know if that'd with. Specifically, I didn't know if each question could have a different length answer array.
>>
File: 1463099479334.jpg (276KB, 1066x1600px) Image search: [Google]
1463099479334.jpg
276KB, 1066x1600px
>>56998366
>*Queens
Queen
>>
File: 1474116900930.png (337KB, 503x469px) Image search: [Google]
1474116900930.png
337KB, 503x469px
>>56998411
>code boot camp
BAIL OUT
>>
>>56998436
It's not so bad. I'd never done web development before so this has helped me with some projects at work. I could have self taught but I don't have that kind of discipline
>>
>>56998316
ethan sounds like a nice guy
>>
>>56998316
That's because people confuse CE/SE/coding with programming and CS. Most 'CS' programmes in US universities are actually shitty CE/SE placebos. CMU, MIT, UPenn and Stanford are among those few that actually provide decent CS programmes.
>>
>>56998486
As long as you forget about StaleReadsDB after this, there is not that much of a problem.
>>
>>56995098
>Thinking Python is autistic and perl isn't
>>
>>56995204
Write an operating system in C.
>>
File: cs.jpg (1MB, 1904x4706px) Image search: [Google]
cs.jpg
1MB, 1904x4706px
>>56998549
mit program is now shit. berkeley has a great program, probably the best right now among the "top" universities. but, history wise, the best program ever was http://aduni.org/
>>
I'm learning verilog and I have this piece of code:
module memory(clk, addr, din, dout, we);
input clk;
input [7:0] addr;
input [7:0] din;
output [7:0] dout;
input we;

wire clk;
wire [7:0] addr;
wire [7:0] din;
wire [7:0] dout;
wire we;

reg [7:0] mem [0:255];

always @(posedge clk) begin
if (we) begin
mem[addr] = din;
end
end

assign dout = mem[addr];
endmodule

I'm not a hardware person so I don't really understand. Why do we use a clock?
Why not execute the always block when we is set? why not execute it when din is set? or when both are set?
I don't get it, what's the benefit of having a clock?
>>
>>56995546
WINDOWS SUBSYSTEM FOR LINUX
>>
>>56995923
Good ole ANSI C
>>
>>56995068
A crutch for languages that cannot express proofs and theorems in their type system
>>
File: 1472590709244.jpg (125KB, 540x796px) Image search: [Google]
1472590709244.jpg
125KB, 540x796px
>50,051 allocs, 49,438 frees
>>
Opinion on Ionic?
>>
>>56998966
Memory in the real world uses clocks to synchronize read and writes. While you could do what what you wanted, it's not realistic of hardware today.
>>
File: rustle.webm (119KB, 848x480px) Image search: [Google]
rustle.webm
119KB, 848x480px
>>56998955
>>56998966
>>56998999
>>56999044
>>
var exampleList = new List<Employee>();

foreach (var employee in employees)
{
exampleList.Add(employee); //adds all employees to the list
}

exampleList.RemoveAt(2); //removes barney :(

var me = new Employee()
{
ID = 101,
Name = "Bruh",
Exemptions = 2
};

exampleList.Insert(2, me);

var example2 = exampleList[HERE???];

foreach (var example in exampleList)
{
PrintOneEmployee(example2);
}


How can I get this to make a list of the exemptions referencing....
private static Employee[] employees =
{
new Employee {ID = 101, Name = "Fred Flintstone", Exemptions = 3 },
new Employee {ID = 102, Name = "Wilma Flintstone", Exemptions = 0 },
new Employee {ID = 103, Name = "Barney Rubble", Exemptions = 3 },
new Employee {ID = 20, Name = "Fred Mertz", Exemptions = 2 },
new Employee {ID = 201, Name = "Ethel Mertz", Exemptions = 2 },
new Employee {ID = 221, Name = "Fred Astair", Exemptions = 1 },
new Employee {ID = 222, Name = "Ginger Rogers", Exemptions = 1 },
new Employee {ID = 223, Name = "Fred Savage", Exemptions = 1 },
new Employee {ID = 224, Name = "Winnie Cooper", Exemptions = 1 }
};


Cant for the life of me figure this out, ive tried using a similar method as the dictionary i made above it but I keep getting errors .

Any help>
>>
>>56999090
Dumb weeb
>>
I fucking hate hash tables!
>>
>>56995940
Another piece of code, this one counts the days since the beginning of the year.

const int       DAYS_MONTH[12] = {31,28,31,30,31,30,31,31,30,31,30,31};

/* Return the day of the year (1..366) */
int
Day_of_year(int month, int day, int year) {
int num_d = 0;
bool is_leap_year = false;
bool error = false;
int cur_month = 0;
int days_in_cur_month;

if ((year < 0) or (day < 0) or (day > 31) or (month < 1) or (month > 12)) {
error = true;

} else {
num_d = 0;

/* Check if this is leap year */
if (((year % 4) == 0) and ((year % 400) == 0))
is_leap_year = true;

/* Count all the days in months 1..current month */
while (cur_month < (month-1)) {
days_in_cur_month = DAYS_MONTH[cur_month];
//num_d = num_d + DAYS_MONTH[cur_month];

if ((is_leap_year) and (cur_month == (2-1)))
++days_in_cur_month;

num_d += days_in_cur_month;

++cur_month;
}

/* Count all days in current month */
num_d += day;

}

if (error)
num_d = -1;

return num_d;

}
>>
>>56999083
What do you mean by synchronize reads and writes?
Why is it not realistic for hardware to do it my way?

I'm willing to use a clock, I just want to understand why it benefits me to use one rather than using one blindly, and not knowing whether to use a clock or not for other things.
>>
File: degredation-of-a-fanbase-hobby.jpg (397KB, 4040x626px) Image search: [Google]
degredation-of-a-fanbase-hobby.jpg
397KB, 4040x626px
>>56998955
normals ruin everything. ready for the machine utopia where humans are kept like cattle and can just sit around watching netflix and eating doritos all day so they can fuck off and just zone out their entire life without shitting up the field
>>
>>56999061
memory leak lol :)
>>
>>56994001
>>>/a/
>>
>>56999099
foreach (var example in exampleList)
{
PrintOneEmployee(example2);
}

your foreach loop doesn't do anything. I think you meant to write
    PrintOneEmployee(example);
>>
I've got an opportunity to bootcamp

What's more marketable? Full stack web development or native applications? I've got two camps I was looking at in my city, one focusing on C#/.net or Java and the other focusing on web.
>>
File: 1476037038966.jpg (185KB, 1280x853px) Image search: [Google]
1476037038966.jpg
185KB, 1280x853px
is this what you """"girls"""" look like ahhahahaha faggots
>>
>>56999145
Imagine this. On real hardware, those wires will be in unknown states between those clocks. Your write enable could still be up and and your din could have all its bits changing, not all at the same time. Where will it write?
>>
>>56999298
quality addition to an already-amazing thread
>>
So I've been working on that key/value storage database for a week now. It performs as fast as an SQL search with no index (which isn't very good) and has barely 10% of the features of Redis. How could I make it useful?

The only plus until now is the good scaling because every request is a new process and the whole database is in-memory.
>>
>>56999297
ruby webdev

https://techcrunch.com/2012/05/10/dev-boot-camp-is-a-ruby-success/

http://uk.businessinsider.com/coding-bootcamp-grad-goes-from-chick-fil-a-to-making-90000-after-6-months-of-study-2015-7
>>
>>56999297
Web dev for sure. There's way more work.
>>
>>56999061
lol and smug C tards think they're not pajeet tier just because they use C

having 50k allocs in the first place is not how you're supposed to do memory management
>>
>>56999226
but without the foreach it will just print 1 example when I want it to print the list of exemptions that are the same.

Of course im not really sure what im supposed to be doing with this program, the assignent doesnt say anything
>>
>>56999297
python
>>
>>56999387
read what i said again, you're not printing the list, you're just printing example2 a bunch of times.
>>
>>56999377

I was thinking the same to be honest. I kind of narrowed down to web = probably recruited by a startup making THE NEXT BIG THING!!!! Whereas native = working for large stable company handling legacy code and dealing with an angry 40 year old engineer but I get stability and benefits.
>>
>>56999380
It is when your professor tells you to allocate heap space for structs and the strings in those structs
>>
>>56999142
>if (((year % 4) == 0) and ((year % 400) == 0))
>is_leap_year = true
2016 was a leap year
>>
>>56999442
Oh I know. If I had it where example2 was a list of Exemptions( ie all people with Exemptions = 2) it would then loop through and print each item with the exemption 2?
>>
>>56999484
yeah
>>
>>56999504
Thats what im trying to do but I cant figure out how, of course the assignment doesnt even say what the outcome should be so maybe im over doing it. so frustrating.
>>
>>56998955
I really hate that little fucking reddit alien
>>
>>56999462
i doubt you're doing a college project where you have 50k+ instances of malloc in your code

the professor might tell you exactly how to do something and use malloc everywhere just so babbies won't fuck it up but for real software you can use a different allocation scheme
>>
>>56999297
web dev is easier but lacks job security
native apps is harder and you probably suck too hard to make it past code monkey tier
>>
>>56999580
>i doubt you're doing a college project where you have 50k+ instances of malloc in your code

It's probably a data structure and he's probably running a bunch of tests on it.
>>
>>56999580
It's string manipulation for a hash table.

Each entry is a struct with three strings, each of which needs a malloc.

I've tested the entry struct to death and there are no leaks in it so I'm losing some when I resize the hash table.
>>
>>56999738
Also I can gurantee this because increasing the resize value to resize less frequently increases the number of frees to 49,986
>>
>>56999738
>so I'm losing some when I resize the hash table.

Alright, so why haven't you fixed it, yet?
>>
>>56994127

"""
For all the folks getting excited about my quotes. Here is another - Yes, I am a terrible coder, but I am probably still better than you :)
"""

>Rasmus Lerdorf
>>
>>56999913
I can't figure out exactly where it is
To resize I malloc a new table to the new size then copy all the structs over with their new hash value.
I'm thinking it has nothing to do with edge cases and just the value that caused the collusion never getting added.
>>
>>57000113

Why don't you realloc the original table?
>>
>>56994148
HHVM is actually solid tbqh.
>>
>>57000205
Because the new size of the hash table means that where one thing hashed before might not be the same.

I didn't mention the hash table is actually supposed to just be an array with buckets just being the indices in it. So when you malloc the original array it's
malloc(BUCKET_SIZE * n * sizeof(void *)

I make a new array
n=n*2
malloc(BUCKET_SIZE * n * sizeof(void *)

then rehash everything into the new array and free the old one.
>>
>>56994001

How THE FUCK do I generate a GLFW project in code blocks??

I can't get past the "enter the location of GLFW on your computer" box

I tried downloading GLFW3, using Cmake to generate a makefile and then running "make" and "make install"

It says the directory needs a lib and include file inside of it, but the commands I ran don't generate a lib directory

Am I supposed to look somewhere in the "file system" directory? problem is that has like 500 different files with a "include" and "lib" folder

why can't I just run "make install" and use a "-lglfw3" linker tag
>>
>>57000347

If you're positive you're taking care of everything, then (like you said) you should be careful to free entries that don't actually get added to the table.
>>
>>57000416
>why can't I just run "make install" and use a "-lglfw3" linker tag
you can
>>
>>57000449

well then why am I entering a directory into codeblocks to make a glfw project
>>
>>57000449
>>57000461

also I tried that in an empty project but my shit still wouldn't build
>>
>>57000461
i don't know, why are you entering it anon?
>>
>>56994031
>>56994266
>>56994323
>>56995054
>there are subhumans that struggle with doing the case correctly in fizzbuzz.

It's Fizzbuzz if it's divisible by both 3 and 5 you imbeclies, not fizzbuzz or FizzBuzz. You failed the interview. Don't ever apply here again.
>>
>>57000479

because it won't start the project without it
>>
File: 1405900014784.png (15KB, 300x300px) Image search: [Google]
1405900014784.png
15KB, 300x300px
>>57000493
T-thanks. I-it's not l-like I ever wanted t-to work at Autismo, Ltd. anyway.
>>
>>57000438
yeah, I need to get this done. The next assignment is a task scheduler.
>>
>>57000493
Do I pass?
defmodule FizzBuzz do
defp fb(n) do
case {rem(n, 3), rem(n, 5)} do
{0, 0} -> "Fizzbuzz"
{0, _} -> "Fizz"
{_, 0} -> "Buzz"
{_, _} -> n
end
end

def run(n) do
Enum.map(0..n, fn(x) -> IO.puts fb(x) end)
end
end

FizzBuzz.run 100


>>57000506
Create a console project instead, install glfw3 globally (either via package manager, or using sudo make install but make sure prefix is configured to /usr/lib/, if you're on Windows manually move the lib/include folders to where the compiler is), then just use the linker flag.
>>
>>57000559
>Enum.map(0..n
>fizzbuzz starting at 0
No
>>
>>57000617
too bad
>>
Can you decipher this ?

I'd jsut lkie to ieejtcnrt for mnoemt. Waht you're reenrifg to as Lniux, is in fcat, GNU/Lunix, or as I've rncelety taekn to clliang it, GNU puls Linux. Lnuix is not an oaitrpneg sstyem utno itslef, but rhater aoenhtr fere conmenopt of a fully fnunoniitcg GNU sytesm mdae uufsel by the GNU cbirleos, slehl utieliits and vatil stysem centopmons csipnimorg a flul OS as dfneeid by POISX.

Mnay cpmotuer usres run a mieidfod vsoerin of the GNU setysm eevry day, wthiout rnzeaiilg it. Troghuh a pulaecir trun of etevns, the voesirn of GNU which is weildy uesd tdoay is oeftn claeld Lnuix, and mnay of its usres are not aawre taht it is bsacllaiy the GNU stsyem, deleovped by the GNU Prcjeot.

Terhe rlaely is a Lniux, and tehse pepole are using it, but it is jsut a prat of the sytsem tehy use. Linux is the kneerl: the prgoram in the setsym taht aoleltcas the mahcnie's rruceoess to the otehr parromgs taht you run. The keernl is an eetassnil prat of an onreiptag ssetym, but uslsees by itlesf; it can olny fnicotun in the ceoxtnt of a ctpemloe ortnaipeg setysm. Luinx is nalormly uesd in coaitnbiomn wtih the GNU oniperatg ssetym: the whole ssytem is bacallsiy GNU wtih Linux added, or GNU/Lnuix. All the so-cllead Liunx dibtisotunris are rlleay dutiboiintrss of GNU/Lniux!⏎
>>
>>56994001

I've got a new job since last monday and they hired me as frontend dev for a shop, mostly for JS stuff.

So, after browsing through their horrible spaghetti code (The frontend was written within 2 weeks with jQuery), They gave me green light to redo the frontend with whatever I would like.

And now I've spent the whole weekend browsing through JS frameworks/libaries, to find out which one would fit the best.

There to effing many of them...
>>
>>57000681
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.l8ak5j3gz
>>
>>57000681
you're about to make a mistake
>>
File: sfdhghjmgfndgsdgn.png (100KB, 512x256px) Image search: [Google]
sfdhghjmgfndgsdgn.png
100KB, 512x256px
is nim a memelang? how can it hope to compete with the likes of ruby and python with a logo like this? baka
>>
>>57000716
the memest
>>
>>57000707
Had a good laugh at this, so sad it's true

>>57000709
I know... I know...
>>
File: Flonne_Avatar_(Disgaea).jpg (57KB, 320x320px) Image search: [Google]
Flonne_Avatar_(Disgaea).jpg
57KB, 320x320px
>>57000716
Whoosh!
Nim nim nim!
>>
>>57000716

It is very memey.
>>
>>57000681
jQueryUI
>>
File: 1415830162092.jpg (18KB, 754x500px) Image search: [Google]
1415830162092.jpg
18KB, 754x500px
>>57000837
>not posting superior pleinair
>>
>>56994266
but nails are easier to put into things??

what the fuck would you use a screw for
>>
>>57000957
nvidia cards
>>
File: 1475904150213.jpg (7KB, 218x232px) Image search: [Google]
1475904150213.jpg
7KB, 218x232px
If my program relies on ffmpeg, should I just bundle a statically built version or is there some way to determine whether or not its installed regardless of OS or package manager?
>>
>>57000957
In case you need to take the screw out at some point.
>>57001093
Statically. Unless you intend to compile a version for each distro+version combination.
>>
>>57001093
Use libavcodec and libavformat instead.
>>
>>57001157
>Unless you intend to compile a version for each distro+version combination.
My alternate solution would be to somehow tell if it's installed and, if not, display a message.
>>
>>57000343
doesn't improve he language
>>
>>57001183
Then you need a script that works with all the popular distros + Windows + OSX. And even, if you display a message, chances are the user can not easily install the version you compiled against, because it is not in the repos.

Generally there are 2 proper ways of binary distribution:
1) Provide a package/installer for each common distro/OS + version combination
2) Link statically.
>>
>>57001176
can you explain the ffmpeg vs. libav controversy?
>>
>>56999551
you are not very clear about what you are trying to do.
something like that I guess :
if (employee.Exemptions>1)
exampleList.add(employee);
>>
>>57001479
What controversy?
It's just a library that can be used for encoding/decoding purposes rather than wrapping calls to external executable.

https://www.ffmpeg.org/libavcodec.html
>>
>>57001528
I mean Libav project vs. ffmpeg project
>>
>>57001555
I don't know.
>>
>>57001093
>>57001176
Better, use libwebp and libwebm if you can
>>
I wish to learn some programming. Nothing professional, but as an engineer i believe i am supposed to know some of it, and some problems i face could be easier solved with coding knowledge.

I only learned very little about it on college, some C++ focused on basic number crunching calculus functions.

Should i stick with c++ for general purpose coding? Any good book for me to study?
>>
>>57001668
literally any

programming is very very easy
>>
Question about sites like coursera or edx.
Are the courses they provide good, if I want to learn something myself? I was thinking of this course, has anyone done it, or can someone take a quick look at it if it's decent?

https://www.coursera.org/learn/crypto

No idea where else to ask.
>>
>>57001668
Forget about C++, Learn C.
>>
>>57001479
>>57001555
1. numales get triggered by the way the repo was managed (slacking, few people with push rights, ""literal nazis"")
2. These steal the ffmpeg.org domain, get fucked doing so and are forced to fork into libav
3. ffmpeg maintainership changes based on criticism
4. people contribute patches to libav, ffmpeg devs pull every addition back in, in realtime :^)
[5. Ubuntu silently advertises libav as ffmpeg in their repo, causing incompatibilities]
6. ffmpeg remains as superior superset of libav
>>
>>57001668
Learn Haskell, Scheme, Common Lisp, Erlang, Rust, or some other so-called "meme language". That's just shill speak for "I need to make sure developers won't leave to languages that our enterprise legacy codebases are written in and make hiring costs higher".
>>
new thread when??
>>
File: 1449709665970.gif (239KB, 500x419px) Image search: [Google]
1449709665970.gif
239KB, 500x419px
>>56997087
What's wrong?
>>
New thread:
>>57001843
>>57001843
>>57001843
>>
>>57001796
I think he meant the fact C++ is slowly turning into Java.
>>
What is best IDE?
>>
>>57001696
Looks fine to me, if a bit basic, but it is an intro course so...

If you want to just use cryptography in a practical application then you probably don't need to know the stuff in this course. If you want to learn how it works from the ground up this looks like a good course though.

I've taken some other coursera courses and they are generally pretty decent.
>>
>>57001859
But you can typedef

typedef std::vector<std::reference_wrapper<const Person>> shit;


and auto to simplify code.
>>
>>57001908
I know. But hidden bloat is even worse in my opinion
>>
>>57001886
What others have you taken? Just out of curiosity, since I'd like some knowledge in regards to security, since I'm still in school, and I'd like to take some courses that they don't teach us.
Thread posts: 327
Thread images: 37


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