[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: 35
File: travellingsalesman.jpg (210 KB, 643x557) Image search: [Google]
travellingsalesman.jpg
210 KB, 643x557
Artificial ants edition

Old: >>54906842

What do you think about swarm intelligence and metaheuristics /g/?
>>
Way too fucking early edition

Sage is your friend
>>
>>54914405
have an upboat le sire

4chan is so full of morons who didn't even read 4chanettique lolol

together we will destroy le spammers xD
>>
(copied from earlier thread)

How do websites like strawpoll prevent duplicate votes? Evercookies?
>>
>>54914710
probably ip+cookies
>>
>>54914724
But wouldn't that prevent two people on the same IP (two different computers) from both voting? I think it allows that. (can't be done with just cookies because those can be cleared)
>>
TRY TO USE THIS CODE BY ENTERING THE NUMBER 78568765 AND DEFY MATHS
def prime(n):
for x in range(2,n):
if n%x==0:
return "NOT PRIME"
return "PRIME"
def palindrome(n):
n_str = str(n)
if n_str == n_str[::-1]:
return True
else:
return False
def search_palindrome(n):
count = 0
print "Number entered: " + str(n)
while True:
count += 1
n_str = str(n)
n_rev = n_str[::-1]
r = int(n_rev)
n = n + r
print n_str + " + " + n_rev + " = " + str(n)
if palindrome(n):
break
print " "
return 'Palindrome "' + str(n) + '" found in ' + str(count) + " steps."
def prime_2(n, count):
hip = str(n) + " - 1 = " + str(int(n-1))
if prime(n) == "NOT PRIME":
print str(n) + " " + "NOT PRIME"
return prime_2(n-1, count + 1)
else:
# Recalculate the original value
original = n + count
count += 1
print str(n) + " " + " PRIME"
return "Number " + str(n) + " is prime found in " + str(count) + " steps, starting from the number " + str(original)
x = int(raw_input("Enter a number: "))
print prime(x)
print " "
print search_palindrome(x)
print " "
print "Number entered: " + str(x)
print " "
print prime_2(x, 0)
>>
>>54914852
how am I defying math? what is your search palindrome method supposed to be doing, it looks like retarded code to me.
>>
Bumping because metaheuristics!
>> TFW just had to forcefully reboot computer because the GA you ran wouldn't shutdown
>>
>>54915078
It checks if your entered number is palindrome or not, if not it will add the number entered with the palindrome of the number entered, if the result of that shows a palindrome then it will stop and if not it will keep going on calculations until it finds a new palindrome.
If you think this is retarded then you must be a real genious.
>>
>>54915132
do it on the python thing for windows, you can kill it without rebooting
>>
>>54914852
Programming in Python - Rule 1:
Never implement algorithms in Python ever and if you do at least use something like CPython or Numba or pypy or whatever is trending atm.
>>
i want to make a game but the thought of learning c# makes me feel dirty
>>
>>54915287
What kind of game? 3d, 2d? Genre?
>>
>>54915269
depends
>>
>>54915287
Do C/C++ instead. There's tons of engines/frameworks.
>>
>>54915287
Do it in html5
>>
>>54915269
the code works with other numbers so i dont see the problem
>>
>>54915360
SFML is comfy but why it uses camelCase? Literally retarded.
>>
>>54915287
Unity isn't the only option mate.
>>
>>54915327
2d i have a few things in mind
>>54915360
i was to learn c++ i'd go for unreal, but it's too overwhelming for someone learning it i think even though i know java and c.
>>54915473
i was thinking monogame desu
>>
>>54914810
Maybe it grabs your MAC Address?
>>
it's fucking retarded
>>
>>54915611
>2d i have a few things in mind
With 2d it's actually pretty realistic to build an engine on your own. You could use C++ or even just C and SDL2 and build something. There are some very simple tutorials on this. I once build a very primitive 3d shooter à la doom with it in C, it's fun as hell.

The other thing about 2d is that performance probably won't be a limiting factor, so you might as well build it with HTML5 and javascript or whatever people do these days.
>>
>>54915611
I'd recommend Anura (very good) or Magnum (graphics library).
Really for 2D you don't need much. You can write it from scratch really.
I've used Angel2D and felt it was rather comfortable when I was new. It's abandoned by devs pretty much.
>monogame
Looks good. Haven't tried it.
>>
File: energylandscape.gif (12 KB, 473x285) Image search: [Google]
energylandscape.gif
12 KB, 473x285
>>54914382
>What do you think about swarm intelligence and metaheuristics /g/?

I think this is interesting field of research. Global optimization is cool.
>>
File: Straw Poll.png (446 KB, 662x444) Image search: [Google]
Straw Poll.png
446 KB, 662x444
>>54914810
Well it says right here.
>>54915887
You could do that. Been a long time since I took my network course but I think that'd be very similar to an IP ban because of NAT? Or maybe NAT encapsulation doesn't contain a mac address. Doesn't make much sense out on the web anyway.
>>
>>54915611
Why don't you go with lua/love2d, anon? It is pretty fast and way more convenient to program in.

I know C++ and I wouldn't use it to write a 2d game. I'd go with lua because I have better uses for my time than debugging C++ segfaults/memory leaks.
>>
>>54915611
>>>/vg/144444849
Has all list of engines. But all the thread just recommends is unity and gamemaker because they're scrubs.
>>54916214
Love2D is nice. A bit bare bones imo.
>>
>>54916322
>Source isn't a real engine!
>>
Explain yourself Haskell
{-# LANGUAGE TemplateHaskell, OverloadedStrings, OverloadedLists, GADTs #-}
{-# LANGUAGE MonadComprehensions, ParallelListComp, TransformListComp, RecursiveDo #-}
{-# LANGUAGE UnicodeSyntax, LambdaCase, MultiWayIf #-}
{-# LANGUAGE BangPatterns, ViewPatterns, PatternSynonyms, TupleSections #-}
{-# LANGUAGE RankNTypes, TypeFamilies, MultiParamTypeClasses, ExistentialQuantification #-}
{-# LANGUAGE DeriveFunctor, DeriveGeneric, DeriveFoldable, DeriveTraversable, DeriveTraversable #-}
>>
>>54916396
Haskell pioneered puzzle-oriented programming paradigm. It is a language that attracts attention of autistic-but-not-bright users that happen to like to solve puzzles while programming.

A wide variety of incompatible language extensions is like a set of additional puzzle levels. An infinite timesink.
>>
>>54916536
I just want a

{-# LANGUAGE EVERYTHING, NOKITCHENSINK #-}
>>
>>54915611
SFML is alright.

>>54916322
from what I've seen in past agdg threads most of the people don't even make games/know how to program they just post there or someshit.
>>
>>54916602
The place has gone down the shitter. But there's people who know what they're doing there. They're probably the worst gamedev forum I know of aside form places like stencyls forums (Scratch-type language game engine, literal pre-teens there).

But they're ready to offer opinions and if you ask for help you generally get answers from people who have some experience.
>>
What the fuck Python.
I have a website from which I need to get some JSON data.
Making a simple requests.get() locally gets me the data immedietely.
cURLing locally gets me the data immedietely.
cURLing on a remote machine gets me the data immedietely.
Making a simple request.get() on the same remote machine takes 3 minutes.

Riddle me this.
>>
QJsonDocument jsonData = QJsonDocument::fromJson(strData.toUtf8());
QJsonObject jsonObject = jsonData.object();
qDebug()<<jsonObject["filename"].toString();


I'm back again. This time, I can't get any data from the jsonObject. When I print out jsonObject, I see the entire json so I know I'm getting it. But when I try to get the value for anything, it shows up either as an emptry string or a 0. Any idea?
>>
>>54914852

Your algorithms are pretty cool, it's a funny definition for palindrome.

protip: You can just return the conditional at the end of palindrome, i.e.

return n_str == n_str[::-1]


I really like the code though, looks like it was fun to write.
>>
>>54916692
data = json.loads(subprocess.Popen(['curl', url], stdout=-1, stderr=-1).communicate()[0])
>>
>>54914852

Another thing, to improve runtime, you can reduce calls to prime(n) by short-cutting any even numbers, and any numbers divisible by 5.
>>
>>54917012
Add me on steam as Necro Magno and explain me there (i didnt understand that part and im a noob on python so i need tips and i dont know what other instant message place to say for you to leave me a message) please
>>
PYTHON IS FUCKING RIDICULOUSLY SHIT FUCKING KILL YOURSELVES
>>
>>54917189
calm down
>>
>>54916396
not haskell the problem's with fucking GHC
>>
post cringe
https://byorgey.wordpress.com/2010/07/19/typed-type-level-programming-in-haskell-part-iii-i-can-haz-typs-plz/
>>
>>54914382
Can you make a living off freelance programming?
>>
i swear drinking coffee is not worth it in the long run

maybe if you need to be alert at a specific point in time like during working hours and then you can pay off the "debt" in your spare time

but not for drinking all the time to try to boost your total productivity. in fact i vaguely recall that there was a study that suggested coffee drinkers were less productive overall.
>>
>>54917572
or had a decreased ability to focus or something
>>
>>54917572

If I don't drink at least 2 cups of coffee a day, I'm ready for bed by 7pm. A few cups and I'm ready to stay up until 2-3 am.

Caffeine is the best.
>>
>>54917572
There's a study out there to prove anything causes anything if you look hard enough.
>>
>>54917619
you hit a wall, you end up with the same problem that ADHD people get where coffee just makes you sleepy and it makes you sleep ridiculous amounts
>>
>>54917667
desu coffee doesnt affect me in the least. maybe that's cause i do have adhd, never heard of that before though
>>
Is vulkan to the point where its better than opengl and dx11 yet
Considering making some 2d games and figured I might as well learn vulkan while Im at it.
Otherwise Ill just use dx11 though Id like to stay modern.
>>
>>54917726
vulkan is a meme use dx11 or modern opengl
>>
>>54917750
but opengl is slower than vulkan and way slower than dx11. Unless its been updated since I last looked at it.
I know khronos wants vulkan to not replace opengl so its possible they finally made it faster.
>>
>>54917779
well it looks like they definitely made it competitive to dx11
>>
>>54917779
are you thinking of ancient fixed function opengl or something

http://www.extremetech.com/gaming/133824-valve-opengl-is-faster-than-directx-even-on-windows
>>
is it possible to use VS without having to log in constantly?
>>
>>54917825
ok opengl seems a bit slower than dx11

http://www.g-truc.net/post-0547.html
>>
File: 1464998874180.jpg (72 KB, 720x690) Image search: [Google]
1464998874180.jpg
72 KB, 720x690
>>54917861
How do i even begin to make a tank simulator? Not super super simulator tier (ie: simulating all the way to the engine) but like getting the transmission, tracks, suspension, etc to all work as they should
>>
What's the easiest way to get a integer from a string in c++, where every string has a specific format?
For example
const char *hn = "HouseNr 10";
const char *fl = "Floors 3";
>>
>>54917891
use a physics engine like box2d
>>
>>54917906
can that actually simulate rotation everything of tracks, etc?
>>
>>54917861
So vulkan then
>>
>>54917906
>>54917938
>>>/vg/egg
>>
>>54917938
yes
>>
>>54917938
Yes. CHeck it. Also check OpenDynamicsEngine.
>>
>>54916888
ok. Another follow up. The 4chan json is nested so I tried this.
 QString strData = (QString)reply->readAll();
QJsonDocument jsonData = QJsonDocument::fromJson(strData.toUtf8());
QJsonObject jsonObject = jsonData.object();
QJsonValue value = jsonObject.value("posts");

qDebug()<<"filename:"<<value.toObject().value("filename").toString();


Still an empty string. Here is a link to the pretty printed json http://hastebin.com/uwumowomed.tex
>>
>>54917893

Those are C """strings""" not C++ strings.
>>
>>54918034
*Those are C strings not C++ """strings""".
>>
>>54917940
mate your 2d games should run at ridiculous framerates no matter which one you use
>>
>>54918046

Incorrect placement of quotation marks, buddy.
>>
>>54918078
My mistake.

Those are C strings not C"""++""" strings.
>>
>ld -lmapm --verbose
...
attempt to open //usr/local/lib/libmapm.so failed
...
>ls -l //usr/local/lib/libmapm.so.0
-rw-r--r-- 1 anon anon 90872 Jun 5 00:01 //usr/local/lib/libmapm.so.0
>>
File: scr5.png (16 KB, 525x350) Image search: [Google]
scr5.png
16 KB, 525x350
Redesigned the UI for my r/a/dio program. Having a rounded progressbar is too much of a problem with WPF.
>>
>>54918124
>ldconfig -v | grep mapm
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.23.so is the dynamic linker, ignoring

libmapm.so.0 -> libmapm.so.0
>>
>>54918233
looks like shit anyway
>>
>>54917893

Search backward through the character array for your delimeter, get the pointer to the start of the number, run stoi() with the pointer argument.
>>
File: Got_some_nerve.jpg (44 KB, 400x267) Image search: [Google]
Got_some_nerve.jpg
44 KB, 400x267
>>54918291
ty bb
>>
>>54918065
No Im only using the 2d games to learn and practice some algorithms I made up. So learning vulkan while Im at it would help me later down the line when I get to 3d methods.
>>
>>54918124
>>54918287
Nobody ever experience this?
>>
>>54918566

Is it readable by your user?

And why are you using pam from /usr/local instead of the system libpam? That's kind of shady, right there.
>>
>>54916888
>>54918027
oh I remember this shitshow

I fixed it, hol up let me find it
>>
>>54918731
libpam? Look again.
>>
>>54918809

Ack, sometimes I think I'm getting dyslexic in my old age.
>>
>>54918809
Turns out I hadn't built the shared library correctly? I used a different recipe in the makefile and had to add -fPIC to get it to work on loonix.
>>
>>54918735
it was with twitch api, but I guess it should be the same, sendrequest part
QJsonArray MainWindow::sendRequest(QString reqe) {
QJsonArray array;
// create custom temporary event loop on stack
QEventLoop eventLoop;

// "quit()" the event-loop, when the network request "finished()"
QNetworkAccessManager mgr;
QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit()));

// the HTTP request
QNetworkRequest req;
req.setUrl(QUrl(reqe));
QNetworkReply *reply = mgr.get(req);
//connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateDownloadProgress(qint64, qint64)));
eventLoop.exec(); // blocks stack until "finished()" has been called

if (reply->error() == QNetworkReply::NoError) {
QString strReply = (QString)reply->readAll();

//parse json
//qDebug() << "Response:" << strReply;
QJsonDocument jsonResponse = QJsonDocument::fromJson(strReply.toUtf8());
QJsonObject jsonObj = jsonResponse.object();
QJsonValue value = jsonObj.value("streams");
array = value.toArray();
delete reply;
}
else {
//failure
qDebug() << "Failure" << reply->errorString();
delete reply;
}
return array;
}

    QJsonArray arrr = sendRequest(url2);
foreach (const QJsonValue & v, arrr) {
QString name = v.toObject()["channel"].toObject()["display_name"].toString();
QString previewImg = v.toObject()["preview"].toObject()["medium"].toString();
QString status = v.toObject()["channel"].toObject()["status"].toString();
int viewers = v.toObject()["viewers"].toInt();
...

just mess about with the final structure
http://hastebin.com/eloqiwuyeq.js <- twitch json structure
>>
card Hand[] = new hand[13];

Can I set do this?
Hand[1] = null;
>>
i made a 4chan scraper.

rip it apart and tell me what i could do better

import re               # Regex filtering for url parsing
import json # Extracting info from 4chan api
import requests # HTTP requests
import urllib.request # Downloading images
import os # Creating directories
import sys # Input stuff
import time # To ensure 1 request per second


def getBoard(url):
board = re.findall(r'org/(.*?)/', url)
return board[0]


def getThreadID(url):
id = re.findall(r'/thread/(.*?)/', url)
return id[0]


if len(sys.argv) < 2 or not sys.argv[1]:
print('ERR: No URL given!')
print('Usage: python scraper.py <thread url>')
sys.exit()

thread_url = sys.argv[1]

print('Parsing JSON data...')

board = getBoard(thread_url)
id = getThreadID(thread_url)

json_thread_url = 'http://a.4cdn.org/' + board + '/thread/' + id + '.json'

r = requests.get(json_thread_url)

print('Gathering image names...')

imagenames = []
for key in r.json()['posts']:
if ('tim' in key):
imagenames.append(str(key['tim']) + key['ext'])

print('Creating directory at ' + os.getcwd() + '/' + board + '/'
+ id + '...')
if not os.path.exists(board + '/' + id):
os.makedirs(+ board + '/' + id)

print('Downloading images...')
for i in range(len(imagenames)):
filename = board + '/' + id + '/' + imagenames[i]

print('Downloading http://i.4cdn.org/' + board + '/' + imagenames[i])
urllib.request.urlretrieve('http://i.4cdn.org/' + board + '/'
+ imagenames[i], filename)
time.sleep(1)

>>
>>5491896
hehe I did a project just like this for my foothill college class! Are you a student here or maybe de anza?
>>
>>54914382
proof C is weakly typed
>>
>>54919038
>python
>3 no less
get out
>>
>>54919153
>anything but python
>anything but 3

lol k stay in the past grandpa
>>
>>54919143
I don't think anyone has said otherwise
>>
File: Screenshot_142.jpg (36 KB, 653x138) Image search: [Google]
Screenshot_142.jpg
36 KB, 653x138
Why the last line?
Why set what was just deleted to null?
>>
>>54919143
>>54919182
Also
str = 5[\code]
should throw an error
>>
File: 1464368077356.gif (450 KB, 472x472) Image search: [Google]
1464368077356.gif
450 KB, 472x472
testing
>>
>>54919038
use urlparse instead of regex to parse urls.
use string.format instead of concat
is request in standard library yet? if not, stick to urllib2 to minimize dependencies on small scripts.
>>
>>54919203

So you don't have a dangling pointer?

Dereferencing nullptr will always give a fatal error.
>>
>>54919203
>>54919296
Arguably you should wrap that in a debug ifdef or whatever.
>>
>>54919143
str = 5;

That's not valid, idiot.
>>
>>54919203
I don't get the argument concerning stuff like this. Unless there's dynamic type inference compilers can generate warnings. Nobody is writing software in some spec-ether where the compiler is perfectly aligns with the language spec flaws (depending on your viewpoint).
>>
>>54919296
I thought just deleting it would be enough. Didn't know one should then also set it to nullptr.
>>
>>54919219
>>54919358
it compiles
it runs
it works just fine, error or no
>>
is there an easier way to make it so Visual Studios 2015 doesn't give me fail to compiled error 4996 when I use scanf instead of scanf_s other than to go into the project settings for each individual project and add the _CRT_SECURE_NO_WARNINGS to the precompile settings or add either the #define or #pragma warning etc etc to the top of each project?

like a setting I only have to change once so scanf successfully compiles for all projects
>>
>>54919203
I mean you should be using smart pointers in C++ anyway
>>
>>54919746
You can export project templates anyway which have that flag
>>
>>54919746
I think you can select multiple projects and set the precompile settings. Not sure how that works if you have different ones in the projects though.

Maybe you can do _CRT_SECURE_NO_WARNINGS;<different settings> or whatever it says.
>>
I want to replace my AsyncTasks with RxAndroid but I'm too retarded to understand it ;_;
>>
>>54919143
You realize what you are doing?

Str is typeless pointer.
That means it stores a number (try the code without the str = 5; assignment).

Wikipedia defines strongly typed as:
"a strongly typed language is more likely to generate an error or refuse to compile if the argument passed to a function does not closely match the expected type"
and weakly typed as:
"weakly typed language may produce unpredictable results or may perform implicit type conversion.[1] A different but related concept is latent typing."

But you gave no such example for either case. In both your printf() calls the expected type matched very closely the expected argument.

That is because %d can interpret a pointer as a number and %s can interpret a pointer as the beginning of a string.

There is no implicit type conversion str=5; is valid (although rarely useful) because pointers are essentially numbers and can be interpreted like numbers.
>>
File: KLBjfbW.png (5 KB, 475x45) Image search: [Google]
KLBjfbW.png
5 KB, 475x45
>>54919143
proof OCaml is weakly typed
>>
>>54920340
You forgot to forget your trip
>>
>>54919143
To a C programmer strong typing means pressing the keys harder.
>>
>>54919358

It is absolutely valid, and for good reason. C was originally developed to make Unix. If you're making an operating system, one of the things you're likely going to have to work with is memory mapped I/O. Say I'm working with VGA. I know that for some given architecture, certain physical addresses will map to video memory, rather than actual RAM. So on x86, I might want to try something like:

void *vga = 0xB8000;


If you don't have that capability, you're going to have a hard time doing MMIO.
>>
>>54920671
>
void *vga = 0xB8000;

Well you could have that generate an error and supress it by
void *vga = (void*)0xB8000;

right? If you decided to make C more strongly typed that could be valid. I don't see where it does harm really.
>>
In my cpp, I have the following method:
Node* LinkedList<ItemType>::getNodeAt(int position) const
{
Node* retPtr = headPtr;
int index = 0;
while(index != position)
{
retPtr = retPtr->next;
index++;
}
return retPtr;
}


It gives me an error at the line of the method signature, says Node is not a type.
I have Node defined as a struct as a private data member in my header.
Where did I go wrong?
>>
>>54920671
import GHC.Prim

vga = int2Addr# 0XB8000
>>
>>54920760
Didn't include the header file?
I'd normally assume you have obviously but that's all I can see.
>>
>>54920760
post cod
>>
>>54920694

Well I don't see any reason why one should need to do unnecessary casting. A memory address IS an integer, so setting one equal to an integer value should be built in to the language.
>>
>>54920788
A memory address is integral but not necessarily an integer
>>
What is an elliptic curve and what do they have to do with crypto?
>>
>>54920788 >>54920844
For instance, rather than 0xB8000 being VGA, you could instead have VGA as its own value, like:

enum class Address { VGA, e0, e1, e2 ... }
>>
>>54920788
Well the reason we do strong typing is to catch errors. With C's dereference syntax there can be many errors. If you have a single letter variable you can accidentally put the * on the wrong side of the variable and do
void* p=0x00BEEF;
p*=5;

for instance. The cast doesn't need to be a runtime cast.
>A memory address IS an integer, so setting one equal to an integer value should be built in to the language.
They're semantically different though. We use hexadecimal as memory addresses usually because it's simpler to read that way.

I don't particularly care much. Most compilers allow you to catch this if you want. I'm just saying that it's a very low overhead that could catch errors.

But considering they had harddisk constraints back then it makes quite a bit of sense to just not cast. Guess it's just a sign of the times that we care.
>>
>>54920844

>integral
>of or denoted by an integer
So what you're saying is that it's an integer.

>>54920846

Don't make me pull out my notes. I can't pull this shit off the top of my head.
>>
>>54920846
It has something to do with factoring integers and public key cryptography. I don't remember. Something about Santa and packets..

I suggest you read about it.
>>
>>54920864
Is 'z' an integer?
Is 'z' integral?
>>
>>54920864
On my machine 'long's are used for pointers.
>>
>>54920852

Let's see what happens if we use this in a C program:

#include <stdio.h>

int main(void)
{
void* p=0x00BEEF;
p*=5;
printf("%p\n", p);
return 0;
}


The result:

$ gcc -std=c11 foo.c
foo.c: In function 'main':
foo.c:5:10: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
void* p=0x00BEEF;
^
foo.c:6:3: error: invalid operands to binary * (have 'void *' and 'int')
p*=5;


Well, it seems the compiler will at least warn you about assigning literals without a cast, but the operation you were worrying about? Why, that's invalid. You can't multiply a pointer; pointer

>>54920917

Yes and yes. 'z' is just syntactic sugar for the integer 122.

>>54920919

long is a stupid type. I've seen way too much code that assumes that it's always the length of a pointer, because the idiot who wrote it either has never worked with Windows or likes to pretend Windows doesn't exist.
>>
>>54920864
Get the notes
>>
>>54920773
>>54920780
I forgot to mention it's a private method.

Header:
#ifndef LINKEDLIST_H
#define LINKEDLIST_H

template <class ItemType>

class LinkedList
{
public:
LinkedList();

bool isEmpty() const;
int getLength() const;
bool insert(int index, const ItemType& item);
bool remove(int index);
void clear();
ItemType getIndex(int index);
int find(const ItemType& item);
void printList() const;

private:
struct Node // Struct so I can have my linked list.
{
ItemType item; // Data item.
Node* next; // Pointer to the next node.
};

int itemCount; // Current amount of items in list.
Node* headPtr; // Head/beginning of the list.
Node* getNodeAt(int position) const;


};
#include "LinkedList.cpp"
#endif // LINKEDLIST_H


cpp
#include "LinkedList.h"
#include <iostream>
using namespace std;

template<class ItemType>
LinkedList<ItemType>::LinkedList()
{
headPtr = NULL;
itemCount = 0;
}

poop load of methods...
then at the very end

Node* LinkedList<ItemType>::getNodeAt(int position) const
{
Node* retPtr = headPtr;
int index = 0;
while(index != position)
{
retPtr = retPtr->next;
index++;
}
return retPtr;
}

>>
>>54920951
Are you telling me the C standard has what warnings you're supposed to implement in the C standard? I had no idea.
>can't multiply a pointer
Fair enough. But you see how there can be unintentional cases at the very least.
>>
>>54916182
That looks to be a system displaying pattern formation, you don't happen to do much in the way of nonlinear dynamics do you?
>>
>>54920996
Maybe you can do LinkedList::Node?
Why do you want it private?
>private method.
Nested struct.

I've never done this.
>>
>>54920951
>pretend Windows doesn't exist
That's a completely understandable thing for a programmer to do. However, I still think people should be using (u)intptr_t or not try treat pointers like integers.

>>54921015
>Are you telling me the C standard has what warnings you're supposed to implement in the C standard? I had no idea.
There are a few cases where the standard says that the compiler must emit a warning of some sort.
I'm not sure if assigning an integer to a pointer without a cast is one of them though.
>>
>>54921015

Of course there are going to be unintentional use cases. Consider that this is completely valid:

#include <stdio.h>

int main(void)
{
printf(2);
return 0;
}


But like before, the compiler's going to give you warnings. And if you're smart, you're going to use -Werror to keep yourself from doing completely retarded shit.
>>
>>54921066
Well having looked into what >>54921050
said.
Apparently:
>An implementation may generate warnings in many situations, none of which are specified as part of this International Standard. The following are a few of the more common situations.
>http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
>An implicit narrowing conversion is encountered, such as the assignment of a long int or a double to an int, or a pointer to void to a pointer to any type other than a character type (6.3)
So it's just recommended you do. Which if we're gonna rely on the warnings (which I'd consider appropriate) should be a required warning if you're supposed to be satisfied with the C language spec.

But yeah. As I mentioned I really don't care much because warnings do exist regardless of the C standard.
>>
>>54921050

(u)intptr_t would be the ideal way of doing things.
(s)size_t and ptrdiff_t would also be, to a lesser extent, still better options than longs. In TinyScheme, I find it incredibly annoying that the creator would decide that the type long would be used to represent integers in Scheme. This is particularly because integers in scheme are also used to represent the size of strings, and as such, the choice leaves the programmer in a strange predicament where in 64-bit Linux, a TinyScheme program can handle more than 2 GiB of data in a string, while on 64-bit Windows, this is not the case. Yet the entire problem could have been avoided by just using ssize_t, since the integer a.) has to represent something's length, and b.) has to be signed.
>>
>>54921096
>So it's just recommended you do
http://port70.net/~nsz/c/c11/n1570.html#5.1.1.3
> A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined. Diagnostic messages need not be produced in other circumstances
Invalid syntax is a situation where a diagnostic message is required.
However, considering that it's implementation defined, it could be as unhelpful as "error" or "Something Happened".

>>54921120
Yes, people should use the standard C "typedeffed types" (is there an actual term for these?).
However, I think people have gotten a lot better at it, and you only see the prevalence of long and stuff in older code.
>>
>>54921066
>completely valid
At best, that shit is implementation defined.
>>
God I hate you language pedants. You're arguing about something that doesn't matter in practice. It's personal choice and you're not even arguing about what's the correct way of doing things (because you all agree).
>>
Is C worth learning?
>>
>>54921256
Yes. It's one of the best things to learn.
>>
File: rust-logo-512x512.png (94 KB, 512x512) Image search: [Google]
rust-logo-512x512.png
94 KB, 512x512
What does /dpt/ think of Rust?

- good lang
- community fucked up the ass by SJWs
>>
>>54921256
Yes certainly.
I'd say it's mainly worth learning not because of the language but rather because of the requirements it puts on you by not being that abstract.

Writing software in C is what teaches you the most. You need to know C for that.
>>
File: C o C.png (6 KB, 505x74) Image search: [Google]
C o C.png
6 KB, 505x74
>>54921284
Only one of those is true
>>
>>54917517
Depends on where you live.
>>
>>54921284
I like it. I don't give a fuck about SJWs. Why would you even bring an "issue" like that into the discussion ever?
>>
>>54921358
because they would deny you from participating in the community

if you ever talk about anything they disagree with, you will be banned from Rust convention and have your contributions/repos blacklisted
>>
>>54921284
it's shit
>>
>>54921408
What's Rust's license?
>>
>>54921436
Dual Apache/MIT IIRC.
>>
>>54921425
why's that?
>>
>>54921408
Wow , you get prosecuted when you spout 'le jews did it', 'muh holohoax', 'le happy merchant', '(((Shekelberg)))' etc. in a programming discussion.
Really makes you think, doesn't it?
>>
>>54921477
>prosecuted
>>
File: 1392359762334.png (735 KB, 750x850) Image search: [Google]
1392359762334.png
735 KB, 750x850
>>54921492
kek, English verbs are retarded. Or maybe I am :3
Here, have a cute /g/-related animu strip.
>>
>>54916182
>Global optimization is cool
Useless for practical problems.
>>
>>54921568
Are you retarded?
>>
>>54919508

Deleting the pointer returns that area of memory back to the heap so it can be reused. But the pointer itself still exists until it goes out of scope (i.e. you return or otherwise exit the block the pointer is declared in).

Deleting the pointer is all you need to do to prevent memory leaks. However, if you have a bug somewhere that tries to access that memory after you delete it, you'll be accessing unmanaged memory.

If the pointer is set to nullptr, it's guaranteed to cause a fatal error if you dereference it. This is preferable to accessing some random region of memory that you might be storing important data in.

TL;DR you don't have to set the pointer to nullptr, but it's a very good practice to get into.
>>
>>54921816
>using languages that allow you to set pointers to null
>>
>>54921846
>using languages that use pointers
>>
>>54921904
>writing code
>>
File: hebre.webm (3 MB, 1280x720) Image search: [Google]
hebre.webm
3 MB, 1280x720
/dpt/-chan, daisuki~

>>54921309
>Writing software in C is what teaches you the most.
No

>>54921256
Not anymore.

>>54921284
It's a good programming language where the hobbyist "low level" stuffs is now happening. I find it a little too verbose for me.

>>54919143
Not weak typing. Weak typing is this

int a = 1;
float *f = (float*)&a;
float fb = *f;


>>54917517
http://upwork.com/

>>54917750
But opengl drivers overhead is not a meme.
>>
>>54921846

>pointers are s-s-s-scary!

Let me know when you grow the fuck up, kid.
>>
>>54921846
>I'm retarded
>please handhold me
>>
File: she.png (7 KB, 257x118) Image search: [Google]
she.png
7 KB, 257x118
Reminder that the only people who like weak typing are feminists
>>
>>54921976

Reminder that 4chan is an 18+ site.
>>
>>54921976
What about people with two Y chromosomes?
>>
>>54922002
Men
>>
Presenting the code of the average Haskell "programmer":

http://stackoverflow.com/questions/37526740/why-is-the-f-version-of-this-program-6x-faster-than-the-haskell-one

main = do
t <- fmap (read . T.unpack) TIO.getLine -- With Data.Text, the example finishes 15% faster.
T.unlines . map (T.pack . show . solve . V.fromList . map (read . T.unpack) . T.words)
<$> replicateM t (TIO.getLine >> TIO.getLine) >>= TIO.putStr


The problem is not decomposed properly. The code is noisy, written in point-free style, and cannot be read - only analyzed. There is one useless comment that shows us what the author thinks is important: that he managed to make this function 15% faster (literally just 15% faster) through an obvious optimization.
>>
>>54921944
God damn, you're seriously the biggest retard in this thread.
>>
>>54922040
What about "people" with 5 X chromosomes?
>>
>>54914852
Your method to check prime numbers is extremely inefficient, firstly, you wouldn't need to check up to n, but only up to sqrt(n) for any integer factors.

Secondly, you're in python and have the tools to deal with very large numbers, there are better ways to test whether a number (possibly) is prime
https://en.m.wikipedia.org/wiki/Primality_test

My favourite test is the Fermat primality test due to how simple it is, just be sure to use build in modular-power functions and do not power and then modular a number
>>
>>54922096
Women
>>
>>54922002
data SexChromosome = X | Y deriving Eq
type Chromosomes = [SexChromosome]

chromosomesOf :: Sex -> Chromosomes
chromosomesOf Man = [X, Y]
chromosomesOf Women = [X, X]

isMale :: Chromosomes -> Bool
isMale = elem Y

genderOf :: Chromosomes -> Sex
genderOf cs
| isMale cs = Male
| otherwise = Female

>>
>>54922155
correction
chromosomesOf Male = [X, Y]
chromosomesOf Female = [X, X]


polite sage for double post
>>
>>54922155
this is silly

SexChromosome is isomorphic to Bit, and chromosomes should be a list of a polymorphic variant [<SexChromsome]
>>
>>54916214
>>54916322
i looked at love2d too but i'd also need to learn lua, plus most of they're docs are deprecated or very superficial. i'll think about it.
>>
File: arpanet_at_its_glory.webm (2 MB, 1600x900) Image search: [Google]
arpanet_at_its_glory.webm
2 MB, 1600x900
Has anyone got ideas for small projects?

i'm bored as fuck.
Video related.
>>
File: 1464942414757.png (1 MB, 3840x2160) Image search: [Google]
1464942414757.png
1 MB, 3840x2160
>>54922295
>>> random.org
>>
>>54914852
Change line 2 range(2,n) to range(2,sqrt(n)) but round it up before
>>
>>54922330
066 will get your IP banned
>>
>>54922360
Only if you implement it in a retarded way?
>>
>>54920846
Let Russian Math Man explain
https://www.youtube.com/watch?v=ulg_AHBOIQU
>>
>>54920671
It's called
uint8_t *vga = 0xb8000;
tard.
>>
To convert an 8 bit array to 16 bits it's just
byte2 * 256 + byte 1

right?

What do I do with the final byte if the array is odd? Leave it as is? Truncate?
>>
>>54922530
>not using uint16 for it
>>
File: cat in bath.webm (386 KB, 261x194) Image search: [Google]
cat in bath.webm
386 KB, 261x194
can anyone give me a quick rundown on how to embed a compiled binary in a Mac Cocoa application in Xcode?

I just want to embed a command line utility (which is a Unix Executable) and make a GUI for it
>>
>>54922547
union
{
u8 b[2];
u16 s;
}
>>
>>54922701
kys
>>
>>54922701
>2016
>not using cross platform toolkits
>>
>>54922980
undefined behaviour
>>
>>54923082
show me where in the standard such an undefined behavior is stated. (protip: you can't, whiteboi)
>>
>>54923082
No it's not. C11 allows you to read members of unions that wasn't the last one written to.
I am however making the assumption that this is C, with some silly typedefs.
>>
>>54922980
I'm not using C.
Can you explain this in terms of arithmetic instead.
>>
>>54923188
What programming language are you using ?

https://en.wikipedia.org/wiki/Union_type
>>
>>54923188
>Can you explain this in terms of arithmetic instead.
Type-punning has nothing to do with arithmatic. It's taking the "raw" values of one type, and reading it as if it was a different type, without conversion.
It's sort of achieves the same thing you were doing, but introduces problems with endianess.

What you were doing before was right, but it may be slightly more obvious what you were doing if you wrote it like
byte2 << 8 | byte1

In terms of your last question, that's entirely up to you.
>>
>>54914710
>>54914810
With strawpoll in particular, I think you can choose whether to limit with IP. If you do that, it would indeed prevent two people with the same IP from voting.

In the more general sense, this isn't a problem you can perfectly solve. Some suggestions follow. You would want to use one or more of these, weighted by feasibility and other factors.
* Simple cookies
* "Evercookies"
* Server-side fingerprinting
* IP limiting
* Require email verification to vote (but it is easy to set up catchall emails that would trivialise this)
* Require Facebook/other social login to vote
* Require payment to vote
* Require manual verification of government issued photo ID scan to vote
* Require the completion of an extensive third-party background check including interviews of friends, relations, and coworkers to vote
>>
>>54922701
nevermind i figured it out.


let bundle = NSAbundle.mainBundle()
let task = NSATask()

task.launchPath = bundle.pathForResource("wewlad", ofType: "")
// the ofType is a blank string because unix applications dont' have an extension. otherwise you could put txt or jpg
>>
Is it still legal to include encryption in your software?
>>
>>54923396
What the hell kind of country do you live in if that is a question you're seriously asking?
>>
>>54923396
It has always been legal and will always be legal. Unless you're living in burgerville obviously.
>>
File: RUST.png (111 KB, 512x512) Image search: [Google]
RUST.png
111 KB, 512x512
>>54921948
imagine if you couldn't compile your program if you had a dangling pointer, any sort of memory leaks, or data races.
>>
>>54923459
It does that? If so, that's pretty nito.
>>
Why C++ does not have a BDD library ready ?
>>
>>54923418
NSA/America, or as I've recently started calling it, NSA plus America
>>
>>54923476
I mean, a Database*
>>
>>54923473
It does- if you don't use `unsafe` blocks, it isn't possible to write memory-unsafe code in Rust.

Of course, you do pay for this with code complexity. But I'd suggest looking into it if you need performant but safe native code.
>>
>>54923476
What the heck is a database library? What fucking database do you want to interact with? Postgres? SQLite? Berkeley DB?
>>
>>54923473
>>54923491
it does, and the fun part is that no additional overhead is required, it's all zero cost abstractions
>>
>>54923486
WTF are you talking about? There are a gazillion database libraries for C++.
>>
>>54923509
0 native
>>
>>54923531
Because nobody in their right mind writes C++ APIs.
>>
>>54923531
http://www.sqlapi.com/
http://en.cppreference.com/w/cpp/links/libs#Databases
https://github.com/SOCI/soci
https://github.com/rbock/sqlpp11
So many more
>>
use std::collections::HashMap;
use std::hash::Hash;
extern crate sfml;
use sfml::graphics::{Texture, Font};

pub trait Resource: Sized {
fn new_from_file(filename: &str) -> Option<Self>;
}

impl Resource for Texture {
fn new_from_file(filename: &str) -> Option<Self> {
Texture::new_from_file(filename)
}
}

impl Resource for Font {
fn new_from_file(filename: &str) -> Option<Self> {
Font::new_from_file(filename)
}
}

pub struct ResourceManager<I, R> {
resource_map: HashMap<I, Box<R>>
}

i
mpl<I: Eq + Hash, R: Resource> ResourceManager<I, R> {
pub fn new() -> Self {
ResourceManager {
resource_map: HashMap::<I, Box<R>>::new()
}
}

pub fn load(&mut self, identifier: I, filename: & str) {
let resource = R::new_from_file(filename).unwrap();
self.resource_map.insert(identifier, Box::new(resource));
}

pub fn get(&self, identifier: I) -> &Box<R> {
match self.resource_map.get(&identifier) {
Some(resource) => resource,
None => panic!("Tried to access nonexistant index in resource map")
}
}
}

#[derive(PartialEq, Eq, Hash)]
pub enum TextureIdentifiers {
Nebula,
Rocket
}
#[derive(PartialEq, Eq, Hash)]
pub enum FontIdentifiers {
Arial
}

pub type TextureManager = ResourceManager<TextureIdentifiers, Texture>;
pub type FontManager = ResourceManager<FontIdentifiers, Font>;


r8 h8
>>
>>54923562
Will take a look, thank you
>>
I'm sidestepping recaptch@ with phantomjs.
Fuck g00gle kikes.
>>
>>54922046
Why don't you post the pretty and faster version, you retarded mongrel?
import Data.List (unfoldr)
import Control.Applicative ((<$>))
import Control.Monad (replicateM_)
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C

parse :: ByteString -> [Int]
parse = unfoldr $ C.readInt . C.dropWhile (== ' ')

solve :: [Int] -> Int
solve xs = foldl go (const 0) xs minBound
where go f x s = if s < x then f x else s - x + f s

main = do
[n] <- parse <$> B.getLine
replicateM_ n $ B.getLine >> B.getLine >>= print . solve . parse
>>
>>54924024
(You)
>>
>>54924082
>the pretty and faster version
>written by a non-retard instead of a typical Haskell user
>>
>>54924187
t-thanks :3
>>
File: z10615819Q,Yerba-mate-w-tykwie.jpg (41 KB, 560x447) Image search: [Google]
z10615819Q,Yerba-mate-w-tykwie.jpg
41 KB, 560x447
>>54917572
>>54917614
>>54917619
>>54917712
Any clues about yerba? I find it very trending in my office where 1/3 of around 200 workers walk with that damn yerba mug.
They even convinced our Boss to put it into office kitchen just as tea/coffee so people dont have to bring their own to work.

I'm curious about it. Any long term side effects? is it healthier than coffee? Or is it just hipster fashion.
>>
File: smuggo01.jpg (105 KB, 551x600) Image search: [Google]
smuggo01.jpg
105 KB, 551x600
MFW my node.js scripts process gigabytes of data

MFW I wrote a multithreaded search engine parser that can run 300 parallel requests
>>
I gave up on making my web file manager modular. I ended up with a MVC like framework and spaghetti code. So no modular magic for now.
>>
File: Screenshot_2016-06-05_16-22-18.png (914 KB, 602x625) Image search: [Google]
Screenshot_2016-06-05_16-22-18.png
914 KB, 602x625
>>54914382
I'm working on a simple 2D warfare game (or more likely simulation as I want dot to fight on their own) currently being inspired by napolenic wars. (muskets, bagnet fighting etc.)

Fun to watch your own anmations to move ad kill each other.
>>
>>54922547
Pad zero bytes onto the end, then convert.
>>
>>54924751
Cool. I like simulations, it's an infinite hobby.
>>
How do you find exercises for a language?
I'm learning java SE since two weeks and i'm trying to find exercises that are in my reach but i somehow found dickall.
>>
>>54925066
All languages are broad.

The best resource is not one resource, but at least 2.

Find a beginners tutorial, as well as a tutorial that is specific to your current programming desire.

Attempt to program parts of that desire using the specific tutorial, falling back to the general beginner tutorial/reference when you get stuck with a particular programming construct.
>>
>>54919296
>Dereferencing nullptr will always give a fatal error.
false
>>
File: oop masterrace.jpg (45 KB, 500x225) Image search: [Google]
oop masterrace.jpg
45 KB, 500x225
reading sicp is making me want to go back to OOP again... like right now i'm reading about functions (define (right-branch tree) (caddr tree)) to get the right branch of a BT and i looked up caddr and it's defined as (car (cdr (cdr x))). in java i could just make an object with a left branch right branch and value fields.. i need to be reminded why OOP is bad remind me
>>
>>54923582
>*Manager
>it's a pointless wrapper for a data structure
Every time.
>>
>>54924582
>MFW my node.js scripts process gigabytes of data
>things that happened
>>
>>54924473
100% trendy fashion bullshit, it's just another caffeine delivery mechanism
>>
>>54925269
I have done even 10 GB, anon.
>>
>>54925066
i can give you some exercises right now
1) count from 1 to 100, if the number is divisible evenly by 3 print fizz, by 5 print buzz, by both 3 and 5 fizzbuzz, and by none of the abother then the number (hint: modulo)
2) make a function that prints the circumference, diameter, and area of a circle given a radius
3) make a function that returns the value of the number in the fibonacci sequence at a given index (1 returns 1, 2 =1, 3 =2, 4 = 3, 5 = 5, 6 = 8, etc)
4) make a function that returns the coordinates of the midpoint of a line
5) make a function that finds the square root of a number

i do these types of exercises in every language that i'm learning and keep them on hand for reference. i'm slowly building up a code bank of sorts. if i'm working on a project and need a square root function i can just search square root + language and copy and paste the function into my project
>>
>>54925344
Anything can parse data given infinite amount of time.
>>
>>54920788
>A memory address IS an integer
wrong
>>54920844
>A memory address is integral
wrong
>>54920951
>long is a stupid type
not more or less than the rest of them
>code that assumes
that's a problem with the code tho
>>54921066
>Consider that this is completely valid:
no, it's undefined behavior
>>54921120
>(u)intptr_t would be the ideal way of doing things
it can't be ideal because it's optional
>while on 64-bit Windows
>the entire problem could have been avoided by just using ssize_t
ssize_t is a posix type and wouldn't help you anyway on windows
>>54921816
>If the pointer is set to nullptr, it's guaranteed to cause a fatal error if you dereference it.
false, there's no such guarantee
>but it's a very good practice to get into
it's cargo cult
>>54921944
>Weak typing is this
no, that's undefined behavior, you're just a retard as usual
>>
>>54925373
The point is, node.js is very past. V8 is magic technology.
>>
>>54925441
fast
(^:
>>
>>54925441
>magic
yes, jscucks are known for not being capable of understanding how things work
>>
>>54925459
>using the smiley face with the carat nose
go back to redchan
>>
>>54925441
Fast is relative. It's still insanely slow compared to C, C++ and Rust.
>>
>>54925491
if you want speed, use assembly. if you want power, use a lisp dialect. if you use any language other than assembly or lisp you're a peasant and you should get off of my dpt

prove me wrong
>>
>>54925511
>if you want speed, use assembly
Compilers can produce more efficient assembly than most people
>>
>>54925486
I understand how dynamic language compilers work, but I also understand how enormous of engineering feat V8 is. The fact that all this complexity works precisely as intended is magical.

>>54925491
In my benchmark JS is only 4 times slower than C++/gcc -O3.
>>
>>54925511
Does that mean you're a peasant?
>>
>>54925421
nullptr do serve a purpose as it always cast to a pointer so you don't accidentally call the int specialization of a template or shit like that.
>>
>>54925491
Not him, but modern benchmarks pit JS as being just as fast as C++ when executing tasks millions of times due to AoT compilation.

I dont check its comparisons to C, etc as often, but with V8, its like C++ but development time is quicker
>>
>>54925534
>magical
>only
called it
>>
>>54925667
Most workloads are io bound nowadays
>>
>>54925589
>non-sequitur
>>54925607
>due to AoT compilation
apparently you don't know what AoT means
>with V8, its like C++
not at all
>>
>>54925692
>backpedaling
of course
>>
File: prewrfs.png (11 KB, 721x391) Image search: [Google]
prewrfs.png
11 KB, 721x391
>>54925421
>>A memory address IS an integer
>wrong
>>
>>54925765
They didn't say it's an unsigned integer :%)))))))))))))))))))))))))))))))
>>
>>54925779

wow my dude
Thread replies: 255
Thread images: 35

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.