420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
Excel automation by Isabella Broppershit - Sun, 30 Apr 2017 03:17:57 EST ID:sjT5DuRU No.36782 Ignore Report Reply Quick Reply
File: 1493536677095.png -(114258B / 111.58KB, 1444x906) Thumbnail displayed, click image for full size. 114258
Hi, I'm experimenting with automation in Excel/VBA, I'm trying to click on the "use another account" element but Spy++ and FindWindowEx can't locate it, but HP UFT can. UFT reads that it has the same HWND as the parent. Can any provide a solution to this?

tl;dr: how to use WinAPI to locate a static element that doesn't have a HWND?
3 posts omitted. Click Reply to view.
Ernest Demblepuck - Sun, 30 Apr 2017 05:41:08 EST ID:P6PS9CBz No.36788 Ignore Report Quick Reply
There's a few possibilities here.

One is that since this is a Windows Security dialog that your process that is calling FindWindowEx does not have the proper permissions to access that element. This may be resolved by running your program "as administrator".

Alternatively that static element may not be a control at all - it could possibly be just code owned by the parent window that handles mouse-over, mouse-click, and display capabilities for that element. This would explain why HP UFT considers it to have the same HWND as the parent (because it is the same HWND as the parent).
Isabella Broppershit - Sun, 30 Apr 2017 06:15:12 EST ID:sjT5DuRU No.36789 Ignore Report Quick Reply
so how is UFT detecting it, and can I use that same method?
I was thinking to just click the X, Y that would match with the element.
Graham Brirrystone - Sun, 30 Apr 2017 07:39:39 EST ID:rAGFRmkY No.36792 Ignore Report Quick Reply
The only case where HWND would be differnt would be if ur lookin at a MDI Form. Admin privs have nothing to do with it what version of win are u ha.. i mean testing . - Gary the snail.
Fanny Murdwell - Sun, 30 Apr 2017 08:20:46 EST ID:b2Dm/aZr No.36797 Ignore Report Quick Reply
Automating a GUI security prompt using VBA, huh? Do you have plans to make this a hat trick?
Graham Brirrystone - Sun, 30 Apr 2017 14:57:32 EST ID:rAGFRmkY No.36811 Ignore Report Quick Reply
U sure u didn't mean VB6 i mean why VBA? So Limited!!! .NET Even??

Former beginners by Doris Croffinghudging - Tue, 11 Apr 2017 04:13:55 EST ID:CXy47cRy No.36707 Ignore Report Reply Quick Reply
File: 1491898435709.jpg -(39661B / 38.73KB, 600x450) Thumbnail displayed, click image for full size. 39661
What did you do before you were good enough at programming to work with it?
I used to know some programming (i had a few courses in it a bunch of years ago in university before i dropped out) but i think i was very, very far from being able to work with it. What kind of stuff did you program when you weren't very good?
11 posts omitted. Click Reply to view.
Wesley Sittingbodge - Sun, 16 Apr 2017 05:12:17 EST ID:qcllrDFj No.36724 Ignore Report Quick Reply

Oh yeah, I know someone has advised you to read some other people's code but If you've never made a program that is at least a couple thousand lines long I don't think you are really going to get anything out of it.

The difficult bits of programming are usually when you have to deal with complexity of your *own* design. Much of the why behind what a good programmer does is just helping themselves not fuck their shit up 10,000 lines in the future. Until you've wrestled with your own dumb program, hit a brick wall where you can't figure out stuff you've wrote, can't see where to put in a new function without blowing everything up, deleted a line of code and broke half the program, and so on, code you read from people who have experienced these things and developed strategies to deal with them is going to go way over your head.
Albert Billingridge - Wed, 26 Apr 2017 06:15:14 EST ID:m0fnFolr No.36758 Ignore Report Quick Reply
Is there some good way that doesn't include getting an idea of a program I want to make?

Like maybe doing some simple shit for someone else that he'd rather just leave for someone else so that he can spend the time on more advanced stuff?
Shitting Sabblebury - Sat, 29 Apr 2017 22:16:23 EST ID:VGkaBTKz No.36776 Ignore Report Quick Reply
There is only one way https://www.youtube.com/watch?v=dvwkaHBrDyI

You find a large open source project, in other words software that people actually use, and you go through the feature request list and ask to implement one of them. The reason why you ask is because somebody else could be doing it at the same time. There will probably be a contributers guide you can read for style which you will want to follow.

You start with the easiest feature. The project will give you feedback how to fix your commit if it's missing things or badly written. The users will then find bugs in your feature and you will fix them.

Then repeat. Keep doing this: writing features and fixing bugs until you get good enough at programming that this is no longer an impossible task for you. This is the only, the best, the single most effective way to get good at programming by yourself if you don't have a "mentor" or Sr. Dev sitting beside you.
Graham Brirrystone - Sun, 30 Apr 2017 02:53:39 EST ID:rAGFRmkY No.36781 Ignore Report Quick Reply
Open SRC and my penis are the answer lol
Emma Weggleford - Sun, 30 Apr 2017 11:33:55 EST ID:m0fnFolr No.36810 Ignore Report Quick Reply
I was imagining something like this even though I have no idea how it works yet.
Right now I'm mostly doing simple exercises but it's going pretty well so I should be able to get decent at it after I've put more time into it.

What's some good stuff to think about when trying to figure out what would be easy to do?

Fintech by David Gandersan - Sat, 15 Apr 2017 00:02:23 EST ID:TI6IU0t+ No.36720 Ignore Report Reply Quick Reply
File: 1492228943306.jpg -(11926B / 11.65KB, 247x204) Thumbnail displayed, click image for full size. 11926
In job ads for developer jobs in the financial sector, I often get the impression that their requirements aren't awfully strict.
It almost looks like it should be easier to get jobs there than anywhere else, is it like that or have I misunderstood everything?
I barely know anything about this stuff and was just curious so my lack of knowledge could mean that my impressions are wrong.
Shitting Sabblebury - Sat, 29 Apr 2017 22:34:28 EST ID:VGkaBTKz No.36778 Ignore Report Quick Reply
Yes, the reasons why they aren't strict is because Wallstreet knows that finding a developer who's an expert in literally everything is a unicorn, so what they do is partner a developer with a mathematician or AI/machine learning type expert, and they work together to build HFT or whatever trading strategy they're doing. They typically want ex video game devs, so somebody with C++ knowledge that can be given a spec to implement though lately they've been looking for functional programmers.

It's also a who you know type job, it's hard to get in at first because most of these jobs are never advertised but once you do get in you quickly network as half your coworkers will leave to work for some other hedge fund and often recommend you. That's when you make the gargantuan money in finance tech as you get large performance bonuses but work 60+ hours per week.

Best first language programming by Esther Cerringshit - Sat, 15 Apr 2017 23:47:44 EST ID:qnKqhFp7 No.36722 Ignore Report Reply Quick Reply
File: 1492314464935.jpg -(139134B / 135.87KB, 1280x920) Thumbnail displayed, click image for full size. 139134
Hello guys I'm a total noob but I would like to start programming

So I was reading about codes and so on and I think python or java would be good starting point for me

do you agree? what was your first languague programming? any typs for me? thanks
4 posts omitted. Click Reply to view.
Charlotte Classlesed - Sat, 22 Apr 2017 15:27:55 EST ID:g56Rcb3k No.36745 Ignore Report Quick Reply
Don't mind him. There's a sizable contingent of people who advocate low level languages for beginners so people learn about memory management or whatever. But it's really just a meme without any serious pedagogical basis.
Beatrice Blatherwater - Tue, 25 Apr 2017 01:15:41 EST ID:9QSfnS0r No.36755 Ignore Report Quick Reply
It somewhat depends on why you would like to program.
C is useful if you want to get into computer science later on.

Another factor is the "no weird stuff" one, which C does not have almost by definition since most other languages are based on it.
On the other hand if you like to learn programming for the purposes of doing web applications learn PHP, it is also "not weird" (in terms of syntax and grammar at least).
Python is weird in a sense because it uses unorthodox syntax but it is a fine language to learn on its own, not for learning the basis for lots of other languages too.
Lydia Derringsirk - Tue, 25 Apr 2017 17:43:17 EST ID:xulTIMe4 No.36756 Ignore Report Quick Reply
OP here

I would like to learn the absolute basis to all, like the second language would be easier

Also a multi-task language that can be used for many applications....still python?
Frederick Brinningville - Tue, 25 Apr 2017 20:55:31 EST ID:S+TDDgvB No.36757 Ignore Report Quick Reply
Java would also be an alternative. Python is nice and easy enough to learn, has a very specific mindset and an associated purity along with it; there's always a most Pythonic way to go. Java on the other hand, has speed. It's not C speed, but it's not slow as balls Python speed. It's the most imperfect, good enough kind of speed that won't scare the majority. IMHO Python is less generic and slightly less flexible but the community seems more concerned with correctness.

All that considered, there's huge overlap between both so it's basically down to what kind of person you are.
Shitting Sabblebury - Sat, 29 Apr 2017 22:29:18 EST ID:VGkaBTKz No.36777 Ignore Report Quick Reply
I take it you just want to learn programming and not computer science, which is different.

My advice is start with HtDP book (free) and then the PAPL sequel (also free).
Edx has made a set of 3 courses out of HtDP called 'How to Code' because of some licensing reasons https://www.edx.org/course/how-code-simple-data-ubcx-htc1x#!

The PAPL book is here: http://papl.cs.brown.edu/2016/ it's done in 'Pyret' which is like, functional python. This doesn't matter though because you want to learn how to program then after can spend time mastering your language of choice by reading it's spec/docs.

This is all you need really. You will learn a profoundly typed programming discipline with HtDP that flows directly into PAPL. If you get bored of just hacking around automating everything on your desktop and want a job, there's this: https://www.gitbook.com/book/frontendmasters/front-end-handbook-2017/details which will bring you up to speed on all the piles of javascript abstractions and framework junk

HAPPENING NEW VAULT 7 CIA LEAK by Samuel Panderstare - Fri, 31 Mar 2017 12:40:46 EST ID:MX3iLMV2 No.36667 Ignore Report Reply Quick Reply
File: 1490978446340.jpg -(294275B / 287.38KB, 840x798) Thumbnail displayed, click image for full size. 294275

>RELEASE: CIA Vault 7 part 3 "Marble"

>today, March 31st 2017, WikiLeaks releases Vault 7 "Marble" -- 676 source code files for the CIA's secret anti-forensic Marble Framework. Marble is used to hamper forensic investigators and anti-virus companies from attributing viruses, trojans and hacking attacks to the CIA.

>Marble does this by hiding ("obfuscating") text fragments used in CIA malware from visual inspection. This is the digital equivallent of a specalized CIA tool to place covers over the english language text on U.S. produced weapons systems before giving them to insurgents secretly backed by the CIA.

Shit Mibberworth - Sun, 02 Apr 2017 04:48:40 EST ID:P6PS9CBz No.36673 Ignore Report Quick Reply
I presume that knowledge of this leak to Wikileaks was the reason that the government declined to publish the "Russian" hack evidence to the public - because if they had, then a little less than a year later we'd all find out that it was never the Russians in the first place.
Matilda Clublingtirk - Tue, 04 Apr 2017 21:18:51 EST ID:xES2LFr1 No.36684 Ignore Report Quick Reply
is there a torrent for this one and part 2 ?
Cedric Pibberlere - Fri, 14 Apr 2017 15:45:08 EST ID:MX3iLMV2 No.36719 Ignore Report Quick Reply
1492199108253.jpg -(263487B / 257.31KB, 1676x1571) Thumbnail displayed, click image for full size.
What is Vault 7?: https://youtu.be/D6BdaoyJe-Q

>RELEASE: Inside the top secret CIA virus control system HIVE https://wikileaks.org/vault7/

>Today, April 14th 2017, WikiLeaks publishes six documents from the CIA's HIVE project created by its "Embedded Development Branch" (EDB).

>HIVE is a back-end infrastructure malware with a public-facing HTTPS interface which is used by CIA implants to transfer exfiltrated information from target machines to the CIA and to receive commands from its operators to execute specific tasks on the targets. HIVE is used across multiple malware implants and CIA operations. The public HTTPS interface utilizes unsuspicious-looking cover domains to hide its presence.

>Full doc: CIA orders to hack Le Pen & other French presidential candidates

Julian Assange Press Conference and Q&A on Vault 7, Year Zero and the CIA (03-09-2017): https://youtu.be/uxmMt4EW3PQ

What do? (Academic Ethics Question) by Oliver Hummlebare - Mon, 03 Apr 2017 00:05:04 EST ID:SWJfiJ9j No.36675 Ignore Report Reply Quick Reply
File: 1491192304967.jpg -(622208B / 607.62KB, 1241x1067) Thumbnail displayed, click image for full size. 622208
I started tutoring one of my classmates who is enrolled in an intro to software dev-course which I completed easily last year.
I thought this would be an easy task, I passed this course with flying colors and really took a liking to programming and Java (which is the language of choice for beginner's programming at BCIT).

I couldn't have been more wrong. He doesn't have the same instructor I did, and her assignment specifications are borderline illegible. Beyond being rife with typos and painfully unspecific I've noticed some much deeper problems while trying to help him navigate these tangled assignment specs.

At first I thought the worst of it was things like specifying to override compareTo() but not specify to actually implement the comparable interface. Dumb lazy stuff like that.

In helping him with the final assignment however, I've noticed not only profoundly bad program design, but the fact that the specifications are malformed. It's too complicated to get into the details but let's just say this isn't bad code, but straight up wrong code. The whole program is just one big logic error.

I want to write an email to the program director to complain about this teacher, my classmate would rather I didn't. I want to respect that but I don't think she has any place teaching programming, especially to beginners. Not only are they being ripped off, but from what I've seen they are being severely lead astray by her instruction.

How should I proceed?
(picture kind of related)
2 posts omitted. Click Reply to view.
Phyllis Pollerfield - Mon, 03 Apr 2017 09:57:38 EST ID:WLOo3E7i No.36678 Ignore Report Quick Reply
From the looks of the code the output will be 1 wont it?

I agree with >>36677 if anything is unclear or impossible your concerns, or your tutors, should be brought up with the teacher.
Nigel Fallerstare - Mon, 03 Apr 2017 21:15:03 EST ID:GIfJ1NyX No.36679 Ignore Report Quick Reply
Nope, the code will output 123.456. This is the way inheritance was designed to work in Java. It's fine that you don't know this, because you aren't teaching a university level course that covers the way inheritance works in Java.

I get what you and >>36677 are saying... But this is not my teacher and I have no direct line of communication with her.

I've looked through her assignment specifications for the entire course, and it's all barely legible.

Can someone explain why it's out of line to bring this up with the department head?

The fact that she seems to be ESL shouldn't even matter in programming, and beyond that what she is teaching is how to write bad code.

IMO that seems worth bringing up to the administration?
Eugene Boblingworth - Mon, 03 Apr 2017 23:31:32 EST ID:WLOo3E7i No.36680 Ignore Report Quick Reply
Interesting, I guess I've been away from Java for too long. Makes sense though.

I guess there is nothing wrong with bringing it up with the department head if you really want to, but it's like you said:
>this is not my teacher
It's not your responsibility. This is pretty much equivalent to having a student have their parent talk to the department head. If the student thinks something is wrong, they should bring it up with the teacher/department head.

But, at the same time, you did mention it was an intro to software dev course, which means it is probably the first time most of the students have ever coded, and as such, have no idea how terrible of a teacher she is.
Henry Summerhire - Wed, 12 Apr 2017 00:25:29 EST ID:MyTF28xo No.36713 Ignore Report Quick Reply

>Can someone explain why it's out of line to bring this up with the department head?

It's not. Go ahead.

If you were her student, you would still need to go to the department head. You don't go to the person grading your work and say "Look, Pajeetna, you don't know what the fuck you're doing. Please fix it." No matter how nicely you say it, you're going to be weathering a shitstorm for pointing it out. Either she doesn't realize what a moron she is, in which case she's going to be pissed that you questioned her competence, or she is going to realize it, and just when she landed this cushy academic job (probably as a diversity hire), some smartass undergrad is on to her. Expect rape/racism accusations. "He came to my office and said I'm a dirty foreigner and tried to rape me!"
Alice Drimbletidging - Wed, 12 Apr 2017 13:31:17 EST ID:FNUGTkco No.36714 Ignore Report Quick Reply
1492018277093.jpg -(177444B / 173.29KB, 1252x1252) Thumbnail displayed, click image for full size.
Agreed, too much of this shit is going on and it needs to be fixed. Also, you might want to have you classmate talk to some of the other students, see where they are at and see if you can get some mutual support and solidarity going.


The school isn't paying the students, the students are paying the school. If the school was paying the students then it might make sense for them to try and fulfill insane and broken requirements. That or if the course was entitled "introduction to software development office politics".

There's way too little accountability in education these days. With tuition rates going into the outer ionosphere having teachers that don't know what the hell they are doing isn't acceptable.

Data Visualization Project by Hedda Socklelutch - Mon, 16 Jan 2017 16:41:51 EST ID:RzCYRoD4 No.36458 Ignore Report Reply Quick Reply
File: 1484602911804.png -(244522B / 238.79KB, 789x477) Thumbnail displayed, click image for full size. 244522
I'm interested in doing a small data visualization project in python, processing, R or whatever for a local hackathon that's coming up in 2 months.

I've taken a bunch of 'introductory' courses in programming (nothing past data structures) in c++, python syntax and fucked around with an arduino a bunch in the past, but other than that i do not have a CS background though i'm not terrible at math. i want to enter this hackathon to gain more exposure to development, hopefully contribute to something cool, and have fun

what can I do in 2 months to prepare, so I don't show up and just sit there and not have anything meaningful to contribute? what should i practice?
Simon Blackstock - Mon, 16 Jan 2017 17:54:06 EST ID:9QSfnS0r No.36459 Ignore Report Quick Reply
  • Processing is better to get stuff on the screen fast, batteries included.
  • Python has the best easy to learn libraries: numpy, scipy, pandas, etc..
use Anaconda if you don't know what to install, there is also pygame if you want to get to the level you get with processing but that is quirky.
  • You could also use javascript and three.js

  • If you want to do something innovative write your own OpenGL fragment shaders for everything related to displaying stuff.
Lydia Povingwell - Mon, 16 Jan 2017 21:16:56 EST ID:j4Mgcfd3 No.36460 Ignore Report Quick Reply
It's hard to advise if you don't have a clear idea of what you'll be doing, but forget the visualization part for a minute. Make sure you can do the basics like ingesting and munging data.
Polly Fonnerridge - Tue, 17 Jan 2017 02:06:30 EST ID:XSh2pMMH No.36462 Ignore Report Quick Reply
Try TouchDesigner. It's node-based but you can run python scripts. It's super fun
Frederick Nondershaw - Tue, 17 Jan 2017 14:42:28 EST ID:9QSfnS0r No.36463 Ignore Report Quick Reply
>Make sure you can do the basics like ingesting and munging data.
ie learn numpy, python list-comprehensions (and dict- & generator-)

What you can also do if you decide to use python do the data mangling in python and use something like flask to create a cheap webservice for the visualization part that you can do in javascript & three.js

However if you aren't as familiar with python, let alone javascript just do everything in C++. The point of hackatrons is using the language you already familiar with not learn a new one imho.
Edwin Croffingnedge - Sun, 09 Apr 2017 04:20:27 EST ID:rAGFRmkY No.36692 Ignore Report Quick Reply
Use js Canvas And WebGL If U Need it!!

Looking for Book by Isabella Sembleford - Tue, 04 Apr 2017 17:10:35 EST ID:bwAjObSg No.36681 Ignore Report Reply Quick Reply
File: 1491340235219.jpg -(29200B / 28.52KB, 379x528) Thumbnail displayed, click image for full size. 29200
Pic related

>All I could find for an image (used tineye and etc. but this is all I have on it)
Book Name: Computer Programming in C (Thai Edition)
Author: Chakchai So-in
Date: 2012

No clue why I can't find this book. So it in a cringy video, but a book shown in the video looked interesting. I am aware of the language barrier.
Phoebe Suvingcocke - Tue, 04 Apr 2017 20:22:13 EST ID:4j+sbIx0 No.36682 Ignore Report Quick Reply
If you can't find anything out about it, it's probably published by the university for internal use only. That's very common.

bad at tech by Charlotte Greenson - Thu, 16 Mar 2017 12:21:25 EST ID:Zudx1stW No.36610 Ignore Report Reply Quick Reply
File: 1489681285293.png -(2817549B / 2.69MB, 1920x1080) Thumbnail displayed, click image for full size. 2817549
I graduated with a liberal arts degree from a top private uni in the US a year ago- i originally got admitted for electrical & computer engineering (a top 10 program) and just struggled like hell in that major for 3 years before dropping into a (semi-useless) liberal arts major so i could gtfo with a degree. my gpa is sub >2.5

I got a shitload of C's, D's and F's in my engineering classes cause I was/am immature, had no discipline and never did my homework. i never moved past the sophomore level of courses, i.e I only got to signal processing, circuits, 3D calc, diff eq, thermo, and a bunch of 'intro' programming classes in C++, python. i did way better in my liberal arts classes cause they were mostly jokes. didn't make it to any junior 'specialized' work or any capstones.

now i'm at a small 'consulting' firm where i'm basically an excel monkey/note taking bitch making a bit below 59k a year. Yes i'm lucky to even have a job but i'm a paper pusher and I feel like I'm wasting my potential every day in an industry i give 0 fucks about

i always get an itch to self-study Ruby or something and try and get back into tech, or go back to grad school (dubious with my poopoo gpa) and try again at something 'useful'- even though I blew tits at anything i touched related to tech. at work I still read tech articles, I still have hordes of engineering textbooks i flip through from time to time cause i feel nostalgic.

Should I move on and leave tech behind since I suck at it or is there a chance to redeem myself?
2 posts omitted. Click Reply to view.
Doris Blusslefire - Fri, 17 Mar 2017 15:40:53 EST ID:9QSfnS0r No.36615 Ignore Report Quick Reply
>If you develop skills and have good projects posted on github that's better than classes
You can't really make a generalization like that.
William Dovinghood - Sun, 26 Mar 2017 18:01:32 EST ID:mfkLzG/S No.36643 Ignore Report Quick Reply
Keep the 59k a year job.

Get up a few hours early every day and do this https://functionalcs.github.io /curriculum/ it's slow at first until you build mathematical maturity then you essentially tear through all the rest of the courses because it will be review/easier to do the psets.
William Dovinghood - Sun, 26 Mar 2017 18:02:31 EST ID:mfkLzG/S No.36644 Ignore Report Quick Reply
https://functionalcs.github.io/curriculum/ oops
Sidney Drubblenitch - Tue, 28 Mar 2017 16:21:01 EST ID:9QSfnS0r No.36647 Ignore Report Quick Reply
>Get up a few hours early
>every day
good one
>build mathematical maturity
yeah do it, without going to any class
>you essentially tear through all the rest

I get the distinct impression that the last thing OP needs is a collection of links.
Albert Turveystone - Wed, 05 Apr 2017 21:18:22 EST ID:1joa5uVv No.36686 Ignore Report Quick Reply
but den u bee 1337 functional programmar.
no but it might be beneficial, idk.

namespaces in c++ by Rebecca Clocklebury - Wed, 03 Aug 2016 00:37:32 EST ID:9GNL65xE No.35945 Ignore Report Reply Quick Reply
File: 1470199052041.jpg -(312799B / 305.47KB, 600x1500) Thumbnail displayed, click image for full size. 312799
newb here...

What exactly is a namespace in c++, I still don't really understand.
3 posts omitted. Click Reply to view.
Hannah Senningdidge - Mon, 22 Aug 2016 20:55:15 EST ID:e7bTcYy7 No.36050 Ignore Report Quick Reply
Can members of a namespace be declared as private to that namespace in C++ like they can in java?
Charles Fibblebanks - Thu, 25 Aug 2016 10:55:17 EST ID:N/tXj6uE No.36058 Ignore Report Quick Reply
No. Private doesn't make sense for how namespaces are used in C++. You can however make an anonymous namespace that's local to the translation unit.
for ex - Sat, 25 Mar 2017 11:30:29 EST ID:rAGFRmkY No.36637 Ignore Report Quick Reply
using namespace std;

is the namespace standard type library which hold most of the main functions of basic c++ development cout cin ect.
Archie Breddlepin - Sat, 25 Mar 2017 15:15:42 EST ID:u6Z4WHSY No.36638 Ignore Report Quick Reply
Careful Bru, that's almost a coherent thought.
Samuel Henningworth - Sat, 25 Mar 2017 23:16:20 EST ID:rAGFRmkY No.36640 Ignore Report Quick Reply
its the only direct sci based answer wtf? crack?

Python by Isabella Cupperham - Fri, 17 Mar 2017 08:11:58 EST ID:sIgWxmPi No.36612 Ignore Report Reply Quick Reply
File: 1489752718854.jpg -(716829B / 700.03KB, 2000x1000) Thumbnail displayed, click image for full size. 716829
So I was helped here, a few month back, choosing a cartesian point from a list by some criteria. Now i need to know how I can select an entry in another list, the criteria being that it has the same index as the entry from the previous list.

Dunno if relevant but here is how i get the cartesian point from the first list:

for point in lista:
avstand = abs(math.hypot(krok[0] - point[0], krok[1] - point[1]) - redskapslengde1)
if avstand < solution[0]:
solution = (avstand, point)

return solution
answer = get_min_distance(krok, redskapslengde1, lista)

So I want to summon an entry in a different list, with the same index as this answer. The latter list consists of single numbers, not x,y pair like the former.

Whoever answers this gets to fuck me in the ass if you can find me :)
Or a cake, if you can find that.
2 posts and 1 images omitted. Click Reply to view.
Phineas Wishchine - Sat, 18 Mar 2017 09:06:08 EST ID:+gXm3O1V No.36618 Ignore Report Quick Reply
1489842368567.jpg -(3025903B / 2.89MB, 2000x1333) Thumbnail displayed, click image for full size.
But not that, obviously.

Frederick Murdgold - Sat, 18 Mar 2017 09:32:35 EST ID:rAGFRmkY No.36619 Ignore Report Quick Reply
1489843955950.png -(127549B / 124.56KB, 1366x768) Thumbnail displayed, click image for full size.
Nell Ceblingwitch - Sat, 18 Mar 2017 10:21:55 EST ID:WLOo3E7i No.36620 Ignore Report Quick Reply

There are a few ways you could do it. You could keep track of the index yourself while looping through the list, or just use the index function:

Shitting Bozzletock - Sat, 18 Mar 2017 14:21:41 EST ID:0Wz3cQnI No.36623 Ignore Report Quick Reply
Just post your code on pastebin and maybe someone will make it do what you want for you.
Reuben Blackdale - Mon, 20 Mar 2017 18:49:24 EST ID:7WN4whBM No.36629 Ignore Report Quick Reply
1490050164640.png -(27060B / 26.43KB, 757x462) Thumbnail displayed, click image for full size.
Yea bich!
That's exactly what I was looking for.

Brute Force Compiler by Fanny Grandford - Sun, 19 Mar 2017 14:35:03 EST ID:8Wkw9vVF No.36625 Ignore Report Reply Quick Reply
File: 1489948503186.jpg -(118472B / 115.70KB, 500x716) Thumbnail displayed, click image for full size. 118472
I've just made what I call a brute force compiler. How does it work? Well it occurred to me that since a program is simply a sequence of bytes we can actually enumerate all the possible programs. So it does that, and runs each one in an emulator until the tests all pass.

One test is that the program should not have written to, read from, or branched to any byte in memory that it hasn't explicitly been given read write execute access to. Just to prove the idea, I put a second test in and that' passes if some memory location, which was initialised to 0, contains some non-zero value after the program has run. Sure enough, the compiler produced the following code (in 6502 assembly):
dec $7F
(that decrements the memory location I specified, so since it was initialised to zero now it'll obviously contain a non-zero value). And this is the shortest program that passes this test, and dec is the first opcode numerically which modifies a memory location in the necessary way.

My idea is that if we have enough tests, then we can use this to generate a program which matches some specification. (And since the programs are tested in a certain order, we also know that it's the shortest possible program that matches the specification).

So the next thing is: How can we get these necessary tests? Maybe I can automatically generate them from running an equivalent program. Maybe I can generate them from source code. Any ideas about that? Or any ideas about how useful this whole contrafibulation might be?
Fuck Sigglekork - Sun, 19 Mar 2017 15:43:37 EST ID:S3TDz6jS No.36626 Ignore Report Quick Reply
What you have is logic programming and not-quite-genetic programming. I think the first problem you'll run into is that constraints are really hard to think about, often harder than solving the problem yourself. The second is that even far more sophisticated approaches are very slow in practice. These are the reasons Prolog isn't popular.
Martha Wudgeridge - Sun, 19 Mar 2017 17:42:47 EST ID:9QSfnS0r No.36627 Ignore Report Quick Reply
There is current research on a topic like that.
The researchers have created a neural network capable of generating source code for a program that produces a required output scheme.

In a sense it's the only currently somewhat plausible way to do that.
Archie Bottinglack - Mon, 20 Mar 2017 03:50:28 EST ID:P6PS9CBz No.36628 Ignore Report Quick Reply
This sounds like the principle applied to superoptimizers:

The problem (both with your idea and with superoptimizers) is that with larger programs your search-space expands too quickly for it to be feasible to search all possible sequences of program bytecode. If you query:
Find me the fastest program that does this thing in less than 4 bytes, you're searching through 2^32 possible (though not necessarily valid) program sequences, but if you expand the search to 8 bytes then you're already at a size too large to search on a single computer in a human lifetime at 2^64 program sequences.

If you restrict your search to only valid programs, then the possibility-space is reduced, but only linearly so you're still stuck with the exponential-search issue only now you have fewer possible programs to enumerate.
Phoebe Fanlock - Wed, 22 Mar 2017 16:57:02 EST ID:8Wkw9vVF No.36631 Ignore Report Quick Reply
Thanks for all your thoughts and input thus far.

>constraints are really hard to think about
So maybe this thing would have a hard time with functions that have side effects and other unknowns and things which are hard to reason about (luckily those things are rare in good programs). But maybe this thing would work okay on a function which returns a value or set of values given an input. Something like a keyboard matrix decoder or a mathematical function. The constraint would be as simple as "You can use this region of memory for your own purposes. You can read from these locations. Put the return value here. Here is how the inputs map to the return value, including the don't-cares."
Of course, that might still be hard to compute...

I haven't had time yet to read that paper properly yet, but the skim has been interesting. Neural nets are another interest of mine

One application that has a (relatively) small search-space: automatically finding the transformations for a peep-hole optimizer. A peephole optimizer might look at four bytes at a time, seeing if a four-byte sequence may be replaced by shorter sequence.

<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9
Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.