--- Log opened Thu Dec 31 00:00:44 2015 |
00:12 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
00:12 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
00:20 | | Turaiel[Offline] is now known as Turaiel |
00:24 | <@PinkFreud> | wtf python. |
00:24 | <@PinkFreud> | >>> temp=33.64 |
00:24 | <@PinkFreud> | >>> temp = temp * (9 / 5) + 32 |
00:24 | <@PinkFreud> | >>> temp |
00:24 | <@PinkFreud> | 65.64 |
00:24 | <@PinkFreud> | that ... is most definitely not right. |
00:25 | <&McMartin> | 9/5 = 1 |
00:25 | <&McMartin> | Because that's integer division |
00:25 | <&McMartin> | You want * (9.0 / 5) in there |
00:25 | <@PinkFreud> | ahh. |
00:26 | <@PinkFreud> | yeah, that looks much better. |
00:26 | <@PinkFreud> | McMartin: thanks! |
00:26 | <&McMartin> | np |
00:39 | | * Derakon_ bahs at love2d's map loading offerings. |
00:39 | < Derakon_> | This platformer demo uses Advanced Tiled Loader, which is no longer under development, and recommends using Simple Tiled Implementation instead. |
00:40 | < Derakon_> | One issue I ran into early on was that the player would run into the "side" of the floor and thus stop running, even though said side was immediately adjacent to another floor tile. |
00:41 | < Derakon_> | I fixed this under ATL by manually constructing collision entities for each tile so they didn't have such useless edges. |
00:41 | < Derakon_> | STI has its own construct-collision-entities logic...but it doesn't prune out those edges. |
00:41 | < Derakon_> | (ATL didn't have any automatic physics logic at all) |
00:41 | < Derakon_> | Implementing the same fix under STI is going to be more complicated. |
00:42 | | gizmore|2 [kvirc@Nightstar-s38o3n.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.3.2 Aria http://www.kvirc.net/] |
00:43 | < Derakon_> | (Because it does its own thing that I ought to properly integrate into, which requires understanding what STI does in the first place...) |
01:16 | | gnolam_ [lenin@Nightstar-oru2ae.priv.bahnhof.se] has quit [[NS] Quit: ??? ? ????] |
01:51 | <~Vornicus> | pinkfreud: alternatives, use python3, or if you know you won't depend on integer division and still insist on using py2, from __future__ import division |
01:54 | <@gnolam> | Indeed. The problem there is still using Python 2.~ |
01:56 | | * McMartin tests his code from vacation on the hardware now that he's back. |
02:14 | <@PinkFreud> | ah, hadn't realized that |
02:14 | <@PinkFreud> | lrwxrwxrwx 1 root root 9 Dec 5 12:46 /usr/bin/python -> python2.7 |
02:14 | <@PinkFreud> | whaddya know |
02:17 | <@PinkFreud> | thanks guys |
02:31 | | [R] [rstamer@genoce.org] has quit [Ping timeout: 121 seconds] |
02:35 | | [R] [rstamer@Nightstar-d7h8ki.org] has joined #code |
03:15 | < Derakon_> | Hm, I need ToxicFrog. |
03:15 | < Derakon_> | I have a string. I need to convert it into an array of vertex pairs, in Lua. |
03:15 | < Derakon_> | So e.g. turn "{{1, 2}, {3, 4}}" into {{1, 2}, {3, 4}}. |
03:16 | <&ToxicFrog> | You caught me just as I was on my way to sleep! |
03:16 | < Derakon_> | It doesn't have to be formatted that way, mind. Whatever is the best format to encode an array of vertex pairs into a string would be, considering that Lua will be reading it later. |
03:16 | < Derakon_> | I hope you can spare a few minutes! |
03:16 | <&ToxicFrog> | If you trust the source, loadstring("return {{1,2}, {3,4}}")() will do for you |
03:16 | < Derakon_> | Hm. |
03:16 | < Derakon_> | The source is a map definition file. |
03:17 | < Derakon_> | I wrote the file, but a future conceivable application might not be so trustworthy. |
03:17 | <&ToxicFrog> | If not, string:match (match regexoid and extract capture groups) and string:gmatch (as above but returns an iterator over all matches) are probably your best bet. |
03:17 | < Derakon_> | Whoof. |
03:17 | < Derakon_> | Let's stick with loadstring for now~ |
03:17 | < Derakon_> | Okay, thanks. |
03:17 | <&ToxicFrog> | Alternately, use an actual (de)serialization library and format like JSON or EDN, both of which should have lua implementations kicking around. |
03:18 | < Derakon_> | That does make sense. |
03:18 | < Derakon_> | Haven't heard of EDN before. |
03:19 | <&ToxicFrog> | It's Clojure's native data format. There are implementations for a few other languages. More powerful than JSON but not as widely supported. |
03:20 | < Derakon_> | Either way, I'd be adding a third-party dependency to this library, which may or not be an issue. |
03:20 | < Derakon_> | But I can use my hand-hacked version! |
03:21 | <&ToxicFrog> | If it's a pure lua library, which I'd expect it to be, there is no issue. Just bundle it with the game and load it at runtime with require() |
03:22 | <&ToxicFrog> | You can even pack it into the .love archive for the shipped version. |
03:22 | < Derakon_> | Yeah, absolutely. |
03:22 | < Derakon_> | I just can't predict how happy some library's maintainer would be to accept a pull request that adds a dependency. |
03:22 | <&ToxicFrog> | If it's object code things get messier. |
03:22 | <&ToxicFrog> | Oh, you're modifying someone else's library to do this loading? |
03:22 | < Derakon_> | (The overall goal here is to allow Tiled tilesets to include custom collision detection information) |
03:22 | < Derakon_> | Yes. |
03:22 | <&ToxicFrog> | Aah. |
03:23 | < Derakon_> | Specifically, the Simple Tiled Implementation library. |
03:23 | < Derakon_> | Which is turning all of my tiles into squares right now. |
03:23 | <&ToxicFrog> | In that case, yeah, I'd say develop using a local fork of the library and send the patch upstream if you have time. |
03:23 | < Derakon_> | I've also posted on the love2d forums in the corresponding thread, so we'll see how they react. |
03:24 | < Derakon_> | ...damn, this library actually encodes vertices with keys of "x" and "y". |
03:25 | < Derakon_> | Well, that's an implementation detail that I can probably sort out on my own. |
03:25 | < Derakon_> | Thanks for getting me started! |
03:35 | < Derakon_> | Haha, it works. |
03:36 | | * Vornicus gives der an invisible twinrova |
03:40 | < Derakon_> | ...though it's adding an extra edge on my corner tiles. |
04:26 | | thalass [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds] |
04:41 | < Derakon_> | I guess the extra edge is just a drawing bug, since I don't seem to be able to collide with it. |
04:42 | < Derakon_> | And I've replaced the unsafe "execute string as code" implementation with gmatch. |
04:42 | < Derakon_> | So I think we're good to go! |
05:01 | < Derakon_> | Behold, I did a thing! http://i.imgur.com/lltubMw.gif |
05:03 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
05:12 | <~Vornicus> | behold |
05:13 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
05:34 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
05:37 | | Derakon_ is now known as Derakon[AFK] |
06:58 | | Turaiel is now known as Turaiel[Offline] |
07:18 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
07:18 | | mode/#code [+o Crossfire] by ChanServ |
08:45 | | Kindamoody is now known as Kindamoody|out |
09:05 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds] |
09:11 | | * McMartin discovers the existence of MSYS2. |
09:12 | <&McMartin> | Holy shit they basically hooked Windows into Arch Linux's package manager |
09:44 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has joined #code |
12:37 | | gnolam_ [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code |
12:37 | | VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
12:39 | | VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
12:40 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
12:41 | | gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
12:41 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
12:44 | | VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
12:44 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
12:45 | | gnolam_ is now known as gnolam |
12:45 | | mode/#code [+o gnolam] by ChanServ |
12:49 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
12:57 | | VirusJTG_ [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
12:59 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
13:06 | | Derakon[AFK] [chriswei@Nightstar-5mvs4e.ca.comcast.net] has quit [Connection closed] |
13:06 | | Derakon[AFK] [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code |
13:35 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
13:37 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
13:37 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
13:37 | | mode/#code [+o himi] by ChanServ |
14:12 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
15:47 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
16:22 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [Connection closed] |
16:22 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
16:22 | | mode/#code [+o JustBob] by ChanServ |
17:03 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has joined #code |
17:03 | | mode/#code [+o celticminstrel] by ChanServ |
17:05 | | Derakon[AFK] is now known as Derakon_ |
17:06 | < Derakon_> | Hmph. Submitted a pull request for the changes I made to the Tiled map loader, and the maintainer is giving me pushback, telling me that I should be manually creating collision objects on a separate layer, rather than deriving collision objects from the terrain tiles I've placed. |
17:08 | < [R]> | Fuck that |
17:09 | < [R]> | Software should help me do my work, not make me do more work. Link to your PR? |
17:12 | < Derakon_> | https://github.com/karai17/Simple-Tiled-Implementation/pull/86 |
17:12 | < Derakon_> | But hold off on white knighting for me. :) |
17:12 | < Derakon_> | Let's see if their advice is actually apropos first. |
17:17 | | macdjord|slep is now known as macdjord |
18:02 | | Turaiel[Offline] is now known as Turaiel |
18:11 | < Derakon_> | Ugh, this person refuses to believe that their code doesn't implement a feature. |
18:11 | < Derakon_> | So I'm having to go to a lot of effort to implement that feature for them to demonstrate that it didn't before. |
18:20 | | Netsplit *.net <-> *.split quits: Turaiel, Xon, @Ogredude, @JustBob, @Tamber, @himi, @Namegduf, grindhold, @froztbyte, Azash, (+4 more, use /NETSPLIT to show all of them) |
18:21 | | Netsplit over, joins: &Reiver, @Tamber, &jeroud, &jerith, @JustBob, @froztbyte, @himi, grindhold, Azash, [R] (+4 more) |
18:22 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has quit [Connection reset by peer] |
18:23 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has joined #code |
18:40 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
18:42 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
18:43 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
18:45 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
18:47 | | catadroid` [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has joined #code |
18:47 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has quit [[NS] Quit: Bye] |
18:47 | | catadroid` is now known as catadroid |
18:52 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
19:11 | | Emmy-Out [M@Nightstar-o9u.8m2.160.77.IP] has joined #code |
19:20 | | thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code |
19:20 | | mode/#code [+o thalass] by ChanServ |
19:26 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has quit [Connection closed] |
19:26 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has joined #code |
19:26 | | mode/#code [+o celticminstrel] by ChanServ |
20:27 | | gizmore [kvirc@Nightstar-s38o3n.dip0.t-ipconnect.de] has joined #code |
21:44 | | Turaiel is now known as Turaiel[Offline] |
21:53 | | Kindamoody|out is now known as Kindamoody |
22:04 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
22:04 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:38 | | Alek is now known as Chi |
22:42 | | * Vornicus readreadreads his C++ book. today's thing he found out about: static assert |
22:43 | | * Derakon_ glares at Lua. |
22:44 | < Derakon_> | How can you insert something into a table, and then not be able to find that something immediately afterwards by iterating over the table contents? |
22:45 | < Derakon_> | I can find it if I iterate using pairs(), but not if I use ipairs(). wtfx |
22:45 | <~Vornicus> | ipairs will only go up until the first integer key whose value isn't nil |
22:46 | < Derakon_> | ...oh. |
22:46 | < Derakon_> | I thought this was like the difference between Python's range() and xrange() methods. I read "ipairs" as "iterative pairs". |
22:46 | < Derakon_> | Righto, carry on. |
22:47 | <&McMartin> | FORTRAAAAAAAN |
22:47 | <~Vornicus> | both pairs and ipairs are both iterators |
22:47 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed] |
22:48 | < Derakon_> | This is one of the problems with learning by reading example code and making assumptions~ |
22:50 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
23:02 | <&ToxicFrog> | Derakon: the reference manual is both concise and complete, I recommend it :P |
23:03 | <&ToxicFrog> | But yeah, pairs is "integer pairs" and is used for iterating over contiguous arrays. |
23:12 | | catadroid [catalyst@Nightstar-2k0p46.dsl.teksavvy.com] has quit [Connection reset by peer] |
23:14 | | Kindamoody is now known as Kindamoody[zZz] |
23:32 | | Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code |
23:33 | | mode/#code [+o Crossfire] by ChanServ |
23:43 | | anion [idonob@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
23:44 | | ion_ [Owner@Nightstar-gmbj85.vs.shawcable.net] has quit [[NS] Quit: Lost terminal] |
23:54 | | gizmore [kvirc@Nightstar-s38o3n.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds] |
23:55 | | gizmore [kvirc@Nightstar-3aaona.dip0.t-ipconnect.de] has joined #code |
--- Log closed Fri Jan 01 00:00:00 2016 |