[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 / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

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

Thread replies: 255
Thread images: 36
File: linked lists copy.jpg (551 KB, 1280x1440) Image search: [Google]
linked lists copy.jpg
551 KB, 1280x1440
old thread: >>55077761

What are you working on, /g/?
>>
i'm writing a better FTP
>>
File: generations_nep.webm (371 KB, 175x204) Image search: [Google]
generations_nep.webm
371 KB, 175x204
NEP-chan is emerging!!

Se ya later, anons
>>
working on a rogue-like game with [spoiler]pygame[/spoiler]
>>
>>55084497
Why are programmers here such pedophiles?
>>
>>55084542
I was just asking how I could run a function in a thread and get a return value on n objects, the algorithm itself isn't too important.
>>
File: top nep.png (401 KB, 500x708) Image search: [Google]
top nep.png
401 KB, 500x708
>>55084497
Writing some installation instructions since someone asked for my repo.
>mfw I don't know how to deploy
>>
>>55084497
I made a simple z0r downloader in Python.

Loved some animations back then and flash is dying, sooner or later the site will go away too, so might as well make some backups...
>>
>>55084560
Return a Task<T> value, there's two chapters on the book Visual Studio 2013 Step by Step about Async methods that will help you.
I actually had problems saving an exception form a async method, might be careful with that (solved it by passing a wrapper of an exception and handled it locally).
>>
>>55084560
Do you want all the results at the same (delayed) time, or all the results asynchronously? (delayed by different amounts)
>>
Finished my brute force tool written in python
Began working on a twitchplays-esque game with bitcoin prizes
>>
>>55084622
Thanks anon!

>>55084632
I just want it to return a value whenever it's done- So the program waits until the object is done finding its path, and then it calls the initialization method without locking shit up while it's calculating
>>
File: K&R hime linkedlist.jpg (566 KB, 1280x1440) Image search: [Google]
K&R hime linkedlist.jpg
566 KB, 1280x1440
>>55084497
OP here, fixed up the font a little bit.
Keeping a windows VM just for photoshop is a pain tho.
>>
>>55084736
What language are you using?
>>
>>55084761
C#
I'm playing with delegate methods now, not sure how it'll go because the delegate method needs to be static
>>
>>55084745
I like OP's more it looks more cute.
>>
>>55084810
maybe you're right
>>
>>55084556
>why do programmers on an anime website like anime?
>>
How do i do this with my arch?
>>
>>55084869
Not everyone who likes anime is a paedophile

>>55084895
Why would you want to?
>>
>>55084869
Pedophilia *
>>
File: firefox-logo.bee1d85af18f.png (67 KB, 512x532) Image search: [Google]
firefox-logo.bee1d85af18f.png
67 KB, 512x532
Is it possible to delete cookies/cache from outside Firefox via a script while Firefox is running?
>>
>>55084905
>Not everyone who likes anime is a paedophile
Yes they are, fucking disgusting loli pedofags. You should all be jailed before you act on your desires and rape some 5 year old.
>>
>>55084927
All cache, cookies, localStorage, etc are stored in a folder on your computer.
You can simply delete the folder.

>>55084939
Wrong thread?
>>
>>55084895
>download awesome wm / vicious
>rice
>>
I've been debating on what kind of project I want to work on for the summer. I've got a list of a few things I'd like to work on, but... still not sure.
>>
File: hisoka2.png (376 KB, 1006x570) Image search: [Google]
hisoka2.png
376 KB, 1006x570
Could anyone give me a bit of C# help?
On line 14 I'm getting the error
error CS0236: A field initializer cannot reference the nonstatic field, method, or property `Packet.PathfindingDelegateHandler(int[])'

even though I'm not using anything static so it should be functioning
http://pastebin.com/GaTBhKpb
It should be a fairly easy fix, I'm just shit at delegates
>>
>>55085163
What the fuck is a delegate?
>>
>>55085174
http://lmgtfy.com/?q=C%23+delegates
>>
>>55085174
Those people coming to Cleveland.
>>
Is Idris ever going to reach non-meme status as a language
>>
>>55085248
Maybe.
>>
>>55085163
Could it be that the signature of the function doesn't match that of the delegate? (int[]/int)
>>
>>55085298
Ah, yes, that was a problem, but not /the/ problem apparently

Now that I've loaded it into visual studio instead of MonoDevelop, I'm getting that same error on line 4 instead- It appears that I can only set the Delegate to a static function for some reason. Does anyone know why this might be?
>>
Why have these threads been slow as fuck lately?
>>
>>55085448
It's 4:30 AM
>>
>programming an Excel macro for my dad
>forced to use Visual Basic for Applications
>trapped inside a 20 year old IDE
>spend 70% of my time Googling, 29% debugging, 1% writing code
>error messages are useless
>doesn't even tell me which line the error is on

Will Microsoft ever let me program macros in C#? Or VB.Net at the very least?
>>
>>55084869
>why do programmers on an anime website disproportionately like shitty pedophile and/or closet homo bait anime when there is other anime?
>>
nullpo
>>
>nullpo
What did he mean by this?
>>
>>55085552
What are some "acceptable" animes, according to you?
>>
>>55084497
Nice girls
>>
File: :^).png (39 KB, 640x300) Image search: [Google]
:^).png
39 KB, 640x300
>>55085569
>>
>>55085593
Fucking pedophile.
>>
>>55085616
Nurupo

Nurupo ( Nurupo , NULLPO ), the programming language is Java in, processing abnormality (when that occurred exception is one of the messages to be displayed on the) java.lang. NullPointerException abbreviation of (or NullPointerAssignment). Anonymous bulletin board 2 channel of programmers plate is the birthplace [1] .
>>
>>55084497
What subs are these?
>>
just made a comfy python script to open my router's IP address in the browser

#! /usr/local/bin/python3

import re
import subprocess
import webbrowser


process = subprocess.run(['route', 'get', 'default'], stdout=subprocess.PIPE)
stdout = process.stdout.decode('utf8')
router_ip_regex = r'gateway:\W*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'
search_result = re.search(router_ip_regex, stdout)
if search_result is None:
print("gateway IP pattern not found in route output!")
router_ip = search_result.group(1)
webbrowser.open('http://%s' % router_ip)
>>
>>55085742
How is this useful?
>>
>>55085742
Yeah that's write, just import every single non-trivial aspect of your program and then pat yourself on the back because you think you "made" a python script.
>>
>>55085742
There's so much wrong with this I can't even begin.
>>
File: Programming Shelves.png (952 KB, 2100x1400) Image search: [Google]
Programming Shelves.png
952 KB, 2100x1400
>>55085756
But that is how you make a python script
>>
>>55085756
literally what

>>55085767
come back and teach me if you ever figure out where to begin
>>
>>55085790
I really really like this picture
Do you mind if I save it?
>>
>>55085800
Well for one, you can't call a method on a None data-type.
if search_result is None:
print("gateway IP pattern not found in route output!")
router_ip = search_result.group(1)


If search_result can be None, then you will call a method on a None type.
>>
>>55085579
literally anything other than what i mentioned. i just find it weird that people on this board don't tend to have more discerning taste and/or blissfully and unashamedly consume degenerate boner bait and try to pretend like there's any real quality to it. of the ones i've seen, anime i've thought were genuinely good have been few and far between, but you can bet your ass none of them have been about sexy children or girly boys because, surprise surprise, a show that focuses on things like that don't have their priorities in order to do anything respectable or memorable
>>
>>55085834
ah you're right, i forgot to exit because i originally was going to raise an exception there but decided against it
>>
>>55085833
Feel free to save it
>>
File: comfy.png (167 KB, 376x328) Image search: [Google]
comfy.png
167 KB, 376x328
>>55085839
Honestly, you'd be pretty hard pressed to find any anime worth watching that doesn't feature cute anime girls in it.

Why are you so angry tho?
>>
>>55085856
Also at the header of the file, most people typically use
#!/usr/bin/env python


but this is just preference to automate finding Python.
>>
Where can I find a programming mentor?
>>
>>55085742
you can also query the network manager daemon via dbus for this
>>
>>55085934
A university.
>>
>>55085934
Pretend you're a girl and give a skype, I'm sure anyone will go head over heels to try to mentor you in programming.
>>
>>55085868
i'm not angry, just confused. and yeah, no shit. most films star attractive people, but the focus of those films is not upskirt shots and the like, because a film with a focus like that would be terrible. i'm just glad other countries haven't bred themselves into widespread autism and pedophilia like japan apparently has or i'd have nowhere to go for good media
>>
>>55085977
>i don't like cute girl anime
>STOP LIKING WHAT I DONT LIKE

Have you ever stopped to consider you just have shit taste?
>>
>>55086023
good or not, at least i have taste to speak of. anything that rides on sex-based fanservice has "quality" objectively equivalent to that of porn
>>
So I'm going to do contract work, and I don't know how to price it. I don't want to bill hourly, just have a price for the project.
>>
>>55086082
Multiply your desired hourly rate times the number of hours you expect to spend on the project.
>>
>>55086082
>So I'm going to do contract work, and I don't know how to price it.
Break the task down into parts, and figure out how long each will roughly take. Double that. Multiply by a reasonable hourly rate.
>>
>>55086060
You seem fixated on the idea that cute girl anime has no merit and can only exist as a series of sex-based fanservice scenes.

Maybe you're the pedophile here.
>>
>>55086082
>>55086096
more like twice the number of hours you expect to spend, because that's probably closer to what it will end up being
>>
>>55085884
thanks, i had seen that before but didn't understand what env was until i looked it up just now
>>
is my method naming scheme and method chaining idiomatronicly pythonic and simply epic? downloads youtube videos

if video.is_not_in(path):
video.download_to(path)\
.then_encode(in_new_thread=True)\
.and_remove_unencoded_file()
>>
>>55086114
It's okay, you'll pick up more as you see more. We all started somewhere.
>>
>>55085627
fuck you cannuck.
>>
File: dungeon.png (17 KB, 1029x542) Image search: [Google]
dungeon.png
17 KB, 1029x542
>>55084545
me too, but using JavaScript instead
>>
>>55086110
yeah, i think the reason i've got that idea in my head is because that's what it is. that or it's some high school slice-of-life bullshit where nothing happens, which is also without merit
>>
>>55086124
oh lord
>>
>>55086112
>>55086109
Okay, I was thinking of having some overhead, but double hours makes sense. I mean technically I can charge more since it's contract work and not employment. I'm mostly worried because wages for programmers are garbage here, despite being in the US.
>>
>>55086177
Not the same without the audio desu
>>
>>55084545
Pygame's fine. It's got some flaws, but it's not terrible like some people seem to think it is.
Are you using the stable version or the latest?

>>55086166
>but double hours makes sense.
You double the hours because for every hour you actually spend programming, you'll spend another hour on pointless bullshit, like trying to explain what the client wants to the client (don't ask why).
>>
File: neppu.jpg (97 KB, 480x604) Image search: [Google]
neppu.jpg
97 KB, 480x604
>>55086141
>igh school slice-of-life bullshit where nothing happens
Nice try.

You should research things you know nothing about before you try to flame people on the internet.
>>
>>55086213
>playing jrpg's
>>
>>55084895
type 'sudo rice'
when the 'faggot?' prompt appears just type 'Y'
>>
File: 12.jpg (71 KB, 600x275) Image search: [Google]
12.jpg
71 KB, 600x275
How can I run something on the main thread once a background worker triggers a .RunWorkerCompletedEventHandler event in C#?

When I try to call a function directly in the event, it runs it in that worker's thread. I want the worker to return a value and then call a function in the main thread.
>>
>>55086286
Please point to the posts in this thread, or any of the last several threads, where people talk about anime and it wasn't instigated by you.
>>
>>55086213
nice try yourself. i know exactly what i'm talking about. i've seen far more anime than i ever thought i would and i have quite a few autistic friends who between them have literally seen it all, and i've picked up quite a bit from them because they're autistic and talk about that shit to people in real life. i get recommendations from one of the slightly less autistic ones because he knows i won't settle for filler-riddled fanservice bullshit and he really has to rack his brain
>>
File: 1452403462016.png (79 KB, 307x400) Image search: [Google]
1452403462016.png
79 KB, 307x400
>>55086313
i.e. there isn't any.
>>
>>55086327
>The more you overestimate time the less competitive you are
I don't follow. My point wasn't that you should overestimate how long the job takes, my point was that only half of the time spend on that kind of work is actually spent programming.
>>
>>55086336
>>55086339
If you're not gonna fucking integrate then you've gotta go back, cunts. You're continuing to disrupt the thread by posting off topic rhetoric that is antithetical to the very nature of 4chan.

>>55086363
I mean if you say it'll take you twice as long as it actually does, that means you'll charge twice as much, making yourself less competitive. You can always practice completing programming contracts to get better at estimating the time.
>>
>>55086417
>I mean if you say it'll take you twice as long as it actually does
That's not what I'm saying though.
I'm saying that estimating how long a job takes based only on how long the programming will take isn't realistic.
>>
>>55086475
Yes, but 2x is quite a significant overestimate
I suppose the answer to all these issues is just experience
>>
>>55086578
Tens of millions of people watch anime
4chan will continue to be an anime website indefinitely, and you know it
>>
>>55086531
no it's not. in addition to straightforward programming time and time spent dealing with the client, there's testing, fixes, maybe environment management and deployment, etc. not to mention having to go back and restructure functionality when the client changes their mind on something, or requests something late in the game that they should have mentioned up front, which absolutely will happen. somebody experienced would know this
>>
>>55086578
>has no real argument
>continues to make posts consisting of serious allegations and simple minded insults


You're that >>>>CSHART SHITTER OMG KYS
kid aren't you?
Nobody here wants to rape kids, especially not you
>>
>>55086630
ignore her, she likes the attention
>>
>>55085174
Dele >te
Gate

(not op)
>>
what's a good book/resource for learning openGL
>>
>>55086662
Youtube video tutorials are pretty good for basically anything
>>
I am making an automatition of my home with a PI , I need to develop an app for my phone to connect with my home
>>
>>55086673
youtube videos are pretty much the worst for basically anything
>>
>>55085163
1. they don't have a matching signature

public delegate void PathDelegate (int target)


the thing you are trying to delegate to a few lines down

public void PathfindingDelegateHandler(int[] path)


2. you are making it static by trying to assign it in the class definition instead of in a method, because you are assigning a variable and initializing it in the context of the class instead of an instance of the class
>>
Is anyone else getting impossible v1 captchas?
The ones where you have to type everything EXACTLY or it fails?

This is like my 10th captcha already.
>>
>>55086994
Use the legacy captcha
>>
>>55087017
Oh wait shit, ignore me
No, I'm not.
I normally only get simple numbers on my legacy captcha v1.
>>
>>55086994
htlftwn uotchrl
>my captcha is "201"
feels good to not be on google's shitlist
>>
I am kill, time for slipped disc surgery. In other news, the image generators are at 300 out of 1000 triangles. I predicted about 35 hours, so I suppose they're right on schedule.
>>
>>55084895
Install awesome wm
Got to http://dotshare.it/ and look for colors based on your terminal emulator
Coose good background.
Shit post on /g/
>>
Holy shit this pedo thread is disgusting, kill yourselves.
>>
>>55086994
Just click on it to generate a new one. At worst you have to click a couple of times to get a simple one only with numbers.
>>
>>55087150

HEY GTP, GUESS WHO'S NO LONGER USING WINDOWS!
>>
>>55087387

Is it you?
>>
>>55087387
80% of the desktop market?
>>
>>55087387
That's just sad.
Kys
>>
writing a shitty compiler that takes in some metadata and auto generates code for different languages
i got tired of having to update my data models across different languages whenever i wanted to change something, but damn this shit was harder then i thought it would be
>>
>>55087469
Does your metadata use algebraic data types?
>>
>>55087496
what
im an idiot, i only speak code monkey language
>>
>>55087405

Yes. Got a new laptop, felt like using this as a chance to quit Windows for good, because it's a pain to develop on for anything other than .NET. It's a System76 laptop, so it actually came with Ubuntu 16.04. Originally, I was planning on installing OpenSuSE on it, but the installer decided to not recognize my network card for some reason (and I think I've got a relatively new wireless card, so I guess Leap just has too old of a kernel version by comparison to Ubuntu), so I figured I'd bother giving 'buntu a try. For all of the shit /g/ gives it, it's actually relatively comfy.

Spent all of yesterday downloading as many libs, compilers, and interpreters as I could, and today copying over a few important documents.

Now all I need to do is come up with some good summer project ideas. Do I want to go back to that OS dev project idea I had at the end of last summer? Do I want to try and tackle that idea I had to make .NET run on RISC-V (even though it's a dirty hack just to try and get it working on Linux)? Should I make a LISP?

>>55087469

>i got tired of having to update my data models across different languages whenever i wanted to change something, but damn this shit was harder then i thought it would be

Compile to some sort of intermediate representation, make a separate code generator for each target based on a common IR format. Front end of compiler should not know or care about what the hell the back end is generating.
>>
File: nig.jpg (26 KB, 264x351) Image search: [Google]
nig.jpg
26 KB, 264x351
http://www.npr.org/sections/money/2015/05/21/408234543/will-your-job-be-done-by-a-machine

>Computer and Mathematical:
>Programmer: 48.1% chance of being automated.
>Application dev: 4.2% chance of being automated.
>System software dev: 12.8% chance of being automated.

wat do
>>
>>55087533
Kys
>>
>>55087533
Jesus, what a click-baity article.
>>
>>55087533
>buzzwords
>buzzwords
>more buzzwords
just ignore it dude

>>55087523
yeah i did that, the generators work with abstract syntax trees (a bit overkill, i know)
mostly having problems with the lexer, shits hard
>>
>>55087533
Not worry. Machines exist that can make clothes and we still have humans who sew things in factories and workshops. Just expect to see two classes of human programmers emerge: sweatshop class (extrapolate the Indian code monkey to something even worse) and luxury programmers for people who have money (San Fransisco)
>>
>>55087553

>lexer
Oh wait, you have multiple input languages, rather than multiple output languages?
>>
>>55086114
I'd suggest that you buy Mark Lutz's 'Learning Python' & 'Programing Python', you'll learn much faster than you'd probably do with YoutTube Videos or online courses.
>>
Is it possible to use CSS (with or without Javascript) as a frontend for a Java program? I know it's possible to load a web page within a Java program, so I was thinking perhaps I could use local hosted files that way.

If not, can anyone suggest any Java gui options that don't suck? I hate swing and JavaFX is intentionally vague to try to sell expensive classes.
>>
>>55087575
nope, just multiple outputs
why?
>>
>>55087623
Fucking degenerate
>>
>>55087627
go be /pol/ somewhere else
>>
>>55087533

>Programmer jobs
>automated

Here's the problem with the claim that our jobs could easily be automated... they already are. It used to be that programmers were writing assembly. But that's ugly as hell for most, and leads to lots of bugs. So we built programs to write assembly for us given a high level description of a program. We've even tried our hand at using English-like languages to describe a program, so that computer programs can be generated from an English description of a language. Turns out we never ended up removing the programmer from the equation. Why is that? Because our bosses don't know how to use that "English-like language" (by the way, I'm talking about COBOL), to tell a computer what it is that they want. They have a vague idea of an application that they want, and computers work with exacts. The job of the programmer is to form an exact.

At best, we could make logical languages more popular, so our bosses could try and tell the machine what their vague new app idea looks like and let it fill in the blanks but... as it turns out, logic languages aren't that popular. Does anyone know someone who uses Prolog? I know a grand total of one. He's a professor, and he's kind of a troll, so it's hard to tell if he genuinely likes it or if he just likes screwing with the class since he found out none of us knew the language.

But I digress... the job of a programmer it to tell computers what to do based on what the customer wants. If the customer knew how to tell computers what to do, the position of programmer would have never existed in the first place.
>>
>>55087679
HAHAHA JESUS CHRIST YOU'RE FUCKING RETARD YOU ARE
>>
>>55087623

If you have one input language, and you are struggling with the problem of multiple output languages, I'm curious how you're having problems with your lexer. You only have to tokenize one input language. The task should have been knocked down solid before you decided to implement code generation.
>>
>>55087627
>>55087687
are you the guy who wrote a 13yr old simulator?
>>
File: tomoko lite using thinkpaddu.png (984 KB, 1920x1080) Image search: [Google]
tomoko lite using thinkpaddu.png
984 KB, 1920x1080
Is the shouty ALL CAPS guy the same anti-anime autist who's been shitting up the last 5 threads in a row?
>>
File: 26375861581.png (75 KB, 430x546) Image search: [Google]
26375861581.png
75 KB, 430x546
>>55087715
I think he's a different anti-anime autist
>>
>>55087747

>pedos
Extraordinary claims require extraordinary evidence, Anon. Now tell me, how are we all pedophiles?
>>
>>55087773
Every time to reply to the anti-anime troll, he gets a little red icon and it further validates his existence.
>>
>>55087785
Better than fapping to cartoon 7 year olds. You people disgust me.
>>
>>55087793
Let me get this straight
1) You're saying you do it for (You)s
2) You're saying you masturbated to cartoon 7 year olds

You're fucked up
>>
>>55084497
Some glue code in our trading system. Always more glue code. Next will be another variant of a piece of the fitting pipeline and more research platform automation in general.
>>
>>55087822
>Glue code
What language are you using?
>>
File: 1464694237246.png (218 KB, 716x362) Image search: [Google]
1464694237246.png
218 KB, 716x362
does /g/ even have mods?
>>
>>55087811
Your reading comprehension is fucked bro.

Wouldn't expect any better from a weaboo pedo though
>>
>>55087829
It's for the best.
Go look at the most overmoderated boards like /v/ and /co/.
On /v/, every mildly interesting thread gets deleted within 200 posts, and on /co/, you'll flat out get 3 day banned ALL BOARDS for having an incorrect opinion according to the autistic /co/ mods.
>>
>>55086616
This guy is correct. All my contractor friends say the same and I've seen it myself in my own projects.
>>
>>55086616
That's all part of the programming though.
Saying 2x the programming would be estimating twice that
>>
>>55087865
* I mean testing, fixing and depending on how you're developing the project, potentially dealing with the client
>>
>>55085756
C fag mad that he needs to write thrice as much code to achieve half the functionality while being prone to errors.
>>
>>55087533
LOL. Python is the automation of programming... so now we just write even more complicated programs, running on even more powerful computers. It never ends.
>>
>>55087829

Yes. They occasionally give me warnings for off topic discussions of politics that more often than not, someone else started.
>>
>>55087826
C++ and Python. Some bash scripts. Glue code is glue code though.
> Turn this thing into this other thing; serialize this thing; write an adapter to this API; persist this thing; cache this thing; standardize the config files for these things; etc etc etc
Mreh. Residual plumbing to connect pieces and further streamline the system now that all the fun math and performance engineering and distributed systems stuff is essentially done for this phase.
>>
>>55087930
These aren't a necessity of programming ('adapter to this API' perhaps excluded), stuff like caching, serializing and such can be automated and generaliesd
>>
>>55087922
It's because you're a filthy pedophile.

Rot in hell scum.
>>
>>55087873
But also really fucking fast and specific. Which it turns out does still matter for certain things, even today. C++ is often the better tool, though-- assuming you're capable of properly wielding it.
>>
>>55087957
Yeah, he certainly needs to squeeze out every CPU cycle out of a script which needs to fetch the IP and open the browser.
>>
>>55087962
this 3bh


>>55087957
C++ could be just as fast but have better functionality and syntax.
(This is even worse a criticism of Python, which if I recall is something like 100x slower)
>>
>>55087940
No shit Sherlock. It takes time to get those things in place. Moreover, if you're caching to custom formats for performance or storage efficiency reasons, or need clean human-readability of particular cached objects, or need to generate logs containing various specific things in the process, it's not as simple as 'download Finklestein's magically generic cross-language-everything-serializer-and-RPC framework' or 'lol just pickle it'. Have you even graduated college yet?
>>
File: it's a trap.png (873 KB, 1275x677) Image search: [Google]
it's a trap.png
873 KB, 1275x677
>>55088005
I mean you don't need glue code for this stuff
A language could easily have a feature that lets you cache a function by just writing "cached"
A language could easily have functionality for de-structuring any type

>>55087982
>call a drawing of a child a slut
>accuse others of paedophilia
>>
>>5508802
>A language could easily have a feature that lets you cache a function by just writing "cached"
what the fuck am i reading
>>
>>55088032
It depends on what the function does, but in simple 1-1 cases you can just use a dictionary of input to output and have the function access the dictionary
>>
>>55088049
by simple 1-1 cases I mean if you've got something like a cumulative list then you're not gonna want to store
{ 0=[1]; 1=[1, 2]; 2=[1, 2, 3]; }
There are no doubt other cases for different scenarios too
>>
>>55088049
>>55088061

>>55088032

Oh wait, I assumed by caching you meant like memoization
>>
im supposed to implement statistics for different shit in our database
are there any techniques for being able to choose stuff you want somewhat dynamically?
id rather not hardcode procedures for anything and everything the boss can come up with
>>
>>55088096
You can try by not being a degenerate pedophile
>>
>>55088096
Do you have a choice of language?
>>
>>55088105
SQL or C#
>>
>>55088167
You could use LINQ
>>
How can I get a binary compiled from gcc onto a microcontroller without using an arduino?

I know about cross-platform compilation, I just need to know how to get the binary onto the chip.

Any specific brand that makes this easier than others?
>>
>>55088244
gcc-avr
avrdude
>>
>>55088096
Functional programming like in F#
>>
>>55088254
thanks
>>
>>55088049
>>55088061
https://docs.python.org/3/library/functools.html#functools.lru_cache
>>
My boss want me to create an android app that wants to do everything. Some of the features

* Lost and Found
* Services Advertisement including
- Massage / Spa
- Restaurant
- Hotel Bookings
* Resume Builder / Job Application
* Wallet / Credit feature
* Audio/Video call
* Bus ticketing system

After I finished the contactless payment system he wants to add those trash on the app. And I'm giving my resignation letter now.
>>
>>55088262
This desu

>>55088284
>Android
Did you have to write that in Java?
I'm so sorry anon
>>
>>55088299
there's no problem for me writing it in java, the thing is we already created a minimum viable product and he wants to add more trash irrelevant features.
>>
>>55088307
>Java
Disgusting.
>>
>>55088353
unless you could suggest a better language to be used by google as a java replacement for android.
>inb4 c#, kotlin, js, react native
because nope
>>
>>55088284
If you want to be a sourpuss you should tell him of the methodology that an app should do one thing and do it well.
>>
>>55088445
I already told him about that for nth time.
>>
>>55088284
kind of in the same boat
i joined our company a few months ago and our product is reaching unmaintainable status pretty fucking soon
TONS of duplicate code, zero automated testing, no company routines for releases combined with the bosses changing their mind about things all the fucking time
i get that you have to bend over to your customers if you want to get sales, but we cant make a customized version of our product for every single goddamn company

yes i mad
>>
>>55088538
last time we talked, the generic POS want's to have another feature that will cater bus ticket system. then a week after from finishing it he wants to remove the contact less payment and integrate the online wallet system. I was like having a tunnel vision that time and want to throw that chingchong device to his face.
>>
>>55088538
If possible you should apply some sort of contract that states that you can only perform a limited number of changes to the defined product--so get it right the first time as much as you can.
>>
>>55088572
That's not gonna happen on a wage slave environment
>>
>>55088590
Not you, the company. Retardo customer demands need to be met with retardo-proof contracts.
>>
>>55087523
https://www.fsf.org/news/dont-depend-on-mono
>>
how do you handle db migrations/schema changes in large companies?
having a huge ass list of hardcoded migration scripts just aint cutting it, especially when you want to auto generate a DB for integration testing
>>
>>55088670
you quit your job and let some other poor soul handle it
>>
File: 1379813940134.png (252 KB, 511x428) Image search: [Google]
1379813940134.png
252 KB, 511x428
Is Scala any good? Searching for functional programming jobs out of curiosity and it seems that that's the only FP language with jobs out there
>>
What books does dpt recommend for writing a lisp?
>>
>>55088646

I never said anything about mono.
>>
>>55088982
Did you even read it?
>>
>>55086994
Log in into your google account. They make the captchas a lot easier, because it provides some level of assurance the user is not a bot.
>>
>>55088997
Of course he didn't, he's a filthy pedophile with poor reading comprehension.
>>
>>55088646
>freetard paranoia
>>
>>55088997

I recall reading that exact article several years ago. The whole idea was "Microsoft can fuck us with patents, so don't use mono." The problem with this article put into the context of today is that Microsoft's entire runtime is now MIT licensed. They can't do fuck all anymore if you make your own .NET implementation, because they've given everyone carte blanche to modify the fuck out of the official .NET implementation and distribute it however we want, including as part of a proprietary application where we don't pay Microsoft anything. Legally, the only thing you are required to do, is give credit where credit is due. Even if they revoked that license, every version of .NET up until the point where they revoked it, is fair game, and applications that rely on it needn't worry.

So yeah, .NET is free software. Granted, support for the official release is kinda buggy on Linux, but one should see no problem with writing C# applications wherever one would make a Java application.
>>
>>55088382
Gomobile soon, but for now it's all shit.
>>
>>55088997
>>55089008
.net core is MIT


and stallman is a fat bastard
>>
>>55089048
What do you expect? They hoard cp and loli.
>>
>>55089049
>>55089056
I hope you didn't read the article yet because it clearly states free implementations aren't safe because the language is patented.
>>
>>55089178
Fucking disgusting.
>>
>>55089178

>the language is patented
And there exists a Microsoft official free compiler released under the Apache license. So as long as no one tries to make a patent claim on the shit that they already patented, they can freely make their own C# compilers.

Any further objections?
>>
>>
>>55089490
that was a lot less memory overhead than i expected
the fuck is up with the cpu tho
>>
>>55089490
Should have installed Gentoo
>>
>>55089524

The process dotnet is actually a script compiling CoreFX. I pulled the latest branch of it from github because the last one failed to compile for some reason. As I have said, buggy.

It's now done, and apparently passed all tests except for System.Diagnostics.Process.
>>
I cant decide between c or c++
c seems more interesting but its shit for coding programs, ill have to use fucking gtk of all things for guis
c++ is bloated but really nice for writing programs, qt is nice too w/o any of that fucking sjw bullshit
>>
>>55089490
>top
Mate, htop is where it's at.
Also, what is with your le hacker green colours?

>>55089666
If you're looking to write Gooey programs, I would go with neither.
>>
>>55089490
>4 cores at 92.6%

wew
>>
File: didntread.gif (1 MB, 182x120) Image search: [Google]
didntread.gif
1 MB, 182x120
>>55089684
>Gooey
>>
>>55089722
It's called a 'joke'.
>>
File: idiots.jpg (161 KB, 736x460) Image search: [Google]
idiots.jpg
161 KB, 736x460
>>55089736
A joke usually needs a punchline.
>>
>>55089666
Qt is the way to go if you want cross-platform GUIs
[spoiler]or if you're ok with windows only GUIs just use WPF lol[/spoiler]
>>
>>55086196
>but it's not terrible like some people seem to think it is.

It's not terrible, it's just not good either.
>>
>>55089777
I didn't say it was a good joke. Also, I probably said that it's more of an in-joke than a regular joke.
>>
Could I make a simple hashmap in C just by having a linked list with each node's value being a key and another value?

Is that how hashmaps actually work?
>>
File: 1464776646043.png (126 KB, 280x280) Image search: [Google]
1464776646043.png
126 KB, 280x280
>>55089814
>just by having a linked list with each node's value being a key and another value?
>>
>>55089795
yeah ill go with qt probably, thanks

>>55089684
what would you go for, and why please? im curious
>>
>>55089826
Is this dumb? I don't think it sounds that dumb.
>>
>>55089814
There are a few ways that you can implement a hashmap, but it's usually done as an array, and each array element (bucket) is implemented as a linked list.
>>
>>55089814
Pretty much.
Don't forget to include a depth variable so you can know how deep each bucket is.
>>
>>55089814
I'd implement a hashmap as an array of null linked list pointers and simply add a linked list if there is none at the hash location.

Why don't people use vectors instead?
>>
>>55089828
I'm honestly not interested in GUI programming, so I'm not really the right person to ask. However, C++ is a horrible language and you shouldn't use it for any purpose. Also, GUI programming really isn't C's strong point.
If I was to write a GTK program or some shit, I would probably use Vala.
>>
>>55089869
>Vala
just when i think i've seen the memiest of meme languages, some fucknut always manages to surprise me
>>
>>55089869
Ok thanks but ill stick to efficient languages
>>
File: sFSlcwl.png (2 KB, 108x250) Image search: [Google]
sFSlcwl.png
2 KB, 108x250
Is there a way to have vertical lines matching braces in visual studio? I can't find anything for the 2015 version
>>
>>55088096
Need more information.

What exactly are you trying to do?

I could walk you through retrieving the data in either SQL or C#.

Are you trying to import this data into a spreadsheet or other visualization tool?
>>
File: lines.png (6 KB, 547x225) Image search: [Google]
lines.png
6 KB, 547x225
>>55089905
I have it, dunno where the setting is
>>
>>55089896
Vala generates C code, and has no runtime (besides the C one, obviously). While it's obviously not going to be as efficient as writing C yourself, you could certainly do a lot worse.

>>55089883
While I haven't seriously used Vala for anything that wasn't completely trivial, it seems like a language that actually has some degree of focus.
>>
>>55088538
>i get that you have to bend over to your customers if you want to get sales, but we cant make a customized version of our product for every single goddamn company
Story of my life, goddamn.

We have one account manager that always sells crazy bullshit that we don't actually do. And then we have to figure out how to do it.
>>
>>55088670
For a production application or for your business intelligence frontends?
>>
I know this sounds like a newfag, but I've been writing HTML/CSS/JS for 2 years, and I've recently learned about Python.

How do I use it to interact with the command-line (like ls, cd)? I've read Python Crash Course, and I've also got Automate the Boring Stuff with Python.

I understand it is the module subprocess that can be used.

Help out a fag pls.
>>
>>55089917
Please try to remember where is it anon
>>
>>55089905
I know there's an implementation in this:
https://visualstudiogallery.msdn.microsoft.com/34ebc6a2-2777-421d-8914-e29c1dfa7f5d
>>
I'm currently attempting to write a basic website with JS and PHP.

What's the best way to go about it?
Use PHP to build the site and JS around the edges?
Use PHP just for getting JS up and running then use JS to build site?
>>
File: QuadTree.png (1019 KB, 1425x638) Image search: [Google]
QuadTree.png
1019 KB, 1425x638
Does anybody have any idea why this bounded query function for a quadtree would only return results located at the border of quad intersections?
C#.

http://pastebin.com/AMLr8R0f
>>
>>55089989
import os

os.system('your command')
>>
>>55090001
>>>/g/wdg
>>
>>55090023
Shit, thanks man. Been a while since I've been to /g/
>>
>>55090001

Use PHP for the database queries, and use JS to pass info to the PHP scripts.

Also, if the page requires logins, use PHP for the login info. That way, you can sanitise input before you send anything to the database etc.
>>
>>55089992
Somewhere in Options > Text Editor
>>
>>55090035
But for like front end stuff, is it easier to just use JS?
>>
File: pGiZRci.png (2 KB, 88x230) Image search: [Google]
pGiZRci.png
2 KB, 88x230
>>55089994
thank you based anon
>>
>>55090014
awesome! Thanks! Is there a similar way to test if a dir or file is there?
>>
>>55090064
import os.path

if os.path.isfile('...'):
pass

if os.path.isdir('...'):
pass
>>
>>55090064
I have no idea.

I don't even Python.

I took 14 fucking seconds and googled that shit for you.

Use Google.
>>
>>55090046
Yeah. Use Ajax / fetch requests for the data, use PHP for the back-end stuff (the exceptions are logins and database queries, as trying to sanitise JS is like pissing on an oil rig fire, afaik. )

JS = Client-side, requests, and sending data to PHP scripts.

PHP = Server-side, managing databse requests, only used on the client-side when absolutely neccessary.
>>
Working on a timeout function for dumb faggots that can't read store descriptions

https://www.youtube.com/watch?v=umW_KbYwQKU
>>
What does /g/ think of the Nim programming language? What is it strong points and bad ones. Also is it worth to learn it?

http://nim-lang.org
>>
>>55090228
>Also is it worth to learn it?
No
>>
>>55090228
No, try Idris instead
>>
>>55084526
that's gotta be the shittiest optimization algo ever
>>
>>55090228
dead in the water meme language
>>
File: code_generated_by_NN.png (91 KB, 450x391) Image search: [Google]
code_generated_by_NN.png
91 KB, 450x391
>>55087679

>At best, we could make logical languages more popular

This is so 80s lol! Now we have deep machine learning that can learn to map sequences

>But I digress... the job of a programmer it to tell computers what to do based on what the customer wants. If the customer knew how to tell computers what to do, the position of programmer would have never existed in the first place.

There is already research that does just that, see papers http://arxiv.org/abs/1510.07211 https://arxiv.org/abs/1605.08535v1 and picrelated

It works for small programs and APIs
>>
>>55090001

>PHP

Why learn this low-pay shit language?

Do everything is JS, it pays 30% more.
>>
>>55090282

plz propose a better one, a gradient-free one of course that will work for 600-dimensional (integer though) function.
>>
>>55090378
differential evolution
particle swarm optimisation
Thread replies: 255
Thread images: 36

banner
banner
[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 / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.