Automatic commit of irc logs
[ipdf/documents.git] / irc / #ipdf.log
1 --- Log opened Mon Mar 17 12:20:15 2014
2 12:20 -!- matches [[email protected]] has joined #ipdf
3 12:20 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
4 12:20 -!- Irssi: Join to #ipdf was synced in 0 secs
5 12:20 -!- sulix changed the topic of #ipdf to: Angry Strawberry Summer
6 12:20 -!- mode/#ipdf [+o matches] by sulix
7 12:39 <@sulix> This is sensible discussion about the project.
8 12:39 <@matches> The suspense
9 12:39 <@sulix> Anyone up for lunch?
10 12:39 <@matches> Yes
11 12:40 <@sulix> drumroll...
12 12:41 <@matches> I don't think it worked
13 12:42 <@matches> Yes I did it manually
14 12:42 <@matches> Maybe cron is broken on motsugo
15 12:43 <@sulix> We shall find out next time at 12:40, I guess.
16 12:43 <@sulix> (Or the next time cron emails errors out, maybe)
17 12:52 <@matches> Let the record show that it didn't work because I didn't install the crontab
18 --- Day changed Wed Mar 19 2014
19 10:59 <@matches> Some guy asked me if he could use the whiteboard, so I let him rub out our timeline
20 10:59 <@matches> And all he did was write "hello world"
21 10:59 <@matches> >:(
22 19:10 <@matches> Testing
23 19:25 <@matches> So the IRC commits should have a different author
24 19:25 <@matches> So that I don't get a ridiculous number of daily IRC commits
25 19:26 <@matches> I could rebase the first three of them but I think that might break things
26 19:45 <@matches> Ok, and now it will only commit when there is more than one new line, so we won't get one every day when no one says anything
27 19:54 <@matches> Alright, and in theory
28 19:54 <@matches> If I spam this some more
29 19:54 <@matches> There will be a commit soonish
30 19:56 <@matches> Any second...
31 19:56 <@matches> Yes
32 19:56 <@matches> Now that is sorted out I can attain maximum productivity
33 19:56 <@matches> (Sorry)
34 --- Log closed Mon Mar 24 01:12:25 2014
35 --- Log opened Mon Mar 24 08:40:12 2014
36 08:40 -!- matches [[email protected]] has joined #ipdf
37 08:40 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
38 08:40 -!- Irssi: Join to #ipdf was synced in 3 secs
39 13:26 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
40 13:27 < matches> Uh oh
41 13:29 -!- Netsplit over, joins: @sulix
42 13:31 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
43 13:32 -!- Netsplit over, joins: @sulix
44 13:40 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
45 13:40 -!- Netsplit over, joins: @sulix
46 16:19 < matches> Well that will make a nice automatic commit
47 --- Day changed Tue Mar 25 2014
48 21:33 < matches> So, I am pretty much free all day tomorrow
49 21:33 < matches> Also Thursday
50 21:34 <@sulix> I'm pretty busy Thursday, but I'm free all tomorrow so long as I can get some maths done at some point.
51 21:34 -!- mode/#ipdf [+o matches] by sulix
52 21:35 <@matches> I'm supervising a test from 2-3pm but that's it
53 21:35 <@matches> So, I will try and get to UWA as early as I can
54 21:35 <@matches> It might be a good idea to have some kind of start on a code base
55 21:35 <@matches> Even though we're supposed to be focusing on a literature review, I don't really like not having any code done yet
56 21:36 <@sulix> Yeah. I agree.
57 21:36 <@sulix> Code + fixing git stuff + preparing for this "talk" on Friday.
58 --- Day changed Wed Mar 26 2014
59 11:32 <@matches> I am in the super secret room
60 11:36 <@sulix> Okay, I'll head in shortly. Had a small "parents fell for a scam email and entered passwords on dodgy websites" crisis here this morning.
61 11:37 <@matches> Oh dear
62 11:42 <@matches> The phone is ringing :O
63 11:43 <@matches> Phew, it stopped
64 22:42 <@matches> I think I have a way to do tests in the Makefile without using cmake
65 22:42 <@matches> You can alter a variable for a target
66 23:20 <@matches> Well, that ended badly
67 23:21 <@matches> With me erasing my own Makefile using make
68 23:21 <@matches> :P
69 23:24 <@sulix> Better than erasing the source code, I guess.
70 23:34 <@matches> This is why we have git
71 --- Day changed Thu Mar 27 2014
72 00:15 <@sulix> Crazy templated loading and saving!
73 00:15 <@sulix> And now for bed!
74 00:30 <@matches> Well
75 00:30 <@matches> It doesn't break the test
76 01:22 <@matches> We now have an arbitrary precision float
77 01:22 <@matches> Where in this case arbitrary precision means I have no idea what the precision is but it is very bad
78 01:35 <@matches> Ok I think I made a half precision float
79 01:35 <@matches> They are quite bad
80 01:36 <@matches> Um, I can probably make a graph of it being terrible as my contribution for Friday
81 01:36 <@matches> Assuming I've done it right
82 --- Day changed Wed Apr 02 2014
83 09:41 <@matches> Dammit codejam is coming up again
84 09:41 <@matches> There goes productivity
85 09:42 <@matches> If you are not busy this afternoon we should do work
86 09:42 <@matches> On the project I mean
87 09:45 <@matches> Although it is tempting to just practice codejam problems for the next week
88 12:44 <@matches> If I work on the project it will help when the inevitable "64 bits is not enough" problem comes up!
89 12:45 <@matches> Maybe
90 --- Day changed Sun Apr 06 2014
91 13:40 <@matches> I get the feeling my part of the project could just be "typedef Real to something from boost"
92 14:15 <@matches> I suppose I could talk about FPU and hardware
93 --- Day changed Mon Apr 07 2014
94 21:42 <@matches> I had a horrible horrible thought... implement a FPU in VHDL and then somehow run all our floating point operations on it :P
95 21:42 <@matches> (This is not a good idea at all but it might be fun)
96 21:42 <@matches> You know, for some definition of fun
97 21:44 <@matches> So my lit review will probably be 1) We need higher precision documents because science (Pixels or Perish) 2) This is how FP works in hardware 3) This is how you can get higher precision in software
98 21:45 <@matches> Oh, and 4) Document formats and rendering them (PDF/PostScript etc)
99 21:46 <@matches> That is starting to sound suitably ridiculously broad?
100 21:46 <@matches> Can always cut things out I guess
101 21:47 <@matches> To reflect what we actually end up doing
102 22:05 <@sulix> From what Tim was saying, I don't think "too broad" is a possibility.
103 22:05 <@sulix> We could be talking about Aztec history and it'd probably not be "too broad."
104 22:05 <@sulix> I do need to remember to read "Pixels of Perish," though.
105 22:19 <@matches> I'll have a look into VHDL stuff, there seem to be compilers and simulators for linux
106 22:20 <@matches> For a minute I was afraid I'd have to use the UWA EE VHDL environment
107 22:20 <@matches> Which is like, running a Java program in a Windows XP VM
108 22:20 <@matches> I heard you liked simulations of hardware so I simulated some hardware in your simulated hardware
109 --- Day changed Tue Apr 08 2014
110 10:46 -!- Netsplit arctic.uniirc.com <-> mits.mits.au.uniirc.com, services.uniirc.com, irc.cassa.au.uniirc.com, mussel.ucc.au.uniirc.com quits: @sulix
111 10:46 -!- Netsplit over, joins: @sulix
112 11:31 <@matches> The "Experiment Running" sign seems to have worked
113 11:31 <@matches> Also open source VHDL stuff is less "actually compiles" than I had hoped
114 11:32 <@matches> The two I've tried so far seem to generate absolute monstrosities of C or C++ files and then fail to compile and/or link
115 --- Day changed Wed Apr 09 2014
116 15:27 <@sulix> So I've been hitting my head against my desk for about half an hour trying to work out where some bugs were in some ipdf code I'm writing.
117 15:27 <@sulix> Turns out to have mostly been precision issues due to the lack of precision in your Real data type.
118 15:28 <@sulix> Switching it to double fixes them all.
119 15:32 <@matches> Oh
120 15:32 <@matches> Sorry
121 15:37 <@sulix> Nah: it's good. It means that precision actually is important!
122 15:37 <@sulix> (I was getting a little bit concerned for a while :P)
123 15:40 <@matches> Well
124 15:40 <@matches> I have rediscovered just how awful VHDL is
125 15:41 <@matches> It seems like you can't define anything without typing it three times
126 15:42 <@matches> You define an entity
127 15:42 <@matches> Then you define a component with identical ports
128 15:42 <@matches> Then you tell it to use the entity for that component
129 15:42 <@matches> Then you tell it to map the identical ports to the entity ports
130 15:42 <@matches> adder_0 : adder port map (a=>a, b=>b, cin=>cin, s=>s, cout=>cout);
131 15:44 <@matches> Pretty much all the hardware papers I found talk about using VHDL for things
132 15:46 <@matches> Let's see if I can make any sense of this jop-devel thing that appears to be a JVM implemented in VHDL
133 15:47 <@matches> Uh oh, .bat files
134 15:48 <@matches> This looks ominous
135 15:51 <@sulix> The whole swapping out main thing breaks the makefile in a few ways btw.
136 15:51 <@sulix> Because none of main.cpp's dependencies are listed.
137 15:51 <@matches> Ah
138 15:51 <@sulix> So if you change main.h, nothing gets recompiled.
139 16:02 <@sulix> Okay, just pushed support for click+drag and zoom in and out in the viewer.
140 16:03 <@sulix> (I did change the default precision to single, rather than half, as zoom out was totally broken with half-precision)
141 16:05 <@matches> The half precision implementation is broken itself anyway
142 16:07 <@matches> Hmm
143 16:07 <@matches> I can't seem to compile anymore
144 16:07 <@matches> Hang on
145 16:07 <@matches> That would be because `uname -i` reports "unknown"
146 16:12 <@matches> I have made unknown default to x86_64 :S
147 16:13 <@matches> I can see the precision issues! Good work
148 16:14 <@matches> These lecture notes seem useful: http://www.cs.berkeley.edu/~demmel/cs267/lecture21/lecture21.html
149 16:14 <@matches> Lecture notes > Blog post in terms of suitable reference?
150 16:16 <@sulix> It's got fortran in it, it must be suitably acedemic.
151 16:18 <@matches> Haha
152 16:18 <@matches> The VHDL compiler I am experimenting with uses Ada
153 16:18 <@sulix> I'm getting my fill of new languages by trying out some c++11 features.
154 16:20 <@sulix> I think I broak realtofloat by changing things to be single precision by default.
155 16:22 <@sulix> (Hopefully fixed)
156 16:49 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
157 16:49 -!- Netsplit over, joins: @sulix
158 16:54 <@matches> What's with the netsplits
159 16:55 <@matches> You're on mussel? I'm on mantis? They are VMs on the same host?
160 16:55 <@matches> I don't know what this uniirc nonsense is
161 16:56 <@matches> What is "arctic"
162 16:56 -!- matches changed the topic of #ipdf to: Happy Bannana Netsplit
163 17:33 <@matches> Well I compiled the VHDL FPU
164 17:33 <@matches> It seems to work quite well
165 17:33 <@matches> Except for the part where it never actually finishes an operation
166 17:34 <@matches> One of the virtual transistors must have overheated
167 17:43 <@matches> Oops it might help to actually give it a valid operation
168 18:27 <@matches> Alright, so I'm going to experiment with getting our Real operations to run on the virtual FPU
169 18:28 <@matches> Then I can look into both hardware and software ways of getting arbitrary precision.
170 18:30 <@matches> VHDL appears to have text I/O so I could make everything read and write from pipes, but this seems like a terrible idea
171 18:30 <@matches> On the other hand the compiler is using Ada
172 19:21 <@matches> Oh wow
173 19:21 <@matches> To open stdout
174 19:22 <@matches> You pass it a string "STD_OUTPUT" for the filename
175 21:40 <@matches> Ok, I give up trying to link this thing
176 21:40 <@matches> fork() and exec() is seeming more and more elegant
177 22:11 <@matches> Nooo, buffering
178 22:11 <@matches> Ok, screw this
179 --- Day changed Thu Apr 10 2014
180 00:00 <@matches> Note: Actually exec'ing the program instead of just going straight to "exit(EXIT_FAILURE)" is generally important
181 00:00 <@matches> Wall of text commit message incoming
182 00:01 <@matches> Horribly inefficient interface to virtual FPU sort of implemented
183 00:02 <@matches> I would have made it based on binary read/write rather than hex strings but I could not work out how to do that in VHDL
184 00:08 <@matches> I still can't believe what I have just done, it seems ludicrous
185 00:08 <@matches> Using an entire executable and stdio operations
186 00:08 <@matches> To do a floating point addition
187 00:10 <@matches> You should see how much is involved in compiling the VHDL FPU...
188 00:11 <@matches> I'm very pleased that it actually compiled from the version in jop's github without much effort, but still
189 00:11 <@matches> It's like 30 object files
190 00:11 <@matches> This is why it isn't in the code repo
191 00:19 <@matches> Whoops, there are some blatantly wrong comments in vfpu.cpp
192 00:19 <@matches> Oh well
193 --- Day changed Fri Apr 11 2014
194 13:38 <@matches> Warning! I am about to make a ipdf/vfpu repo
195 13:43 <@matches> You know what's really cool
196 13:43 <@matches> You can run it as `vfpu --vcd=output.vcd`
197 13:43 <@matches> And it will create a gtkwave file as it runs showing all the operations
198 13:44 <@matches> You only get the simulated time from the point of view of the device
199 13:44 <@matches> Which is probably useful
200 13:46 <@matches> Or it would be if I wanted to compare different devices
201 13:47 <@matches> To do that I need to actually make different devices...
202 17:12 <@matches> Would you prefer seperate repos for the individual reports or just sub directories in the documents repo?
203 17:12 <@matches> I can't decide
204 17:12 <@matches> On the one hand 5+ repos is getting a bit out of hand
205 17:12 <@matches> On the other hand they are individual work
206 17:24 <@matches> Individual seems best
207 20:31 <@matches> Hmm
208 20:31 <@matches> The sqrt op in the fpu appears to have been commented out
209 20:31 <@matches> Also despite having constants for the sizes of things they have just used magic numbers everywhere
210 20:34 <@matches> I need an IRC script to prevent myself from saying stuff unless someone else has said things, or this channel will just be me ranting
211 --- Day changed Mon Apr 14 2014
212 13:42 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
213 13:43 -!- Netsplit over, joins: @sulix
214 14:42 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
215 14:43 -!- Netsplit over, joins: @sulix
216 18:32 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
217 18:32 -!- Netsplit over, joins: @sulix
218 18:34 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
219 18:35 -!- Netsplit over, joins: @sulix
220 18:36 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
221 18:38 -!- Netsplit over, joins: @sulix
222 18:40 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
223 18:41 -!- Netsplit over, joins: @sulix
224 18:41 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
225 18:43 -!- Netsplit over, joins: @sulix
226 18:45 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
227 18:45 -!- Netsplit over, joins: @sulix
228 18:46 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
229 18:47 -!- Netsplit over, joins: @sulix
230 18:54 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
231 18:56 -!- Netsplit over, joins: @sulix
232 18:59 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
233 19:00 -!- Netsplit over, joins: @sulix
234 19:03 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
235 19:04 -!- Netsplit over, joins: @sulix
236 19:07 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
237 19:08 -!- Netsplit over, joins: @sulix
238 19:10 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
239 19:10 -!- Netsplit over, joins: @sulix
240 19:13 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
241 19:13 -!- Netsplit over, joins: @sulix
242 19:15 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
243 19:15 -!- Netsplit over, joins: @sulix
244 19:17 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
245 19:18 -!- Netsplit over, joins: @sulix
246 19:21 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
247 19:22 -!- Netsplit over, joins: @sulix
248 19:23 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
249 19:23 -!- Netsplit over, joins: @sulix
250 19:26 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
251 19:26 -!- Netsplit over, joins: @sulix
252 19:27 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
253 19:29 -!- Netsplit over, joins: @sulix
254 19:30 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
255 19:31 -!- Netsplit over, joins: @sulix
256 19:32 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
257 19:35 -!- sulix [[email protected]] has joined #ipdf
258 19:35 -!- ServerMode/#ipdf [+o sulix] by mussel.ucc.au.uniirc.com
259 19:40 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
260 19:42 -!- Netsplit over, joins: @sulix
261 19:44 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
262 19:48 -!- sulix [[email protected]] has joined #ipdf
263 19:48 -!- ServerMode/#ipdf [+o sulix] by mussel.ucc.au.uniirc.com
264 19:54 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
265 19:54 -!- Netsplit over, joins: @sulix
266 19:54 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
267 19:54 -!- Netsplit over, joins: @sulix
268 19:55 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
269 19:56 -!- You're now known as 13VAAAAGJ
270 19:56 -!- Netsplit over, joins: @sulix
271 19:57 <@13VAAAAGJ> Why am I now known as 13VAAAAGJ
272 19:57 <@13VAAAAGJ> WHAT THE FUCK IS GOING ON
273 19:57 <@13VAAAAGJ> ARE WE UNDER ATTACK
274 19:57 <@13VAAAAGJ> Oh crap this is #ipdf
275 19:57 <@13VAAAAGJ> Um, disregard this bit of the totally project related conversation
276 19:57 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
277 19:57 <@13VAAAAGJ> I'd edit the commit script to censor the swear words, but effort
278 19:57 <@13VAAAAGJ> Oh dear
279 19:57 -!- Netsplit over, joins: @sulix
280 19:57 <@13VAAAAGJ> Hello
281 19:58 <@13VAAAAGJ> I think mantis might be dying?
282 19:59 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
283 20:00 -!- Netsplit over, joins: @sulix
284 20:01 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
285 20:01 -!- Netsplit over, joins: @sulix
286 20:04 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
287 20:04 -!- Netsplit over, joins: @sulix
288 20:05 <@13VAAAAGJ> Sigh
289 20:07 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
290 20:07 -!- Netsplit over, joins: @sulix
291 20:08 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
292 20:08 -!- Netsplit over, joins: @sulix
293 20:08 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
294 20:09 -!- Netsplit over, joins: @sulix
295 20:09 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
296 20:10 -!- Netsplit over, joins: @sulix
297 --- Log closed Mon Apr 14 20:11:29 2014
298 --- Log opened Mon Apr 14 20:18:05 2014
299 20:18 -!- matches [[email protected]] has joined #ipdf
300 20:18 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
301 20:18 -!- Irssi: Join to #ipdf was synced in 0 secs
302 22:04 < matches> Ergh
303 22:06 < matches> http://szmoore.net/ghdl.bug
304 22:06 < matches> Pretty
305 22:10 < matches> Looks like we'll be sticking with ASCII input files for the FPU
306 --- Log closed Mon Apr 14 22:29:33 2014
307 --- Log opened Mon Apr 14 22:44:34 2014
308 22:44 -!- matches [[email protected]] has joined #ipdf
309 22:44 -!- Irssi: #ipdf: Total of 1 nicks [1 ops, 0 halfops, 0 voices, 0 normal]
310 22:44 -!- sulix [[email protected]] has joined #ipdf
311 22:44 -!- Irssi: Join to #ipdf was synced in 12 secs
312 22:53 <@matches> Someone's VPS was compromised and killing our network
313 22:53 <@matches> For reference
314 22:53 <@matches> It affects this project because
315 23:07 <@matches> Argh
316 23:07 <@matches> So I thought I was being really clever
317 23:07 <@matches> I had files of type "bit" and everything
318 23:07 <@matches> Guess how a "bit" is represented...
319 23:08 <@matches> It's an ASCII "0" or "1"
320 23:09 <@matches> I guess I will just conclude that ASCII strings treated as hex is the only way
321 --- Day changed Wed Apr 16 2014
322 00:10 <@matches> I'm either about to perpetrate horrible things on your nice View class or give up and go to sleep
323 00:28 <@matches> Yeah... the problem is if we want to overlay objects rendered using different precision's over each other
324 00:28 <@matches> It leads towards templates
325 00:29 <@matches> And templates lead towards fear
326 00:29 <@matches> And fear leads towards anger
327 00:29 <@matches> And anger leads to hate
328 00:29 <@matches> I think
329 00:29 <@matches> Saving an image
330 00:29 <@matches> Recompiling the program
331 00:29 <@matches> Overlaying the image
332 00:29 <@matches> Is going to lead to less hate
333 00:30 <@matches> Otherwise pretty much every occurance of "Real" needs to be come a template
334 00:50 < sulix> So there are a couple of problems with doing that.
335 00:51 < sulix> - You'd need some way of storing objects of different precision. Possibly an extra "high-precision bounds" struct.
336 00:51 < sulix> - View also uses real for its internal bounds, which is where many of the problems appear.
337 00:52 < sulix> (I guess you could have a "high-precision viewport" as well.)
338 00:52 < sulix> - The actual upload of graphics data to OpenGL is done as 32-bit floats, no matter the type of real, as that's all OpenGL supports.
339 00:53 < sulix>   (At some point we'll have to actually do some view transforms on the CPU rather than just passing all of the bounds and viewport straight to OpenGL)
340 01:02 <@matches> Yeah I don't want to replace Real with templates
341 01:02 <@matches> That'd be horrible
342 01:03 <@matches> By the way, the introduction of SDL_Renderer in SDL2 is confusing
343 01:05 <@matches> I thought it was replacing Surface with Renderer and Texture
344 01:05 <@matches> But Surface seems to still be a thing
345 01:13 < sulix> Yeah: basically Surfaces are in CPU memory, textures in GPU memory.
346 01:13 <@matches> Right
347 01:14 <@matches> And renderers magically put stuff on surfaces/textures
348 01:14 < sulix> Yeah.
349 01:14 < sulix> So it basically represents the graphics card.
350 01:15 < sulix> But if you want to just use OpenGL yourself, you don't need to create a renderer at all.
351 01:15 <@matches> Ah, but the plot thickens
352 01:15 <@matches> I'm saving the window to a bmp
353 01:16 <@matches> Which requires a renderer
354 01:16 < sulix> Hmm... I'm not sure if that will work.
355 01:16 <@matches> It does
356 01:16 <@matches> It seems rather convoluted though to be honest
357 01:16 < sulix> (In theory, it shouldn't, but it probably actually does)
358 01:16 <@matches> I seem to remember it not being this convoluted in SDL1.2
359 01:16 <@matches> -_-
360 01:16 <@matches> So the procedure is
361 01:17 <@matches> 1. Get a surface associated with the window
362 01:17 <@matches> 2. Allocate buffer of unsigned char for the pixels
363 01:17 < sulix> Yeah, TBH I prefer SDL1.2's rendering API, but I generally just use OpenGL anyway.
364 01:17 <@matches> 3. Get renderer from the window (NB: Don't use SDL_CreateRenderer, only the (undocumented) SDL_GetRenderer works because the Window already has a Renderer because it has been created with an OpenGL flag)...
365 01:18 < sulix> In theory we should probably use glReadPixels.
366 01:18 <@matches> 4. Use the magical renderer power to put pixels into the pixel array
367 01:18 <@matches> 5. Create an RGB surface from the pixel array
368 01:18 <@matches> 6. Now you can call SDL_SaveBMP, congratulations
369 01:18 <@matches> What's this about a glReadPixels
370 01:18 <@matches> I was just about to commit this
371 01:19 < sulix> Well, you can use glReadPixels instead of steps 1,3 and 4.
372 01:19 < sulix> (This is what SDL is doing behind the scenes)
373 01:20 < sulix> Unfortunately, the SDL wiki is still down thanks to heartbleed. :/
374 01:20 <@matches> :O
375 01:20 <@matches> It was up when I looked at it before
376 01:20 <@matches> Throwing python exceptions when I tried the search function though
377 01:21 < sulix> Ryan said that it was up, but I'm still getting revoked certificate errors.
378 01:22 <@matches> Hmm, I needed to do step 1 in order to know the size of the pixel array in step 2...
379 01:23 < sulix> Screen::ViewportWidth(), Screen::ViewportHeight()
380 01:26 <@matches> Yeah this is looking a lot shorter than what I had
381 01:33 <@matches> It doesn't seem to work though
382 01:35 <@matches> I'm getting a segfault
383 01:35 <@matches> And of course valgrind automatically exits when it gets more than 1000000 errors from the flgrx driver
384 01:38 <@matches> First call to glReadPixels is OK but the bmp is just white, second call segfaults
385 01:39 < sulix> Hmm... what's the call?
386 01:44 <@matches> Segfault was due to me forgetting about the pixels needing 4 bytes for RGBA
387 01:44 <@matches> Still white though
388 01:45 < sulix> (That was going to be my guess)
389 01:45 <@matches> The advantage of getting the SDL_Surface
390 01:45 <@matches> Was that you just pass all the surf->format->format->stuff
391 01:45 <@matches> Everywhere
392 01:45 <@matches> Also makes it rather verbose
393 01:46 < sulix> The white screen might just be an fglrx bug.
394 01:46 <@matches> There we go
395 01:47 <@matches> No, it helps to remember that the pixels need 4 bytes for RGBA
396 01:47 <@matches> I have very selective memory
397 01:47 <@matches> I had to remember it for each line individually
398 01:47 <@matches> Right I guess it is slightly nicer now
399 01:47 <@matches> Although it has a bunch of magical "*4" everywhere
400 01:48 <@matches> I'm going to put this on Stack overflow as an alternative to the answer I was originally following
401 01:48 < sulix> Well, I'm going to attempt to sleep...
402 01:48 <@matches> Thank you for fixing my bug without seeing it :S
403 01:49 < sulix> I have far too much experience breaking glReadPixels...
404 01:53 <@matches> We need an easy way to compare our document rendering the same thing using a different Real and/or view representation
405 01:53 <@matches> Templates would only solve changing the Real and really they probably wouldn't actually solve it
406 01:53 <@matches> They'd just create nightmares
407 01:53 <@matches> Hmm
408 01:55 <@matches> Um
409 01:55 <@matches> Just looking at View::Render
410 01:55 <@matches> Why is there a seperate loop for each type of object...
411 01:56 <@matches> With "continue" statements for the other types in each loop
412 01:56 <@matches> Is this so you can just make one call to glBegin and glEnd...
413 01:56 <@matches> I am suitable scared
414 01:57 <@matches> suitably scared and also suitable scared
415 22:05 <@matches> Ok, trying again. This is the sort of thing a template is supposed to be used for... I just seem to always end up suddenly having to make everything all the way back to Document into a template class :S
416 22:07 <@matches> blergh
417 22:07 <@matches> trying again
418 22:07 <@matches> After getting coffee
419 22:07 <@matches> I think
420 22:30 <@matches> Ok, templates is way too complicated
421 22:30 <@matches> I am going to do the following instead:
422 22:31 <@matches> 1. Allow a "save this region to bmp" argument
423 22:31 <@matches> 2. It reads the specified bmp, saves a new bmp with the current view overlayed in a different colour or something
424 22:32 <@matches> 3. Makefile hacks to recompile the program using a different typedef of Real and then do 1. and 2. for them all
425 22:32 <@matches> 4. Realise I probably should have used templates
426 23:02 <@matches> So, according to my timeline that I haven't looked at since submitting the proposal, I will have done a draft literature review by tomorrow...
427 23:02 <@matches> Hah
428 --- Day changed Thu Apr 17 2014
429 00:26 <@matches> I am not good at OpenGL/SDL
430 00:26 <@matches> I am the master of producing a black screen
431 00:26 <@matches> Also we have FILLED and OUTLINE the wrong way round still

UCC git Repository :: git.ucc.asn.au