logs archiveChat DB / Freenode / #programming / 2015 / November / 5 / 21
Anduin
Right, it breaks out of the switch. The problem is, given an input other than 0-9, it never goes INTO the switch case, and therefore can't break.
Twey
thecha: I don't know, depends how complicated PE's interface is
thecha
ther is only two entry fields
Twey
Probably less than two hundred
thecha
and the top one is always the one for the soution
Anduin
for some reason, deafult doesn't catch it (probably because letters are different from ints, which is what it looks for)
Twey
thecha: Unfortunately that's not very indicative
thecha
heh
twey just in a sentence how woudl you go about it
i mean what would your aproach be twey
Twey
thecha: If it's really simple, you could just use curl on the command-line, and it would be faster
thecha
if you dont mind my asking
ahhh
then same way peopel use curl to pastebin
i see
GeDaMo
Anduin: it is going into the default case but the problem is because your input is not the correct type (not an int) the the input stream doesn't move forward
Twey
thecha: It's probably just a POST request, so you can use cpp-netlib or similar to POST to it. If you need to log in or something first, or there's CSRF, it gets more complicated: you have to perform login and form requests first, and use the results to figure out what cookies to send to the server with the request
Anduin
GeDaMo, what should I do then?
thecha
twey ahh
Twey
You can do the former with a single cURL command; the latter is a bit more complicated, since you have to do different things conditional on the output
Anduin
Is there anything like a string which can work for switch case? Or can I typecast it or something
thecha
thanks
adsc
Twey: so you would argue that mathematics is not science, because it is not empirical?
GeDaMo
Anduin: I don't know C++ well enough to recommend anything
Twey
adsc: Yes
GeDaMo
Anduin: there is no string based case
Twey
adsc: They're each useful to the other, but they're not the same thing  they stem from opposed branches of philosophy
Anduin: Instead, just check whether !cin.
adsc
Twey: what do you understand as "natural sciences"?
Anduin
Twey: I'll try that
Twey
Anduin: if (cin) then everything is fine, and you can proceed.
Anduin
Wait... what does !cin mean
I'm not exactly sure how to implement that
Twey
adsc: Empirical study of the natural world  biology, chemistry, physics
And various sub/crossfields thereof
adsc
Twey: and there are also empirical non-natural sciences?
boodllebat
Mathmetics is not science as it is just a representation of what we think science is , actually only thing available to represent scientific thoughts and it'll change if mankind finds something better
but logically math = science
adsc
it's a philosophical question if there is actually a different kind of mathematics, or "better" as you said
some believe mathematics are fundamental and were only "discovered"
jontxu
https://xkcd.com/435/
boodllebat
I have a weird question , i have few projects/ideas ( for learning purpose , they are all mine so no deadline/pressure ) so what is better for productivity working on one and moving to another after completing the first one or should i work on all of them concurrently ?
Twey
Anduin: int reply; std::cin >> reply; for (; !std::cin || reply < 0 || reply > 9; std::cin >> reply) std::cout << "Please enter a number from 0 to 9." << std::endl;
adsc: I think the natural sciences are usually contrasted with the study of artificial things, like computers. But I don't really know.
game
hi
Twey
adsc: There's a fair argument to be made that natural sciences covers anything that can be empirically tested, but I don't think that's common usage
adsc
Twey: it seems the distinction is between natural science and formal science, and the latter is always non-emipircal
Guest12590
anyone got a link about rpg battle systems
):
lemondom
isn't an axiom empircal, too?
Twey
lemondom: No, axioms are technically arbitrary
In practice we tend to choose them based on empirical considerations, but we don't *have* to: our logic would just be less useful for dealing with the real world
(but still a perfectly valid logic)
boodllebat
Twey: can you check out my question :) it would just take a second
Twey
And indeed we often choose different axioms for reasoning about different kinds of systems
Because we hope they will match the system better
lemondom
so empirical always realms in this world
Twey
boodllebat: Do one project at a time
boodllebat
Twey: you mean i should complete one project than move to another one right ?
GeDaMo
Guest12590: maybe ask in #gamedev
Twey
boodllebat: Well, it's tricky to tell when a project is really completed. In my experience, the best way to maintain high productivity seems to be to work on one thing until it is *usable*, then post it (e.g. on GitHub), where social pressures generally provide motivation to maintain and improve it
adsc
Guest12885: Rolemaster has a cool battle system
Twey
boodllebat: But my productivity is terrible, so I'm mostly passing on what I've seen other, more productive people do.
GeDaMo
adsc: wrong guest
adsc
oh fu*k
GeDaMo
The other one left
boodllebat
Twey: :)
adsc
yeah, seen it
it's why my tab completion failed
pewpau
lmao! https://www.youtube.com/watch?v=E2evC2xTNWg
GeDaMo
Or succeeded incorrectly :P
adsc
Twey: a project is finished when it meets all predefined goals
Anduin
Visual studio just broke and is telling me everything is ambiguous... argh...
Twey
adsc: Unfortunately the goalposts tend to move. Even if you don't suffer feature creep, the underlying technologies shift under your feet so that you have to continuously maintain it.
boodllebat
adsc: what do you think , complete one then move to another or work concurrently ?
abs25
anyone knows any web dev channel?
adsc
Twey: well, maintenance doesn't mean a project isn't completed
Twey
abs25: ##web
abs25
tnx Twey
Twey
adsc: Well, perhaps.
adsc
boodllebat: if you want to get stuff done, you do one after the other
Twey
abs25: And more specific channels, like ##css, ##javascript, &c.
abs25
Twey, its empty haha
Twey
##html
abs25
any sql or web security ?
Twey
abs25: Oh, sorry, it might still be #web
SQL at ##sql
boodllebat
abs25: ##sql
Saturn1
Heya, can anyone help me out? What does %s do/mean in Python?
Twey
Ugh, #sql
boodllebat
Saturn1: format specifier
Twey
Saturn1: It's a deprecated format specifier
boodllebat
Saturn1: google python format specifiers
abs25
boodllebat, thanks
pyon
Saturn1: In what context?
Saturn1: Are you talking about something like this? `"%s and %s" % (foo, bar)` ?
stoopkid
so, singular objects, like from OOP are ubiquitously represented by key-value pair lists, so it seems this is perhaps their most 'natural' representation, at least from a programming perspective.. would anybody agree with me there?
Denommus
pyon: is it possible to match block comments in the lexer level, or do I need to go to the parser level?
pyon
Denommus: What tool are you using to write your lexer?
vendu
hey guys :)
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 next »