code logs -> 2016 -> Tue, 23 Feb 2016< code.20160222.log - code.20160224.log >
--- Log opened Tue Feb 23 00:00:57 2016
00:12
<~Vornicus>
arg, I need to set up a unit test rig.
00:16
<~Vornicus>
(for lua 5.1/love)
00:31 * Vornicus flails at things that require installation beyond "run the installer"
00:36
<~Vornicus>
I want to just have something and have it work, not have to hunt around for all these random settings and set up weird environments nad fuck around in the command prompt and all that shit, especially for a system I've never tried and have no idea whether I'll like it enough to use it twice
00:37
<@Reiv>
You know, I actually felt that way about the Unity dev kit
00:37
<&ToxicFrog>
Vornicus: what are you trying to install and what problems are you having?
00:37
<@Reiv>
I guess the assumption there is "If you're driven enough to design a game, you're driven enough to set it up", but it sure felt archaic
00:38
<~Vornicus>
Unity is child's play, honestly
00:40
<&ToxicFrog>
Love can generally just be installed from the package manager, or, if windows, unzipped wherever.
00:40
<~Vornicus>
The thing I'm trying to install is a unit testing rig and the first one that was suggested was busted, which uses luarocks as its installation system.
00:41
<&ToxicFrog>
Unit test frameworks -- I haven't used many, but the ones I have used have generally been single-file libraries that you require() from your tests
00:41
<&ToxicFrog>
And then you can just run the tests with 'lua tests.lua' or 'lua -ltests', or both, depending on how you organized your code.
00:41
<&ToxicFrog>
I have never had a good experience with luarocks, so there's that
00:42
<~Vornicus>
Ah, well
00:42
<~Vornicus>
But right now i'm looking at that and going "well it looks like it needs a lua terp installed, but the lua download isn't an 'installer', it's just an exe, this isn't any help"
00:43 Derakon[AFK] is now known as Derakon
00:44
<&ToxicFrog>
I thought you were using love2d, though?
00:44
<&ToxicFrog>
love.exe is a lua interpreter -- 5.1 in earlier versions, luajit in the current version.
00:45
<~Vornicus>
Right but - I don't have any idea if luarocks would point at it in the first place
00:45
<&ToxicFrog>
It doesn't have an interactive mode, but you can feed it a love.conf and main.lua that run your tests
00:46
<&ToxicFrog>
That's generally how I set up testing for love2d-based projects -- I have a test/ subdirectory where love.conf disables the graphics/window modules and enables the console (the latter is necessary on windows if you want anything useful out of it)
00:46
<&ToxicFrog>
And the a main.lua that runs all the tests and then exits
00:46
<&ToxicFrog>
And then I also have the actual test code, test framework, etc in there.
00:46
<&ToxicFrog>
So then "love ." runs the actual game and "love test/" runs the tests.
00:47
<&ToxicFrog>
I don't know what you mean by "point at it".
00:47
<~Vornicus>
luarocks wants a lua terp to, uh, use
00:49
<&ToxicFrog>
oh
00:49
<&ToxicFrog>
right
00:49
<&ToxicFrog>
I think it just assumes that lua.exe is in your $PATH, which I think both luaforwindows and luadist will set up for you automatically
00:49
<&ToxicFrog>
That said, I have no idea if luarocks is even supported on windows; I know it also expects a C compiler for any module that has C components, for example
00:50
<~Vornicus>
of course this might be the same problem as I had before when I looked into A. CD burning and B. sshd on linux and spent days trying to figure out what I needed to do to make it happen and it turns out that everything I needed was already done
00:50
<&ToxicFrog>
Luadist has its own package manager, and both luaforwindows and luadist come with a huge pile of extra libraries built in, which may include what you want
00:50
<&ToxicFrog>
That said
00:50
<&ToxicFrog>
For the purposes of testing, it helps if you know your tests are running in the same environment your production code is
00:51
<&ToxicFrog>
So my approach, and my recommendation -- especially taking into account the fact that package management on lua is, bluntly, a clusterfuck --
00:51
<~Vornicus>
because that happens way too often, frankly. "how to tell if stuff is ready to go already" is kind of a dire situation on a lot of open source projects.
00:51
<&ToxicFrog>
is just to find some test framework that you can download and stuff into your source tree and require() directly.
00:51
<&ToxicFrog>
And not worry about system-wide installs of stuff, which is kind of running counter to how lua expects to be used anyways.
00:52 * Derakon :gonk:s at a third party.
00:52
<~Vornicus>
yeah
00:52
<&Derakon>
They've recently added support for parsing the metadata JSON that our program outputs (along with the image data that they were already parsing)!
00:52
<&Derakon>
They're doing this manually.
00:52
<&Derakon>
Their homebuilt JSON parser has problems.
00:52
<~Vornicus>
Oh boy.
00:52
<&Derakon>
For example, failing to recognize that ":" can occur inside of a string.
00:52
<~Vornicus>
...oh boy.
00:52
<&McMartin>
Oh *dear*.
00:53
<&Derakon>
They also can't handle any array or dictionary values (aside from the root-level dictionary)
00:53
<~Vornicus>
Shit son I can write a json parser in a day and a half at worst and it won't have that kind of bug. What is their major malfunction
00:53
<&Derakon>
Got me.
00:54
<&McMartin>
Assuming you know what you're doing, JSON is actually simple enough that you can whip up a conforming custom parser without it being madness to do so.
00:54
<~Vornicus>
(granted I wouldn't actually do so, 'cause the real ones are robust enough to handle errors gracefully and tell you what it thinks is wrong sensible)
00:54
<&ToxicFrog>
I've been reasonable happy with luaunit, and it's probably what I'm going to use for ttymor, once I get around to writing the tests which it desperately needs: https://github.com/bluebird75/luaunit/blob/master/luaunit.lua
00:55 * McMartin did once for practice and because it was for a C project and he wanted it to play nice with his other data structures, since C doesn't have any of those.
00:55
<&Derakon>
I told him "look, the json.org library has a ridiculously permissive license, just embed that in your program and you won't even have to add an external dependency."
00:55
<&ToxicFrog>
Derakon: oh wow
00:56
<&McMartin>
https://github.com/michaelcmartin/monocle/blob/master/src/json.c <-- does not have these bugs
00:56
<@Reiv>
McMartin: Aw, it made me scroll down like three times
00:57
<&McMartin>
Not having a default usable array or map type is a harsh mistress indeed
00:57
<&McMartin>
Though it doesn't include the implementation of mncl_kv
00:58
<&Derakon>
I like to think you just typed all that out in the minute or two since I described what was going on.
00:59
<&McMartin>
Sadly, the commit logs give the lie to that~
01:00
<@Reiv>
Derakon: What language does he work in?
01:00
<&Derakon>
This is all Java.
01:03
<@Reiv>
... why on earth is he writing a ... this is JAVA
01:04
<@Reiv>
Step 1 of all programming in Java is "Look up what packages out there will already do this shit for me" and then go from there
01:06
<&Derakon>
Best guess is he didn't want to add an external dependency.
01:06
<&Derakon>
Since the project he works for is a library.
01:06
<&Derakon>
But as I noted, you can just download the json.org implementation and bundle it into your program. That's what we do.
01:09
<@Reiv>
Yeah
01:11
<@celticminstrel>
Java provides a ton of stuff in its standard library, like XML parsing (I think?). Is there no JSON parsing there too?
01:12
<&Derakon>
Not as far as I'm aware.
01:12
<&Derakon>
But there's a ton of third-party options. http://www.rojotek.com/blog/2009/05/07/a-review-of-5-java-json-libraries/
01:17
< [R]>
JSON isn't enterprisey. Java is enterprisey.
01:18
<&Derakon>
And that's why it has XML parsing.
01:19
< [R]>
Right
01:27
<&ToxicFrog>
Ok, time to try moving orias from XFS to ZFS
01:27
<&ToxicFrog>
If I'm not back in ten minutes, things have gone badly wrong
01:27 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 1.4]
01:40
<@iospace>
well
01:40
<@iospace>
it's been 13
01:40
<@iospace>
so...
01:42 * McMartin sings the Doom Song
01:42 Turaiel[Offline] is now known as Turaiel
01:59 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
01:59 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
02:00
<&ToxicFrog>
Ok, they didn't go badly wrong but they could have gone more smoothly than they did.
02:01
<&McMartin>
17:40 <@iospace> well
02:01
<&McMartin>
17:40 <@iospace> it's been 13
02:01
<&McMartin>
17:40 <@iospace> so...
02:01
<&McMartin>
17:42 * McMartin sings the Doom Song
02:01
<@iospace>
:P
02:11
<&ToxicFrog>
pfft
02:12
<&ToxicFrog>
Anyways, orias is now FULLY ZFS:
02:12
<&ToxicFrog>
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
02:12
<&ToxicFrog>
ancilla 7.25T 5.42T 1.83T - 8% 74% 1.00x ONLINE -
02:12
<&ToxicFrog>
backup 928G 528G 400G - 11% 56% 1.00x ONLINE -
02:12
<&ToxicFrog>
rpool 196G 18.8G 177G - 6% 9% 1.00x ONLINE -
02:12
<&ToxicFrog>
Which means that later this week I can go ahead with merging it with ancilla.
02:13
<&ToxicFrog>
That's going to be the scariest part of this whole exercise, since it means touching the MTA.
02:14
<&ToxicFrog>
Which, as anyone can tell you, is a bad idea second only to having one in the first place.
02:14
<&ToxicFrog>
I also need to figure out why spamd doesn't start up properly on boot but does start normally if I tell it to once the system is booted.
02:16 * Vornicus looks into luaunit
02:18
<~Vornicus>
It even has tests for itself
02:18
<&Derakon>
...how do you unit-test the unit tester?
02:19
<~Vornicus>
presumably, progressively
02:28 * Vornicus fiddles, thinks he needs to see an example of how tf has a love thing with testing set up
02:28
<&ToxicFrog>
I don't have those projects on github, but give me a minute and I can pastebin the relevant bits
02:29 gizmore [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has joined #code
02:30
<~Vornicus>
the important part I *think* is that I need to load stuff from one directory upstream and I do not see how that works.
02:31 gizmore|2 [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has quit [Operation timed out]
02:38
<&ToxicFrog>
Vornicus: https://gist.github.com/ToxicFrog/c77799a2f7f6f23de756
02:39
<&ToxicFrog>
Vornicus: oh. The thing there is that love2d extends, but does not replace, require
02:39
<&ToxicFrog>
And require by default looks in '.' as well as the system locations
02:39
<&ToxicFrog>
So if you do "love test" rather than "cd test; love .", then $PWD is the root of your game and you can just require the game libraries as you see fit.
02:40
<~Vornicus>
Aha! That is what I needed. Thank you
02:41
<&ToxicFrog>
One thing that I've considered doing but haven't seriously investigated yet, btw, is combining testy with luaunit
02:41
<&ToxicFrog>
testy lets you write your test functions as local functions in the file under test, and uses the debug API to find them at runtime
02:41
<&ToxicFrog>
But it doesn't come with any of the extended assert stuff that luaunit has, or things like table equality
02:42
<&ToxicFrog>
If I end up doing that and it works well, I'll put it on github somewhere for you
03:01 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
03:17 * Vornicus gets a befuddling error :(
03:20
<~Vornicus>
luaunit.lua:1933: No such name in global space: C:\Users\Vorn\Documents\Vorns-Ahoy\test
03:21
<~Vornicus>
Switching to using non-global luaunit doesn't help either. :(
03:34
<&ToxicFrog>
Vornicus: I'm going to sleep now, but I have h
03:35
<&ToxicFrog>
*but I can help debug tomorrow
04:26
<~Vornicus>
hmm. Looks like it's pulling the name it's trying to use off the command line
04:28
<~Vornicus>
Which is not at all what I want it to do. I wonder if I can turn off command line test-grabbing.
04:31 * Vornicus does so by passing a fake command line to LuaUnit.run
04:31
<~Vornicus>
hooray
04:31
<~Vornicus>
that was dumb
04:43 gizmore|2 [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has joined #code
04:45 gizmore [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has quit [Operation timed out]
04:47 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
04:57 Turaiel is now known as Turaiel[Offline]
05:04 Derakon is now known as Dearkon[AFK]
05:04 Dearkon[AFK] is now known as Derakon[AFK]
06:29 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
06:57 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
06:57 mode/#code [+o Crossfire] by ChanServ
07:03 celticminstrel is now known as celmin|sleep
07:28 Kindamoody[zZz] is now known as Kindamoody
07:47
<~Vornicus>
okay. unit tests in I now see exactly where my code went wrong there. Now, to figure out what the hell I'm doing in my gondola update that's making it do these dumb things
07:55
< catadroid>
Try poling with the current instead of crosswise
07:55
< catadroid>
And remember to bail.
08:05 * Vornicus needs to break it down into more sensible pieces, and then test those
08:29 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
08:31 catadroid` [catalyst@Nightstar-kspds2.dab.02.net] has joined #code
08:32 Kindamoody is now known as Kindamoody|afk
08:35 catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has quit [Ping timeout: 121 seconds]
08:36 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
08:36 mode/#code [+o himi] by ChanServ
08:39 catadroid` [catalyst@Nightstar-kspds2.dab.02.net] has quit [Ping timeout: 121 seconds]
08:44 catadroid [catalyst@Nightstar-kspds2.dab.02.net] has joined #code
08:46 gizmore|2 [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
09:06 M-E [M@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
09:09 Emmy-zZz [M@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
09:48 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
09:49 M-E is now known as Emmy
10:51 catadroid [catalyst@Nightstar-kspds2.dab.02.net] has quit [Ping timeout: 121 seconds]
11:37 Emmy is now known as Emmy-Werk
12:49 Emmy [NSwebIRC@Nightstar-41pbej.static.chello.nl] has joined #code
12:54 You're now known as TheWatcher[d00m]
13:08 You're now known as TheWatcher
13:33 sshine [simon@Nightstar-a7j18s.static.netgroup.dk] has joined #code
13:33
< sshine>
hello.
13:36
< sshine>
I've got this Filing(TargetCompanyId, Percentage, OccurredUtc) class that a parser spits out. a new input source to the parser doesn't have TargetCompanyId, but rather TargetCompanySymbol. what's a good way to extend my model class to support either? it isn't until at a later stage when the TargetCompanyId/TargetCompanySymbol is resolved into an Company object.
13:36
< sshine>
if instead of a class this were algebraic types, I'd change Filing's first parameter to a data TargetCompany = TargetCompanyId of int | TargetCompanySymbol of string.
13:37
< sshine>
I wonder what the idiomatic alternative to union types is in C#.
13:41 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
13:41 mode/#code [+o Crossfire] by ChanServ
14:01
<@abudhabi>
Ctrl-G: BEL. On some old-time teletype terminals, this would actually ring a bell. In an xterm it might beep.
14:04
< sshine>
this Union3 thing is the closest, I guess. http://stackoverflow.com/questions/3151702/discriminated-union-in-c-sharp
14:04
< sshine>
and then it isn't really generic.
14:05
< sshine>
or rather, the produced union types have generic names.
14:05
< sshine>
or I have to make them with a lot of boilerplate code every time.
14:12
<@gnolam>
Admittedly, just skimming what you wrote, but: what's wrong with just subclassing both versions from a parent Filing class?
14:36
< Emmy>
[15:17] <Emmy> built a query to filter entries based on date [15:18] <Emmy> so that i can say choice > entry date < choice [15:23] <Emmy> so in case one of these choices isn't specified, i decided i must make code to fill in choice > entry date < infinite. [15:23] <Emmy> took a while before i realized it's much more efficient to just go choice > entry date
14:44 * Emmy blarghs. sorry, apparently webchat does not know line breaks.
14:59 celmin|sleep is now known as celticminstrel
15:12
< sshine>
gnolam, I was thinking more of a discriminate union type for that one particular field.
15:18
< Natanial>
hey
15:52
< Natanial>
ckuke
15:53
<@ErikMesoy>
is that the counterpart to ckseme?
15:54 Emmy [NSwebIRC@Nightstar-41pbej.static.chello.nl] has quit [[NS] Quit: of to home we go]
16:01
< Natanial>
i guess
16:01
< Natanial>
trying to say shute but didnt work out well
16:21 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
16:21 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:40 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
16:55 Kindamoody|afk is now known as Kindamoody
17:09 gizmore [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has joined #code
17:21 Emmy-Werk is now known as Emmy
18:24 PinkFreud is now known as The
18:25 The is now known as PinkFreud
18:27
<@Tamber>
The PinkFreud.
18:30
<~Vornicus>
Not just any pinkfreud
18:43 Kindamoody is now known as Kindamoody[zZz]
18:52 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
18:52 mode/#code [+o Crossfire] by ChanServ
19:02 abudhabi is now known as Wulfric
19:05 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
19:05 mode/#code [+o Reiv] by ChanServ
20:02 catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has joined #code
20:43 Natanial [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has quit [Ping timeout: 121 seconds]
20:57 * jerith fiddles with UI layout in Unity3D.
20:57
<&jerith>
These tools aren't fantastic, but they're not terrible either.
21:25
<@Reiv>
whatcha buildin'
21:26
<@Wulfric>
DEATH.
21:26 Turaiel[Offline] is now known as Turaiel
21:28 catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has quit [[NS] Quit: Bye]
21:45 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
21:59 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
21:59 mode/#code [+o himi] by ChanServ
22:01 Turaiel [Brandon@Nightstar-7mqsi0.mi.comcast.net] has quit [[NS] Quit: Bouncer terminated]
22:02 Turaiel [Brandon@Nightstar-7mqsi0.mi.comcast.net] has joined #code
22:18 gizmore [kvirc@Nightstar-7ne6bq.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
22:21 catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has joined #code
22:26 Wulfric is now known as abudhabi
22:37 Turaiel is now known as Turaiel[Offline]
22:43
<&jerith>
Reiv: I am mostly just playing.
22:43
<&jerith>
I have a maze generator and now I'm putting buttons and sliders on the screen.
22:44
<@Reiv>
neat
22:44
<@Reiv>
I should try it again some time
22:44
<@Reiv>
I need to make wallsnake some time
22:46
<&jerith>
As well as being an excuse to tinker with something gamelike, it's an excuse to learn some F#.
22:48 * jerith compiles, sees if he broke everything.
22:49
<&jerith>
Okay, I'll need to set some heights manually.
22:57
<&jerith>
Or just set the right flags on the layour controllers.
22:57
<&McMartin>
12:57 <&jerith> These tools aren't fantastic, but they're not terrible either.
22:57
<&jerith>
*layout
22:58
<&McMartin>
Mice kinda have one too few axes
22:58
<&McMartin>
So it's always a bit tricky
22:58
<&jerith>
McMartin: I'm building a simple UI (buttons, sliders, widgets, etc.) in code.
22:59
<&jerith>
The tools I'm talking about are things like http://docs.unity3d.com/ScriptReference/UI.VerticalLayoutGroup.html
23:00
<&jerith>
I don't like GUI/IDE form designers that emit opaque data, and Unity's editor is basically made out of that.
23:01
<&jerith>
It's great for tinkering with the running system and seeing where I'm going wrong, btu there's too much invisible state for me to be comfortable with it as means of building stuff.
23:12 catadroid [catalyst@Nightstar-7ffc9s.cable.virginm.net] has quit [[NS] Quit: Bye]
23:22
<&ToxicFrog>
holy shit death to email forever
23:23 * ToxicFrog takes a liver fried rice break before pushing the new port forwarding rules
23:30 Emmy is now known as Emmy-zZz
23:34
<&jerith>
Bleh. I pull in UnityEditor because of the builtin UI resources, but that seems to break the webgl build.
23:34 FionaSapphire [FionaSapphi@Nightstar-cdrdgq.dsl.as9105.com] has quit [[NS] Quit: Leaving]
23:34
<&jerith>
I guess I should deal with this tomorrow, though.
23:35
<&jerith>
Since it's getting rather close to 2am.
23:45
<@Reiv>
ToxicFrog: What about email is it this time~
23:47
<&ToxicFrog>
Reiv: I just spent an hour trying to figure out why spam wasn't being routed properly before realizing that I'd migrated the mail spools but not the cyrus db over and thus it couldn't see the maildirs I wanted it to deliver to
23:47
<&ToxicFrog>
So that one's on my
23:47
<&ToxicFrog>
*on me
23:47
<&ToxicFrog>
But I also can't get cyradm to authenticate with PAM, for no apparent reason
23:51
<&ToxicFrog>
cyrus imapd PAMs just fine! It's just cyradm that has problems with it.
23:52
<@Reiv>
Is this an email thing, or a tools thing?
--- Log closed Wed Feb 24 00:00:13 2016
code logs -> 2016 -> Tue, 23 Feb 2016< code.20160222.log - code.20160224.log >

[ Latest log file ]