code logs -> 2017 -> Wed, 22 Feb 2017< code.20170221.log - code.20170223.log >
--- Log opened Wed Feb 22 00:00:35 2017
00:40
<@himi>
ugh
00:41
<@himi>
Anyone know of a json parser that knows how to ignore comments?
00:42
<&McMartin>
jsoncpp can ignore or collect as desired
00:42
<&McMartin>
https://github.com/open-source-parsers/jsoncpp
00:44
<@himi>
. . . a C++ library is a /little/ more work to use than I was hoping for, given I'm interested in translating half a dozen json config files into yaml equivalents
01:06 Kindamoody is now known as Kindamoody[zZz]
01:19
<&McMartin>
Probably not what you were aiming for, then.
01:20
<&McMartin>
jsoncpp is probably the best JSON library I've ever used, though.
01:23
<&ToxicFrog>
I thought JSON didn't support comments?
01:24
<&McMartin>
There's a lot of things that JSON doesn't support but that one would like a JSON parser to accept.
01:24
<&McMartin>
The two primary ones being comments and commas after the last element in a list or dictionary.
01:26
<&ToxicFrog>
Ok, but the upshot of this is that you need to define what you mean by a "JSON comment" before this is even a meaningful question, because I can think of at least three possibilities
01:27
<&ToxicFrog>
himi: what kind of language/environment are you operating in, and how do you expect these comments to be formatted?
01:36
<@himi>
TF: // format, and this is just a one time process so in the end it doesn't matter all that much if I end up deleting them and using whatever works
01:39
<@himi>
This is a puppet environment where someone thought that using json as the configuration data store made more sense than using yaml
01:40
<@himi>
In practise this is insanity, so I'm in the process of converting it - the comments are meaningful, so I'd like to keep them if possible, but not so important that I'm going to spend more time trying to automate the process of transferring them or even just ignoring them in the parse than I'd spend literally cutting and pasting them manually
02:03
<&ToxicFrog>
For the "just remove them" case, just run them through `sed '/^ *\/\//d'`
04:41
<@macdjord>
himi: The JSON standard explicitly does not permit comments; early versions did, but people started using them for ad-hoc processing directives, which killed interoperability, so they were eliminated
04:42
<@macdjord>
This lack is exactly why I switched to YAML for my config files
04:43
<@macdjord>
himi: On the other hand, JSON is a strict subset of YAML these days, so you could just change all the comments from '//' to '#' and call it done
05:18 * McMartin starts ripping out an audiocassette data format
05:19
<&McMartin>
This thing can actually export as .WAV but roundtripping through .WAV is more work than I think should be necessary
05:19 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Operation timed out]
05:30 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
05:30 mode/#code [+o abudhabi] by ChanServ
05:57
<&McMartin>
This is the worst runtime I've ever seen
06:00
<&McMartin>
In order to save a program you must also save a copy of screen memory, because screen memory is located in *the middle* of a saved program.
06:05 celticminstrel is now known as celmin|sleep
06:10
<~Vornicus>
what is this runtime
06:11
<&McMartin>
It is the BASIC for the Sinclair ZX81
06:11
<&McMartin>
The unlamented precursor to the Spectrum
06:12
<&McMartin>
Also the first home computer my family ever owned
06:12
<&McMartin>
Z80 based
06:12
<&McMartin>
So it's time for me to do a revisit as a jaded adult
06:12
<&McMartin>
And man
06:12
<&McMartin>
Filing this under "failing to reach the lofty heights of technical sophistication and ease of use reached by the Atari 2600"
06:12
<~Vornicus>
Ouch.
06:13
<&McMartin>
And this with a system whose standard kit included a full 16KB of RAM
06:14
<&McMartin>
It looks like people managed to get high-resolution graphics out of it without expansion packs (which it was very good at) by doing crazypants scanline stuff
06:14
<&McMartin>
This thing spends 80% of its time servicing display interrupts
06:14
<&McMartin>
Unlike the 2600 it's not as good at retaining vertical hold, so the display rolls if it works too hard
06:14
<&McMartin>
The emulator I'm using mimics this, and does it way too much for actual model I had
06:15
<&McMartin>
Which I think is because it's not got NTSC timings quite right in the emu.
06:15
<&McMartin>
But if I can get some decent power into this thing I should be able to actually dump the ROM out the cassette port and into the mic port of a computer.
06:16
<&McMartin>
I've never done Z80 coding before this either, which is kind of dumb too, but oh well
06:16
<&McMartin>
Funny bits: there is no restriction on what can go into a basic line, and BASIC lines can theoretically be 64KB long each, despite there only being 16KB of RAM, usually.
06:16
<&McMartin>
So you can just cram entire machine language routines into a REM
06:17 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Ping timeout: 121 seconds]
06:26
<~Vornicus>
How much time does the 2600 spend servicing display interrupts
06:28
<&McMartin>
What's an 'interrupt'
06:29
<&McMartin>
2600 removed all the interrupt pins from the CPU to save on manufacturing costs
06:29 LadyOfLight [catalyst@Nightstar-900lq3.dab.02.net] has joined #code
06:29
<&McMartin>
So you're doing it all manually
06:30
<&McMartin>
But that also means that you do your own work in there and this also turns into some wackiness because you rock custom collision logics and such
06:30
<&McMartin>
The 2600 is really pretty incomparable
06:30
<~Vornicus>
so wait how could you tell, etc etc
06:31
<~Vornicus>
Okay I guess better question, compare to c64
06:31
<&McMartin>
Two generations behind
06:31
<&McMartin>
The C64 loses, hm
06:31 * McMartin does some math
06:32
<&McMartin>
In the absence of sprite multiplexing shenanigans
06:32
<&McMartin>
It loses about a thousand cycles out of every 17,000 or so.
06:32
<&McMartin>
A few dozen more if you've got sprites out
06:33
<&McMartin>
But the hallmark of the 3rd gen (C64, NES, etc) is dedicated graphics chips
06:33 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
06:33 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
06:33
<&McMartin>
And then the VIC-20 had a graphics chip but it never interfered with the CPU at all
06:34
<&McMartin>
... which is why you had a 22x23 screen and no pixel-level control
06:34
<&McMartin>
But, like
06:35
<&McMartin>
The display from the ZX81 actually flips the fuck out because it doesn't give a valid television signal with some regularity
06:35
<&McMartin>
The VIC and VIC-II ships of the VIC-20 and C64 guarantee that this will never happen.
06:35
<&McMartin>
*chips
06:35
<&McMartin>
The Atari 2600, properly programmed, also will never have this happen.
06:36
<&McMartin>
NES will flip out, but it will flip out for reasons that have nothing to do with the composite video signal
06:36
<~Vornicus>
Both my c64s had their graphics chips fall over as far as I can tell.
06:37
<&McMartin>
Could be, but it's more likely that its address multiplexer is what blew out.
06:37
<&McMartin>
That was a proto-FPGA (a "PLA", apparently), and that chip is apparently most often the first to go.
06:45
<&McMartin>
Tape Ripper: SUCCESS
06:46 * McMartin now has the original, terrible version of Galaxy Patrol, and also some things that are clearly the same style of game as FACETANK
06:46
<&McMartin>
I wonder if I'm remembering these from my early youth or if there's only so many ways you can reimplement Kaboom.
06:48
<~Vornicus>
what is Kaboom
06:51
<&McMartin>
A game by activision, which stars the Midnight Bomber What Bombs at Midnight
06:51
<&McMartin>
he drops bombs at an ever-increasing rate
06:51
<&McMartin>
You have a breakout bat that is actually a bucket of water and you must catch all the bombs
06:53
<~Vornicus>
Damn, that's nuts.
06:53
<~Vornicus>
Also the first video I found about it started with, um, it was a very 90s intro, I'll say that
06:53
<&McMartin>
The game itself dates from early-2600 era
06:54
<&McMartin>
I'm not quite sure if the game is in fact a Breakout-class or its own thing
06:54
<~Vornicus>
I'd actually put it in the same vague bin as Bagger, Tapper, and Ducks Ahoy
06:54
<&McMartin>
Ducks Ahoy has more of a maze aspect to it
06:55
<&McMartin>
The thing about Kaboom is that when it really gets going you are basically acting like a cartoon character playing tennis at mach 3
07:03
<~Vornicus>
though closer to Bagger than anything else.
07:04
<~Vornicus>
Apparently David Crane did the sprites for Kaboom. Later he did Ghostbusters for C64
07:09
<&McMartin>
David Crane did a whole lot of things
07:12
<~Vornicus>
Dang, he did
07:12
<&McMartin>
This may include "inventing the platformer"
07:24
<~Vornicus>
I didn't realize he was responsible for Pitfall
07:36
<~Vornicus>
I was similarly unaware of his involvement in A Boy And His Blob
08:10 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
08:13 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
08:13 mode/#code [+o ion] by ChanServ
08:26 LadyOfLight [catalyst@Nightstar-900lq3.dab.02.net] has quit [[NS] Quit: Bye]
08:27 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
08:30 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
08:30 mode/#code [+o ion] by ChanServ
08:38 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
08:51 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
08:51 mode/#code [+o ion] by ChanServ
08:55 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
09:02 Kindamoody[zZz] is now known as Kindamoody
09:11 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
09:11 mode/#code [+o ion] by ChanServ
09:17 macdjord is now known as macdjord|slep
09:19 Kindamoody is now known as Kindamoody|afk
09:27 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
09:40 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
09:40 mode/#code [+o ion] by ChanServ
10:01 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
10:04 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
10:04 mode/#code [+o ion] by ChanServ
10:12 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
10:15 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
10:15 mode/#code [+o ion] by ChanServ
11:45 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
12:00 Kindamoody|afk [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
13:06 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds]
13:09 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code
13:09 mode/#code [+o Alek] by ChanServ
15:15 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:15 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
15:15 mode/#code [+o himi] by ChanServ
15:28 LadyOfLight [catalyst@Nightstar-u5np0a.dab.02.net] has joined #code
15:36
< LadyOfLight>
Today I am mostly converting C++ code into C#
15:36
< LadyOfLight>
It is *thrilling*
15:36
<@TheWatcher>
EXCITEMENT!
15:36
<@TheWatcher>
ADVENTURE!
15:38
<@iospace>
and MASOCHISM
15:43 macdjord|slep is now known as macdjord|wurk
15:45
<@Azash>
Reminds me of a project a coworker mentioned, involving a black box (to him) system that would take a .jar and eventually plop out a .c
15:45
<@Azash>
No explanation was ever given
15:46
<@Tamber>
"Eventually" being the key word?
15:56
< LadyOfLight>
That's
15:57
< LadyOfLight>
Does the .c file need to be in any way related?
16:00
<@Azash>
It was a direct result of processing the .jar yes
16:01
<@Azash>
Tamber: Some minutes, apparently
16:01
<@Tamber>
Oh, that's not so bad.
17:28 celmin|sleep is now known as celticminstrel
17:39
< LadyOfLight>
Also I had a bit of a breakthrough in terms of thinking about Reduct today
17:39
< LadyOfLight>
But I can't really explain it on a phone, u just realised
17:39
< LadyOfLight>
I just*
17:45 Kindamoody|autojoin [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has joined #code
17:45 mode/#code [+o Kindamoody|autojoin] by ChanServ
18:43 LadyOfLight` [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:43
<&McMartin>
Heh
19:44
<&McMartin>
Also, having been burned by simultaneous C++/Java development in the past: watch out for those types that are mutable and passed by reference everywhere in C# but by value by default in C++ >_<
19:54
<@celticminstrel>
Doesn't C# have pass-by-value in ways that Java doesn't?
19:54
<@celticminstrel>
ISTR that it had some sort of struct-equivalent or something.
19:55
<&McMartin>
It does but it's finicky and it's still *different*
19:56
<&McMartin>
Because you can get code that superficially looks similar but has very different API contracts
19:56
<@celticminstrel>
Fair enough.
19:56
<&McMartin>
LoL's predilections means she's less likely to hit those, though, as immutability solves everything >_>
20:04
< LadyOfLight`>
it turns out that the only significant problem has been that I used some iterators and need them to be indices to make the logic neat in C#
20:06
<&McMartin>
Hooray for that being straightforward, good luck with the refactor there
20:06
< LadyOfLight`>
It was pretty straightforward :)
20:06
< LadyOfLight`>
Immutability /does/ solve everything :P
20:06
< LadyOfLight`>
*
20:09
<&McMartin>
I'm vaguely proud that I can predict these bits >_>
20:21 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:21 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:37
< LadyOfLight`>
:D
20:48 * Vornicus hats LadyOfLight`!
21:08
<&jeroud>
LadyOfLight`: For your next trick, rewrite it in F#. :-P
21:12
< LadyOfLight`>
Okay :D
21:12
< LadyOfLight`>
I don't know F#, but I imagine it wouldn't be hard to pick up
21:15
<&jeroud>
It borrows heavily from OCaml.
21:16
<&jeroud>
Very heavily. There is a mutually intelligible subset of both languages.
21:16
<&jeroud>
Although idiomatic F# uses some syntax shortcuts that OCaml doesn't have.
21:28 LadyOfLight`` [catalyst@Nightstar-9lu59t.dab.02.net] has joined #code
21:30
<&McMartin>
Every time I want to play with something high-level something low-level distracts me again
21:30 LadyOfLight [catalyst@Nightstar-u5np0a.dab.02.net] has quit [Ping timeout: 121 seconds]
21:31 * Vornicus just kind of wishes he felt like any of his projects were appropriate to try learning haskell or something to.
21:36
< LadyOfLight`>
I don't know OCaml either :D
21:36
<&McMartin>
Those Jane Street videos were fun but in the end not what I was looking for.
21:42 Kindamoody|autojoin is now known as Kindamoody
22:03
<&jeroud>
McMartin: I didn't really think they would be.
22:03
<&jeroud>
But I'm glad you enjoyed them.
23:09 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Thu Feb 23 00:00:36 2017
code logs -> 2017 -> Wed, 22 Feb 2017< code.20170221.log - code.20170223.log >

[ Latest log file ]