code logs -> 2007 -> Fri, 02 Nov 2007< code.20071101.log - code.20071103.log >
--- Log opened Fri Nov 02 00:00:52 2007
00:00 Vornicus is now known as Darius
00:42
< ReivSLEP>
Rising edge/falling edge?
00:42
<@McMartin>
Of the clock signal.
--- Log closed Fri Nov 02 00:49:54 2007
--- Log opened Fri Nov 02 01:01:06 2007
01:01 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
01:01 Irssi: #code: Total of 15 nicks [8 ops, 0 halfops, 0 voices, 7 normal]
01:01 mode/#code [+o TheWatcher] by ChanServ
01:01 Irssi: Join to #code was synced in 38 secs
--- Log closed Fri Nov 02 01:12:09 2007
--- Log opened Fri Nov 02 01:28:16 2007
01:28 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
01:28 Irssi: #code: Total of 15 nicks [8 ops, 0 halfops, 0 voices, 7 normal]
01:28 mode/#code [+o TheWatcher] by ChanServ
01:28 Irssi: Join to #code was synced in 41 secs
01:37 You're now known as TheWatcher[T-2]
01:38 You're now known as TheWatcher[zZzZ]
02:09 gnolam|Party [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
02:15 Darius is now known as Vornicus
02:27 * ToxicFrog eyes javac
02:27
<@ToxicFrog>
I would greatly appreciate it if you would report errors in the files in which they occur
03:11 Vornicus is now known as Vornicus-Latens
03:22 Vornotron [~vorn@64.252.5.ns-26444] has joined #code
03:23 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
03:33 Vornotron [~vorn@64.252.5.ns-26444] has quit [Connection reset by peer]
03:34 Vornucopia [~vorn@64.252.6.ns-25745] has joined #code
04:37 GeekSoldier [~Rob@Nightstar-4326.pools.arcor-ip.net] has quit [Ping Timeout]
04:44 * ToxicFrog prints off 16 pages of CPU specifications for use tomorrow
04:45 Sy [~Syloq@Nightstar-10648.hsd1.or.comcast.net] has joined #code
05:42
<@McMartin>
"The Great Indoors is a region."
06:05 GeekSoldier [~Rob@Nightstar-3813.pools.arcor-ip.net] has joined #code
06:56 Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has quit [Connection reset by peer]
07:02 Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has joined #code
07:02 mode/#code [+o Thaqui] by ChanServ
07:03 GeekSoldier is now known as GeekSoldier|work
07:14 Thaqui [~Thaqui@Nightstar-13312.jetstream.xtra.co.nz] has left #code [Leaving]
09:27 You're now known as TheWatcher
10:33
<@AnnoDomini>
Hm. Does anyone know of a utility somewhere which can automatically concatenate a potentially large amount of text files into one?
11:21 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
11:21 mode/#code [+o gnolam] by ChanServ
11:57 Vornucopia is now known as Vornicus
13:14 MyCatSchemes [~rb6822@Nightstar-1631.cs.bris.ac.uk] has joined #code
13:52
<@ToxicFrog>
AnnoDomini: "cat"
14:02
<@AnnoDomini>
Is there a version for Windows?
14:12 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: @AnnoDomini
14:13 Netsplit over, joins: AnnoDomini
14:13 mode/#code [+o AnnoDomini] by ChanServ
14:14
< ReivSLEP>
...cat concantenates? I thought it just read the file. >.>
14:15 * ReivSLEP uses 'cat filename' on a semi-regular basis to read small filenames without futzing about with pico, etc
14:18
<@ToxicFrog>
Also a common use.
14:18
<@ToxicFrog>
However, 'cat a b c d e f > abcdef' is how you generally concatenate stuff.
14:21
<@ToxicFrog>
AnnoDomini: several. Cygwin (www.cygwin.com) and Mingw (www.mingw.org) both come with one. If you'd like something you can pick and choose from, gnuwin32 (gnuwin32.sourceforge.net) and unxutils (unxutils.sourceforge.net) both have it, too.
14:22 mode/#code [-o+o ToxicFrog ToxicFrog] by ToxicFrog
14:22
<@ToxicFrog>
AnnoDomini: several. Cygwin (www.cygwin.com) and Mingw (www.mingw.org) both come with one. If you'd like something you can pick and choose from, gnuwin32 (gnuwin32.sourceforge.net) and unxutils (unxutils.sourceforge.net) both have it, too.
14:22
< ReivSLEP>
Aha, so long as I wasn't going to accidentally break anything. >.>
14:22
<@ToxicFrog>
Note that of these, Cygwin you probably don't want unless you're planning to use more than just cat and don't intend to package and distribute whatever it is you're working on.
14:23
<@ToxicFrog>
If you do, or if you only need cat, go with gnuwin32 or unxutils.
14:24
<@AnnoDomini>
Thanks. I'll look into it.
14:34 * AnnoDomini fails to understand how to use the thing.
14:41
< MyCatSchemes>
ReivSLEP: cat file1.raw file2.raw > /dev/dsp, etc.
14:41
< MyCatSchemes>
ReivSLEP: though generally I uses a FIFO with a copy of "mplayer -rawaudio on" hanging off the back of it, instead.
14:42
<@AnnoDomini>
Anyone know how to use the unxutils version?
14:43 * AnnoDomini is having no luck.
14:44
<@gnolam>
AnnoDomini: what are you trying to do?
14:44
<@AnnoDomini>
Concatenate files a, b and c into d.
14:45
<@gnolam>
Under windows?
14:45
<@AnnoDomini>
Yes.
14:46
<@gnolam>
copy /b foo.bar+frotz.bar fnord.bar
14:49
<@AnnoDomini>
Wow. Thanks, that worked.
14:49
<@AnnoDomini>
What's the /b do, out of curiosity?
14:50
<@AnnoDomini>
Without it, I seem to get the SUB code at the end.
14:50
<@gnolam>
Specifies binary files.
14:50
<@AnnoDomini>
How many files can it do?
14:51
<@gnolam>
Dunno. Lots? :)
14:52
<@gnolam>
But if there's a limit, there's nothing preventing you from doing successive concatenation.
14:53 * gnolam flees the scene again.
14:55
<@AnnoDomini>
I suppose not. It's trivial to make a batch file.
15:30 GeekSoldier|work is now known as GeekSoldier
16:27 Sy is now known as Syloq
17:07 You're now known as TheWatcher[afk]
17:13 AnnoDomini [AnnoDomini@Nightstar-29278.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
17:21 AnnoDomini [AnnoDomini@Nightstar-29758.neoplus.adsl.tpnet.pl] has joined #Code
17:21 mode/#code [+o AnnoDomini] by ChanServ
17:52 AnnoDomini is now known as Lerhir
18:05 MyCatSchemes [~rb6822@Nightstar-1631.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
18:10 You're now known as TheWatcher
18:17
<@ToxicFrog>
Lerhir: I note for future reference that the way you use the unxutils version is exactly as MCV say.
18:17
<@ToxicFrog>
*says.
18:19
<@Lerhir>
Didn't work for me. I copied cat.exe to the folder, made a shortcut to it, and specified '"<path>\cat.exe" file1 file2 > file3' for its run path.
18:20
<@Lerhir>
It just displayed text (too quick for me to follow).
18:20
<@Lerhir>
And the exited.
18:21
<@ToxicFrog>
Did you try actually runnin git from the command line to see what the text was?
18:21
<@Lerhir>
It was the text I wanted (well, the first file anyway) when I took a screenshot.
18:23
<@ToxicFrog>
Oh. I see the problem
18:23
<@ToxicFrog>
'>' isn't part of the cat command, it's a shell redirect.
18:23
<@ToxicFrog>
Works in batch files and from the command line.
18:24
<@ToxicFrog>
Does not work in shortcuts.
18:24
<@Lerhir>
Huh.
18:24
<@Lerhir>
Well, in any case, DOS' copy works.
18:25
<@ToxicFrog>
In that case, problem solved.
18:37 MyCatSchemes [~rb6822@Nightstar-1589.cs.bris.ac.uk] has joined #code
18:45 blkr3b3l [~nothing@Nightstar-6907.hsd1.md.comcast.net] has joined #Code
18:56 blkr3b3l [~nothing@Nightstar-6907.hsd1.md.comcast.net] has left #Code []
19:49
<@ToxicFrog>
But, yeah, Shortcuts Are Not Shell Scripts, nor are they symlinks.
19:49
<@ToxicFrog>
They're actually more like an environment and argv[] which is passed to exec()
20:19
< jerith>
Ugh. This Project Euler number 27 is a bit of a bugger.
20:38 MyCatSchemes [~rb6822@Nightstar-1589.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
21:12
< Vornicus>
what is it?
21:12
< jerith>
Find the value of d < 1000 for which 1/d contains the longest recurring cycle.
21:13
< Vornicus>
...not actually that hard. I assume you're working in base 10?
21:13
<@ToxicFrog>
...in what radix?
21:14
< jerith>
Base 10.
21:15
< Vornicus>
See, there's a cool trick - the length of the cycle for a number d is the same as the smallest number n such that d | 10**n - 1
21:15
< jerith>
I have a couple of ideas, but none are clean.
21:16
< Vornicus>
:)
21:16
< jerith>
What is | in this context?
21:18
< Vornicus>
a | b -> b is evenly divisible by a
21:18
< Vornicus>
oh, actually, I tell a lie - you first have to divide d by 2 and 5 until you can't any more.
21:31 * Vornicus eyes this. probably should have instrumented it...
21:34
<@ToxicFrog>
a | b == (b % a == 0) ?
21:34
<@McMartin>
More or less.
21:35
< Vornicus>
Yes.
21:35
<@McMartin>
IIRC, divisibility is always defined, even when % is not
21:37 * Vornicus is compiling a list of primes. A bit list of primes.
21:38
< Vornicus>
hey, look, it's interruptable without losing progress.
21:38 * Vornicus instruments.
21:39
< jerith>
Vorn: Python?
21:39
< Vornicus>
Quite
21:39 * jerith is using Erlang.
21:40 mode/#code [+o Vornicus] by Vornicus
21:40
<@Vornicus>
http://rafb.net/p/gHiZ6B98.html
21:40
<@Vornicus>
It's not pretty.
21:42 * Vornicus is at 35,000 primes, and the 35,000th prime is 414,977.
21:43
<@McMartin>
Trying to get the millionth prime?
21:44
< jerith>
A seive is faster if you have an upper bound.
21:44 * jerith nods.
21:44
< jerith>
Oops. Op me?
21:44 mode/#code [+o jerith] by McMartin
21:44 ServerMode/#Code [-o jerith] by Blargh.CA.US.Nightstar.Net
21:44 mode/#code [+o jerith] by ChanServ
21:44
<@McMartin>
lolpwnt
21:44
<@jerith>
http://paste.lisp.org/display/50180
21:44
<@jerith>
O_o
21:48 * jerith goes to sleep.
21:54
<@Vornicus>
yeah, an upper bound would help.
21:54
<@Vornicus>
McM: no, the primes up to 1M
21:54 mode/#code [-o+o McMartin McMartin] by Vornicus
21:55
<@Vornicus>
I need to learn erlang and haskell and ML, just so I can follow the code that gets thrown around in here.
22:01 * Vornicus asks it for the highest prime below 1000, uses that as the maximum index. Should probably do this loop by hand so he doesn't have to rejigger it later.
22:42 Lerhir is now known as AnnoDomini
23:10 * Vornicus is going through project euler, is on the collatz one. First, aggressively fills from the bottom. This produces nearly 400,000 numbers that when collatzed don't go above 1,000,000.
23:15
<@McMartin>
Collatz can go to a million without blowing out signed 32-bits.
23:15
<@Vornicus>
Not surprising.
23:16
<@Vornicus>
But I was curious about what happens if you limit it to 1,000,000. You get a much larger number of things than I expected.
23:17
<@Vornicus>
(the longest chain that doesn't break 1M starts at 595800)
23:19
<@Vornicus>
(which has 296 steps to 1)
23:19
<@McMartin>
Nod
23:49
<@gnolam>
http://feber.se/article_images/34846.jpg <- Ahh, old programming books.
23:49 mode/#code [+o gnolam] by ChanServ
23:49
<@gnolam>
http://feber.se/article_images/34846.jpg <- Ahh, old programming books.
23:54
<@Vornicus>
O.o
--- Log closed Sat Nov 03 00:00:58 2007
code logs -> 2007 -> Fri, 02 Nov 2007< code.20071101.log - code.20071103.log >