[ / / / / / / / / / / / / / ] [ r8k / ck / wooo / fit / random / doomer / f1 / foodism / harmony / lathe / lewd / warroom / wtp ]

/prog/ - Programming

Programming

Catalog  Archive

Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Options

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


1fc122 No.4088 [Open Thread]

Programming/reverse engineering challenge: Figure out what my obfuscated code does.


/*
k.c

-1 17 36 29 19 -1 13 13 04 14
-1 00 00 00 00 -1 00 00 00 00
-1 00 00 00 00 33 00 00 00 00
-1 07 00 00 00 00 00 00 35 08
-1 00 00 00 00 00 31 00 00 00
-1 00 00 10 00 00 00 27 00 00
-1 00 00 00 19 00 00 00 00 00
-1 03 11 00 00 00 00 00 00 14
-1 00 00 00 00 -1 00 00 00 00
-1 00 00 00 00 -1 00 00 00 00

-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
19 00 00 00 00 27 00 00 00 00
30 00 00 00 00 13 00 00 00 00
-1 22 00 00 00 00 00 00 -1 -1
26 00 00 00 00 00 13 00 00 00
13 00 00 24 00 00 00 09 00 00
14 00 00 00 34 00 00 00 00 00
-1 -1 22 00 00 00 00 00 00 -1
22 00 00 00 00 11 00 00 00 00
14 00 00 00 00 30 00 00 00 00
*/

int vt [10] [10], ht[10][10],inv
[10] [10] ,inh [10][10],sl
[10][10];;int cp(int x,int
y){{int s[10] ={0},h=ht[y]
[x],hs=0,xx=x ;for(;;){int
c=sl[y][xx--] ;if(c==-1)
break;if(s[c] )return 0;
s[c]=1;hs+=c; ;;if(hs>h)
break;}if(x+1>=10||sl[y]
[x+1]==-1){if(hs!=h)
return 0;}else if(hs
>=h)return 0;};;int s
[10]={0},v=vt[y][x],vs
=0,yy=y;for(;;){int c=sl
[yy--][x];if(c==-1)break;
if(s[c])return 0;s[c]=1;vs
+=c;if(vs>v) break;}if(y+1
>=10||sl[y+1 ][x]==-1){;;;
return vs==v ;}return vs<v;
}int s(int x ,int y){if(y>=
10)return 1; if(sl[y][x]==
-1){if(x+1< 10)return s(x
+1,y);return s(0,y+1);}for
(int i =1;i< 10;++i){sl[y]
[x]=i;if(!cp (x,y)){;;;;;;
continue;;;} int cd=0;if(x
+1<10)cd=s(x +1,y);else cd
=s(0,y+1);;; if(cd)return 1
;}sl[y][x]=0 ;retur
Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

1fc122 No.4090

>>4088

A kakuro puzzle solver.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

1fc122 No.4099

>>4090

correct!

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

1fc122 No.4102

Because this doesn't exist.

http://jsbeautifier.org/

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1459696264774.jpg (162.1 KB,728x520,7:5,1458147745456.jpg)

553ff0 No.4089 [Open Thread]

Hey /prog/, I have a large project I have been brainstorming for a few years or so and I now want to start programming it. The problem is I am a little indecisive on what language to do it in. Anyone have any tips on this matter?

I was thinking of doing C++ or Java but a friend got me into Haskell lately. It really shouldn't matter too much, but I just am wondering if anyone has experience in these matters. Thanks!

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

553ff0 No.4091

File: 1459739026287.gif (196.82 KB,500x500,1:1,PoEhh9a.gif)

It all depends on the project, you dummy, and you've said nothing about it.

Is it a web application? Desktop application with a GUI? CLI? Device driver? Correctness matters? Performance? Extensibility? Portability? Do you actually want to finish the project or learn a language better? Do you expect any external contributions? Say something, jeez.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

553ff0 No.4092

>>4091

Desktop with networking and heavily text-based. I want to actually finish it.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

553ff0 No.4094

>>4092

Then you probably should pick C++ or Java, whatever you know best

If you don't have any good reason to use Haskell, then there's no need to because you'll have much less libraries to choose from.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1428950596261.png (1.08 KB,169x51,169:51,1f12ea246c06418bada30c745a….png)

89a872 No.2032 [Open Thread]

The equation in pic related describes the behavior of cubes in any number of dimensions, with m being the total number of dimensions in a cube, and f(n m) describes "the number of n dimensional forms in a m dimensional cube."

Here's and example
>For a 2d cube (flat square), m=2. A line segment is n=1. Therefor f(n m)=f(1 2)=4, since a square has four sides

Let's try again and count the edges in a 3d cube
>For a 3d cube, m=3. A line segment is n=1. f(n m)=f(1 3)=12, since there are 12 edges to a cube

Now let's change n=1 (a line) to n=2 (a flat square)
>Fore a 3d cube, m=3. n=2 is a flat square. Therefor f(n m)=f(2 3)=6, since a cube has 6 sides


Now how would I go about writing this in C++? I've been fucking around with it all afternoon and nothing I do seems to work
21 posts and 1 image reply omitted. Click [Open Thread] to view. ____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

89a872 No.2363

>>2353

>has no place in real life applications

Yeah, totally. Who needs those shitty "parsers" anyway?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

89a872 No.2433

>>2363

Shift-reduce parsers are typically superior to recursive descent parsers. RD is just easier to implement by hand.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

89a872 No.2435

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

89a872 No.4057

>>2032

What the fuck? You calculate n choose k by using pascal's triangle + memoization. Does anyone on /prog/ know how to program?


#include <stdio.h>
#include <stdint.h>
/* col > row is undefined */
uint64_t tb[5000][5000];
uint64_t pascal(const uint64_t row, const uint64_t col) {
if(!col || col == row) return tb[row][col] = 1;
if(tb[row][col]) return tb[row][col];
return tb[row][col] = pascal(row - 1, col - 1) + pascal(row - 1, col);
}
int main() {
uint64_t n, k;
while(scanf("%lld%lld", &n, &k) == 2) {
printf("%lld choose %lld = %lld\n", n, k, pascal(n, k));
}
return 0;
}

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

89a872 No.4075

File: 1459192375148.jpg (16.65 KB,251x244,251:244,1242224296128.jpg)

>>4057

>clogging up the cache with a 5000x5000 2d array of 64 bits integers

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1457020257517.jpg (33.72 KB,350x350,1:1,798.jpg)

d141e4 No.3998 [Open Thread]

Does anyone here freelance, how is your experience with it? Do you make enough for a living?

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d141e4 No.4043

I personally call it freelance but it's more like I'm unemployed.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d141e4 No.4051

Did it for a few years. If you work hard and make people happy, you'll have more work offered to you than you'll have time for. Once you get to that point, start letting go of your crappy clients and retain your favorites. I ended up with 2 to 3 great clients who kept me busy almost full time. I hate saying this, but you'll probably have a better time working for a profitable business.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d141e4 No.4059

freelancing sucks, working full time is so much better

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d141e4 No.4066

>>4043

this tbh fam.

Software can be written anywhere. You can't compete with the best because you're probably not the best, and you can't compete with the worst because you wont be able to beat them in pricing or even scamy tactics.

CS is a maymay.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d141e4 No.4067

>Does anyone here freelance,

I do.

>how is your experience with it?

Shit.

>Do you make enough for a living?

No.

>>4043

This.

I don't even have any idea how the fuck I'm supposed to find more than 30 dollars a week worth of work.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



a172a9 No.4010 [Open Thread]

Is Java too hard to learn as a first language?

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a172a9 No.4011

Not really, what's hard is getting good at programming in general.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a172a9 No.4017

>>4010

Java is one of the simpler languages so it is often used to teach programming. other simple good teaching languages are python, ruby, and javascript.

but for next time you should know programming is a skill and the programming languages are the tools. asking if Java is too hard for a first language is like asking if photoshop is too hard to learn how to edit photos.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a172a9 No.4042

>>4017

An analogous problem would be is a Land Rover too hard to drive as a first car.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a172a9 No.4045

>>4042 I came to the conclusion that Python is probably the language I will learn first, as there are a lot of projects to apply it

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

a172a9 No.4052

>>4045

It's a good one, too. At least to familiarise yourself with the concepts.

Once you're comfortable with Python, I'd suggest giving C a go.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1457891881754.jpg (11.89 KB,189x267,63:89,grey fox.jpg)

70c92c No.4013 [Open Thread]

HURT ME MORE SNAKE, MAKE ME FEEL ALIVE AGAIN!



import numpy

"""training data"""
x = numpy.array([[1,1,1,0,0,0],
[1,0,1,0,0,0],
[1,1,1,0,0,0],
[0,0,1,1,1,0],
[0,0,1,1,0,0],
[0,0,1,1,1,0]])

correct_label = numpy.array([[1, 0],
[1, 0],
[1, 0],
[0, 1],
[0, 1],
[0, 1]])

"""initializes weight and bias as zero vectors"""
weight = numpy.zeros((6, 2))
bias = numpy.zeros((6, 2))

def softmax(a_vector):
"""Compute a logit for a vector."""
denom = sum(numpy.exp(a_vector))
logit = numpy.exp(a_vector)/denom
return logit

def softmax_a_set(a_set):
"""computes logits for all vectors in a set"""
softmax_set = numpy.zeros(y.shape)

for x in numpy.nditer(a_set):
x = softmax(x)

return softmax_set

def cross_entropy(logit, label):
"""generates the cross entropy between label and logit"""
return -1*sum(numpy.log(logit)*label)

def train(x):
"""walks the function closer to the best value"""
pass

y = numpy.dot(x,weight) + bias

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

70c92c No.4034

what is this shit?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

70c92c No.4035

>>4034

someone who's seen docstrings but doesn't know how they work.

also looks like neural network stuff.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1457894670130.jpg (25.87 KB,498x321,166:107,why.jpg)

c1830a No.4014 [Open Thread]

Windows forced me to update so I turned automatic updates off. And it restarted before I hat save.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c1830a No.4015

Windows will still restart by itself even if you don't want it to. I have now to rewrite everything. I'm now forced to be up at night for this stupid shit.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c1830a No.4022

Save often, brother, this is like computer literacy 101

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c1830a No.4024

>>4014

>>4015

Why not not use windows?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1456812984336.png (40.21 KB,685x723,685:723,seamsbotsms.png)

26f369 No.3991 [Open Thread]

What projects are you guys working on?

I got a not-yet-conforming to PEP8 Python project.

https://github.com/keithstellyes/Seams-Bot

I have unlimited SMS but limited data, figured I'd just run a script using Twilio for texting. It also can run in a terminal and can be easily ported as an IRC bot or email interface.

Pic related, show me your cool stuff.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

26f369 No.3992

Each time it polls for new SMS, it prints _, when it detects a new one, it prints !, shows the message received, and the one it sends.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

26f369 No.3993

Easy as hell to make new commands for it too

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1426132970503.png (334.97 KB,812x458,406:229,1426107755599.png)

7b38cf No.1643 [Open Thread]

Anyone wanna learn Android programming with me?

Add meow@hot-chilli.net on XMPP

Use OTR. We can do this.
5 posts omitted. Click [Open Thread] to view. ____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

7b38cf No.2095

>>2085
>congratulations, two terminal commands, one minute of configuring and 1-5 minutes of googling for a server allow you to defeat the NSA's multi-billion-dollar surveillance mechanism.
Not if one of the computers is rigged.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

7b38cf No.2111

>>2095
alright, but cracking weakened encryption is still more expensive than just looking at the packets.

there is not yet an english sauce available but:
>thx to snowden there's moar encryption
>nsa can't decrypt
>representatives of google, cisco m$ and university of zürich are trying to help by suggesting a new protocol that puts information about the content into the packet header so middleboxes can check for bombs or whatever they do.
http://www.heise.de/netze/meldung/Friedensangebot-oder-Kniefall-IETF-streitet-ueber-Auskunftspflicht-von-Datenpaketen-gegenueber-2597342.html

some encryption is always better than no encryption and it requires virtually no effort to get started.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

7b38cf No.2119

>>2111
I'm speaking of things like keyloggers and screenrecorders.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

7b38cf No.2120

>>2119
lmao, right.
well, spend an afternoon to set up linux then if you want to be on the safe side.
sage because not sure if serious.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

7b38cf No.3985

>>1643

I'm a bit late to the party, but I want in. I created a hot-chilli account and added you.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1455323149655.png (164.37 KB,800x846,400:423,Konqui.png)

96305e No.3938 [Open Thread]

Let's play a game.

>Pick a open source project you like/hate/think is horribly buggy or bloated

>post example code on how to make something it does better

>Hard Mode: Test and commit the change to the project.

>Damn Fine Autism Mode: Show profiled proof that your change made it better. Valgrind.

8ch shut the fuck up this isn't even flooding yet

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

96305e No.3939

https://github.com/chromium/chromium

README.md

 The main Chromium project is located at https://www.chromium.org/.
The source code is available at https://chromium.googlesource.com/.
Instructions for contributing can be found at https://www.chromium.org/developers.

BETTER VERSION

 The main Chromium project is located at https://goo.gl/i55pmC/.
The source code is available at http://goo.gl/zB2JyD/.
Instructions for contributing can be found at https://goo.gl/shpwff/.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

96305e No.3950

File: 1455410517009.jpg (26.84 KB,275x142,275:142,e.jpg)

How does one find a project to contribute, granted that all the software I use on daily basis is usually too mature and complex for any minor fixes.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

96305e No.3956

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

96305e No.3957

File: 1455560118305.png (77.86 KB,433x331,433:331,his-smile-and-optimism.png)

>>3938

>post example code on how to make something it does better

In many cases that would be a complete purge/redesign/rewrite so you see this isn't feasible.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1437170965130.jpg (72.38 KB,600x300,2:1,mathslide.jpg)

6887e0 No.2843 [Open Thread]

/prog/ why the people say that math is so importan for programming… I started programming in the last year, and I didn't need more than the basics operation.

>ohggg faggot u don't know nothing of programming, kill u plz.

9 posts omitted. Click [Open Thread] to view. ____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6887e0 No.2899

>>2868

>>2892

In my experience, the concept surrounding modulo is taught in elementary school as a way to avoid fractions when learning division (because they haven't covered fractions yet).

After that, the concept doesn't come up until you take a course containing a number theory unit.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6887e0 No.2910

Programming is an art not a science.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6887e0 No.2912

>>2868

This board has IDs, you samefag retard.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6887e0 No.3919

>>2843

Don't be intimidated by math. Just think of it as formalized logic. ;-)

There's an endless debate on what makes an algorithm run faster. There's plenty of external factors. But a rule of thumb is that an elegant written algoritm is faster than a sloppy one. E.g. a * (b + c) instead of (a + b) * (a + c).

>>2910

There's no conflict between art and science.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6887e0 No.3928

>Started programming last year

>This makes me an expert on programming, enough to assert certain things

The things posted here about math and programming are fairly consistent. I'll repost something I posted a while back:

>Can I learn programming even though I suck at math?

Sort of.

Firstly, you may think that you suck at maths, and be mistaken. See: https://www.maa.org/external_archive/devlin/LockhartsLament.pdf

tl;dr: most mathematicians agree that maths is grossly misrepresented in school, with the wrong things emphasized. Yes, what you do is important for 'real maths', but most teachers up until university won't tell you how something works, or how it was discovered, or why we know it's true. They'll just give you a formula or a rule.

Coding is logic and problem solving. So is maths. You can be mathematically mediocre, but still be a great programmer. You can write lots of code and barely encounter anything above basic highschool maths, depending on the kind of coding you're doing. But people who are good at programming tend to be the sort of people who could be good at maths.

If you want to write database applications, all you'll really need is arithmetic and an understanding of percentages. That, as well as logic, and the ability to think somewhat abstractly.

I used to think I was shit at maths until I started coding. It made me look at maths a different way, and then I went to university to study maths, and they actually taught the beauty behind it. I found that I was decent at high-level abstract maths.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1438816683135.png (95.39 KB,680x478,340:239,093.png)

4026af No.2978 [Open Thread]

…syntax doesn't matter, but that's obviously bullshit, since programming languages are just another user interface.

However, is there serious research about effectiveness, readability etc pp.?

Not necessarily limited to programming, but also text in general?

2 posts omitted. Click [Open Thread] to view. ____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4026af No.3004

>>3003

>Lisp user telling you syntax doesn't matter

They probably didn't know what they were talking about. Lisp's syntax is the major reason why it's so useful.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4026af No.3005

>>2991

>>3003

>>3004

That's all pretty dank and meme'd, but could we go back to topic?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4026af No.3030

Most likely the person who told you this was talking about abstract concepts, in which it isn't so much the syntax of the language you need to focus on, but the core idea. At least that is my best guess.

For example, you could describe rocket mechanics in English, German, or Russian, and while the syntax is different, the abstract concepts are the same.

It is possible that the language could inhibit your understanding of a concept, and this is a case where syntax does matter. For instance it would be quite hard to talk about rocket propulsion in Swahili.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4026af No.3031

Syntax matters for learning programming, which is why SICP chose a language with almost no syntax so you could focus on programming and not get hung up on whitespace/syntax.

Syntax also matters to Don E Knuth who invented literate programming so you wouldn't need comments (since almost nobody properly comments) and you could read a program like a book.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4026af No.3910

>>2991

>Technically, every language capable of being turing complete is a programming language, so English could be a programming language.

True. But what separates languages from programmming languages is that they are not 100% literal.

>>3031

But that requires that there's no ambiguity in the names of the variables, yes?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1452381678522.jpg (61.78 KB,396x264,3:2,Linux .jpg)

46b5cd No.3839 [Open Thread]

Hello there people with no lives and girlfriends.

I've this question that I would like you to answer for me, please.

This Linux+ book came out just recently and I there is this other 2 books that are a bit older but not that much, should i buy the newest or not? I know new =/= good.

>1.CompTIA Linux+ / LPIC-1 Cert Guide BY Ross Brunson and Sean Walberg (thats the newest one)

http://www.amazon.com/CompTIA-Linux-LPIC-1-Cert-Guide/dp/078975455X/ref=sr_1_1?s=books&ie=UTF8&qid=1452380509&sr=1-1

>2.Linux+ Guide to Linux Certification 4th Edition by Jason W. Eckert (I was told it's good)

http://www.amazon.com/gp/product/1305107160?keywords=Linux%2B%20Guide%20to%20Linux%20Certification%20eckert&qid=1452380460&ref_=sr_1_1&sr=8-1

and finally…

>3. CompTIA Linux+ Study Guide: 2nd Edition by Roderick W. Smith (seems like everyone advises this one and that it's the best and easy to follow.

http://www.amazon.com/gp/product/1118531744?keywords=linux%2B%20roderick&qid=1452380558&ref_=sr_1_1&sr=8-1

Now what do you think guys?

ps before you mention RHCSA is much better, don't worry thats on my mind too but everything in its own time.

3 posts omitted. Click [Open Thread] to view. ____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

46b5cd No.3879

>>3878

Getting a "Linux certification" means about as much as a B.A. in philosophy. All you need is to know your shit and preferably have a CS degree, and you can start making shekels.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

46b5cd No.3886

>>3879

What about CS degree + certifications?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

46b5cd No.3889

>>3886

degree + work expierence works much better

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

46b5cd No.3890

>>3886

>>3889

Needless to say since you likely won't have much if any experience right out of uni, the degree itself is still highly appealing to potential employers. Better than applicants with degrees in other fields or none at all.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

9355ac No.5270

alacrity

log into Anyone with password 0

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1453177111172.png (94.86 KB,337x450,337:450,403.png)

c6be61 No.3852 [Open Thread]

I wrote a python script to download images from tinyboard/vichan imageboards.

It works on every imageboard I try except 8ch, which gives me a 403 forbidden error. I tried changing my user agent within the script (perhaps unsuccessfully), but still 403. What gives?


#!/usr/bin/env python3

import argparse, bs4, os, urllib.request, urllib.parse

parser = argparse.ArgumentParser()
parser.add_argument("url", help="Link to thread")
parser.add_argument("-d", help="Directory to download to")
args = parser.parse_args()

if args.d:
if not os.path.exists(args.d):
os.makedirs(args.d)
os.chdir(args.d)

soup = bs4.BeautifulSoup(urllib.request.urlopen(args.url))

domain = urllib.parse.urlparse(args.url).netloc
http = urllib.parse.urlparse(args.url).scheme + "://"

for link in soup.find_all("p", class_="fileinfo"):
image = http + domain + link.next_sibling.get("href")
filename = image.rsplit("/", 1)[1]
if not os.path.exists(filename):
urllib.request.urlretrieve(image, filename

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c6be61 No.3853

Note that I accidentally removed a parenthesis to close the very last line.

- urllib.request.urlretrieve(image, filename

+ urllib.request.urlretrieve(image, filename)

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c6be61 No.3882

>>3852

If I had to guess,

>image = http + domain + link.next_sibling.get("href")

href of link is is https://media.8ch.net/prog/src/1453177111172.png for 8chan. Look at in in a page inspector.

I think it's because hotwheels has some weird hacky shit with the servers due to bui and/or site growth.

You might have figured this out by yourself already, since this was a while ago.

I might try writing my own version in javascript or bash for 8chan specifically. I'll prob post it here if I do

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c6be61 No.3883

>>3852

If I had to guess,

>image = http + domain + link.next_sibling.get("href")

href of link is is https://media.8ch.net/prog/src/1453177111172.png for 8chan. Look at in in a page inspector.

I think it's because hotwheels has some weird hacky shit with the servers due to bui and/or site growth.

You might have figured this out by yourself already, since this was a while ago.

I might try writing my own version in javascript or bash for 8chan specifically. I'll prob post it here if I do

fak you flood detection

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



File: 1453522198030.jpg (27.65 KB,311x475,311:475,SICM.jpg)

f720d4 No.3862 [Open Thread]

Hey /prog/, I'm looking for some compsci-related physics books other than pic related. Discovered it thanks to the godlike sticky.

Even RMS got his B.A. in the field. There must be at least a few others that are useful for programmers.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

f720d4 No.3863

>>3862

P.S. I already checked out /sci/'s directories, and I didn't see any undergrad textbooks worth the gorillion shekels they usually go for. Nor did I find any good paperback texts akin to "What is Mathematics?" (R. Courant) or "How to Solve It" (G. Polya).

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

f720d4 No.3872

>>3862

> compsci-related physics books

you mean computational physics? that is heavy numerical analysis for physics problems solutions?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



Delete Post [ ]
[]
[1] [2] [3] [4] [5] [6] [7] [8] [9]
| Catalog | Nerve Center | Random
[ / / / / / / / / / / / / / ] [ r8k / ck / wooo / fit / random / doomer / f1 / foodism / harmony / lathe / lewd / warroom / wtp ]