« first day (1135 days earlier)      last day (3808 days later) » 

user1804599
8:00 PM
@rightfold (Also, j/k I have never used Liquid before in my entire life.)
 
vOv help is help
 
user1804599
 
do I assign with single equals?
 
user1804599
Yup.
 
hmm... 'unkown tag had_first'
 
8:02 PM
What is a listbox?
 
user1804599
Welp.
 
user1804599
github.com/Shopify/liquid/wiki/Liquid-for-Designers describes the syntax at the very bottom of the page.
 
user1804599
@Pawnguy7 STFU.
 
yeah! all working now
thanks guy
 
user1804599
no problem guy
 
user1804599
8:05 PM
What was wrong with the assignment?
 
now, to make popcorn :D
 
Hm?
 
@rightfold yeah, saw the page, didn't see that bit
 
user1804599
olol
 
@rightfold I think I messed up the end* bits, and was not say 'assign ' each time... I think
 
user1804599
8:07 PM
How do you solve the problem with the whitespace before the period?
 
user1804599
I would use comments to keep it readable.
 
kind of annoying that you have to write {% if had_first %},{% else %}{% assign had_first = true %}{% endif %} and not {% if had_first %},{% else assign had_first = true endif %}
@rightfold erm, I started with a white space, rather than ended
also seems you have to careful to not have whitespace (new lines) between liquid tags
 
user1804599
Meh.
 
user1804599
This should be readable enough I guess.
 
I just have it as online...
seems to be very finicky about white space
 
user1804599
8:10 PM
I’m afraid it has to be this:
 
user1804599
{% assign had_first = false %}
{% for post in site.posts %}{% if post.my_option %}{% if had_first %},{% endif %}{% assign had_first = true %}{{ post.title }}{% endif %}{% endfor %}.
 
user1804599
In Django templates you have control of whitespace.
 
@rightfold can't have even the two lines, else you end up with the list not being after the bit of non-template stuff that says what this list is :S
it's not too bad though.
 
user1804599
Welp, maybe this:
 
Uh what is that 'had_first' for
 
8:12 PM
it'll do :P
 
Use forloop.first
 
@CatPlusPlus I can't just use 'forloop.first' as it's not just 'is it the first item in the loop' but the first that meets my criteria.
 
Uh why
 
user1804599
{% assign had_first = false %}
{% for post in site.posts
  %}{% if post.my_option
      %}{% if had_first %},{% endif
      %}{% assign had_first = true
      %}{{ post.title
  }}{% endif
%}{% endfor %}.
 
Filter the list first
Yey 22 slides full of crap
Now I have to figure out narration
 
user1804599
8:15 PM
What is it about?
 
And have 30 minutes of content
P2P
 
user1804599
I once had to give a presentation about cookies.
 
Mostly BT because it's so obvious
 
Thesis or something?
 
Seminar
I don't know if I should be happy or sad that this isn't the most pointless thing I've done for uni to date
 
8:17 PM
is it a big audience?
I wanna go and watch it :)
13 hours drive by car
 
@H2CO3 Where did I say that I was encouraging it? The question asks is a do-while loop faster than a while loop. And I answered the question by saying it can be faster. I didn't say by how much. I didn't say whether it was worthwhile. I didn't recommend anybody to start converting to do-while loops. But simply denying that there is a possibility of an optimization, even if it's a small one, is in my opinion a disservice to those who do care are interested in these things. — Mysticial 58 secs ago
 
last sentence reads weird
 
Geez... This time, I'm the one on the receiving end of H2CO3...
 
@Rapptz fixed
 
8:21 PM
while (check_which_takes_365_days()) { ... } // if the condition requires 365 days to evaluate, then you can win a year by making it do-while
 
user1804599
 
@Jefffrey what does it say?
 
user3010322
@Mysticial H2CO3 sometimes gets a really big stick up his butt sometimes.
 
@Pawnguy7 That a bitboard is basically a std::bitset with Cols * Rows bits.
 
user3010322
I just wish he'd be homosexual, so he could enjoy it rather than bitch at everyone. =l
 
8:25 PM
@CatPlusPlus how do?
 
@Jefffrey I don't know, I cannot read it
 
@rightfold cool
@Mysticial Maybe you should just add that it can be slower as well :/
 
@sehe IBH, I've never actually observed a do-while to be slower than a while in a practice.
My hypothesis is that a do-while has strictly fewer instructions than a while-loop.
 
I don't see how a do while can be slower
 
@Mysticial Well. It always depends. A natural while loop is bound to be as fast or faster than the force do-while equivalent. And with a smart compiler there ought to be no difference
 
8:29 PM
And if stuff like instruction alignment gets in the way, most modern compilers are able to pad it out with nops.
 
And by natural I mean, the kind of loop that needs to check the loop condition before first entry
 
user1804599
do-while needs an extra goto at the beginning. :D
 
@sehe That makes it wrong, not slower.
 
@rightfold it does?
 
@R.MartinhoFernandes or both. Style is not the issue now. We're talking about academics of optimization-in-the-sky
 
user1804599
8:31 PM
@jalf dunno.
 
user1804599
I was thinking about a particular possible silly implementation.
 
@sehe Who cares if different code runs slower.
 
user1804599
begin:
    …
if (…) goto begin;
 
@rightfold possible silly implementations may need an unbounded number of additional instructions
 
I can just as well say that a while loop that sleeps for three days after each iteration is slower than one that doesn't.
 
8:31 PM
that's what's make them silly
 
@R.MartinhoFernandes Nah. I mean if (condition) do {} while (condition). Pfft
 
@Pawnguy7 Here.
 
@R.MartinhoFernandes Sounds about the same as turning off optimizations. :P
 
It's a ~~purformance~~ themed question. Why on earth did you assume rationality :)
 
8:32 PM
the icon is badly named?
Oh golly gee, I just noticed a box saying under the chat room name. I wonder what that could possibly mean
 
2 messages moved to bin
 
@Jefffrey fancy bitboard :D
 
It's posted in the wrong place
 
@jalf It means this room is for asking questions about the concept of "no".
 
@Pawnguy7 Yeah, I found out that it's useless, so I've just spent 15 minutes writing that for nothing. :D
 
8:34 PM
Fun Fact: If you want to post a question to the bin and you don't have write access, the fastest way to do so is to post it in Lounge<C++>.
18
 
@Jefffrey Why not just, say, std::array<std::array<bool>>?
 
@user3024598 You can't read, can you?
 
@StackedCrooked Oh... So if I had questions abount icons and listboxes, this would not be the correct place, you mean, because those do not relate to the concept of "no"?
 
@Pawnguy7 std::bitset is sexy.
 
How interesting
 
8:35 PM
1 message moved to bin
 
Ell
ahhh
my house is grim
 
@jalf Exactly.
 
user1804599
Just leave.
 
..already.
 
@Jefffrey why are you making your own then?
 
user3010322
8:36 PM
WOOO
 
user3010322
I BROKE THE NOVEMBER CTP 2013 !!
 
user3010322
internal compiler errors, yay~
 
@Pawnguy7 Because mine is 2 dimensional :)
 
meh. slow poke
 
user3010322
template <typename T, typename U>
	T maybe_or( const optional<T>& op, U&& defaultvalue ) {
		typedef unqualified<decltype( defaultvalue )>::type return_t;
		return maybe( op,
			detail::pass( ),
			[ ] ( ) -> return_t { return defaultvalue; } );
	}
 
user3010322
8:36 PM
^ That broke it.
 
@Jefffrey hrm. So, what was time wasting about it?
 
@Pawnguy7 That I don't need the bitboard at all.
 
@ThePhD Needs typename, btw.
 
@Jefffrey what do you need?
 
user1804599
@ThePhD Ugh Phantom Derpstorm Parentheses.
 
8:37 PM
@Pawnguy7 Love. Love is all need ;)
 
user3010322
Spacing in parenthesis is nice. <3
 
user3010322
But VS still can't handle my true preference
 
user3010322
Or, it can, mostly.
 
@Pawnguy7 Just std::bitset.
 
user3010322
It's still placing parenthesis for declarations and definitions next to the operator name (maybe_or( <---- FROWNY FACE)
 
user3010322
8:38 PM
Which means I can't grep for a declaration by checking for a space after the name
 
@Jefffrey your not Scott
@Jefffrey are you making fake 2D arrays?
 
@Pawnguy7 yup
 
user3010322
@R.MartinhoFernandes Yeah, I added it but it still breaks. q_q
 
@Jefffrey So you are wrapping it somehow?
 
@Pawnguy7 Yup, with the terrain class that needs it.
 
8:39 PM
@Jefffrey Wasn't the point of bitset to not be wrapped?
 
@Pawnguy7 Not to be wrapped in bitboard which was wrapped in terrain anyway.
 
user3010322
You can capture things by move, right?
 
It took me like half an hour to make this diagram. Why are simple things often so complicated?
 
@FredOverflow because you decided to do it on a computer? :p
 
@jalf probably, yes :)
 
8:42 PM
you could've done it in a minute on paper ;)
 
@FredOverflow Either you are using the wrong tool or there is no good tool for this?
 
And because you don't do it every day.
 
@FredOverflow bad tools
 
user3010322
Finally, a great use for def_window_proc
 
user3010322
<3 optional
 
user3010322
8:42 PM
Now I don't need 20 if-statements in my code
 
@Jefffrey I thought the beauty of it was like raw arrays and bitwise stuffs :D
 
user3010322
auto defwindowproc = [ hwnd, umsg, lparam, wparam ] ( ) { return DefWindowProcW( hwnd, umsg, wparam, lparam ); };
w32message.result = maybe_gen( handlecode, defwindowproc );
 
@jalf Paper <3
 
@ThePhD why do I get this terrifying sinking feeling every time you're excited about some of your code?
 
user3010322
@jalf Oh come on, the snippet I've shown you isn't even harmful. :c
 
Ell
8:43 PM
@FredOverflow challenge accepted!
 
@Pawnguy7 Eh, in a way it is, internally. What matters is that the public interface of terrain doesn't show any bitset (which is the implementation).
 
@ThePhD Yeah, but I said I get that feeling when you express excitement about your code, not when I actually see the code
 
user1804599
@FredOverflow It would have taken me two hours, because I’d first have to read about how sine and cosine work and what they are used for.
 
wot
 
user3010322
@jalf I get excited about a lot of good and wonderful things!
 
8:44 PM
@rightfold Have you never done any 2D graphics?
 
user1804599
Nope.
 
user3010322
Gasp.
 
you never took basic trig?
 
user3010322
LE GASP.
 
user1804599
We never got this in high school. vOv
 
8:45 PM
oh
that's a right triangle showing the Pythagorean identity.
 
Ell
soh/cah/toa
 
@Jefffrey Ah, but the entire point was the interface, was it not? You said it yourself, memory and speed aren't issues.
 
TIL: rightfold knows the state monad, but no trigonometry.
 
We got it in grade 6 or something (and I honestly feel my math education is severely lacking)
 
@FredOverflow Might have been a little easier if you'd drawn it the traditional way (alpha at center of circle, sin(alpha) as the height and cosine(alpha) as the base of the triangle).
 
8:46 PM
@rightfold Woah
 
@user3024598 we love your code
It's just so sexy
 
garbage
 
@JerryCoffin Easier for me or the reader?
 
user1804599
When I was in fourth year of high school they taught us how to add and multiply rational numbers. :V
 
really?
that sucks. :|
 
user1804599
8:47 PM
That shit is taught in elementary school and most people couldn’t do it.
 
user1804599
But useful stuff like trigonometry? Nope.
 
user3010322
@DeadMG you know, this casting shit is having a really bad impact on my code I think. And it's also really flooding my output window. =[
 
Speaking of useful things to know.
What the purpose of tan2 is :\
 
user3010322
And it's just 20000 of that
 
user3010322
First-chance exception at 0x76B44B32 in Snake.exe: Microsoft C++ exception: Furrovine::Native::Win32Message * at memory location 0x002AE774.
 
user3010322
8:49 PM
All in my output window
 
@Rapptz Well, this is priceless though :D
 
@Jefffrey anyway, if you ever want AI, I have a one-move AI
 
user3010322
I wonder if there's a way to get Microsoft to shut up about exceptions unless they're actually uncaught.
 
@Pawnguy7 I don't think so, but thanks :)
 
user1804599
@FredOverflow State monad is quite simple. vOv
 
8:50 PM
@rightfold I'm pretty sure you'd be able to figure out trigonometry in like five minutes.
 
2 minutes to write.
10 minutes to read.
 
user1804599
@FredOverflow gimme five minutes.
 
@user3024598 Bye bye.
 
@Jefffrey think I need an instructions screen?
 
user1804599
 
user1804599
8:51 PM
So if I divide the length of the opposite by the length of the hypotenuse, I get the sine of the angle?
 
lol sinus
 
user1804599
Dutch terminology.
 
sinus & cosinus !
 
same in German
 
Seno e coseno.
 
8:52 PM
:13129104 You spending two minutes on something does not mean we have to look at it
 
The cool thing about the italian version of sinus (seno) is that it also means "breast".
 
user1804599
 
you were doing so well earlier, with the not-bothering-us-with-irrelevant-questions thing. Don't throw it all away now
 
user3010322
Diagram making is truly an art.
 
> So i can't ask someone to help me fix my code? Thats nice, because i see people all day asking questions and asking you to fix their code and you're doing it without telling them anything. You know what? FUCK YOU! "The lounge" is for having fun... what fun are you having you stupid fking misanthropes? Go suck your dad's dick.
> Don't help newcomers because you don't know how, instead tell them to get the fuck out of here b4 you get all badass and start insulting them. That's a goodbye "programmers" i wish you a fucking bad day.
lol, what programming language is that? :)
 
8:53 PM
@jalf He won't bother us for a while now.
 
4 mins ago, by Jefffrey
@Rapptz Well, this is priceless though :D
 
I saw that enough times already.
 
user3010322
@FredOverflow Madcuzbad#
 
@rightfold Yeah, and inside the unit circle, the hypotenuse is 1.
 
Ell
okay I finished my diagram but it wont upload :(
 
8:56 PM
@rightfold Nice colors. What tool did you use?
 
user1804599
@FredOverflow Wikipedia.
 
user1804599
> sin(45.0 * System.Math.PI / 180.0);;
val it : float = 0.7071067812
> 5.0 / 5.0;;
val it : float = 1.0
 
user1804599
Okay, I suck at trigonometry.
 
Ell
@FredOverflow I would have used inkscape
 
8:57 PM
@rightfold Why do you divide 5 by 5?
 
Ell
as well as an online latex thing to generate svgs
 
user1804599
@FredOverflow Lengths of the opposite and the hypotenuse?
 
@rightfold What's wrong? The sin of 45° is exactly that one.
 
They can't be the same length, the triangle would be invisible.
 
user1804599
A triangle with a hypotenuse of five and an opposite of five is perfectly visible.
 
8:58 PM
You're confusing hypotenuse with adjacent.
 
user1804599
Opposite, not adjacent.
 
user1804599
Oh wait, right.
 
user1804599
:P
 
Ell
it's an equilateral triangle
 
If you divide those two (I forgot the order), you get tan.
 
Ell
8:59 PM
do you guys not learn "soh-cah-toa"?
 
Ell
as in, you learn sin(theta) = o/h etc. by learning to say it out loud?
 

« first day (1135 days earlier)      last day (3808 days later) »