[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/dpt/ - Daily Programming Thread
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 328
Thread images: 35
File: DPG.png (389 KB, 934x1000) Image search: [iqdb] [SauceNao] [Google]
DPG.png
389 KB, 934x1000
What are you working on, /g/?
>>
butts
>>
File: RW1jmxB.png (31 KB, 923x477) Image search: [iqdb] [SauceNao] [Google]
RW1jmxB.png
31 KB, 923x477
For some reason I gave the executable to a friend, and the "SEK" column is always blank.

I can't understand why the hell it'd do that.
>>
>>52638044
SeconD
>>
>>52638225
are you using the same version of java?
>>
paiza doesn't seem to like my solution to the eyepatch challenge
it passes all their examples, and I even wrote up a bunch of test cases and they were all successful
yet it fails on their secret test cases that I'm not allowed to see
what the fuck
>>
>>52638044
Reminder that you post on the same general as people who don't know how to use codetags
>>
>>52638265
>Java

It's C# - The thing is built on .NET 4.5.2.

Which I assume he has or the thing wouldn't load.
>>
>>52638272
what do you even mean by this?
>>
>>52638278
ok my bad, already wondered why it looked slightly off
never used c#
>>
hey is me with a lambda problem again

I have written this piece of code

public static void stringMethod(List<String> list) {
list.stream()
.filter(s -> s.startsWith("C"))
.sorted()
.forEach(System.out::println);
;


}

but it doesnt put anything out when I call it. What have I done wrong ?
>>
>>52638044
import faggot
print you're a faggot
kill you're self
>>
>>52638297
look at this shit:
>>52638343
>>
>>52638343
sorry heres the formatted code



public static void stringMethod(List<String> list) {
list.stream()
.filter(s -> s.startsWith("C"))

.sorted()
.forEach(System.out::println);
;


}


>>
Doing a webdevelopment project at school, does anyone have some cool tricks to impress the teacher and get me a kickass grade?
>>
>>52638392
ok
people are fucking stupid
that's a surprise?
>>52638398
>;
for what purpose
>>
File: output.webm (2 MB, 800x800) Image search: [iqdb] [SauceNao] [Google]
output.webm
2 MB, 800x800
Java program to generate these random animations.
>>
OCaml is the last language you'll ever need. Why haven't you converted yet, /dpt/?
>>
>>52638392
fixed it <3
>>
>>52638432
cuz ur gay
>>
Conditional jump or move depends on uninitialised value(s)


How do I debug C code so I can know exactly what value that is?
It's causing undefined behavior on some of my test inputs.
>>
>>52638428
>>52638398

there was another statement that I deleted its irrelevant
>>
>>52638428
>that's a surprise?
If everyone had your lackadaisical attitude, humanity would be way behind

>>52638438
Good man
>>
>>52638278
>The thing is built on .NET 4.5.2.

You have a problem with 4.6.1?
>>
>Java
>
>>
>>52638452
gdb?
>>
>>52638477
This
>>
>>52638429
So it's just like that ball from pong times 12 with lines drawn between them?
>>
>>52638432
Because Windows support sucks.
>>
>>52638452
doesn't gcc give you the line number where it occurs? check if the variables are initialised properly.
>>
Bros,

I got my first job in Development and my first job is to read data from an excel document and arrange the information in C#

No oledb, using interop with Microsoft.office.excel.interop as a reference and im using DataTable to create the data with a winform

Any advice? I hate stack overflow
>>
>>52638545
its not that special anymore now
>>
File: 1357230484044.jpg (40 KB, 548x577) Image search: [iqdb] [SauceNao] [Google]
1357230484044.jpg
40 KB, 548x577
Is writing a C compiler a good project for a beginner?
>>
>>52638563
>this guy is a pleb at programming and yet he managed to get a job in development
You neets have no excuse
>>
>>52638563
>I hate stack overflow
You should probably get over that hate
>>
>>52638585
Why do I need an excuse? I like being NEET.
>>
>>52638467
Yes, I'd have to go into a menu and select 4.6.1

Laziness is the best.

I just ended up using NCalc to evaluate the expression, whatever they use to do their math seems to work on anythiing.
>>
>>52638575
anything never is when you learn to code
>>
>>52638580
Yes. There is a chapter in SICP on writing a compiler.
>>
>>52638618
>anything never
community college detected
>>
Learning Pythong the hard way. I want to use Django after completing it.
>>
>>52638648
Pythong?
>>
>>52638639
or just non-native, genius
>>
>>52638655
Sexy version of Python.
>>
>>52638563
>Any advice?

Look it up on MSDN, you wiener.
>>
>>52638585
Its fucking daunting man

Give me genuine advice, you sound like you know what to do
>>
>>52638563
>I got a job
Well done

>I have no idea what I'm doing
You lucky cunt

>I hate stackoverflow
You better stop hating it, seeing as it's going to be doing your job for you

>How do I do this simple thing with a well documented piece of software using my incredibly well documented language that has libraries to do any conceivable task?
Google, you fuck.
>>
/new2g/ here

are these threads against /agdg/ progress?
>>
File: 1326803526413.jpg (24 KB, 386x252) Image search: [iqdb] [SauceNao] [Google]
1326803526413.jpg
24 KB, 386x252
>do Haskell
>switch to Linux
>Cabal breaks because of file path case sensitivity
>can't make it just look for lower case directory names
>have to rename every single source file
>>
File: 1453653439709.gif (3 MB, 880x603) Image search: [iqdb] [SauceNao] [Google]
1453653439709.gif
3 MB, 880x603
>>52638773
We're all friends here
>>
>>52638773
go ahead :3
>>
If I had a bunch of data, how would I go about inserting it into an active OpenOffice Spreadsheet document?

Does it accept any kind of formatted text that'll break values into cells/rows?
>>
File: wilk320-03.png (30 KB, 320x200) Image search: [iqdb] [SauceNao] [Google]
wilk320-03.png
30 KB, 320x200
Tinkering a bit on my shitty shooter.

Also, writing a report for Parallel Processing class.
>>
>>52638773
gtfo
>>
>>52638851
sexy
is that your own engine or are you just fucking with Doom
>>
>>52638832
I once had to scrape a website full of apartment data and put it into a spreadsheet categorized by country, city, district. I created the final string with \t and \n. \t would put the next data in the next cell in a row, while \n would put the next data in the 1st cell in a row on the next column
>>
>>52638851
John Carmack, is that you?
>>
>>52638366
syntax error on lines 2 and 3
>>
Is it better to learn java first and I mean really learn the technology not just the language
or cpp ?
I'm affraid if I start learning cpp I'll end up as a bad dev cause I realize you have to be a lot more careful with what you do in cpp.
>>
>>52638873
Own engine, based on SDL2. All drawing is done in 2D on an SDL texture. Started out mostly as a way to practice my C.
>>
File: 1453695267087.gif (1 MB, 320x200) Image search: [iqdb] [SauceNao] [Google]
1453695267087.gif
1 MB, 320x200
>>52638930
>java
>>
>>52638930
learn scheme first
>>
>>52638930
Java a shit, learn D
>>
>>52638930
whatever you do, don't listen to all of the know-nothings that tell you Java is undesirable for any reason other than (minor) bloat
>>
>>52639010
>verbosity
>broken generics
>shitty native interop
>>
>>52638398
This works fine, provided there are actually strings in the list starting with a C.
>>
>>52638044
https://www.youtube.com/watch?v=DNLB7bFA_U4

how do i become this good at hacking?
>>
>>52639042
>>shitty native interop

I have nightmares. JNI nightmares.
>>
>>52638735
see if your friends or family can get you a job
>>
>>52638881
Heh, neat.
>>
>>52639052
Just be grateful. Some programmers your "nightmares" are literally all they know.
>>
>>52639010
bloat is not even the smallest of the issues

also forced OOP, and inflexible passing of values/references also contribute
>>
>>52639042
>no pass-by-reference
>no unsigned variables
>>
>>52639042
I guess if we use personal opinion to classify languages, we can argue literally any point
>>
>>52639091

I really do feel bad for people who have to do a considerable amount of JNI work. After using interop in C#, I don't think I could ever go back.

"And I've looked over, and I've seen the promised land." - MLK, jr.
>>
>>52638851
funny, I was thinking of doing my own raycasting engine over the next weekend
>>
>>52639122
Those are facts, there's nothing subjective about them.
>>
>>52638110
agreed.
>>
>>52638110
/tesg/ pls go
>>
>>52639107
>no structs
>no pointers
>>
>>52639198
>no malloc()
>methods only
>>
>>52638818
I'm 27 hours away motherfucker. Beer better be cold. Poutine has turned mushy.
>>
>>52639048
Do you know visual basic 6?
>>
>>52639237
>>no malloc()

Get on the sun.misc.unsafe train, lad. It's where all the high-speed low-drag magic is happening.
>>
>>52638452
Compile with -g, then valgrind can give you the file:line where it occurred.
>>
>>52638580
Writing a parser is pretty easy once you get started, I've never tried actually writing a compiler
>>
>>52639293
can you post any code to help get started?
>>
>>52639269
Naw, I'll wait until D gets their manual memory management shit together
>>
Who /practicalapplications/ here?

I ask all my friends who work in data entry jobs and similar things what they're working on and try to write a program that can make their jobs much easier. That way I know that my code will actually be used, and have some value.
>>
>>52639317

Maybe one day.
>>
File: jh.gif (509 KB, 500x281) Image search: [iqdb] [SauceNao] [Google]
jh.gif
509 KB, 500x281
Linux file permissions are a pain to be honest, if one thing doesn't have the correct permission a program can break.
>>
>>52639329
So you're doing somebody else's job? Do they pay you for this?
>>
File: BasedAndrei.jpg (18 KB, 631x87) Image search: [iqdb] [SauceNao] [Google]
BasedAndrei.jpg
18 KB, 631x87
>>52639343
Not one day. Soon
>>
>>52639329
Do their employers actually let them use it?
>>
>>52639364

Look, Andrei says a lot of things. I'll believe when I see it. I hope to be pleasantly surprised.
>>
Assignment for C++ with Applications in Finance.

Coding Black-Scholes pricing calculator
>>
>>52639309
Have a look at Understanding and Writing Compilers by Richard Bornatt, you'll find the pdf online very easily
>>
>>52639364
I can't wait, maybe I'll finally be able to drop C++
Well, at least use both. Andrei's talks and blog posts taught me a lot of neat tricks that make even C++ simple to use
>>
>>52639359
Nope, programming is a hobby, if I wasn't helping people out I'd be sat on my thumbs or writing completely meaningless shit that nobody will ever even see.

>>52639372
I assume a few of them have no problem with it, if they even know. At the end of the day my software is open source, and they took the initiative to use a bit of open source code to increase productivity. If your shit's getting done quicker and to a higher standard, then I'd struggle to see how an employer could get the hump.
>>
>>52639407
thank you
>>
>>52639353
How about you use a language with exceptions and proper automatic resource management?
>>
>>52639420
do my work
>>
>>52639420
>then I'd struggle to see how an employer could get the hump

Probably because the speed gained would be offset by the cost of hiring someone to do a code review.
>>
>>52639449
As a rule I never cut out the middle man, I just make the job easier.

For instance if your current task is to go onto a website and copy paste data, maybe convert some of that data, I'll just write a program that grabs that data, does whatever calculations need to be done and then displays it to you in a more readable and more easily accessible format.

>>52639447
What work you need doing? No friend rate for you though, gonna have to cough up.
>>
>>52639410
They're actually working on interoperability with C++, so it'll probably be worthwhile to also know C++
>>
>>52639522
do you like being fucked in the ass?
>>
>>52639522
we're all friends in /dpt/
>>
>>52639353
sudo chmod -R 777 /*


Problem solved.
>>
>>52639556
With enough lube and some prep I could be convinced.

>>52639561
>/dpt/
>Friends
>>
>>52639420
Sounds exactly like me. My boss knows some people who hate lead generation so I wrote some scripts which scrape websites and gather that shit up into a csv file. I've grabbed thousands and thousands for some of my boss's clients and I use the scripts for myself as well. Other people within my office have come to me for specific programming tasks, and it's badass; I get to sit around all day programming when it isn't even my job. No one there knows how long it'll take so I can just relax and take my time, enjoying it.
>>
File: kEmLf7x.gif (622 KB, 480x304) Image search: [iqdb] [SauceNao] [Google]
kEmLf7x.gif
622 KB, 480x304
>>52638366
wow so edgy and funny XD
>>
>>52639664
Baller, I'd love to get paid to sit there all day working on my lovely UI-driven programs to make peoples jobs a bit easier.

Unfortunately my lack of experience and the fact that such a position doesn't really exist as a general rule.

I should look at doing this kinda shit for small business as a freelancer, seems like a decent way to make a living.
>>
>>52638873
this looks more like wolfenstein 3d

doom actually had angled walls and shit

>>52638851
also nice freedoom textures
>>
>>52639717
It's fun, definitely a nice change of pace from talking to clients on the phone all day.
>>
>>52639726
>doom actually had angled walls and shit
pics or it didn't happen
>>
>>52639574
Making files writable to all is too spooky for me.
>>
>>52639735
I'd imagine I might not find it as fun after a while, when it's a hobby I can just decide to not even bother for a week or two if I like.

Waking up every morning and having no choice but to go into the office to do something might kill any enjoyment you might have.

Eh, what do I care. The NEET life is treating me just fine.
>>
>>52639758
there's angled walls all over e1m1 senpai
>>
>>52639758
>Implying doom didn't have angled walls

How's life as a 16 year old these days?
>>
>>52639726
yep, most of the graphics are borrowed from Freedoom.
>>52639758
"angled" walls as in "can run in any direction instead of 90/45-degree turns"
>>
>>52639107
>no pass-by-reference
>no unsigned variables

>95% of users don't need or shouldn't be using unsigned types/raw pointers anyway
Apple logic if I've ever seen it.

That's probably all you need to tell anyone with previous programming experience to make them want to never touch Java.
>>
>>52639771
As I said, I don't work as a programmer, they just ask me if I can do certain things sometimes and usually I can so I spend the day doing that rather than establishing relationships with corporations and conglomerates. So being asked to work on programming, something I'm usually now too tired to do by the end of the day is sweet, especially when I get paid for doing it.
>>
>>52639829
Ah yeah, fair enough.

Sounds good man, should write more broad-strokes code that you find yourself doing often and release it, other people might have a use for it.
>>
>>52639796
>>52639817
>>52639818
I thought he meant sloped walls by that
>>
>>52639796
>>52639817
They're not angled walls, they're loads of tiny straight walls which makes it look angled.
>>
>>52639862
With a texture applied, the final effect looks exactly like an angled wall.

How do you think they achieved the "straight" walls? Especially seeing as there is no "straight" wall in a doom level.
>>
How do I into graphics programming?
>>
>>52639862
Wolfenstein is grid based, Doom is not.
>>
File: 1449869401106.png (69 KB, 186x283) Image search: [iqdb] [SauceNao] [Google]
1449869401106.png
69 KB, 186x283
Does anyone here program in a non-English speaking country?

What's it like programming/working in?
>>
>>52639975
I'm second language English, I program.

It's difficult at times, especially when your language is old and isn't really conducive to programming syntax.

You try your best and learn the concepts and the words attached to them as you go.
>>
>>52639998
>It's difficult at times, especially when your language is old and isn't really conducive to programming syntax.

You're supposed to program in English.
>>
>>52639975
Traditionally, only comments are in the foreign language

But in my case, I always work in full English, because we have clients that only speak English
Can't say it's any hard for me, even though I officially live in a French nation, the entire continent pretty much speaks only English, so it was easy to learn
>>
>>52639959
You can start with OpenGL. Here's a nice book: http://www.openglsuperbible.com/
>>
>>52640023
Yup, but my native language is ancient and computing concepts are really not a part of it, so I have almost no frame of reference for programming syntax.
>>
>>52640026
>Can't say it's any hard for me, even though I officially live in a French nation, the entire continent pretty much speaks only English, so it was easy to learn

Which French nation?
>>
>>52639862
I don't believe you.
>>
File: 1369329345344.png (12 KB, 352x400) Image search: [iqdb] [SauceNao] [Google]
1369329345344.png
12 KB, 352x400
>>52640061
Québec
I know Québecois are usually terrible at English, but I think I'm pretty good.
>>
>>52640118
>Quebec
>Nation

In your dreams, Canadian.
>>
Writing a 6502 emulator.
There arent consistant patterns in the opcodes so decoding them doesnt work. Will probably just have to do a huge case-switch.

What about having structs with function pointers?

stuff like:
struct Instruction
{
size_t Cycles
void (*Proc)(Context6502&);
};

Instruction blah(4),[Context6502& context](){context.X = 'beef'};


or something like that

so i can just fill a static array and go

Instructions[memory[PC++]](*this);
>>
>>52640135
Quebec is a nation just not a sovereign nation.
>>
>>52640135
Meh, might be a difference in culture definition of words, but I don't associate nation with a country.
I know the dream of a country is dead, I don't even want a country to begin with
But you can't say we're not apart from the rest of Canada. We have our own stereotypes and shit
>>
>>52639975
Yes, I've been doing it for nearly 14 years, since I was ~12. My English is pretty much just as good as my native language, I don't have any issue at all with programming.
>>
File: Sem Título.jpg (84 KB, 1366x768) Image search: [iqdb] [SauceNao] [Google]
Sem Título.jpg
84 KB, 1366x768
I summon all you great haskell erudites to this thread

I am a begginer in haskell, and programing in general, and i was making some exercises about binary trees. I understand recursion a bit.

This is the type of the tree:

 data Tree a = Empty | Node a (Tree a) (Tree a)


Can you help a fellow beginner?
>>
>>52640118

I'm French Canadian by heritage. I can clearly remember my great granmaman wildly screaming "TU ECRIS MAINTENANT!!!!" into the telephone because she wanted me to take a message for my parents who didn't speak a lick of French.
>>
>>52640184
>sublime garbage
>hasklel
>BR
>the most retarded post itt
>>>/reddit/
>>
>>52640154
You're still legally Canadian. I say I'm "Welsh" and we are a recognised principality, but that doesn't mean I'm not legally a British citizen.
Let it go, Canadian frog, just let it go.

>>52640152
No, it's a province.
>>
>>52640184
whats the question, beaner
anyways
repetidos is inane, just calling nub is enough
and yes, your type is correct
>>
>>52640211
But I know I'm Canadian, it's written on my passport
Can you stop projecting and trying to cause shitstorms out of non-existing arguments?

Anyway, nowadays, the only nationalists left are baby boomers and the occasional young left-winger. Why would you think a guy on 4chan would be either of those?
>>
File: Untitled.png (16 KB, 592x417) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
16 KB, 592x417
I believe I have found a good way to get lines from fstreams in C++--both in forwards and in reverse.

I think that indexing the position of each '\n' forwards is bad, and that stepping into each character in reverse to find each '\n' is worse, but I have const-length strings so this is best for me.
>>
>>52640211
>No, it's a province.
Look up the definition of nation, idiot.
>>
>>52640135
Quebec is a nation, and enjoys a most autonomous government.
>>
Quebec a shit
>>
Is Learn Python the Hard Way still the best source for learning Python?
>>
>>52640255
Why do you need a shared_ptr of string?
Just return an std::string and let the client of the function decide how they want to allocate it

Also
>C style casts in C++
>>
>>52640327
It isn't my job to decide that people want a copy of a string. Indirection is minor overhead at worst.
>>
>>52640327
C casts in c++... what's the alternative in this case?
>>
I'm not really liking emacs tbqh.
>>
>>52640468
then stop buying the meme and keep using nano or an actual ide.
>>
>>52640467

C++ style casts.
>>
>>52640327
>c style casts are bad
>implying (type)x is somehow worse than std::static_cast<type>(x)
>>
>>52640467
Static casts, dynamic casts, const casts, and reinterpret casts.
Reinterpret is considered "bad" though.
>>
>>52640244

Repetidos is just there, not important, i just want to know what is wrong in "--3" "somaNum"
>>
>>52640501
C-style casts are only bad in idiomatic C++ in the context that c-style casts don't guarantee type and bound safety.
https://youtu.be/hEx5DNLWGgA?t=396
>>
>>52638818
What is chip8 guy's obsession with that washed out little blond boy?
>>
>>52638044
For my C++ class the teacher said all of our programs need to compile in VS. Im on Linux. What do I need to do so that this isn't a problem/
>>
File: 1453653435287.gif (2 MB, 891x634) Image search: [iqdb] [SauceNao] [Google]
1453653435287.gif
2 MB, 891x634
>>52640738
gorgeous californian goddess familio

anyways updated my higher-level language a ton

night lads
>>
>>52640845

Does your higher level lang get transpiled into chip8?
>>
>>52640873
Indirectly, yes.

It uses my macros, operations, jump/calls and labels, and some other operation shortcuts (= and an operation in one line, as well as expanding on * to do multiplication using repeated adding) and turns it into the assembly code that anyone's basic assembler can assemble, but my higher-level lang file also calls that assembler to make the final binary file
>>
>>52639854
I did suggest monetizing the scraper, nothing ever really came from it.
>>
>>52640805
>What do I need to do so that this isn't a problem/
Avoid C++11 or 14 code.
>>
>>52640939

Pretty neat, m9.
>>
>>52639048
Obviously install loonix and a mind blowing gooie
>>
>>52641047
>this guy
C++11/14 is highly portable
>>
Is java done? Also is python useful?
>>
>>52641110
cheers m7, I appreciate it
>>
>>52641116
>this guy
Not in Visual Studio. There's a ton of shit that will compile on Clang and GCC but not MSVC.
>>
>>52641157
At worst, MS put a bunch of stuff in std::experimental because they release MSVC in big chunks
>>
>>52639353
>Linux file permissions are bad because I can't violate them
lol?
>>
>>52641157
Are you still using an old version of VS? VS2015 has pretty much full C++11 support and supports a large chunk of C++14
>>
>>52640994
Hey if it's your code and your contract doesn't cover any programming-based output it's your prerogative to open source the thing.
>>
>>52639198
>>no structs
you don't need struckt in OOP
>>
>>52640290
yeah but don't learn python if you can avoid it. Learn a lower level language and shit like python will come naturally.
>>
>>52641365
It's perl, messy, and geared towards the canadian yellow pages. I'd rather sell the results that it scrapes for money. a lead generation type gig. gathering prospects is a pain in the ass.
>>
>tfw diagnosing a outages in our 1000+ machine hadoop cluster
>>
>>52641902
>they fell for the hadoop meme
>>
File: madsen.jpg (22 KB, 160x247) Image search: [iqdb] [SauceNao] [Google]
madsen.jpg
22 KB, 160x247
>>52641902
>not having central management of your systems.
>>
>>52641838
>It's perl

Nice.
>>
>>52641637

C++ has structs, though. So does C#.

:)
>>
is ruby on rails a reliable source for learning web design and app development? If not, What is ? I'm up for books and stuff and websites that teach me and stuff. I just wanna get started.
>>
>>52642038
>ruby on rails
Is it still 1980?

everyone's jumped on the python+django bandwagon
>>
>>52639577
friends who hate each other
>>
>>52642051
What can I do with python and django ?
>>
>>52642051
>anything but ocaml+ocsigen
Enjoy your slow as balls, unsafe piece of turd.
>>
>>52642106
>he fell for the ocaml meme
>>
>>52638044
Who is that semen demon?
>>
>>52642103
Anything
>>
Rust FTW
>>
>>52642123
>he fell for the [insert shit languages [i.e. not ocaml] here] meme
>>
>>52639260
Dim ThisGuy As Single
>>
>>52642134
yuki nagato from suzumiya haruhi no yuuutsu
>>
>>52642332
Thanks anon
>>
Hey guys, I'm learning JavaScript instead of C! Great decision huh!
>>
File: g_fullxfull-29942.jpg (108 KB, 1280x720) Image search: [iqdb] [SauceNao] [Google]
g_fullxfull-29942.jpg
108 KB, 1280x720
>>52642384
no
>>
>>52638780
its 2016 m8, everyone is using Stack. Break out of Cabal hell.
>>
>>52642384
Ya blew it
>>
>>52642384
Sure if your gay man.

>gay man near me
>no good is that
>>
Best C IDE for Windows?
>>
>>52642570
gvim + powershell
>>
>>52642570

CLion.
>>
>>52638429
looks neat
>>
>>52642570
>OMG
>1111+905
>USING AN IDE
>FUCKING
>KILL
>YOUR
>SELF
>GAYBOI

jk VS then xcode
>>
>>52641122
No.
>>
>>52642590
>CLion

Would love but it's not free
>>
>>52642611

Don't you have a student e-mail address? Free for 2 years or something.
>>
>>52642613

No. And it hasn't been cracked.
>>
analysis by paralysis

I'm afraid to fix what's working and break what isn't

I have a big dumb complication of complexity, of the cyclomatic variety which I am living in fear of. Fear which is actually affecting my health and well-being.

I am controlled by fear created by my own lack of control over that which was wrought by my hand.

help
>>
>>52642587
This. I love IDEs as much as the next guy, but there's something magical about writing C in vi that you cant get anywhere else.
>>
File: Stallman3.jpg (166 KB, 1600x1067) Image search: [iqdb] [SauceNao] [Google]
Stallman3.jpg
166 KB, 1600x1067
>>52642613
>>
>>52642633
>No.

My condolences. It's the goat.
>>
>>52642636
write unit tests
>>
Right now I'm trying to implement a Trueskill library into my Django app for matchmaking. Programming as a hobby is difficult after work. ;-;

>>52639862
Except you're fucking wrong. I think you're confusing the walls with how they're rendered.

>>52642038
Yes, Rails is the fastest way to get started with web apps and a good place to start. There's tons of resources, you could even type "learning how to learn Rails" and come up with stuff. Django's also good if you're already familiar with Python.
>>
File: DSC_2167.jpg (93 KB, 799x531) Image search: [iqdb] [SauceNao] [Google]
DSC_2167.jpg
93 KB, 799x531
>>52642658

Free as in freedom only matters to me when it comes to politics (pic related). As far as I'm concerned, free as in beer is good enough when it comes to software.

I don't want to politicize programming. It's fun.
>>
I have officially had it with C++ as of now.
testing.cpp:181:21: error: expected expression
auto p = x.get<3>();
^
>>
>>52642744
Why are guns politics and software isn't? Is it because everybody in your country is too retarded to understand that bad software can be harmful?
>>
>>52642759
just give it an expression, you lazy piece of shit
i know what you're trying to do and no, the compiler is not all-knowing and it's not going to guess what you want
>>
>>52642794
I literally can't give it an expression, my function takes no arguments.
>>
>>52642788
>Why are guns politics and software isn't?

Nobody's trying to take my software away.
>>
Gentoofags, what do you have in your CFLAGS?
>>
>>52642001
Perl is epic. Don't reply to me unless you're contributing to your alcoholism. I'm still mad at you for "getting your drinking under control" mr beer in the morning.
>>
>>52642859

I've only had 4 beers today, thank you very much.
>>
File: 1403315969159.gif (398 KB, 500x500) Image search: [iqdb] [SauceNao] [Google]
1403315969159.gif
398 KB, 500x500
>>52642870
Since the fucking morning? I'm on my 7th since 6pm. So 3 hours. step it up, gotta drink fast.
>>
File: 1444564378729.png (74 KB, 518x688) Image search: [iqdb] [SauceNao] [Google]
1444564378729.png
74 KB, 518x688
>>52642540
>>52642558
Is ok bb, still wanna learn Rust and C.
>>
File: lain175.jpg (43 KB, 890x790) Image search: [iqdb] [SauceNao] [Google]
lain175.jpg
43 KB, 890x790
I made Wiki-Style links for my wiki software in Racket. But I had no internet then, that really made me more productive. Now, I don't know--I should code SOMETHING.
>>
>>52642888

I had one with my breakfast, before class, and 3 since I've been home.

I told you. CONTROL!

IT"S UNCER CONTROL!
>>
>>52642829
What about all the locked down shit currently being sold to almost every single user?

>you don't need any software we don't approve

To your "muh guns", think pinning mags.

>who would need more than 10 bullets?
>>
>>52642927
Yes, ulcer control.
You remember that guy who posted all of his cs grad pics? That's me.. I'll do it again.

Serious note, how's the image software thing coming, any progress?
>>
Making java programs for robotics this year.
First time with java, must say at first I hated this object shit. Now that I'm used to it, it's not THAT bad.
It's not too hard programming autonomous and Tele-Op programs for a robot
>>
>>52642983
Nice screenshot man, keep up the good work.
Lovin' line 61.
>>
>>52642983
SNIPPING TOOL
>>
File: cartoonyfilter.png (605 KB, 753x563) Image search: [iqdb] [SauceNao] [Google]
cartoonyfilter.png
605 KB, 753x563
>>52642940
>Serious note, how's the image software thing coming, any progress?

I made 3x3 convolutions considerably faster by sacrificing some memory. Instead of wasting time getting the same pixels over and over again (since neighbors need to be referenced constantly) images are converted to 2D arrays of colors at the outset.

So that was nice.

I also made this cartoon filter the other night, after looking at some pictures and I had a eureka moment about how they did it.

Other than that, not much.

>>52642930

Guns already are pretty locked down, though (in the mechanical sense). Not to mention, there are already open source firearms. Look at FossCAD, Defense Distributed, etc. and be amazed.

The honest truth is that talking politics is exhausting and I like programming because it's """fun""".
>>
>>52642999
ALT+PRTSCR + MSPAINT

>>52643001
Neat, can I see it used on a hot woman? Someone.. I dunno. White? Pale lips. Maybe freckles and red hair.
>>
>>52642997
It was a video I took scrolling through the code
>>
>>52642983
>picture of his screen
>java is good for X that any other language could do as good if not much better
Javacunts everybody.
>>
>>52643001
>>>/africa/
>>
>>52643022
Just busting your balls man.
Tell me more about it?
>>
OCaml is such a ridiculously good language. Only way it could be better is if it had linear types (and no GC), lisp syntax's regularity and lisp's ability to reload code at runtime in a running image. It would be literally perfect if it had those.
>>
>>52643031
>>52643039
We HAVE to use java. We're programming onto a ZTE (also mandatory) phones, one is on the bot and the other connected to a controller.
I load the code I write onto the phone that connects to the bot, which is a module that motors and servos connect to.
>>
#dpt on irc.rizon.net
gogogo
>>
>>52643018
>Neat, can I see it used on a hot woman?

That is my fucking nigfu you are talking about. Show some respect.
>>
>>52643066
You sure are jumping through some loops.
>>
>>52643079
Explain
>>
File: yuki.webm (251 KB, 1920x1080) Image search: [iqdb] [SauceNao] [Google]
yuki.webm
251 KB, 1920x1080
>>52638044
>>52642134
>>52642332
>>
File: bsd minix autism.jpg (365 KB, 1440x1436) Image search: [iqdb] [SauceNao] [Google]
bsd minix autism.jpg
365 KB, 1440x1436
>>52643051
I should get around to making a PSA picture about the OCaml autist.
>>
>>52642668
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>>
>>52643001
Isn't your freedom enjoyable, maybe not fun but enjoyable?

Isn't the further progression into locked down, use this language, OS, crypto algorithm or program that is NSA approved not so much fun?
>>
>>52643087
Butthurt
u
t
t

h
u
r
t

I bet you like python you c-uck!
>>
>>52643085
The only reason I would use a phone for a long-distance robotics project is if I was being paid to do it.
>>
>>52643096
>average /dpt/ basement dweller's reaction to good advice.jpg
>>
>>52643099

I appreciate open source & free as in freedom software (which is why I applaud Microsoft's open-source efforts with the .NET stuff lately), but it's not #1 on my list of political issues.

Lockdown is shit, though. If MS were slightly LESS jewish, we'd have considerably better C# on all platforms.
>>
>>52643131
It's not long distance. It's big robotic competition type thing.
On my team we have people who build, people who work on notebook/CAD type stuff, and me, I'm the programming guy.
Like I said we have to use java to program these shitty android phones, and use their shitty motor and servos controllers on the bot.
It's not as bad as it seems. Pretty fun at times Imo.
>>
>>52643144
Isn't mono or M$ new open source shit pile good enough for C# dev on other OS? Or is .NET/CLR too rooted into windows to be ported?
>>
>>52643192
We control the robot right in front of us on a play feild. It's small 18×18×18 bots
>>
>>52643203
Mono is okay.
The CLR is open source now but nobody's actually made an implementation of it yet.

The general rule of thumb is that C# code written on Linux can be ported to Windows, but not always the other way round.
>>
>>52643203
https://github.com/dotnet/core
>>
anyone here on a crack team
>>
>>52643276
Crack's illegal yo
>>
>>52643203

Mono is good, but it could be a lot better if, again, Microsoft were not run by the illuminati jews.

>>52643259

Mono has damned good coverage, imo. That said, a lot of big applications end up partially dependent on Win32 interop stuff, and that's where it all goes wrong.
>>
>>52643078
Then do me a solid and use that filter on a qt red head with pale lips who is allergic to the sun. pls./
>>
>>52643051
>He's going all out.
>>
File: random_colors.png (2 MB, 1295x860) Image search: [iqdb] [SauceNao] [Google]
random_colors.png
2 MB, 1295x860
>>52643314

Here. This just uses random colors.
>>
>>52643391
Never reply to me again unless your post contributes to the thread.
>>
I'm currently writting a FEN parser for my PGN parser for my chess engine.

It works perfectly but is ugly as fuck, so i'm going to spend the next 6 hours making it sparkle.
>>
are an object and a class instance the same thing?
>>
>>52643421
>this is just a point of interest detector with low threshold
>>
File: redhead2.png (2 MB, 1295x860) Image search: [iqdb] [SauceNao] [Google]
redhead2.png
2 MB, 1295x860
>>52643421

Wait, that one used Composite(A, B) rather than Average(A, B).

This is a bit more subtle.
>>
>>52643441

It's just edge detection. Nothing fancy.
>>
How might I evaluate an RPN expression with conditionals in a way that won't try to evaluate the value if false?
say the syntax is
if(a,b,c)

meaning if a is non-zero then b else c
which would get RPN-ified to
a b c if

I want to only evaluate the applicable argument out of b and c, so I can do things like
factorial(n) = if(n<2, 1, n*factorial(n-1))

without it trying to evaluate factorial(n-1) if it doesn't need to

This has been a real headscratcher
>>
>>52643456
>>52643421
ye boi.
Thanks. Last beer then sleep.
>>
>>52643492
https://mitpress.mit.edu/sicp/full-text/sicp/book/node75.html
>>
>>52643291
anyone here on a reverse engineering team
>>
>>52643522
will that actually help or are you just memeing?
>>
>>52643492
Hm...programming languages question?

dunno too much but it seems like, intuitively, you would be able to use "if" like a regular function if you had eager evaluation this way. would only work if you had lazy evaluation (R programming language does have this with the ifelse function)
>>
>>52643543
Actually it would, SICP talks about evaluation order in the first chapter and the 4th chapter(the one linked) is about implementation of a lisp interpreter.

Although in your case it isn't that complicated.
>>
>>52643492
Lazy evaluation. Instead of evaluating expressions, save them and evaluate when needed (eg. either as the result of the program, or as the condition of an if)
>>
>>52643492
use a language with lazy evaluation.
>>
>>52643543
>>52643580
Just build your parse tree and read the first page: https://mitpress.mit.edu/sicp/full-text/sicp/book/node77.html

define (eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if? exp) (eval-if exp env))
((lambda? exp)
(make-procedure (lambda-parameters exp)
(lambda-body exp)
env))
((begin? exp)
(eval-sequence (begin-actions exp) env))
((cond? exp) (eval (cond->if exp) env))
((application? exp)
(apply (eval (operator exp) env)
(list-of-values (operands exp) env)))
(else
(error "Unknown expression type - EVAL" exp))))


self-evaluating? -> primitive data(numbers, strings, ...)
variable? -> look up its value
...
if? -> eval-if

(define (eval-if exp env)
(if (true? (eval (if-predicate exp) env))
(eval (if-consequent exp) env)
(eval (if-alternative exp) env)))


It's just as simple as you'd imagine, eval the predicate and then whatever.
>>
Do you guys get paid well?
>>
>>52643759
Very well but I'm not a programmer. I pour concrete for $35/hr, $70/hr on overtime(I do a lot of overtime).
>>
>>52643759
Nah, microsoft are massive jews. I have to shill F# to hell and back to even make a dime.
>>
>>52643759
$17/hr for a summer internship on a security team
>>
>>52643759
7-figure startup company CTO
>>
>>52643833
I need 7 figures fuggggg
>>
>>52643759
I'm NEET :3
>>
Okay. I'm a bit stumped on C++. STOI doesn't seem to be in our compiler, so I can't use it.

I'm reading a bunch of information and storing it into a structure, but first I need to compare the values with the rest of the structure.

        while(getline(inFile,data))  //reads the file line by line{
{ //Create a set of temp holders before adding to the array to search the array
stringstream ss(data); //separate out the lines
getline(ss,tempitem,',');
getline(ss,temptype,','); //can be 'For Sale' or 'Wanted'
getline(ss,tempprice,',');

//then some other garbage that will handle the sorting


It is formatted in such a way like this
'chicken, for sale, 60'

The problem is that I need the price (60) to be an integer so I can put it into the array and compare it with other prices. (IE match buy and sell offers based on price range of the buyer and shit, so I need access to less than and greater than operators)

Any advice /g/?
>>
>>52643853
If you can code and shit why are you a neat?
>>
>>52643893
then use the C way, atoi().

atoi(str.c_str());
>>
>>52643759
Back when I worked I made $75/hour at a startup in Philly. Doing MongoDB and node.js shit. I'm glad I escaped, but I miss having enough money to eat out for lunch everyday =(.
>>
just leaving this here :3
come in when you're ready!

NEW THREAD
>>52643955
>>52643955
>>
>>52643896
not smart enough, no qualifications, ocd/anxiety
>>
>>52643972
You're 12 posts too early, faglord.
>>
>>52643648
>>52643553
the problem is that my current algorithm for evaluating an RPN expression (the one from the wikipedia article) goes from left to right through an array of tokens, so when it hits
2 factorial

it pushes 2 straight onto the evaluation stack, then it sees factorial and looks it up in the function table
the RPN expression corresponding to factorial would be
n 2 < 1 n n 1 - factorial * if

so it pops the right number of arguments (1) off the stack, and replaces them
2 2 < 1 2 2 1 - factorial * if

and then puts that into the expression, and tries to evaluate again
2 2 < evaluates to 0 so it pushes that onto the stack
0 1 2 2 1 - factorial * if

2 1 - evaluates to 1
0 1 2 1 factorial * if

1 factorial needs to get looked up and replaced and the result is
0 1 2 1 2 < 1 1 1 1 - factorial * if * if

and tries to evaluate

this is clearly not going to work

>>52643671
I'm making the language senpai

>>52643709
>parse tree
I was using RPN so I wouldn't have to make a tree, but now I suppose I kind of do have to at this stage
>>
>>52643986
whip up some projects on a nice looking website and get to applying nigga
>>
>>52644007
Couldn't you store the intermediate results into an object? An object that could also hold an expression.

When you finally hit an operator, you could then decide how to evaluate.
>>
>>52644009
even if I was good enough to get a job, my ocd/anxiety stops me going outside and there isn't a lot of programming work near where I live
>>
>>52643930
Boom, (seems) to have worked perfectly (I still need to base the code around it)

I remember reading about it earlier, but I didn't quite understand it and guess I just neded somebody to say "fucking just do it"

cheers, anon
>>
>>52643893
If the price is the last item of the line, why use a delimiter?

int tempprice;
...
ss >> tempprice;
>>
>>52644058
Or just store it into an array and read it backwards.
>>
>>52644007
instead of looking up the function table, push it to the stack as a function token. when applying +, -, etc. evaluate the function if it's on the top of the stack
>>
>>52644073
you mean like a stack?
because that's literally a stack
>>
Was OOP a mistake, /dpt/? Why?
>>
File: 1453568740859 (1).jpg (16 KB, 268x265) Image search: [iqdb] [SauceNao] [Google]
1453568740859 (1).jpg
16 KB, 268x265
>>52643986
What does ocd have to with you making some cash ?

>not smart enough

What do you mean by this anon
>>
>>52644105
Well yeah, but just split into tokens, then reverse the thing instead of pushing everything onto a stack. Then iterate the array backwards.

Seems both more efficient and easier.
>>
Next thread: >>52644165
>>
>>52644173
Commit suicide.
>>
>>52644173
there's already 3 fucking threads you anime autist
>>
>>52644067
I sorta don't understand how to implement this properly, because if I initialize it that way, and remove the comma delimiters, then I get breakdowns in getline because it wants to store it as a string, doesn't it?

(There is a space between the comma and the number which might be it)
>>
>>52638044
depression
>>
>>52643955
>>52643955
>>52643955
>>52643955
>>
>>52644124
it stops me going outside without having regular panic attacks

I mean I just don't have the right brain for programming, I'm not good at dealing with logic and maths. it's just a hobby for me really
>>
>>52644327
You seem angry.
>>
>>52644007
This is why conditionals are always non-strict even in strict languages.

Your options are to either use lazy evaluation (which probably means a substantial re-design of your language and a shitload of work), or implement conditionals as a language construct rather than as a function.

E.g. the way it works in PostScript (which uses RPN) is that if takes a procedure (essentially arrays of tokens) as an argument, and only evaluates the procedure if the condition is true.

If you have strings, possibly the simplest way to implement conditionals would be to push a string containing the body of the conditional as an argument and have "if" eval() the string if the condition is true.
>>
>>52644211
I think you misunderstand ... your code would be like this:
getline(ss,tempitem,',');
getline(ss,temptype,',');
ss >> tempprice;

So, in the case of your example 'chicken, for sale, 60', chicken will go into tempitem, for sale will go into temptype, and 60 will go into tempprice (which will be an int, rather a string). The extraction operator (>>) will disregard the space between the comma and the number.
>>
return void;
>>
>>52644455
No stop! The stability of the entire system depends on you not doing that.
>>
>>52644400
Oh yeah, okay I never realized that

good shit. Thanks anon
>>
So, an observation my professor made earlier today made a note about cache. Registers, L1, L2, L3, etc.

If I am deciding using any particular data structure to cache data for my application, how do I know whether or not my cache will fit into one of the above?
>>
>>52644909
it shouldn't be too big and it should preferrably be contiguous
>>
File: 1395732454955.gif (1 MB, 320x234) Image search: [iqdb] [SauceNao] [Google]
1395732454955.gif
1 MB, 320x234
Write a program which sets up communication between a parent and child. Have each process send their relative a message. Have the child send the parent the message "When is dinner, mom?" and the parent sends the message "Dinner is at 5:30. Finish your programming homework." Ensure that the messages are arriving by printing them out after they are received. Use two pipes.


I can't see how I would write this utilizing two pipes when I know that one pipe makes more sense to use. Should I just drop out now?
Thread replies: 328
Thread images: 35
Thread DB ID: 475851



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

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

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 shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.