code logs -> 2014 -> Sat, 20 Dec 2014< code.20141219.log - code.20141221.log >
--- Log opened Sat Dec 20 00:00:03 2014
00:41 Derakon[AFK] is now known as Derakon
00:42 * Derakon readsup.
00:42
<&Derakon>
Maybe it's my insistence on thoroughly naming any remotely non-temporary objects I work with, but currying isn't a God Tech for me.
00:54 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
01:04 Turaiel[Offline] is now known as Turaiel
01:20 Turaiel is now known as Turaiel[Offline]
01:51 Turaiel[Offline] is now known as Turaiel
02:09
<&McMartin>
Derakon: The point is that having to formally define lessThanThree() is not actually any clearer than being able to write (<3) as you do in Haskell
02:10
<&McMartin>
But this also assumes you're writing in a language that makes super-heavy use of higher-order functions, which is, well, not many of them, because THAT'S WHAT OBJECTS AND METHODS ARE FOR
02:17
<&McMartin>
(Not a fan -_-)
02:17
<&McMartin>
(But then, hence the functional accent)
02:18
<&McMartin>
I have been pointed at the language Rust, which appears to be trying to hybridize C and Haskell while still being basically C
02:18
<&McMartin>
I'm skeptical but that will be a Great Big Deal if they manage to square that circle
02:19
<&McMartin>
(Type inference, ML-style immutability by default, modes where you can prove the heap is never touched, etc)
03:14 Turaiel is now known as Turaiel[Offline]
03:22 Turaiel[Offline] is now known as Turaiel
04:05 Turaiel is now known as Turaiel[Offline]
04:53 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
05:11 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:35 Derakon is now known as Derakon[AFK]
05:47
<@celticminstrel>
Most of this initialization code is a) setting stuff to 0 or b) setting stuff to a default-constructed version... which is the implicit behaviour anyway, so I guess I can just delete most of this.
05:52
<@celticminstrel>
(Was initializing static data to 0 not the default in ANSI or pre-ANSI C?)
05:58 Kindamoody[zZz] is now known as Kindamoody
06:32 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [Client exited]
06:35 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
07:32 celticminstrel [celticminst@Nightstar-jeiu0g.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:12 Kindamoody is now known as Kindamoody|afk
08:24 Orthia [orthianz@Nightstar-lca.o7s.224.119.IP] has quit [Ping timeout: 121 seconds]
08:29 Orthia [orthianz@Nightstar-fdm.ne6.184.203.IP] has joined #code
08:29 mode/#code [+o Orthia] by ChanServ
08:29 macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has joined #code
08:29 mode/#code [+o macdjord] by ChanServ
08:47 macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has quit [Ping timeout: 121 seconds]
08:58 macdjord [macdjord@Nightstar-c0i1dq.cable.rogers.com] has joined #code
08:58 mode/#code [+o macdjord] by ChanServ
09:10 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
10:36 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
10:36 mode/#code [+o Checkmate] by ChanServ
11:34 addicted_to_internet [NSkiwiirc@Nightstar-rv7.auq.109.46.IP] has joined #code
11:35
< addicted_to_internet>
hey :)
12:24 addicted_to_internet [NSkiwiirc@Nightstar-rv7.auq.109.46.IP] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
12:32 VirusJTG_ [VirusJTG@Nightstar-lsl.j5i.46.174.IP] has joined #code
12:35 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Ping timeout: 121 seconds]
12:46 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:50 VirusJTG_ [VirusJTG@Nightstar-lsl.j5i.46.174.IP] has quit [Ping timeout: 121 seconds]
12:53 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
12:54 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
14:29 VirusJTG_ [VirusJTG@Nightstar-lsl.j5i.46.174.IP] has joined #code
14:32 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Ping timeout: 121 seconds]
14:38 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:38 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:27 VirusJTG_ [VirusJTG@Nightstar-lsl.j5i.46.174.IP] has quit [[NS] Quit: Program Shutting down]
15:27 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
15:56 Xires is now known as ^Xires
16:09 ^Xires is now known as Xires
17:05 celticminstrel [celticminst@Nightstar-jeiu0g.dsl.bell.ca] has joined #code
17:05 mode/#code [+o celticminstrel] by ChanServ
18:19 celticminstrel is now known as celmin|away
18:33 Derakon[AFK] is now known as Derakon
20:14
<&McMartin>
celmin|away: No version of C actually initializes things to anything - you get random RAM contents. This was the basis of the Heartbleed bug.
20:14
<&McMartin>
In C++, primitive data types do not have constructors and continue to behave like C as far as I know.
20:23
< [R]>
There's a special variable that'll get initialized to zero though, goes into it's own memory area. Can't remember if that's C's thing or ELF's though.
20:25
< [R]>
Also static variables appear to be initialized to zero.
--- Log closed Sat Dec 20 20:50:53 2014
--- Log opened Sat Dec 20 20:51:01 2014
20:51 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
20:51 Irssi: #code: Total of 40 nicks [19 ops, 0 halfops, 0 voices, 21 normal]
20:51 mode/#code [+o TheWatcher] by ChanServ
20:51 Irssi: Join to #code was synced in 38 secs
21:18 * abudhabi frowns.
21:19
< abudhabi>
For some reason, I'm only getting int-coordinate versions of graphics drawing methods in my Graphics2D.
21:19
< abudhabi>
Anyone know why that could be?
21:21
< abudhabi>
Ideally, I'd like a way that accepts doubles for coordinates.
21:22
< [R]>
It's fairly normal for 2D rendering systems to only work on ints.
21:24
< abudhabi>
How do I get around that? Do I just call .intValue() whenever I feed these functions?
21:24
<&McMartin>
It looks like Graphics2D's direct renderers only work on ints, with the subpixel operations only applying to its values
21:24
<&McMartin>
They're primitives
21:24
<&McMartin>
You should be able to just say (int)d
21:24
<&McMartin>
Er, subpixel operations restricted to transforms, above
21:24
< abudhabi>
Ideally, I'd like to round properly.
21:25
< abudhabi>
(int)d just drops the fraction, right?
21:25
<&McMartin>
Uh, sort of
21:25
<&Derakon>
Oh, I am reminded: waaay more languages need to provide int(), float(), etc. as functions.
21:25
<&McMartin>
It also requires you to be in the int range, which doubles go way beyond.
21:25
<&Derakon>
So I can do "int(expr)" instead of "(int) (expr)".
21:26
< [R]>
Too little benefit
21:26
<&McMartin>
Derakon: Or you can be like Go and just have that *be* the cast syntax.
21:26
<&Derakon>
McM: if you need a double's range for drawing then your display is crazygonuts
21:26
<&McMartin>
Also, static_cast<int>(expr)~
21:26
<&Derakon>
McM: yeah, that's fine too.
21:26
<&McMartin>
Derakon: Right, but this is part of why floor() and ceil() return doubles, not ints
21:26
<&Derakon>
I just hate the double-parens that Java forces you to use because there's only one casting method.
21:26
<&McMartin>
Yes
21:26
<&McMartin>
C got this wrong
21:51
< abudhabi>
McMartin: The double part is mainly for supporting numbers that are arbitrarily small, but that will be significant with sufficient scaling.
21:54
<@ErikMesoy>
i.e. zoom?
21:54
< abudhabi>
Yes, zoom.
22:15
<&McMartin>
The scaling transforms in Graphics2D *do* use doubles. I'd suggest defining the things in terms of integers and scaling down, rather than in terms of tiny fractions and scaling up.
22:22
< abudhabi>
Hmm. I'd have to figure out what the smallest thing I want to model is, then.
22:28 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
22:32 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
22:32 mode/#code [+o himi] by ChanServ
23:06
<@celmin|away>
C++ allows int(x).
23:06
<@celmin|away>
However, it does not allow unsigned int(x). ><
23:25 Kindamoody|afk is now known as Kindamoody
23:30 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
23:46 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Ping timeout: 121 seconds]
23:52 Kindamoody is now known as Kindamoody[zZz]
--- Log closed Sun Dec 21 00:00:19 2014
code logs -> 2014 -> Sat, 20 Dec 2014< code.20141219.log - code.20141221.log >

[ Latest log file ]