[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: 318
Thread images: 28

File: press F to pay respects.png (909KB, 1280x720px) Image search: [Google]
press F to pay respects.png
909KB, 1280x720px
Old thread: >>59269815

What are you working on /g/?
>>
What happened to the last thread?

Mods just nuked it?

Why?
>>
Writing a rapidminer "clone" that actually uses fast libraries.
>>
>>59275079
Yeah, I don't know why the got rid of the notepad one.
I'm pretty sure that one was valid.
>>
>>59275095
It would be nice if the mods would make an appearance and explain. I didn't see anything out of the ordinary on that thread. No CP or anything.
>>
So I'm trying to make a simple pattern generator in Ruby.
def carpetSquareGenerator()
blockArray = ["▓", "▒", "░", "█", "▞", "▚"]
carpetPattern = blockArray.sample(6).join
carpetSquare = 3.times do print(carpetPattern,"\n") end
return carpetSquare
end
print(carpetSquareGenerator)

This code outputs "3" after the pattern, like this:
▞█▚▒▓░
▞█▚▒▓░
▞█▚▒▓░
3

How can I prevent the "3" from being printed as well? Sorry for the noob question, I'm just starting out.
>>
>>59275079
>>59275095
Probably because there were too many programming threads
>>
>>59275145
The only other one is literally on page 9 and at bump-limit.
>>
Reminder that if a new thread is created early but isn't deleted before the old one hits bump limit, it is now legitimate. If you create yet another new one after the bump limit, 9 times out of 10 it will be deleted in favour of the first new thread.
>>
Attention, /dpt/:

The mods do not like C#.

There was entirely too much C# at the end of the last thread.

Please refrain from posting C#, or the threads will be deleted.

That is all.
>>
>>59275163
It might be accidental then. Don't look too much into it, else people who hate this kind of threads will take it as a precedent
>>
studying cs
which of these courses to choose this sememster
vb.net, php or security engineering
which will make me closer to becomin a /g/entooman
>>
>>59275242
None of those. They all sound like absolute garbage, and aren't even CS.
>>
>>59275242
what the hell? don't choose any of them and do something healthier
>>
>>59275263
>arent even cs
define cs then
>>
>>59275079
Ran out of pockets, had to rage somewhere.

notepad-tan was in the wrong place at the wrong time.
>>
>>59275294
like what?
already chose c#, data structures and calc 2
need 2 more to take
>>
>>59275317
No reason to learn VB if you're already go for C#.

No reason to learn VB at all, really.

The other two options are fine, I guess.
>>
>>59275329
>he doesn't use mad vb macros skills to impress cute girls from accounting
>>
>>59275382
VB.NET != VBA

Also,
>not using VSTO to modify your workbooks from a C# application
>>
File: 1343864884019.jpg (30KB, 251x236px) Image search: [Google]
1343864884019.jpg
30KB, 251x236px
Something probably easy but I can't figure it out.
Let's say I got a byte variable in Java.
I want to swap its 2 numbers places, so like 15 because 51, or 07 becomes 70. How can I do it without too much mess.
>>
>>59275504
(n % 10 * 10) + (n / 10)

It only works if n < 100.
>>
>>59275518
It is, since my byte value is always %100. Thanks
>>
>>59275134

return carpetSquare

while i dont know ruby, that looks like you are returning 3 via that
>>
>>59275504
You mean swapping the hex values? That's easy:
swapped = (a >>> 4) | ((a & 0xF) << 4);


If you want to swap the values in the decimal form, it's best to just convert it to a string and reverse the string.
>>
>>59275568
>convert it to a string and reverse the string
That's the idiot's way of doing it.
If you ever bring a string operation into something not involving strings, you're doing it wrong.
>>
>>59275382
>>59275404
I use LOB for macros because it respects my freedoms :^)
>>
So could someone redpill me on this notepad-chan nonsense? I haven't been here since last night because I've been busy studying
>>
>>59275592
Swapping the places of two numbers does involve strings because the two numbers being swapped are from the string of the decimal representation of the number. The computer has no clue that it is decimal.
>>
>>59275592
Oh please, if you're not using the built-in string operations then you're essentially just re-writing ParseInt or whatever the Java version is. And you're gaining absolutely nothing except a few bytes in memory.

If you're converting a number to a base that isn't a power of two you're creating a sub-class of the string. So why not just use the class that you already know works?
>>
Learning functional JS.
>>
What's the best 3 programming languages
>>
>>59275736
1. C
2. Haskell
3. Bash
>>
>>59275668
>>59275677
You two brainlets don't seem to know how modular arithmetic works.
>>
>>59275736
C, BASIC, ECMAscript
>>
File: tips.jpg (198KB, 3000x1688px) Image search: [Google]
tips.jpg
198KB, 3000x1688px
>>59275746
>>59275760
>C
>>
>>59275788
>Redox OS user calling anyone else a fedora tipper
>>
File: 1485262515835.jpg (76KB, 1065x859px) Image search: [Google]
1485262515835.jpg
76KB, 1065x859px
>>59275788
>>C
>Le tips meme
>>
>>59275804
>>59275810
*segfaults*
>>
>>59275736
*are
>>
>>59275804
>>59275810
c++/java/c# are all better
>>
>>59275851
Come on, at least try. That's just insulting.
>>
File: Numb.jpg (62KB, 846x634px) Image search: [Google]
Numb.jpg
62KB, 846x634px
Can I generate a set of 10 numbers (12345-67890) based on another set of numbers?

These are codes for 2h wifi access. Can this be bypassed like a serial number?
>>
I'm a bit of a noob to coding but i have this script, I was wondering how you would add it so instead of just visiting a profile i can get the script to send a defult msg?


https://github com/Hexalyse/Interpals-Autovisit/blob/master/InterpalsAutoVisit/interpals-autovisit.py
>>
>>59275851
Java and C# are managed languages, they're not even remotely in the same class as C. C++ is a valid alternative to C, but only because it is almost a superset of C. Enterprise OOP C++ is still cancer.
>>
>>59275862
like a seed to a PRNG?
>>
>>59275886
Just add a print with the message you want it to say
>>
>>59275862
Yes you can. It's task either for simple neural net ("artificial intelligence") prediction or you can reverse engineer the algorithm that generates the numbers. Either way, the more samples you have the more reliable the solution will be.
>>
>>59275862
https://en.wikipedia.org/wiki/German_tank_problem
>>
>>59275965
do i not need to give some form of coding relating to actually selecting "message" someone?
>>
File: every-flipping-day.gif (492KB, 312x176px) Image search: [Google]
every-flipping-day.gif
492KB, 312x176px
>tfw review stackoverflow posts
>tfw crush pajeet dreams every flippin day
>>
>>59276000
Sorry, your question was worded confusingly.
>Go to profile in your browser
>Open up your browser's web tools
>Open up the Network tab
>Filter URLs for the site you currently are on
>Send message and look for the request with the message in it

It's your goal to try and take that request and generalize it and send it for when you want to send the message.
>>
>>59275990
>all this maths

This is a programming thread faggot.
>>
>>59275913
>C++ is a valid alternative to C
No it's not. C++ has many things wrong with it, making it an utterly inappropriate alternative to C.
>>
>>59276109
Computer science and programming is a subset of mathematics.
>>
>>59276121
What's wrong with the C-like subset of C++? Just because a language lets you be a retard, doesn't mean the language is bad.
>>
File: 1407905937240.jpg (23KB, 500x375px) Image search: [Google]
1407905937240.jpg
23KB, 500x375px
>>59276164
>The "my subset of C++" argument
Languages should be evaluated in their entirety.
>>
>>59276197
C++ is too large to evaluate
>>
>>59276197
What's wrong with the entirety of C++?
>>
>>59276126
>programming is a subset of mathematics
lol
>>
>>59276093
Apologise for that, but thank you for the response. I got this stage now, i am assuming it is the initial one or the first two i want to pay attention to. What do i have to do with this information now?

http://puu sh/uxncC/1555dee232.png


I assume something to do with this?

http://puu sh/uxniN/1ae43d3f23.png
>>
>>59276197
By that logic, C is bad because you can do stuff like
return 1 / 0
.
>>
>>59276245
Undefined behaviour.
>>
>>59276245
>>59276257

It's undefined by the C language. That case is very well defined by the implementation.
>>
>>59275935
Can you point me to a webapp exemple or some source code so I can analyse and compile based upon that?

>>59275990
Very interesting...
>>
>>59276294
You clearly don't understand the implications of undefined behaviour.
>>
>>59276302
Oh yeah, the compiler might delete your stupid ass "undefined" statement because they love improving their little benchmarks.
>>
>>59276242
Right click on the first one and click copy as curl. Now you can use this in your terminal to test it out. After you are able to replicate sending messages via curl, start removing arguments to curl you think are unnecessary. Some sites might check your headers when you try to post but a lot don't. After everything is stripped down you can convert your commands into the actual requests you need to do in your python script.
>>
>>59276327
A compiler is under no obligations to do anything if your program has undefined behaviour, and is well within its "rights" to optimise based on the assumption that it never happens.
It's one of the reasons that C is inherently faster than most other languages.
>>
>>59276362
F O R T R A N
O
R
T
R
A
N
>>
>>59276257
>>59276294
Either way it's retarded, but the compiler still lets you do it.
>>
>>59276362
>A compiler is under no obligations to do anything if your program has undefined behaviour,

Actually if there's undefined behavior, the entire program is undefined. So the compiler should just generate an empty executable and save us the trouble.

>It's one of the reasons that C is inherently faster than most other languages.

It's the reason compilers output absolute bullshit code sometimes. How in the fuck can you justify bugs that only happen at high optimization levels?
>>
>>59276385
gcc used to have a feature that allowed you to throw c++ exceptions from trapping instructions like n/0.
>>
>>59276339
okay thanks i copy and pasted everything you've said for me to do tomorrow as it is getting late here. I've apprciated your insight, i will probably come back tomorrow. Peace out
>>
>>59276297
If you know what PRNG they use and if they use a cryptographically insecure algorithm (in which they want speed) you can possibly predict the next output of the generator.
It's also possible that the numbers are created from an algorithm and aren't random. In that case you'll need to reverse engineer it. Another Anon suggested to use machine learning. While that may work, you would need a lot more training data then what you showed in your picture.
>>
>>59276385
>the compiler
There is no "the" compiler.
>>
>>59276428
Find a C compiler that will reject that code.
>>
File: Martha.png (395KB, 427x787px) Image search: [Google]
Martha.png
395KB, 427x787px
>>59276406
>c++ exceptions
>>
>>59276434
You prefer C exceptions?
>>
>>59276432
>>
>>59276432
All my C compilers throw warnings. You're not one of those subhumans who just ignore warnings are you?
>>
>>59276452
>-Werror
>>
>>59276476
So? A compiler with a different set of command line options counts as a "different" compiler in its own right.
To get an actual standards compliant GCC, you need to pass it several command line arguments.
>>
>>59276449
>C exceptions
aka "instant crash with no warning or opportunity to fix your shit"
>>
>>59275068
binlist = [bin(x)[2:].zfill(8) for x in range(0,256)]

[print(i,j) for i,j in enumerate(binlist)]
>>
Is there a text editor that's similar to notepad++ for linux\? I'm not a fan of notepadqq.
>>
>>59276546
VIM or GNU Emacs
>>
When someone ships software in C/C++/Java do they compile the executable file with optimization flags?
>>
>>59276586
Typically, yes.
>>
>>59276586
No, it takes too much time to build and they include all debug flags so the user can see what happens when an assert goes wrong.
>>
>>59276507
Yes, that's the Unix way. Error handling is code-word for bloat.
>>
>>59276523
python 2.7+ compatible
print [(i,j) for i,j in enumerate([bin(x)[2:].zfill(8) for x in range(0,256)])]
>>
>>59276586
Java doesn't optimize at compile time because it compiles to byte code and optimization depends on the native implementations (so optimization is done at run-time).

As for C/C++, usually people optimize to some extent for their release builds but there are some trade-offs especially for very large programs.
>>
>>59276449
I do prefer error codes over the fucking brain damage that is C++ exceptions.

>>59276507
C functions either check parameters and return error codes, or they document their assumptions and fuck you if you're stupid enough to violate them.

You're probably dumb enough to feed random data into functions expecting null-terminated strings
>>
>>59276663
Yes, the more complex the program is the higher the chance to get some Torvalds-rage-inducing output.
>>
>>59276676
>Patrician tier
Returning error code in eax
>Good tier
Pushing the error on the stack and use an interrupt vector to handle it
>Mid tier
Having error handled directly inside the procedure
>Bad tier
Using a null-object
>Pooinloo tier
Throwing an exception
>>
>>59276676
>document their assumptions and fuck you if you're stupid enough to violate them
This is honestly the best way of doing most things. People need to learn what preconditions are.
>>
>>59276713
Or you can write a logical proof and turn off your exception handling and checks.
>>
File: Interest.png (21KB, 1244x238px) Image search: [Google]
Interest.png
21KB, 1244x238px
>>59275068
Yesterday I got shit on for my sum of series function. How is this? I didn't use eval this time so please be gentle i'm a virgin.
>>
>>59276713
where is "trapping cpu faults and modifiying the stack to make it seem like a random instruction threw a c++ exception"?
>>
>>59276676
>>59276723
>documenting when you could be using types
>>
File: 1488590790614.jpg (20KB, 306x423px) Image search: [Google]
1488590790614.jpg
20KB, 306x423px
>>59276741
Put it between Patrician and Good then.
>>
>Try solving a problem for hours
>Work ends
>End up thinking about how to solve problem at home

I don't think this job is for me familias
>>
>>59276713
Exceptions are great for things like complex file reading and network stream reading where literally anything can go wrong at any given point for a dozen different reasons. The problem comes when people use exceptions as glorified goto statements and make no efforts to recover from recoverable errors.
>>
>>59276777
That is what I end up doing most of the time. Sandboxes are glorious things, and you should set one up and just throw code or implementations at it until you get whatever it is sussed and fast.
>>
>>59276713
>Returning error code in eax

Goddamn I love using Linux kernel system calls. They do it that way and they're so easy to use.

>>59276741
Or you can not be a fucking mathematician and write actual code that works.

>>59276723
It makes sense when your input can't be verified anyway. How do you verify your input pointer actually points to a null-terminated string? It requires traversal of the memory in question.

Honestly, I'd avoid designing brain-damaged data structures like that. Look at the mem* and str* functions; they're all equivalent if not for the fact that mem* takes pointers and sizes and str* takes null-terminated memory. Why the fuck do we need two sets of functions that do the same thing, but one is brain-damaged and fucks pajeets the world over every single day, while the other is sane?

>>59276748
https://steve-yegge.blogspot.com.br/2010/12/haskell-researchers-announce-discovery.html
>>
>>59276805
>He does it for free
>>
>>59276837
>How do you verify your input pointer actually points to a null-terminated string?
By construction.
>>
>>59276837
>Or you can not be a fucking mathematician and write actual code that works.
+1, retard.
>>
>>59276805
>Working for free
I just want to do my own thing but i can't when my mind knows there is a problem that needs to be fixed.
>>
>>59275068
my first fizzbuzz in golang:
https://play.golang.org/p/Q7Ek05QjOP
>>
>>59276799
Lol if you want to see what a real exception handling system is like, learn common lisp and its conditions system. Everything else is just plain garbage.

>>59276852
If your function is taking a pointer as input, it obviously isn't going to acquire and initialize the memory.

Only the caller can be sure.

>>59276861
Kill yourself.
>>
>>59276882
>Only the caller can be sure.
Yes, the caller is responsible for adhering to the specification.
>>
>>59276870
package main

import "fmt"

type fb struct {
n int
s string
}

func Strings(c <-chan fb, mod int, what string) chan fb {
out := make(chan fb)
go func() {
for x := range c {
if x.n%mod == 0 {
x.s += what
}
out <- x
}
close(out)
}()
return out
}

func Nums(c <-chan fb) chan fb {
out := make(chan fb)
>>
>>59276562

Is it worth the time to learn it?
>>
>>59276837
>Goddamn I love using Linux kernel system calls. They do it that way and they're so easy to use.
Literally all software interrupts work that way.
>>
>>59276931
I mentioned Linux because it was the one I was familiar with.
>>
>>59276923
>Go
>2017

top kek
>>
>>59276976
Go back to redd*t
>>
>>59276925
vim is better and is supported by a few IDEs.
vim macros can save you loads of time and its the most powerful editing language out there.
its simple & composable, like software should be.
>>
File: 1482251585484.jpg (165KB, 1032x774px) Image search: [Google]
1482251585484.jpg
165KB, 1032x774px
>>59276985
>everybody I don't agree with is from reddit
>>
File: onion823743wehds.png (133KB, 800x1480px) Image search: [Google]
onion823743wehds.png
133KB, 800x1480px
>>59276992
>tip fedora
>2017

top kek
>>
Another interesting thing is about the "clever" Go implementation using segmented stacks. Your routines have stacks that are effectively unbounded, allowing really fast, effective and predictable stack memory allocation. Stack and static memory allocation is how you do real time code; you can't have motherfucking malloc fucking up your latency.

Unfortunately for Go, though, it was also designed with "lightweight threads" in mind. The idea is to enable you to write multithreaded web servers without all the asynchronous programming that comes along with the task. Hell, asynchronous programming is a thing because with a 1 thread/task model you exhaust your machine's memory since every thread normally allocates like 1MB of memory for its stack. Go allocates a lot less memory, allowing you to have millions of "goroutines".

These features smash right into each other. When a routine runs out of stack, which will happen often since they have small stacks, it allocates another stack and switches to it. This is no different than a malloc and may involve a system call. In practice this happens in the worst possible time, like tight loops, and you're basically fucked in that case. It will keep allocating and deallocating stacks right in the middle of the loop like a tard.

You'd think these people would invent a mechanism to do something like "hey a loop is about to start so let's preallocate a bigger-than-normal stack and switch to it in advance to guarantee performance" but no. They decided to get rid of the current implementation. Now when you run out of stack space, Go allocates a bigger one, copies the old shit to the new stack, and resumes from there. No different than a 4 year old's dynamic resizable array library. I've never seen developers backpedaling this hard

Really makes you think when you see Go diehards hyping their language like it's a "perfect C" or something. As if being designed by that Pike guy made it good. Sounds a lot like Apple when I think about it.
>>
>>59276852
>point the pointer at a string
>append a null character to the string
>>
>>59277082
No.
>>
>>59275242
Security engineering. Seems better than visual basic or php.
>>
>>59277082
>appending either overwriting data, assuming the memory is available or allocating a new memory block

>overwriting the last character requires looping through the string
>blows up when you copy the null character to the end if faggot forgot to add +1 to malloc for the \0
>calling malloc is often an expensive operation

top C
>>
>>59276962
Try programming in 8086/dos someday. If you like software interrupts you'll definitely love it.
>>
File: 1474960567642.jpg (277KB, 616x693px) Image search: [Google]
1474960567642.jpg
277KB, 616x693px
>>59276992
>>59277033
>Give free advice on >>>/g/
>Posts replying to it as if you are committing sin
>Suspect readit has found le epic real coder hangout
>Further down in the thread someone is being accused of being from reddit for posting go
>>
File: 1488657098778.gif (348KB, 540x400px) Image search: [Google]
1488657098778.gif
348KB, 540x400px
>>59277143
Whoa take it easy man. Have a qt anime.
>>
>>59277177
What did she mean by that gesture?
>>
File: anon pls let me love you.png (416KB, 712x560px) Image search: [Google]
anon pls let me love you.png
416KB, 712x560px
>>59277186
She wants you to fug her anon
>>
>>59277118
Okay how about this? Allocate and zero a block of memory that you KNOW is significantly longer than the string, and copy the string to the beginning of the block.

>>59277186
Something something proton torpedo into the thermal exhaust port.
>>
>>59277230
>Allocate

At this point you can just make a string_concatenate function that returns new strings.
>>
>>59275736
>CL
>C
>C++
>>
What's an up-to-date guide on handling web communication with Android? A lot of pages I'm looking at use deprecated or unsupported imports on newer Android SDKs.
>>
>>59277256
The android documentation you pajeet. Also stackoverflow.
>>
>tfw java the language is ok but it's surrounded by the worst enterprise autism like gradle
>>
>>59277268
calm down, Rajesh kumar
>>
>>59277274
>gradle
>bad

Try Maven or Ant.
>>
>>59277268
he already knows about stackoverflow
thats where he copies all his code from
>>
>>59277291
what's the problem with with, Sir?

can you email me the solution?
>>
>>59277305
Sent :^)
>>
File: 1455926607404.webm (493KB, 498x446px) Image search: [Google]
1455926607404.webm
493KB, 498x446px
>tfw visit pajeet blog

http://www.learnopencv.com/face-swap-using-opencv-c-python/

>subscribe for the codez
>subscribe with temp mail
>emails me his github repo
>>
>>59276452
yo what font/shell theme is that?
>>
>>59277388
BungiournoPeido
>>
File: 1488783232394.png (557KB, 433x713px) Image search: [Google]
1488783232394.png
557KB, 433x713px
Alright, bros, no memes.
How is java embedded different from normal java? How does it compete with C?
>>
>>59277501
Simple. It runs on processors that implement the JVM bytecode directly. IIRC every single credit card runs that shit
>>
>>59277501
Lisp.
>>
>>59277388
Terminus.
The terminal is urxvt, so here is my .Xresources:
URxvt.depth: 32
URxvt.background: [95]#111111
URxvt.foreground: #ADADAD

URxvt.scrollBar: false

URxvt.font: xft:xos4 Terminus:size=12:antialias=true

URxvt.color0: #3B3B3B
URxvt.color1: #CF6A4C
URxvt.color2: #99AD6A
URxvt.color3: #D8AD4C
URxvt.color4: #597BC5
URxvt.color5: #A037B0
URxvt.color6: #71B9F8
URxvt.color7: #ADADAD
URxvt.color8: #3B3B3B
URxvt.color9: #CF6A4C
URxvt.color10: #99AD6A
URxvt.color11: #D8AD4C
URxvt.color12: #597BC5
URxvt.color13: #A037B0
URxvt.color14: #71B9F8
URxvt.color15: #ADADAD

The colours were taken from the "Jellybeans" Vim colour theme.
>>
>>59277521
weird. So, it's hardware specific?
>>
>>59277408
>BungiournoPeido
bonjour to you mate
>>59277584
thanks!
>>
>>59275736
c/haskell/lisp
>>
>>59275119
didn't have an anime OP
>>
>>59277588
I know it either runs or used to run in the yubikey.

https://en.wikipedia.org/wiki/Java_Card
>>
File: 1488413334849.jpg (114KB, 579x570px) Image search: [Google]
1488413334849.jpg
114KB, 579x570px
Get software job. Signing NDA.
>tfw I'm literally signing over the rights to everything I've ever made
>they add a sheet to write current Inventions I have
>mfw there is only room for 5
>>
>>59277694
Why on earth would you sign that?
>>
>>59277501
>>59277588

By embedded they mean "small computer" not "micro controller" or "low power optimized device" or "SDRAM driver"

You would use it if you want to avoid undefined behavior at all costs or if you really want a higher level language.

The reason why credit cards use a version of Java is because they don't want to leave anything to chance.
>>
>>59277703
I haven't. There's a way to add more stuff. Time to count all my bash scripts, all my hello worlds / dumb programs / actual stuff that could be a product.
>>
>>59277694
>he didn't write his own GNU agreement
>>
>>59277694
That sheet's probably for projects you don't want associated with the company. That's how it works at my company. Makes sense that proprietary software you write for the company belongs to them. If they're taking ownership of your side projects then you're probably signing onto a shit company.
>>
anyone else find it easier to write code and then translate their thoughts to English later?
>>
tfw HM is not powerful enough on its own and I need to shove weird hacks into it just to make my shit work
my chances at actually producing something of interest are quickly deteriorating
>>
>>59277763
Almost always, yes. Code is notation for programming for a reason
>>
File: cant_handle_the_feels.png (32KB, 344x326px) Image search: [Google]
cant_handle_the_feels.png
32KB, 344x326px
>tfw have computer science degree
>tfw I am too anxious to join a company because they might make me do something I don't know
>tfw they might fire me because I'm not good enough
>>
>>59277777
>>
Are there any jobs that don't require web development?
>>
>>59277776
What are you trying to do?
>>
>>59277792
That's a good sign that you are probably better than 60% of your fellow developers.
>>
>>59277730
Ah, okay.
So what makes a language safe/unsafe? Would that be like the compiler checking for accessing an array out of bounds, or how people consider gets() in C unsafe?
>>
>>59277802
All the ones worth having, yeah.
>>
>>59277826
Which ones?
>>
>>59277792
I'll let you in on a secret: that feeling will never end. Realize that yes, the bar really is that low and that even a dumbass like you will still outperform most of your shit stain co workers.
>>
>>59277751
Yeah, it's more of that now that I've spent a little longer rereading it. The legalese is pretty dense. Probably going to hold off for a day on signing this to make sure I understand everything.
>>
A good reason to stop using C is that all the build systems for it are garbage
>>
>>59277897
Plain Makefiles are great.
>>
>>59277902
Not if you need to do cross-compilation.
>>
>>59277846
I mean, I don't have a list, but I do simulation/systems engineering for a defense company. C++, Python, Ada, Fortran, shell scripting, etc. Applied to a bunch of similar positions during the job search, too. I guess pick an industry that lends itself to using real languages?
>>
>>59277918
Just you wait until your manager tells you you need a web GUI

JUST YOU WAIT
>>
>>59277694
>I'm literally signing over the rights to everything I've ever made
i seriously doubt that. you may want to read it again. what they are probably doing (many companies do this) is informing you that they will own the rights to software you make while you are working for the company if it makes use of any company time or resources, and giving you a chance to declare any software you are already working on up front so that it's on paper that you were already working on it when you signed on with the company
>>
>>59277694
Renegotiate your employment and tell them to remove the part that covers code written outside of company time.
That's a gross overstep of power and incredibly rife for abuse.
>>
>>59277821

When you program C on a desktop computer, it's designed so that you can't access memory that isn't considered to be "yours."

This is because it has an OS and hardware memory protection.

When you program a computer without hardware memory protection, you can read/write any memory you want. Arrays are allowed to go out of bounds basically
>>
>>59277792
take solace in the fact that if you were consistently confident in your ability as a programmer, it would almost certainly mean that you're a shit programmer. companies make use of shitloads of different technologies and internal codebases and they generally don't expect a new hire to already be extensively familiar with everything they might happen to use. they understand a good programmer will be able to ramp up in a reasonable amount of time. and if they expected people to at full productivity immediately, "ramping up" wouldn't be a term in the industry
>>
>>59277928
pls no
>>
File: java.jpg (38KB, 663x195px) Image search: [Google]
java.jpg
38KB, 663x195px
>>
>>59277802
anything in client software and just about anything in tools, testing, or automation
>>
>>59277818
type inference system for multiparty session types
>>
>>59278123
Java is good
Rust is better
>>
>>59278123
in java, you could write Thing.Add(a, b) and have it mean almost anything
>>
>>59278141
Do you like HLists?
>>
>>59278123
Babbys first programing
>>
>>59278207
this.
wish I had operator overloading in java.
>>
>>59275134

Let us analyze what you're doing here...

carpetSquare = 3.times do print(carpetPattern,"\n") end

Print the pattern 3 times, and then set carpetSquare equal to the number of times you printed it.

return carpetSquare

Return the value of carpetSquare, which is 3, from the previous statement.

print(carpetSquareGenerator)

Call the function carpetSquareGenerator, print its return value, which is 3.

Remove the last print statement, remove the return value. Just make it like this:

def carpetSquareGenerator
blockArray = ["▓", "▒", "░", "█", "▞", "▚"]
carpetPattern = blockArray.sample(6).join
3.times do
print(carpetPattern,"\n")
end
end

carpetSquareGenerator
>>
>>59276546
Sublime text
>>
>>59278209
haven't ever found a good use for them desu
>>
>>59278256
i won't claim a language should allow overloading as many operators as C++ does (i'll admit it's a bit ridiculous being able to overload the comma operator, among others), but i mean come on, not even basic arithmetic operators? there are tons of scenarios beyond primitive types where those are entirely predictable and well-defined
>>
>>59278283
I'm disappointed in you doggo, pretty much any problem can be solved using heterogeneous lists
>>
>>59278300
maybe, but not necessarily more effectively than with something else
>>
>>59278292
Especially considering that those operators don't even do anything for classes, so it's not like you're overloading them so much as defining them.

That being said, the concept of interfaces are pretty much directly in line with the way Algebraic structures are defined mathematically. Too bad they're so ugly.
>>
>>59278273

If only IO were monads, he'd not have made this mistake!

t. Karen
>>
>mfw putting Quiet in front of a function eval in mathematica
>>
>>59278394

Yeah, nah, I still want to do my permissions-based procedural language.

[<Permissions(ConsoleIO, Random)>]
proc carpetSquareGenerator()
tiles = [ "▓", "▒", "░", "█", "▞", "▚" ]
indices = [ rand_range(0, 5) for i in 0..5 ]
for _ in 1..3
for i in indices
print tiles[i]
end for
print_line ""
end for
end proc

[<EntryPoint>]
proc main()
carpetSquareGenerator()
end proc


Testing out some ideas on syntax.
>>
>>59278516
>Permissions

This is not what we agreed on.
>>
>>59278516
I can't believe how easily Karen managed to plant this in your head
>>
>>59278543

When was a consensus ever reached?

>>59278549

Nah, Karen's still insisting on Monads. I just realized I could achieve the benefits of everything he's talking about without actually giving a damn about type theory. I also realized it might make for an excellent PhD research. I've looked up "permissions based programming languages", and only seemed to find some that involve permissions on objects/state. I don't want to encapsulate state, but actions.
>>
>>59277792
I know that feel. Computer Engineer here. A big company asked me to interview with them, and I got nervous and failed.
>>
>>59278577
b-but don't you wanna use permissions to encapsulate state + actions in an asynchronous message-passing communication session between multiple parties
if I fail now maybe I'll add this to some sort of future PhD research though :°)
>>
>>59278615

>encapsulate state
Mate, this is a procedural language. The basic unit of abstraction is the procedure, not the object. If you want to expand upon my work to make some sort of object-oriented message-based Frankenstein's monster of a language later down the road, be my guest.

>if I fail now maybe I'll add this to some sort of future PhD research though :°)
By the time you start your PhD, I'll have already finished mine, or abandoned this project.
>>
>>59278577
>When was a consensus ever reached?

Last night, you fucker.
>>
>>59278738

GTP, you need to lay off taking LSD before bed.
>>
>>59278123
Java best.
>>
JAVA IS POO
fuck JAVA. poo in loo PAJEET. ahahahah le C master race. fucking java kids and your actual careers.
>>
>>59278780

Wrong.
>>
>>59275242
Security Engineer, jesus
>>
>>59278842

DRUGS ARE BAD, GTP
>>
>>59275242

Security Engineering. VB.NET is dying. It isn't even in .NET Core, while F# is. PHP is obsolete thanks to Node.js being a thing.
>>
if you are an elite programmer you should know what this prints
int three = 3;
String four = "4";
System.out.println(1 + 2 + three + four);
>>
>>59279025
I got this
>>59279025 is a faggot


What does it mean?
>>
>>59279025
segmentation fault
>>
>>59279025
>System.out
Knowing Java, either 6 + whatever '4' is in decimal, or fucking FALSE
>>
>>59279037
>>59279038
>>59279052
>/dpt/ is this dumb
I would take Pajeet over you chumps any day
>>
>>59279082
Jokes on you I am the pajeet
>>
I'm looking to teach myself python. I'm using a VM with Ubuntu and python3 and I'd like to stay CLI only. What other shit should I install? Should I force myself to learn git at the beginning?
>>
>>59279025
64
>>
>>59279107
You don't need git unless you are doing a project. Plus git is easy as fuck to use.
>>
File: image.jpg (59KB, 480x775px) Image search: [Google]
image.jpg
59KB, 480x775px
Question: Where do you guys work? What are you working on? What's the coolest thing you've worked on?
>>
>>59278809
kek
>>
>>59279025
64
>>
>>59279107

>Should I force myself to learn git at the beginning?
While it is a skill you should learn at some point, you needn't divide your focus. Most of the programs you're going to be making at this point will be so small that using a VCS would not really be useful.
>>
>>59278919
just say no
>>
>>59277792
This is me right now. Actually this is me for the last 6 months. I only started applying a few weeks ago. I feel like if I got an interview I'd do fine, but if I actually got hired they'd be like "how did YOU get an offer?"
>>
>>59279177
>but if I actually got hired they'd be like "how did YOU get an offer?"
Trust me. Everyone gets that feeling. You will be fine. Fyi. Here is a run of my programming life so far

>Major in EE
>Learnt C, C# and Assembly in school
>Learnt Python for FYP
>Found a job doing unit test in fucking Java
Can you image my first day? And yet here I am coping well about 2 years later.
>>
I spent a majority of the day working on the scraper part of what will eventually be used for a machine learned shitposter.
Can anybody point me in the direction of how I can turn the cached replies into a learned response from it? Some preliminary searching has pointed me towards NLTK and python. I'll probably fiddle with that for a bit.

In other news, if anyone wants to laugh at/help me improve some really shoddy perl scripts, I'd be down to post the files for the scraper.
>>
>>59277694
Quit job immediately.
>>
>>59279277

There shouldn't be a replacement.
>>
>>59279277
Wrong thread
Wrong board
>>
>>59279264
http://karpathy.github.io/2015/05/21/rnn-effectiveness/
>>
>>59279304
This guy's pretty cool. I first found him from his cubing videos (3x3 Rubik's cube). Wasn't until earlier last year I learned he was getting a PhD in AI / Machine Learning.
>>
>>59279277
back to /pol/
>>
Give me a small language that runs on JVM
>>
why do you people always talk about languages like autists who are simply too retarded to follow practicality?
this whole thread should be solely on software engineering principles, not coding/syntax/tools which are less than 15% of a REAL JOB
>>
>>59279479
>this whole thread should be solely on software engineering principles
This ain't reddit senpai
>>
>>59279479
>Engineering
Wewlad, the people here are proud to call themselves 'programmers'.
>>
>>59279013
I wonder if there is any chance of JScript.NET coming back to life.
>>
>>59279479
>REAL JOB
see, that's where you are wrong. /dpt/ is filled with NEETS who sure as fuck can write nifty little single file programs, but have never worked on anything serious in the two years they have been out of high school.
>>
>>59279479
>practicality
>a REAL JOB is 85% theory
wew
>>
>>59279479
Because it's fun? kys
>>
>>59279615
That's not true I actually prefer Java and OOP Enterprise software
>>
>>59279615
>but have never worked on anything serious in the two years they have been out of high school.

Let me tell you first hand working in the real world that the nifty little single file programs are better written, more readable and more documented than 90% of the shit I deal with on a day to day basis.

When you code due to passion or interest, you bother giving a fuck. Once coding becomes your job, you do the bare minimum so you can't be fired. You will be amazed at how fucking fragile some programs are.
>>
>>59279639
this is true I only care about how much money programming pays and don't even care about optimizing the code
>>
>>59279616
Not what he said. He meant that 85% of the job is focused on producing functionality for the client, working with other developers, testing your system, refactoring your code, etc...
The tools used are a small part of a real world software development job.
>>
>>59279549
>>59279616
>design, requirements, testing
>not LITERALLY what all companies are all about, the most time consuming and expensive thing
dpt really is filled with basement neets who dont know about working in and/or managing teams
>>
>>59279650
>The code works
>Junior member tells me there is a better way to implement it but that means at least 5 more hours of writing and testing minimum. Not to mention the amount of paperwork required for such a commit
>Tell him he can spend his weekend doing it
>Smile and walk away
I literally give zero fucks
>>
>>59279588

F# does basically everything you would want out of JScript.NET.
>>
File: 1486819450596.jpg (28KB, 642x481px) Image search: [Google]
1486819450596.jpg
28KB, 642x481px
>>59279466
bump
>>
>>59279660
More like 85% of the job is making sure your program does the bare minimum before the deadline and the other 15% is doing documentation
>>
>>59279660
>he
>>
>>59279673
it's true clients only care about the code working not if it is the best written for perfect optimization etc
>>
>>59279660
>The tools used are a small part of a real world software development job.
top wew
>>
Are logger programs mostly used for logging exceptions and you need to make your own logger to log things like inputs?
>>
File: Lain_merge.png (4MB, 1600x1148px) Image search: [Google]
Lain_merge.png
4MB, 1600x1148px
Anyone know (pseudocode or otherwise) ways I could merge two images together (such as in pic related)
>>
File: lug.jpg (14KB, 480x360px) Image search: [Google]
lug.jpg
14KB, 480x360px
>>59279707
>>
>>59276164
The C-subset of C++ has one big problem to me, it is its enforcement of strong typing, thus disallowing implicit conversion of void pointers. God, it is absolutely unnecessary to cast in this case, but you still have to use the long-ass static_cast otherwise, hence breaking compatibility with C.
>>
>>59279639
>coding becomes your job
well shit, whoever hired you isn't getting bang for their buck. it is your job as a software engineer to produce quality code. when you're just "coding" the bare minimum shitty spaghetti code to make the tests pass green you're no better than Pajeet.
>>
>>59279668
I was agreeing with you. programmer is an embarrassing term that people wear with pride, for some reason.
>>
>>59279731
programmers are glorified typewriters
>>
>>59279685
>>59279650
it's like you fuckers are proud of being garbage. and yet I bet you come on here and talk about how OOP is POO and talk shit about "pajeet"
>>
>>59279728
>well shit, whoever hired you isn't getting bang for their buck
Then maybe they should pay me more for the hours I spend coding. You say like I literally cobble shitty spaghetti code together for a living. No. I write quality code in the time I am paid to write code. I can't be fucked to spend more hours where I am not paid to write better quality code. Who is the one with real world experience now? Or do you spend 40+ hours in the office and then go home and spend another 30 hours writing the perfect code?

>>59279702
Which is why it is funny that the anon looks down on people who code out of passion and interest as a hobby without being paid. Those people are motivated to write the best code they can write. I am motivated to write the best code in the hours I am paid to write it. That is it.
>>
>>59279753
I love OOP it just works and make it easy to read other people's code because it's all practically the same
>>
>>59279753
When you actually find a job you can write code for 40 hours a week and then spend another 30 hours at home writing code for your work. Yeah fuck off retard.
>>
>>59279731
>programmer is an embarrassing term
Yeah, that's like calling yourself a janitor instead of a sanitation engineer.
>>
>>59279777
completely mis-interpreting what I'm saying. I'm saying that the 40 hours a week that you are at work, coding on the job, you should put some goddamn effort into it.
I, too, think that writing code for the company outside of normal work hours is bullshit.
>>
>>59279820
>Implying I don't
If you ever worked in the real world, the deadlines are set in a matter they almost always require you to do overtime which I hate but I do anyway cause deadline. Bare minimum code is what 40 hours of effort is going to give you due to the way deadlines are structured. Are you sure you have worked in the fucking real world before or do deadlines not exist in your world place and you are free to spend weeks upon weeks on a single project?
>>
>>59279799
Yep
>>
>>59279837
pretty much this lots of features get cut and just the bare minimum to meet most project requirements so the enterprise software can be finished for the project
>>
>>59279718

There are lots of ways.
>>
>>59279837
I've had three jobs out of uni and I've never had to do bullshit overtime. Not sure what shit ass 45k a year jobs you've had.

also, >implying that producing quality product takes a lot of time
no. it simply requires that you know what you are doing. let me guess - you don't write tests either because that's "a waste of time".
>>
>>59279870
>No overtime
>No concept of deadline
>Rags on other people who produce "bare" minimum code
Yeah fuck off. You never worked a real job before. Just keep pretending to okay.
>>
>>59279870
>it simply requires that you know what you are doing
Spoken like someone who has never worked in a real life job before. You don't directly produce a product, a team is behind it. You are assigned a component that is subjected to change at the whimps of your project leader, the design team, the sales team and whatever the fuck the client wants. While having to meet a deadline. Also real companies have dedicated departments designed to write test for products that don't remotely even touch products.
>>
>>59279881
I don't have to prove shit to you. Sounds like you've made some bad decisions buddy. Not all companies are like that.
>>
>>59279913
>I don't have to prove shit to you
There is no need, everything you said already shown me that you only pretend to know what work is like with zero concept of how work actually operates.
>>
Can't really find good examples of using java's logger to log user inputs, do I just save them to a file on my own?
>>
>>59279913
>Not all companies are like that.
Why don't you name those 3 fantastic companies you worked at with no overtime bullshit. And your role as well. Working at google doesn't count if you are their toilet cleaner.
>>
>>59279934
>>59279921
woah pal. didn't mean for you to get this ass pained.
>>
>>59279945
>Rags on /dpt/ for being NEETs while talking about working in the real world
>Proceeds to get BTFO about him "working'
>I don't have anything to prove you are just butthurt

Ironic really. You came in to look down on others now you are the one being looked down on.
>>
>>59279934
>toilet cleaner
excuse me anon, everyone who works at Google is an Engineer
and don't you forget it
>>
>>59280017
Google hires plenty of non engineers. Pretty sure they have their own in house masseuse as well.
>>
>>59279718
fuckin imagemagick
>>
>>59280025
*Massage Engineer
>>
How do I into hashing, vector and mapping? The concept itself is simple enough to understand and reproduce with pen and paper if there are only a few entries, but then when it comes to thousands or even millions of entries I have no idea what's going on. Should I just stop worrying about it and let the keys do their thing?
>>
I played bitcoin dice instead of working today
Doubled my money after going all in
feels gud man
>>
>>59280035
That is what they put in their job description not their job title.
>>
How do I deal with physics?
CS department requires it, and honestly if I want a decent grade I have to put 15+ hours weekly
more than I study for all my cs classes combined
>>
>>59280052
So long as you grasp the concept that is enough. Unless you have PhD knowledge you are not going to be developing new methods of encryption by a long shot. You can try.
>>
>>59280055
I see, that makes sense. I want to apply to be a Job Description Engineer at Google, please advise.
>>
>>59280099
That is called the Human Resource Engineer senpai
>>
>>59280053
Smart man
>>
>>59280058
So what's the problem?
Just study the hours you need.
>>
>>59280058
chegg.com
it's worth the money
>>
>>59280032
I was thinking more of what you would be doing with said libraries.

One thing I'm thinking of is sort of alternating pixels within an image. The only issue with that is that I'd need to have images of the same size...That or at random choose a corresponding pixel in the other image.

Any other ideas?
>>
>>59280307
You know that a RGB image is a 3 dimensional array right? What are you trying to do by merging? Adding the digital values of the pixels together and averaging it?
>>
is it easier/cleaner to program a small neural network in a functional style or an OOP style with methods and whatnot for the nodes?
>>
>>59280343
Do you want to expand and reuse your code in the future? The latter. If you just want to have fun with a small NN then the former.
>>
File: solve (6).png (900KB, 1920x1080px) Image search: [Google]
solve (6).png
900KB, 1920x1080px
>>59280058
Physics is extremely simple and intuitive.
>>
>>59280353
it's likely that i'll expand it, so i'll go with OOP in that case.
>>
>>59280358
>Simple and intuitive
Yeah till you get to quantum mechanics and it makes zero senses at first and makes your brain hurt. Learning the maxwell equations was really cool tho.
>>
>>59280395
QM is actually very intuitive if you understand the math behind it.
>>
>>59279233
Are most software jobs a specific area like unit testing? Does it stay like that until you find another job or do some companies move people around?

probably varies but just curious.
>>
>>59280411
QM is intuitive if you understand it as a singular concept. It is putting it together with classical physics as well as Einstein physics that makes your head hurt.
>>
>>59280341
>You know that a RGB image is a 3 dimensional array right?
no? more like an array of 3-dimensional values. i've never seen a texture implementation where the channels weren't interleaved
>>
>>59280426
In a large company there are specific departments that do specific stuff. The only time you juggle multiple roles in different projects is at small/medium startups. Or silicon valley lite companies that try to copy google. Even google has a very structured departmental setting, although you have a lot of freedom within the department itself. Anywhere else, you get assigned a department and a role. Say software engineer at R&D department. Or Unit testing. Or operations. Or backend etc etc. And after X amount of years, you can tell your department head/project leader you want a change in environment and then you can maybe transfer to another department. Software engineers are no different from any other engineers. An engineer working on cars motors is not going to be working on the electrical wiring of the car even if both of them are engineers working on developing a car (or any big software for that matter)
>>
>>59280431
GeoTiff doesn't interweave their arrays. That allows for multiple layers to exist in an image.
>>
New thread:
>>59280552
>>59280552
>>59280552
>>
>>59280460
What are important principles to know for software engineering?
I would assume: design patterns, testing, modelling (UML Diagrams and shit?), design methods, what else?
>>
>>59280481
>GeoTiff doesn't interweave their arrays
okay, that's one. i'll give you that

>That allows for multiple layers to exist in an image
the same effect can be achieved with an array of arrays of 3-dimensional values
>>
>>59280645
>the same effect can be achieved with an array of arrays of 3-dimensional values

Depends on what you are trying to do. Have a preset array that can only handle 3 amount of value means you are only handling an image with RGB. Some images require NIR or LiDAR.
>>
>>59280607
Those are important principles to know for the job interview. Past that stage, you can dump almost all the theoretical stuff out of the window unless you are in R&D or research. Everything past that is on job training. Different companies have their own pattern for design, testing, modelling, design methods etc. There is no one size fit all methodology. So long as you grasp why you are doing what you are doing and the terminology, you will be fine. For example, I do unit testing so I don't need to know design patterns or design methods indepth.
>>
>>59280666
i figured it was a given that the dimension of the values would depend on what kind of data you need to store
Thread posts: 318
Thread images: 28


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