←2008-02-03 2008-02-04 2008-02-05→ ↑2008 ↑all
00:56:01 -!- ehird` has quit (No route to host).
00:56:30 -!- ehird` has joined.
01:03:04 <ehird`> I wonder how crazy an esoteric language can get re: modifiable syntax
01:03:29 <ehird`> Maybe something that starts off dirt-simple forth-style parsing, then is extended in itself into a crazy crescendo of modifiable, extendable, pluggable, composable syntax from hell
01:24:16 -!- GreaseMonkey has joined.
01:26:51 <lament> ehird`: it's called "Perl"
01:27:11 <ehird`> heh
01:27:23 <ehird`> not quite - it doesn't have extendable syntax to that degree
01:27:31 -!- ehird` has quit ("K-Lined by peer").
01:39:06 -!- sebbu has quit ("@+").
02:38:52 -!- immibis has joined.
02:58:55 -!- adu has joined.
02:59:09 <adu> i'm sad
02:59:25 <adu> I just found two languages which are nearly Identical to my dream language
03:04:00 -!- immibis has quit ("Hi Im a qit msg virus. Pls rplce ur old qit msg wit tis 1 & hlp me tk ovr th wrld of IRC. and dlte ur files. and email ths to).
03:04:21 -!- immibis has joined.
03:11:01 <GreaseMonkey> adu: that sucks
03:11:09 <GreaseMonkey> you say there's two...
03:11:52 <adu> Io (no keywords, i like) and Z (functions == relations, i like)
03:12:59 <adu> Io method syntax: Object method Args<CTCP>
03:13:11 <adu> Z function syntax: Function Args
03:13:21 <adu> both have minimal syntax as well
03:36:42 -!- Corun has quit ("This computer has gone to sleep").
04:08:17 -!- danopia has quit (Read error: 110 (Connection timed out)).
05:07:33 -!- oerjan has joined.
05:21:12 -!- adu has left (?).
05:57:43 -!- oerjan has quit ("leaving").
06:07:20 -!- immibis has left (?).
06:54:18 -!- immibis has joined.
07:10:55 -!- pikhq has quit ("leaving").
07:32:49 -!- lifthrasiir has joined.
07:39:37 -!- chuck_ has joined.
07:43:37 -!- chuck has quit (Read error: 110 (Connection timed out)).
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:00:09 -!- immibis has quit ("Hi Im a qit msg virus. Pls rplce ur old qit msg wit tis 1 & hlp me tk ovr th wrld of IRC. and dlte ur files. and email ths to).
08:16:47 -!- Aatch has joined.
08:36:04 -!- GreaseMonkey has quit ("Hi Im a qit msg virus. Pls rplce ur old qit msg wit tis 1 & hlp me tk ovr th wrld of IRC. and dlte ur files. thx.").
09:10:10 <faxathisia> ehird`, Yeah that's what I want
09:10:44 <faxathisia> ehird`, Just getting a really good mixfix parser and hooking it up to whatever lambda calculus you want
09:59:15 -!- Aatch has left (?).
10:01:33 -!- faxathisia has quit ("If there are any aliens, time travellers or espers here, come join me!").
10:58:37 -!- RedDak has joined.
11:49:52 -!- Corun has joined.
11:56:58 -!- Corun has quit ("This computer has gone to sleep").
12:32:30 -!- chuck_ has changed nick to chuck.
13:46:42 -!- timotiis has joined.
14:12:25 -!- RedDak has quit ("I'm quitting... Bye all").
14:48:07 -!- jix has joined.
15:36:00 -!- faxathisia has joined.
15:36:08 <faxathisia> !Huh
15:36:11 <EgoBot> Huh?
16:49:39 -!- ehird` has joined.
16:49:59 -!- ehird` has quit (Client Quit).
16:50:27 -!- ehird` has joined.
17:02:12 -!- oerjan has joined.
17:05:17 -!- helios24 has joined.
17:30:30 -!- sebbu has joined.
18:06:18 -!- Corun has joined.
18:16:25 <ehird`> oklopol: okloping
18:34:44 <ehird`> b:4>@[n;&0n=n:+/_sqr 50{c+(-/x*x;2*/x)}/c:+,/(-1.5+2*(!w)%w),/:\:-1+2*(!w)%w:200;:;4];`mandel.pbm 6:"P4\n",(5:2#w),"\n",_ci 2_sv'-1 8#,/+(2#w)#b
18:34:52 <ehird`> I wish K systems still offered a free interpreter.
18:35:17 <ehird`> apologies, Kx systems
18:35:44 -!- jix has quit (Read error: 104 (Connection reset by peer)).
18:35:55 -!- jix has joined.
18:36:19 -!- jix has quit (Read error: 104 (Connection reset by peer)).
18:36:39 -!- jix has joined.
18:36:48 <ehird`> As it stands now I can't even see how you can pay them for one
18:38:51 <ehird`> very unfortunate
18:39:44 * SimonRC watches "Barack Obama @ Google"
18:39:46 <SimonRC> What a pity I can't vote for him
18:40:59 <oerjan> hm... doesn't the US presidential candidate foreigners like best usually turn out too left-wing for americans?
18:41:12 <ehird`> SimonRC: he's probably the best one left.. this is unsuprising, e.g. kucinich had no hope in hell so his dropping out is unimportant (though apart from the ufo stuff he was great)
18:41:33 <ehird`> i also note that reading k comments changes how i type like this. damn you, kx systems and your commenting style
18:41:38 <lament> he dropped out because he was abducted by aliens?
18:42:04 <SimonRC> ehird`: what is this commenting style?
18:42:06 <ehird`> lament: possibly :p
18:42:33 <ehird`> SimonRC: lowercase, concise, not always grammatically correct
18:42:34 <SimonRC> If they got Hillary back that would make an alarmingly-long time with only Bushes and Clintons in the House
18:42:34 <ehird`> e.g. http://www.kx.com/a/k/examples/bell.k
18:42:42 <SimonRC> ehird`: heh
18:43:01 <ehird`> kind of like k code
18:43:25 <ehird`> http://kx.com/a/k/examples/read.k some more kx systems commenting in the same style
18:44:02 <SimonRC> hmm, forthy
18:44:14 <ehird`> SimonRC: no
18:44:14 <ehird`> APL-y
18:44:22 <ehird`> it's a derivative
18:44:35 <SimonRC> that is some cray line-noise syntax
18:44:39 <SimonRC> *crazy
18:44:47 <ehird`> SimonRC: pretty much like APL, but sans crazy characters
18:44:51 <ehird`> i like it
18:44:52 <SimonRC> I have seen it before, but it still surprises me
18:44:55 <ehird`> http://www.kuro5hin.org/story/2002/11/14/22741/791 this is good stuff
18:45:03 <ehird`> unfortunately if you go to kx.com there's no reference to it
18:45:13 <ehird`> &they seem to not offer interpreters for it any more, beyond the obvious one you need to run their kdb+ software
18:45:24 <SimonRC> pity
18:45:30 <SimonRC> you could implement one yourself maybe?
18:45:39 <SimonRC> for playing it doesn't need to be fast
18:45:51 <ehird`> SimonRC: k is a large language.
18:45:54 <ehird`> lots of built in stuff.
18:45:58 <SimonRC> nor would you need all the libraries from the beginning
18:45:59 <SimonRC> :-(
18:46:06 <ehird`> all code uses most of them.
18:46:17 <ehird`> that's k style
18:46:29 <ehird`> their interpreter is very concise though.
18:46:36 <ehird`> there's no language spec
18:46:41 <ehird`> an alternate interpreter would be hard
18:47:21 <SimonRC> ther is a manual and a dictionary though
18:47:25 <ehird`> true
18:47:26 <ehird`> but still
18:48:10 <ehird`> SimonRC: plus i don't really want to damage kx's profits etc
18:48:19 <ehird`> i think for something like k they deserve it ;)
18:49:09 <ehird`> unfortunately i can't really afford kdb+ just to try out k
18:49:10 <ehird`> :)
18:49:24 <SimonRC> no-one would use your terp in place of their product
18:49:37 <SimonRC> also, look at J, which is similar I hear
18:49:45 <ehird`> SimonRC: well, they used to commercially sell the interp.
18:50:07 <SimonRC> if they were still interested in that they would still be selling it
18:50:27 <SimonRC> or, you could email them about it
18:50:46 <SimonRC> I am sure they would like to hear from a fan
18:51:29 <ehird`> true, i'll keep searching for a copy of the interp though
18:51:29 <ehird`> :)
18:51:36 <ehird`> they used to offer a free one
18:52:12 <ehird`> k is hard to google
18:52:45 <lament> much unlike c
18:53:43 <ehird`> c is popular enough
18:53:56 <ehird`> d has the same problem except k is more obscure so it is almost impossible
18:54:19 <ehird`> i may have to use the web archie
18:54:22 <ehird`> *archive
18:54:39 -!- slereah__ has joined.
18:54:39 <faxathisia> It's really hard to turn haskell into scheme...
18:54:54 <ehird`> Along the way I found K Links put up by the other of the kuro5hin article, and "No Stinking Loops", a collection of links for various APL-derived languages; interpreting the latter my best guess is that versions 2 and 3 of K are obsolete and version 4 is now called "Q".
18:54:56 <ehird`> that is confusing
18:55:08 <ehird`> ahhh:
18:55:08 <ehird`> It used to be the case that you could download a demo version of K from the Kx website. However, in 2003 Kx systems released Q which merges the features of K and Ksql and is meant to be the successor to both. At some point they deleted the K download since it is no longer a featured language; however they did not add a Q download. Kx still offers trial versions of Q, but it is on a by request basis. Abcarter 15:05, 25 August 2006 (U
18:55:08 <ehird`> TC)
18:55:16 <ehird`> SimonRC: i doubt an email from a fan would help then:)
18:55:39 <ehird`> A correction and a comment. I had thought that Q was the successor to both ksql and k. It is the successor to ksql and it does merge the features of ksql and k, however it is still written entirely in k, though a newer version. It would be nice for Kx to offer older versions of k without support, but it's not clear that it is in their interest to do so. Abcarter 00:19, 1 December 2006 (UTC)
18:55:40 <ehird`> ok
18:55:41 <ehird`> that;s confusing
18:58:56 <ehird`> SimonRC: http://en.wikipedia.org/wiki/Talk:K_%28programming_language%29 take a look at the prototype j interp
18:58:59 <ehird`> very epic
19:00:51 <ehird`> gcc complains about it :)
19:00:59 <ehird`> but sure enough it works
19:01:12 <ehird`> sweet, 1/0 segfaults
19:01:21 <ehird`> so does any unrecognized instruction
19:01:24 <ehird`> <3
19:02:14 <ehird`> hm i am talking a lot
19:07:31 <ehird`> Hm
19:07:35 <ehird`> does it even define 'mv'?:|
19:07:49 <ehird`> oh
19:07:50 <ehird`> yes
19:10:17 -!- ais523 has joined.
19:10:50 <ais523> hello ehird`
19:10:57 <ehird`> hello
19:11:03 <ehird`> i was just blabbing on endlessly about k
19:11:17 <ehird`> in particular arthur's first prototype j interp: http://rafb.net/p/zcG1y584.txt
19:12:41 <ais523> that looks pretty obfuscated for an interpreter...
19:13:14 <ehird`> ais523: ever read k/j code?
19:13:22 <ais523> no
19:13:36 <ehird`> http://www.kx.com/a/k/examples/bell.k
19:13:42 <ehird`> bell labs benchmark
19:13:50 <ehird`> even more impressive:
19:13:54 <ehird`> http://www.kx.com/a/k/read.k translates k code into english
19:15:02 * ais523 runs the original paste through cpp and indent
19:15:15 <ehird`> ais523: i wouldn't
19:15:19 <ehird`> it's not k/j style
19:15:34 <ais523> it might at least give me a chance of reading it more easily...
19:15:35 <ehird`> certainly if you want to understand code written in those languages you should get used to code like that
19:15:46 <ehird`> perhaps a slow read through it will be beneficial
19:15:48 <ehird`> :-)
19:15:49 * ais523 has written code like that before
19:16:01 <ehird`> ais523: ah, but has your code powered banks and stuff?
19:16:13 <ais523> no
19:16:15 <ehird`> or full enterprise-quality relational databases?
19:16:23 <ais523> they'd be crazy to run code that isn't well-commented and indented
19:16:25 <ehird`> well, technically THAT doesn't but the k interp is tiny and really fast and IS used for those
19:16:29 <ais523> because it would be harder to spot the bugs
19:16:38 <ehird`> ais523: no, not with k.. it's a paradigm shift.
19:16:44 <ehird`> read the .k files i showed you
19:16:55 <ehird`> ais523: It's an APL descendant
19:17:33 <ais523> I was talking about the C code you pasted originally
19:17:37 <ehird`> http://www.kuro5hin.org/story/2002/11/14/22741/791 this is a good explanation of why k is like that
19:17:44 <ehird`> ais523: it is basically in the style of k/j code, that c code.
19:18:12 <ehird`> also, cpp+indent won't help you. i tried for amusement
19:18:19 <ais523> it does help
19:19:32 <oerjan> ais523: do you know if there is a way to make a template or something for catseye URLs so we don't have to change them all on the wiki every time cpressey moves around?
19:19:41 <ais523> oerjan: shouldn't be too hard
19:20:22 <ehird`> oerjan: yes
19:20:24 <ehird`> shall i make one?
19:20:51 <ehird`> template name=catseye, and i only need to handle the domain not filepaths
19:20:52 <ehird`> right?
19:20:59 <ais523> pretty much
19:21:12 <oerjan> yes please :)
19:21:25 <ais523> you could do a template which was used along the lines of {{catseye|projects/worb/|description}}
19:21:32 <oerjan> er, we want to be able to do file paths
19:21:42 <ais523> you would be able to
19:21:47 <ais523> by putting more between the two | signs
19:21:59 <ehird`> current url?
19:22:05 <ais523> catseye.tc
19:22:08 <ais523> making the template's code:
19:22:18 <ais523> [http://catseye.tc/{{{1}}} {{{2}}}]
19:22:44 <ehird`> ais523: heh, i've added fancy comments to make changing the url easy
19:22:48 <ehird`> perhaps a bit overboard
19:22:57 <ais523> no, making wikis easy to use is important
19:23:08 <ais523> you might even want to add documentation in a <noinclude>
19:24:46 <ehird`> i hope mediawiki strips comments decently
19:25:26 <ehird`> kay gimme a second
19:25:29 <ehird`> logging in to test it
19:26:02 <ehird`> hmm
19:26:08 <ehird`> by default it uses its second parameter as the description
19:26:11 <ehird`> without the catseye.tc stuff
19:26:19 <ehird`> i think it should have the http://catseye.tc/... in with it
19:26:20 <ehird`> agreed?
19:26:49 <ehird`> ais523: oo crap, you know mw right? is there a way to like save a variable or something
19:26:55 <ehird`> i guess i could do template:catseye being
19:27:01 <ehird`> {{catseye/inner|theurl}}
19:27:08 <ehird`> with /inner having nowikis around the argument places
19:27:14 <ehird`> hopefully that metaness would work.
19:27:20 <ais523> have a look at what I've done so far
19:27:20 <ehird`> ais523: would it?
19:27:27 <ehird`> yeah i know
19:27:27 <ehird`> :|
19:27:33 <ais523> I'm not entirely sure what you're trying to get at
19:27:38 <ehird`> oh wait
19:27:40 <ehird`> you edited my stuff
19:27:42 <ehird`> heh
19:27:48 <ais523> hey, it's a wiki...
19:27:53 <ais523> the default is currently parameter 1
19:27:56 <ehird`> ais523: yeah but i was working on it
19:27:56 <ehird`> :p
19:28:03 <ais523> but you can change it by putting things between the | and the }}}
19:28:13 <ehird`> i know mw templates
19:31:05 <ehird`> ok
19:31:07 <ehird`> almost got it working
19:31:08 <ehird`> :-P
19:31:40 <ehird`> ah wait
19:31:41 <ehird`> silly me
19:31:46 <ehird`> ais523: got it, just give me a second
19:32:41 <ais523> you're only passing one param to catseye/inner, rather than 2, and MW params are 1-based not 0-based
19:32:54 <ais523> the only way to pass in {{{0}}} is to explicitly write 0= in the template call to give a named parameter
19:32:55 <ehird`> is it
19:32:55 <ehird`> okay
19:33:44 <ehird`> ok
19:33:47 <ehird`> got it apart from one case
19:33:50 <ehird`> which i am about to fix now
19:34:08 <ehird`> ais523: in:
19:34:11 <ehird`> {{{a|b}}}
19:34:14 <ehird`> can b include argument refs?
19:34:17 <ais523> yes
19:34:34 <ehird`> curious
19:34:48 <ehird`> this is catseye/inner
19:34:48 <ehird`> [http://{{{1}}}/{{{2}}} {{{3| http://{{{1}}}/{{{2}}} }}}]
19:34:57 <ehird`> the {{{1}}}{{{2}}} arent getting expanded
19:35:02 <ais523> are you passing it three arguments?
19:35:42 <ais523> ah, the problem is that you need to write {{{1|}}} and {{{2|}}} in the main catseye template
19:35:51 <ehird`> ahhh
19:35:52 <ehird`> okay
19:35:54 <ais523> because otherwise if param 2 is missing you pass it the literal string {{{2}}} rather than a blank string
19:36:15 <ehird`> ah wait!
19:36:18 <ehird`> we want to default to [1] etc
19:36:20 <ehird`> since htat's what MW does
19:36:22 <ehird`> not the full url
19:36:26 <ehird`> right?
19:36:39 <ehird`> so that catseye is always isomorphic to []s
19:37:00 <ais523> in that case you want a null string as the default
19:37:08 <ais523> so it autonumbers the URL
19:37:12 <ehird`> excellent, ais523 -- i fixed it up
19:37:26 <ehird`> and its dirt simple to change the url, since it's right there, easily visible
19:37:43 <ehird`> now -- how do we get all pages that link to a url containing catseye
19:37:45 <ais523> the next problem is to find all the links to catseye
19:37:58 <ais523> normally you'd do that using http://en.wikipedia.org/wiki/Special:Search?go=Go&search=Special:Linksearch, but it appears to not be installed on Esolang
19:38:47 <ehird`> if only we could run arbitary code on the wiki server!
19:38:50 <ehird`> oh wait.
19:38:52 <ehird`> :)
19:39:10 <ais523> API is disabled, too, so checking all the pages by hand is likely to be the only option
19:39:51 <ehird`> ais523: I have a better idea.
19:39:56 <ais523> what?
19:40:09 <oerjan> i assume [[Chris Pressey]] is a good place to start
19:40:24 <ehird`> I'll write a program that wget's every entry on the language list concurrently, tries to find catseye in a url, and saves it to disk if it finds it :D
19:40:29 <ehird`> then I can run a script to do the replacement! \o/
19:40:37 <oerjan> yay
19:41:17 <ehird`> guess i should go write it
19:41:17 <ehird`> :-P
19:41:30 <ehird`> hmm, this is either going to be a superb use for perl, or a hilariously evil use for bash
19:41:58 <oerjan> some links have been changed to catseye.tc, while some are still the broken catseye.webhop.net
19:42:22 <ehird`> oerjan: Well, they're both wrong
19:42:23 <ehird`> :-)
19:42:47 <oerjan> might even be some wayback links hiding in there, unless cpressey fixed it all
19:43:05 * ais523 tries opening up the Esolang database dump in Emacs to find the links that way
19:43:12 <ehird`> oh, database dump
19:43:13 <ehird`> that's a good idea
19:43:26 <ehird`> hmm, ok here's the plan
19:43:32 <ehird`> shout out a page name to me and i'll magically fix it
19:43:44 <ehird`> i will multithread and also look myself.
19:43:57 <ais523> Befunge
19:44:48 <ais523> lots in the history of the language list
19:44:58 <ais523> but I think all the external links are supposed to have been removed from there
19:45:15 <ehird`> fixed pages: befunge,ALPACA
19:45:39 <ais523> Smallfuck
19:45:52 <ais523> Wierd
19:46:19 <ais523> SMETANA
19:46:31 <ais523> beta-Juliet
19:46:54 <ehird`> up to SMETANA
19:47:13 <ais523> Esoteric programming language
19:47:26 <ais523> Muriel
19:47:36 <ais523> ALPACA
19:47:43 <ais523> (but you've done that one already...)
19:47:51 <ehird`> up to Esoteric
19:47:51 <ais523> SMITH
19:48:01 <ais523> RUBE
19:48:16 <ais523> Blank
19:48:28 <ais523> Hunter
19:48:44 <ais523> Noit o' mnain worb
19:48:54 <ais523> RedGreen
19:48:55 <ehird`> up to SMITH
19:49:14 <ehird`> just a note
19:49:16 <ais523> SARTRE
19:49:22 <ehird`> we're getting some catseye.tc//foo because of the / in the links
19:49:23 <ehird`> thats ok though
19:49:46 <ais523> Thue
19:49:57 <ais523> Ypsilax
19:49:58 <ehird`> oerjan: you're welcome to help too :-P
19:50:05 <oerjan> er...
19:50:05 <ehird`> i am up to RUBE
19:50:15 <ais523> Strelnokoff
19:50:24 <ehird`> Blank
19:50:29 <ais523> 2iota
19:50:48 <ais523> Version
19:51:04 <ehird`> Up to hunter
19:51:06 <ehird`> database is being flakey
19:51:07 <oerjan> oops
19:51:10 <ehird`> ais523: how much more?
19:51:16 <ehird`> oerjan: oops?
19:51:26 <ais523> not sure
19:51:38 <ais523> I'm only 4% of the way through the dump but that isn't a very reliable measurement
19:51:52 <ehird`> i hope these aren't just the first 4%
19:51:52 <ehird`> :|
19:51:56 <ehird`> ais523: did you strip all the HISTORY out?
19:51:58 <ehird`> that might help.
19:52:11 <ais523> the current versions are stored separately from the history
19:52:17 <ais523> I'm viewing the current versions at the moment
19:52:23 <ais523> but the history makes up the bulk of the dump
19:52:30 <ais523> which is why 4% is such a low number
19:52:43 <ais523> i.e. we get all the links we're interested in first
19:52:45 <ehird`> exactly
19:52:51 <ehird`> ais523: can you grep to find the history section
19:52:53 <ehird`> and then kill to EOF?
19:52:54 <oerjan> ehird`: i tried starting from the back but someone already did ;)
19:53:16 <ais523> ehird`: I don't know enough about the layout of a MW database dump to do that reliably
19:53:23 <ehird`> up to Thue by the way
19:53:29 <oerjan> shelta done
19:53:33 <ehird`> ais523: grep for obvious things? :P
19:53:40 <ehird`> Like, grep for a page name you've already seen
19:53:55 <ais523> what with all the links in the wiki?
19:53:56 <ehird`> Just done thue
19:53:59 <ehird`> ais523: True..
19:54:05 <ais523> it would probably be easier just to add to the list than try to find its end
19:54:05 <ehird`> grep without [[]] around?
19:54:27 <ehird`> Up to Ypsilax
19:54:42 <oerjan> squishy2k
19:55:14 <ehird`> Up to 2iota
19:55:25 <ais523> Chris Pressey
19:55:35 <ehird`> ais523: Fixed that one already.
19:55:39 <ais523> Beturing
19:55:47 <ais523> Braktif
19:55:59 <ais523> Shelta
19:56:09 <ais523> ILLGOL
19:56:15 <oerjan> did Shelta
19:56:21 <ais523> Bear Food
19:56:33 <ais523> MDPN
19:56:51 <ehird`> My mouse skills sure are improving!
19:57:03 <ais523> Sally: this page seems to have identical content to Bear Food; maybe worth investigating if one or the other of the pages are vandalism?
19:57:17 <ais523> Squishy2K
19:57:23 <ehird`> ais523: bear food is legit
19:57:26 <ais523> Tamerlane
19:57:36 <ais523> TURKEY BOMB
19:57:38 <ehird`> Up to Bear Food
19:57:48 <ais523> Star W
19:57:54 <ehird`> Sally and Bear Food are legit
19:57:57 <ais523> Circute
19:58:08 <ais523> Sbeezg
19:58:18 <ais523> PESOIX
19:58:37 <ais523> that's it for mainspace
19:59:02 <ehird`> Up to Tamerlane
19:59:08 <ais523> no, wait, there's more...
19:59:10 <ais523> Vertica Smile
19:59:29 <ehird`> up to TURKEY BOMB
19:59:30 <ais523> scratch that, I was right first time
19:59:34 <ehird`> ais523: What about other namespaces?
19:59:53 <ais523> Talk:Braktif
19:59:57 <ehird`> Up to Star W
20:00:13 <oerjan> the Bear food link is now incorrect
20:00:23 <ehird`> oerjan: {{sofixit}}
20:00:43 <ais523> Esoteric Topics in Computer Programming
20:00:45 <ehird`> Up to sbeezg
20:00:49 <ais523> argh, it seems they aren't sorted by namespace after all
20:01:09 <ehird`> fsck.
20:01:28 <oerjan> i cannot find the right page
20:01:29 <ais523> that is it
20:01:44 <ais523> I've gone past the end of the article-text table and ended up in the links table
20:01:47 <ais523> so I think that's everything
20:01:50 <ais523> unless I missed one
20:03:15 <ais523> some of the new links point to 404s at Catseye, by the way
20:03:17 <ehird`> Esoteric Topics in Computer Programming -- no suitable link
20:03:20 <ehird`> ais523: yeah..
20:03:22 <ehird`> needs some fixup
20:03:23 <ais523> we'll have to check which ones actually do need waybacking
20:03:27 <ehird`> but, recent changes.
20:03:29 <ehird`> so it'll be easy
20:03:34 <ehird`> i for one have worn out my fingers for now
20:03:48 <ehird`> i dominate Recent Changes
20:03:49 <ehird`> awesome
20:04:38 <ais523> there's also Special:Whatlinkshere/Template:Catseye if we need to find all the pages in the future for some reason
20:06:03 <ehird`> hmm
20:06:09 <ehird`> my /inner trick is no longer neccessary
20:06:23 <ehird`> i will remove
20:07:37 <ehird`> ais523: okies
20:07:44 <ais523> as for your comments about K
20:07:49 <ais523> to me it looks like what GolfScript ought to be
20:07:55 <ehird`> ais523: heh, indeed
20:07:58 <ehird`> except it's serious!
20:08:10 * ais523 sees no reason why a language like that cannot be serious
20:08:12 <oerjan> should the link to Cat's Eye Technologies: Esoteric Topics in Computer Programming from Esoteric programming language be reverted to wayback, or changed to projects?
20:08:21 <ehird`> oerjan: well, it was an article
20:08:24 <ais523> it's about the column itself
20:08:25 <ehird`> so find the article or leave it
20:08:30 <ais523> so it should probably be the Wayback link
20:08:36 <ais523> if the article isn't on catseye any more
20:08:59 <ehird`> http://golf.shinh.org/p.rb?Number+lines my challenge is pretty interesting!
20:09:00 <ehird`> ais523: yeah
20:09:42 <ais523> ehird`: I entered that one already
20:09:45 <ais523> I'm 9th for Perl entries
20:09:49 <ehird`> hm, speaking of which, who here uses reddit? http://reddit.com/r/programming/info/67myb/comments/ the prototype j interp
20:09:49 <ais523> which is not really very good
20:09:55 <ehird`> its at 0 points right now, so..:)
20:10:15 <ais523> I'm still winning outright on Perl ROT13s, though
20:10:39 <ehird`> http://golf.shinh.org/p.rb?Minimal+scheme+interpreter look, all the lovely cheats!
20:10:42 <ehird`> if only my examples were OK
20:10:52 <ais523> (hint: my entry doesn't rot13 punctuation marks between Z and a properly, but it doesn't need to based on the examples given)
20:11:10 <ais523> I think it may also exploit UB in the Perl implementation
20:11:26 <ehird`> http://golf.shinh.org/reveal.rb?Minimal+scheme+interpreter/notogawa%28embed%29/1201272045&hs <-- ooh, clever
20:13:06 <ais523> Haskell in the style of Prolog!
20:13:06 <oerjan> what the?
20:14:40 <oerjan> ah just a typo
20:15:16 * ais523 is upset that there aren't more genuine entries in the Underload contest
20:16:23 <ehird`> http://golf.shinh.org/p.rb?simple+language the one challenge that nobody will not cheat on!
20:16:24 <ais523> My Perl entry is genuine (although not quite compliant); there are also Ruby and PostScript entries that look genuine
20:16:40 <ehird`> the funnest thing about mine is that the only primitive stuff is the infix ops
20:16:40 <ais523> I'm not sure about the large C one, because I don't understand the word in the parens
20:16:44 <ehird`> like : and {...} and * + etc
20:16:51 <ehird`> if is called like a composite
20:16:57 <ehird`> because {} is a lambda
20:17:21 <ehird`> ais523: i think hidoi=embed
20:17:24 <ehird`> mugoi=genuine
20:17:29 <ais523> ok
20:17:42 <ehird`> those crazy japanese rubyist golfers
20:21:06 <ehird`> i ought to write some c code like the j interp
20:22:53 * SimonRC tries to figure out what the "rsh" thing is in that APL-like terp
20:23:06 <ehird`> SimonRC: evilness
20:23:16 <ehird`> evilness and DEATH
20:24:14 <ehird`> SimonRC: that interp isn't intentionally like that, btw. that's just how the guy codes. he went on to create K, and his product KDB by Kx systems has *no loops at all*
20:24:15 <ehird`> none.
20:24:19 <ehird`> and it's a full freaking rdbms
20:25:23 <ais523> is APL 2D?
20:25:26 -!- jix has quit (Read error: 113 (No route to host)).
20:25:27 <ais523> if not, it ought to have been
20:25:50 <ais523> and there's nothing wrong with using combinators to avoid needing to write loops
20:25:53 <SimonRC> ah, reshape
20:25:56 <ais523> several languages use that method
20:26:10 <SimonRC> that is a nice feature
20:26:23 <ehird`> it doesn't use combinators, really
20:26:28 <ehird`> it uses some weird stuff
20:26:36 <ehird`> ais523: and no, because that's actually the opposite of apl philosophy
20:26:51 <SimonRC> waitamo, surely it must have a wait-for-input loop?
20:26:58 <SimonRC> OTOH, few others are needed
20:27:06 <SimonRC> just implicit loops in various things
20:27:15 <ais523> ehird`: K's adverbs remind me of combinators
20:27:21 <ais523> even though technically speaking they aren't
20:27:46 <ehird`> SimonRC: beats me, all i know is that they have 0 loops in their code
20:27:51 <ehird`> which has been verified by them multiple times
20:27:59 <ais523> waiting for input isn't a loop
20:27:59 -!- RedDak has joined.
20:28:02 <ais523> it's just waiting for input
20:28:15 <ais523> just like sleep commands which wait for time needn't be loops
20:29:01 <ais523> short waits (a few microseconds) on PIC microcontrollers, for instance, are often achieved by putting in several useless flow-control commands so as to cause the microcontroller to waste time figuring out how to follow them
20:29:08 <ehird`> http://cdn-www.cracked.com/articleimages/wong/computer.jpg this is ... brilliant
20:29:32 -!- danopia has joined.
20:29:32 <ais523> aiming a CALL at a RETURN of a procedure you already have takes it a whole 4 us to process, with just one machine-language word
20:29:38 <ais523> whereas most commands run in 1 us
20:29:46 <AnMaster> ehird`, hah
20:29:58 <ehird`> AnMaster: it's ironic, of course -- which loads of people don't seem to grok.
20:30:02 <AnMaster> indeed
20:30:05 <ais523> come to think of it, you could create really evil obfuscated code by combining that sort of thing with the built in clock cycle counter...
20:30:07 <AnMaster> ehird`, of course it is ironic
20:30:21 <ehird`> AnMaster: some people have thought it was serious
20:30:35 <AnMaster> they did?
20:30:36 <AnMaster> wtf
20:30:52 <AnMaster> well with some americans, you never know, they could mean it
20:31:56 * oerjan finished checking the recent changes. Good night.
20:32:15 -!- oerjan has quit ("leaving").
20:32:34 <AnMaster> what recent changes?
20:32:35 <ehird`> he
20:32:36 <ehird`> h
20:32:40 <ehird`> he dropped asleep
20:32:41 <ehird`> he was:
20:32:48 <ehird`> 'omg..last change... i can..make it....urghfdkgh'
20:33:12 <ehird`> AnMaster: we made fun of chris pressey^H^H^H^H^H^H^H^H^H^H^H made a template for catseye links and changed all of them to it
20:33:14 <ehird`> because the domain changes often
20:33:40 <AnMaster> eh?
20:33:51 <ehird`> :-|
20:34:08 <SimonRC> I mean the REPL
20:34:25 <SimonRC> or the thing that waits for incoming connections to a db, or wheatever
20:35:06 <ehird`> SimonRC: it has 0 loops
20:35:09 <ehird`> that's all i know
20:35:29 <SimonRC> the best low-level trick I have seen is calling the next instruction: you execute everything up to the next return, return, then execute it again, and return from the original subroutine
20:35:36 <SimonRC> ehird`: so yuo said
20:36:45 <ais523> SimonRC: that's the method used for constants in Modular SNUSP
20:36:55 <ais523> which I am very impressed by
20:37:00 <SimonRC> where?
20:37:45 <ais523> there are some examples on the wiki
20:38:00 <ais523> http://esolangs.org/wiki/SNUSP
20:38:45 <SimonRC> the third line of (rsh) is an evil trick
20:38:53 <ehird`> SimonRC: what does rsh do
20:39:11 <SimonRC> reshape, on that obfuscate C thing posted earlier
20:39:24 <SimonRC> it "reshapes" an array
20:39:46 <ehird`> its not obfuscated, SimonRC..
20:39:50 <SimonRC> the third line uses an overlapped move if the destination is much bigger than the source
20:39:51 <ehird`> that is just how arthur codes..
20:39:56 <SimonRC> who?
20:40:09 <ehird`> guy who helped create J (that's a basic interp for j), and Kx guy
20:40:10 <ehird`> he made K, too
20:40:11 <ehird`> and KDB+
20:40:15 <SimonRC> cool
20:40:22 <ehird`> he in all honesty codes C just like that link..
20:40:56 <ais523> the unusual thing is not that he codes like that, but that he codes like that even with people watching
20:41:13 <ehird`> ais523: the literal kind of people watching?
20:41:16 <ehird`> i.e. over-his-shoulder
20:41:22 <ais523> over the Internet
20:41:33 <ehird`> ah, you mean publishing his code?
20:41:39 <ais523> I've written code like that, and I assume most coders have at some point, but not if anyone else is likely to read it
20:41:41 <ehird`> well, sure. he advocates concise programming like that
20:41:46 <ais523> because I would feel the need to explain it
20:41:51 <ehird`> i mean, K is totally based around that kind of stuff
20:42:17 <ais523> the point is that #defining language constructs to give them shorter names would be considered by many people to be excessive abbreviation
20:43:00 <ais523> and most companies would probably fire people for it
20:43:02 <ehird`> ais523: unless you were raised on APL, like he was :-)
20:43:18 <ehird`> ... and unless you found your own company and make loads of money selling enterprise-level database systems!
20:43:21 <ehird`> :-P
20:43:22 <ais523> are you aware of how the IOCCC got started in the first place?
20:43:35 <ehird`> ais523: It sneezed out of arthur's nose?
20:43:44 <ais523> some major piece of software, I think maybe UNIX sh, was written in C
20:43:54 <ais523> but with #defines to look like some other language, maybe ALGOL or Pascal
20:44:01 <ehird`> ahh yes
20:44:05 <ehird`> that thing
20:44:20 <ais523> and one of the IOCCC creators was working on the code and put out a Net-wide challenge for people to find code harder to work with
20:44:36 <ais523> (for the record: this is a paraphrase, not the literal story)
20:45:37 <ehird`> speaking of 'serious' obfuscated c: the joy interp is quite odd
20:46:07 <lament> why are you looking at the joy interpreter?
20:46:17 <ehird`> lament: huh?
20:46:31 <ehird`> why wouldn't i?
20:46:37 <ehird`> oh
20:46:40 <lament> i dunno... it's joy?
20:47:03 <ais523> there's nothing wrong with Joy
20:47:25 * ais523 thinks that 2008 will be the year of concatenative languages
20:47:34 <ais523> or at least ought to be
20:47:42 <lament> suuure.
20:47:42 <ehird`> i'm not really a fan of concatentative languages for practical purposes
20:47:58 * SimonRC reocmmnds that people get a copy of ColorForth
20:48:07 <SimonRC> not to use, but just to read Chuck's code
20:48:09 <ais523> it depends on what you mean by 'practical'
20:48:10 <SimonRC> it is amazing
20:48:16 <ais523> when I'm coding for speed/portability, I use C
20:48:22 <lament> SimonRC: amazing?
20:48:26 <ais523> when I'm not, I use whatever lang I like
20:48:37 <SimonRC> yes, a real insite as to just how small programs can be
20:48:41 <ais523> and normally aim for what I consider elegant
20:48:45 <ehird`> SimonRC: chuck is my favourite insane outsider programmer guy!
20:48:53 <SimonRC> chuck's and insider
20:48:58 <ais523> and normally consider concatenative langs to be elegant for any particular job
20:48:59 <chuck> ehird`: err
20:49:05 <SimonRC> he's been doing programming his whole career
20:49:10 <ehird`> chuck: unless you're chuck moore, not you
20:49:16 <ehird`> SimonRC: yeah
20:49:19 <chuck> ah okay hahah
20:49:22 <ehird`> but still
20:49:23 <ehird`> :D
20:49:40 <SimonRC> ISTR that Chuck Moore is usually called "chipChuck"
20:50:13 <ehird`> what is ISTR anyway
20:50:41 <SimonRC> I Seem To Recall
20:50:46 <ais523> I Seem To Remember
20:50:59 <ais523> probably either depending on context
20:51:06 <SimonRC> that J terp needs at least a few comments
20:51:12 <ehird`> SimonRC: bah, comments
20:51:19 <SimonRC> something like chipChuck's commenting style would work great
20:51:26 <ehird`> comments are for losers, unless they're only used once every 15 lines, like in k code
20:51:46 <SimonRC> he thinks that 5 words and a stack picture are enough for a whole function
20:51:48 <ais523> comments are useful when learning a language
20:51:54 <SimonRC> where function is one of those things
20:51:56 <ais523> I still have some assembly code where every line is commented
20:51:59 <ehird`> ais523: arthur is hardly learning c
20:52:01 <ehird`> :-)
20:52:05 <ais523> because it was a program I was learning on
20:52:14 <ehird`> speaking of which, the colorforth distro has disappeared it seems
20:52:16 <ais523> they are also useful for helping other people understand your code
20:52:16 <ehird`> from colorforth.com
20:52:22 <SimonRC> TBH, 1 or two words for each of those operators would be enough and really help
20:52:27 <ais523> especially if it's a case of "why did you do that" rather than "what are you doing"
20:52:33 <SimonRC> I used a windows port of colorForth
20:53:37 <ehird`> where HAS his code gone
20:53:55 <ehird`> aha
20:54:01 <ehird`> http://www.colorforth.com/install.htm
20:54:14 <ehird`> he doesn't share his source.
20:54:36 <SimonRC> "WinColorForth" or something like that
20:55:04 <SimonRC> alas the editor is not written in cf :-(
20:55:28 <SimonRC> I made a modification so you can't crash the icon editor by going beyond the last icon
20:55:41 <ehird`> i want to write some c code like that interp, but have no idea where to start :|
20:55:59 <ehird`> actually, doesn't it interpret as-read?
20:56:05 <ehird`> does plus do: read_expr() or something
20:56:19 <SimonRC> chipChuck also made a chip editor and simulator in 20k that simulates his chip better than the multi-$100,000 professional ones do
20:57:46 <ais523> if you read thedailywtf.com, that won't surprise you in the least
20:58:10 <ehird`> SimonRC: http://www.nsl.com/papers/origins.htm wowzers! the original interp had one-space indentation and some blank lines
20:58:42 <ais523> 1-space indentation is a sure sign of a golfer at heart
21:00:03 <ehird`> ais523: no -- no indentation is
21:00:20 <ais523> there are other reasons to use no indentation
21:00:35 <ais523> but 1-space gives the impression of "do I really have to indent this? Stop forcing me to indent!"
21:01:00 <ehird`> By the way, I think that interpreter may have platform-specific fragments
21:01:14 <ehird`> which is why it segfaults
21:01:54 <ehird`> i am quite confused as to what the # and , operators do
21:02:01 <ehird`> actually, { too
21:02:12 <ehird`> ~ also does some weird stuff
21:03:07 <ehird`> is either z or l taken as proglang names?
21:03:14 <oklopol> z is
21:03:28 <oklopol> also oklopong
21:03:30 <ais523> use &thinsp;
21:03:36 <ais523> if you want a really short lang name
21:03:56 <ais523> (I've HTML-encoded that so it shows up readably on IRC)
21:04:24 <oklopol> i wonder if is taken as a name
21:04:35 <SimonRC> the trick to writing code like that is to keep refactoring and to readily chuck away features
21:05:01 <ehird`> m/^(a*)b\1$/ a^nba^n matcher in perl
21:05:19 <SimonRC> cut away all unnecessary layers of absraction, then cut away a few ones you thought were necessary too
21:05:22 <lament> chuck away moore features
21:05:29 <SimonRC> :-)
21:05:31 <ehird`> groan
21:05:42 <ais523> then compile your code at max optimisation and decompile it again
21:05:47 <SimonRC> no
21:05:53 <ais523> max space optimisation
21:06:01 <ais523> but optimised for 'generic'
21:06:07 <SimonRC> no, not generic
21:06:10 <SimonRC> specific
21:06:15 <SimonRC> YAGNI
21:06:16 <ais523> hmm... how common are compilers for a lang into itself?
21:06:24 <ais523> that optimise the code but leave it legal in the original lang
21:07:05 <ehird`> http://everything2.com/index.pl?node_id=1398015 i like this language
21:08:15 <ehird`> 'Examples of functional languages are Lisp, and Forth.' whut
21:09:15 <ais523> well, Lisp is certainly capable of being functional
21:09:30 <ehird`> ..
21:09:37 <ehird`> i was thinking more of the forth reference
21:09:48 <ais523> I don't know that much about Forth, but from what I know I would expect that it can be written in a vaguely functional style if necessary
21:10:23 <ehird`> ... no
21:10:23 <ehird`> forth is the antifunctional language.
21:10:37 <ehird`> SimonRC: back me up here i'm lazy :P
21:11:09 <oklopol> back and forth
21:11:23 <oklopol> i'm too tired to make a pun, but you get my point
21:11:33 <ais523> most langs can be written in a vaguely functional style
21:11:57 <ais523> except for the ones which are ridiculously imperative, to the extent that they don't even have second-class functions like C
21:11:57 * SimonRC re-reads
21:12:20 <ais523> and for Prolog, of course, which still manages to be entirely unlike anything else and yet somehow mainstream
21:12:26 <SimonRC> forth is low-level with super-duper macros
21:12:43 <ais523> does it have an eval command?
21:12:48 <ehird`> no, ais523
21:12:48 <SimonRC> lots of forth doesn't even have dynamic allocation: everything is static
21:12:49 <ehird`> it does not
21:12:59 <ehird`> forth is far too old, and low-level for that
21:13:05 <ais523> ah, in that case writing it functionally would probably be quite difficult
21:13:14 <SimonRC> whereas almost all functional langs have GC
21:13:38 <ais523> Unlambda only needs reference-counting
21:14:39 <ais523> of course, most langs end up needing GC when they get advanced enough
21:15:00 <ais523> recent versions of C-INTERCAL, for instance, need GC to find and remove inaccessible portions of threads
21:15:16 <ais523> (Being able to backtrack past fork() really puts a strain on a language.)
21:15:41 <ehird`> ais523: you use the boehm gc for that? right? right?!
21:15:47 <ais523> refcounting
21:16:05 <ais523> within libickmt.a, so it's transparent to the user
21:16:13 <ehird`> bah
21:16:16 <ehird`> boehm is superiaur
21:16:27 <ais523> boehm is slower, and not always right
21:16:40 <ais523> refcount is fine because so far, luckily, there's no way to get into a loop of thread-referencing
21:17:02 <ehird`> well, boehm never frees something it shouldn't. let's put it that way
21:17:02 <SimonRC> refcount sucks on the cache behaviour
21:17:08 <ehird`> SimonRC: yep
21:17:10 <SimonRC> ehird`: wel...
21:17:24 <ehird`> SimonRC: and naw, i'm pretty sure it never frees something it shouldn't.
21:17:30 <ehird`> since it counts everything
21:17:40 <ais523> sometimes it causes a memory leak, though
21:17:44 <SimonRC> you can legally write a pointer to a file and read it in in C, thereby hiding it from the collector
21:18:05 <ais523> luckily, so far, it's impossible to send an INTERCAL thread across a network
21:18:07 <SimonRC> ais523: yes, especially if you don't null your list pointers
21:18:17 <ais523> CLC-INTERCAL apparently allows file-handles to be sent across a network
21:18:33 <ais523> and reading or writing to them will read or write to the relevant file in the remote location
21:18:34 <SimonRC> a fake pointer that hits a linked-list node will retain the entire list unless you null pointers
21:18:48 <ehird`> SimonRC: and.. does c-intercal do this
21:18:53 <SimonRC> dunno
21:18:57 <SimonRC> probably not
21:19:05 <ais523> it doesn't currently null down the list, I don't think
21:19:10 <ais523> just decrements the refcount
21:19:17 <ais523> after all, those pointers might be being used by something else
21:19:30 <ais523> the refcount is necessary because it actually affects the semantics of the language
21:20:01 <SimonRC> I meant in Boheme GC
21:20:05 <ais523> the threads act sort-of like a tree. When a thread dies, one leaf of the tree is removed, making all the tree back to the next branchpoint inaccessible
21:20:31 <ehird`> SimonRC: boehm
21:20:41 <ais523> likewise when a thread backtracks, it will be killed unless no other threads survive at the fork() that created it
21:20:54 <ais523> although it isn't a fork() in INTERCAL, of course, but instead multiple COME FROMs aiming at the same line
21:20:58 * SimonRC sings the Boehm Rhapsody.
21:21:39 <SimonRC> # mamaaaaaa, just segfaulted a process #
21:21:42 <lament> Boehmian
21:22:03 <SimonRC> # freed a pointer that was live, it derefed and then it died #
21:22:08 <SimonRC> :-P
21:22:18 <ais523> I wonder if it's possible to use valgrind as a garbage collector?
21:22:25 <SimonRC> lament: I know
21:22:45 <SimonRC> ais523: it would make early LISP ones look positively zippy
21:23:07 <ais523> I wasn't wondering if it was efficient, just if it was possible
21:24:01 <SimonRC> A cool trick I have seen is to have a 1-many refcount as a single bit in the pointer: when you duplicate a pointer, set the refcount to "many". Most pointers are never really duplicated, so most stuff gets freed straight away, with less left for the GC
21:24:13 <SimonRC> refcounts in the pointer are *way* better for the cache
21:24:17 -!- RedDak has quit ("I'm quitting... Bye all").
21:24:21 <SimonRC> ais523: dunno
21:26:20 <SimonRC> well, that C is commented now
21:27:27 <ehird`> SimonRC you commented it?
21:27:30 <ehird`> that's illegal.
21:27:35 <ehird`> that's a magical creation!
21:29:25 <ais523> did you at least use //-style comments?
21:29:33 <SimonRC> I did so comprehensively, with stuff like:
21:29:35 <SimonRC> if(n-=wn)mv(z->p+wn,z->p,n);R z;} // "overlapping move" to fill rest
21:29:54 <ais523> /* */ seems wrong there, even if it's more portable
21:30:10 <SimonRC> most lines have 2..3 word of comment
21:31:06 <SimonRC> All that really need documenting is the operator semantics and the two data structures involved
21:31:18 <SimonRC> everything else is simple
21:31:33 <ehird`> SimonRC: you evil evil person
21:33:46 <ehird`> SimonRC: paste it so i can burn you at the steak. mm, steak.
21:34:29 <SimonRC> where is the pastebin?
21:35:06 <ais523> http://pastebin.ca
21:38:04 <ehird`> rafb.net/paste
21:40:17 <SimonRC> http://pastebin.ca/891738
21:48:00 <ehird`> #
21:48:00 <ehird`> #define P printf // monadic op
21:48:00 <ehird`> #
21:48:00 <ehird`> #define R return // dyadic op
21:48:04 <ehird`> pray tell how does that help you
21:48:09 <SimonRC> huh?
21:48:36 <SimonRC> oops
21:48:56 <ehird`> SimonRC: it would help if in your //operators line you did a symbol->op mapping
21:48:57 <SimonRC> try now
21:48:58 * ais523 was wondering about that too, but didn't comment for some reason
21:49:33 <ehird`> SimonRC: try linking the new one
21:49:33 <ehird`> :P
21:49:36 <ehird`> http://pastebin.ca/891750
21:50:14 <ehird`> SimonRC: also, see where i linked above
21:50:18 <ais523> wow, that's genuine old-fashioned K&R C
21:50:24 <ehird`> it's the original version, which HAS indentation
21:50:27 <ehird`> well, onespc ;)
21:50:29 <ehird`> and some newlines (2)
21:50:35 <ehird`> ais523: sure. j is old.
21:50:39 <ais523> and it contains a buffer overflow
21:50:49 <SimonRC> many
21:50:52 <ehird`> yes, it does -- but there's probably tons of those in regular K
21:50:59 <ehird`> for a reason, too
21:51:00 <SimonRC> that is the first prototype remember
21:51:13 <ehird`> the reason being: that's the k mindset
21:51:18 <ehird`> you don't care about things like that
21:51:21 <ais523> C s[99];while(gets(s)) should never be written by anyone
21:51:32 <ais523> because there's no way to guarantee that the user types in 98 or fewer characters
21:51:41 <SimonRC> yes there is
21:51:42 <ehird`> ais523: thanks for the c lesson!
21:51:48 <SimonRC> you make sure the only user is you
21:51:50 <ais523> the function gets itself is very hard to use
21:51:56 <ais523> in a way that can't segfault
21:52:10 <SimonRC> actually gets is impossible to use properly
21:52:10 <ehird`> ais523: read:impossible
21:52:23 <ehird`> wait that's a lie
21:52:25 <ais523> I did write code that used it safely once as proof-of-concept
21:52:30 <ehird`> you can trap sigsegv to expand
21:52:31 <ehird`> :-)
21:52:33 <ais523> it redirected stdin to a file that it created itself
21:52:37 <ehird`> ais523: ow
21:52:45 <ehird`> mmap?
21:52:50 <ais523> and array overflows don't necessarily cause sigsegv, they just do so sometimes
21:52:58 <ais523> ehird`: no, it actually used the filesystem
21:53:02 <ais523> so as to do it in portable C89
21:54:05 -!- helios24 has quit ("Leaving").
21:54:31 <ehird`> btw SimonRC
21:54:45 <ehird`> find does do something
21:54:48 <ehird`> i just don't know what
21:54:56 <SimonRC> no
21:55:01 <SimonRC> it really doesn't
21:55:11 <SimonRC> it is an operator that returns stack garbage
21:55:33 <ehird`> SimonRC: well, it does something in the repl
21:55:33 <SimonRC> it is supposed to look up a value in an array
21:55:33 <ehird`> :P
21:55:42 <ehird`> how do you know that?
21:55:42 <ehird`> :P
21:55:53 <SimonRC> maybe
21:56:01 <SimonRC> but it isn't implemented
21:56:11 <ehird`> thats far too conventional for that btw ;)
21:56:43 <ehird`> anyway -- switch to the indented version
21:56:53 <SimonRC> CBA
21:57:32 <ehird`> itll take 2 secs
21:57:34 <ehird`> :|
21:57:47 <SimonRC> you do it then
21:58:03 <ehird`> hah
21:58:04 <ehird`> also
21:58:11 <ehird`> I *ma(n){R(I*)malloc(n*4);}
21:58:18 <ehird`> that's wrong for today's machines
21:58:19 <ehird`> :)
21:58:26 <ehird`> I *ma(n){R(I*)malloc(n*sizeof I);} // obviously
21:58:28 <ais523> sizeof exists for a reason
21:58:36 <ehird`> ais523: didn't back then at least not widely
21:58:39 <SimonRC> it was prototype ffs for one person's machine
21:58:51 <ais523> I write portably even just for personal code
21:58:54 <ais523> unless I have a reason not to
21:59:05 <ais523> because I often end up trying to run it on a different machine...
21:59:12 -!- pikhq has joined.
21:59:13 <SimonRC> also, odd things happen if malloc returns values near the bottom of memory...
21:59:32 <ehird`> ais523: do you know when that code was written?
21:59:32 <SimonRC> the token-classifier might misclassify them as operators or variables
21:59:36 <ehird`> in the 80s, at latest
21:59:42 <SimonRC> ehird`: style
21:59:53 <SimonRC> default-to-int all over the place
22:00:00 <ehird`> SimonRC: yes
22:00:02 <ehird`> i know
22:00:08 <ehird`> and abusing that to return ptrs
22:00:08 <SimonRC> it's really a B program ina disguise
22:00:08 <ehird`> :)
22:00:10 <ais523> after all, I use Gnome/GNU/Linux, GNU/Windows, Explorer/Windows, and Common Desktop Environment/SunOS reasonably often
22:00:18 <ehird`> gnu/linux
22:00:21 <ais523> and have been known to use DOS on occasion
22:00:22 <ehird`> you pretentious!
22:00:34 * ais523 spells it out in full when both parts are relevant
22:00:56 <ais523> after all, using the acronym is the only way that people will realise what I mean by GNU/Windows
22:01:09 <ehird`> SimonRC: change your comments to be aligned and start them with //NB.
22:01:15 <ais523> I've never seen anyone write Explorer/Windows before, but they should more often so that people realise that the OS is not the computer or the GUI
22:01:16 <ehird`> J uses NB. as a comment indicator
22:01:20 <ehird`> and generally has them aligned
22:01:46 <SimonRC> #define NB //
22:01:48 <SimonRC> :-)
22:01:52 <SimonRC> I dont' *think* that weorksd
22:01:56 <SimonRC> *works
22:01:59 <ais523> the pp-phases are in the wrong order
22:02:44 <ehird`> SimonRC: doesn't.
22:02:46 <ehird`> cpp strips comments.
22:03:10 <ais523> technically speaking, all comments have to be replaced by a positive amount of whitespace
22:04:04 <ehird`> i want a compiler that replaces comments with whitespace corresponding to fibonacci numbers, incrementing each commentused
22:04:04 <ais523> btw, has anyone here used m4?
22:04:09 <ehird`> vaguely
22:04:31 <ais523> I'm used to changequote([,])-ed m4 as a result of reading the source of Autocong
22:04:36 <ais523> s/g$/f/
22:04:52 <SimonRC> Actually, I think the #line directive is mostly for the use of seperate preprocessors
22:05:02 <ais523> m4 is capable of generating them
22:05:09 <ehird`> SimonRC: no
22:05:09 <ais523> it's also useful for things like lex and yacc
22:05:10 <ehird`> its for
22:05:12 <ais523> when you're compiling into C
22:05:14 <ehird`> 1. gcc can report proper errors
22:05:17 <ehird`> after cpp
22:05:24 <ehird`> and 2. compiler output
22:05:28 <ehird`> can do #line"srcfile" 4
22:05:29 <ais523> but that doesn't use #line, but #<space>
22:05:43 <ais523> that is, what cpp does
22:05:43 <ehird`> true
22:21:42 -!- ais523 has left (?).
22:27:27 <ehird`> SimonRC: q about the interp
22:27:32 <ehird`> is there any way to construct vectors?
22:30:59 <SimonRC> what do you mean "construct"?
22:34:44 <ehird`> SimonRC: make new ones from inside code
22:34:51 <ehird`> also: paul graham is a fucking idiot
22:34:54 <SimonRC> how about iota?
22:35:00 <ehird`> he deleted my comment on the 'what would this look like in other languages'
22:35:06 <SimonRC> what was that?
22:35:08 <SimonRC> and where?
22:35:22 <ehird`> i see probably why - he said 'joke submissions will be deleted'. apparently, because my code was concise and didn't look like a 'regular' language, it was obviously fake!
22:35:26 <ehird`> bloody retard
22:35:37 <SimonRC> respond with evidence to support you
22:35:55 <ehird`> SimonRC: someone asked me what language it was. i responded 'the language of paul graham deleting comments for no reason'. he'll probably see.
22:35:57 <SimonRC> to actually get numbers, you can use 0-9 which are 0-dimensional arrays if 1 number
22:36:09 <SimonRC> where?
22:36:13 <SimonRC> and which lang?
22:36:26 <ehird`> SimonRC: it was a little language i've been making for a while
22:36:32 <ehird`> and yeah i know with 0-d arrays
22:36:35 <ehird`> but what about more?
22:36:40 <ehird`> http://arclanguage.org/item?id=722
22:36:47 <ehird`> rewriting it quickly, it was this:
22:37:25 <ehird`> #rg"said"[<fm[<ip[x.<a"click here"["you said: "!!x]]<sub]]
22:37:37 <SimonRC> looks K-y
22:37:49 <ehird`> which in both his beloved code-tree measurement and characters, is much shorter
22:37:55 <ehird`> and also far more understandable, i think
22:37:57 <ehird`> SimonRC: yes
22:38:43 <ehird`> he's very arrogant, i must say
22:38:49 <ehird`> calling that a 'gag submission'?
22:39:04 <ehird`> because he can't grasp the concept that maybe some languages are 1. very, VERY different and 2. much shorter than his beloved arc
22:39:18 <ehird`> 2, i believe, had a noticable effect... but i'm cynical
22:39:41 <SimonRC> it looks more specialised than arc
22:39:42 <ehird`> oh yes, and mine doesn't fuck up unicode by converting £ to GBP, dropping umlauts and accents and other atrocities
22:39:50 <ehird`> SimonRC: hardly. only with the web lib
22:39:56 <ehird`> and incidentally look at the original example
22:39:59 <ehird`> if that's not specialized?!
22:40:06 <SimonRC> ok
22:40:12 <SimonRC> is ther a spec online?
22:40:15 <ehird`> (defop said req
22:40:15 <ehird`> (aform [w/link (pr "you said: " (arg _ "foo"))
22:40:15 <ehird`> (pr "click here")]
22:40:15 <ehird`> (input "foo")
22:40:16 <ehird`> (submit)))
22:40:19 <ehird`> SimonRC: no, it has no spec
22:40:25 <SimonRC> adding a link to that would help convince him
22:40:26 <ehird`> only a 1000 line compiler that basically compiles a toy lisp dialect to scheme.
22:40:28 <ehird`> oh
22:40:32 <ehird`> for mine
22:40:35 <ehird`> eh, no, there isn't
22:40:40 <ehird`> it's still under development
22:40:50 <ehird`> but fsck him, it is not a joke language
22:41:02 <SimonRC> the "for mine" changes the meaning of the line above so much
22:41:17 <SimonRC> lol
22:41:22 <ehird`> heh
22:41:35 <SimonRC> the compiler is supposed to be the spec
22:41:49 <ehird`> SimonRC: you buy into that?
22:42:02 <SimonRC> it is very precise...
22:42:21 <SimonRC> and I suspect subtle bugs will be quickly outed
22:43:16 <ehird`> you buy into the whole arc crap, then
22:43:37 <SimonRC> I have not seen many problems with it, though I haven't been looking
22:43:39 <SimonRC> tell me some
22:44:09 <ehird`> i would but i'd just be repeating myself and countless others
22:44:21 <ehird`> arc is a toy that took 6 years to make and it's useless for anything but trivial web apps.
22:44:47 <SimonRC> not 6 continuous years
22:45:07 <SimonRC> he probably spent most of that time throwing stuff away, to get a good ballence
22:45:18 <ehird`> you really did buy into all the hype
22:45:19 <SimonRC> anyone can make a huge programming language
22:45:20 <ehird`> cute :)
22:45:41 <SimonRC> OTOH, it isn't actually useful yet
22:46:06 <SimonRC> it is at the same stage of development as, say, Glass is now
22:46:13 <SimonRC> and about the same age, I'd guess
22:46:50 <SimonRC> unless Glass has modules, inwhich case Glass is more advanced
22:46:57 <ehird`> or unicode support
22:47:01 <SimonRC> heh
22:47:03 <SimonRC> ah, yes
22:47:14 <ehird`> SimonRC: try posting a unicode comment on the arc forum
22:47:20 <ehird`> especially with £ or the yen symbol
22:47:26 <ehird`> laughter follows
22:47:26 <SimonRC> I can guess what will happen
22:47:29 <ehird`> SimonRC: guess
22:47:34 <ehird`> you will be wrong
22:47:57 <ehird`> i'll bet £100000 on it :P
22:48:50 <SimonRC> the point of abstract data types is that you can (e.g.) store strings as some kind of unicode but give them the interface of a linked list of boxed unicode codepoints
22:49:16 <ehird`> guess!
22:49:32 <SimonRC> it gets converted to "GBP" or whatever?
22:50:04 <ehird`> SimonRC: yep, and some characters get changed into completely irrelevant ones
22:50:09 <SimonRC> heh
22:50:12 <SimonRC> pay up
22:51:05 <ehird`> oh crap
22:51:06 <ehird`> :(
22:51:09 <ehird`> you looked in the logs.
22:51:25 <SimonRC> I have scrollback
22:51:31 <SimonRC> looooooooooooots of scrollback
22:52:31 <SimonRC> back to 11 Jan here
22:52:32 <ehird`> SimonRC: what would you have guessed not having looked?
22:52:39 <ehird`> and wow
22:53:07 <SimonRC> otherwise I would guess they became ?
22:53:20 <ehird`> heh
22:53:22 <ehird`> also, http://reddit.com/r/programming/info/67l5f/comments/c03310l
22:53:26 <ehird`> best language ever!
22:54:05 <SimonRC> heh
22:54:25 <ehird`> hm
22:54:28 <ehird`> i'm going to codetree-size up:
22:54:29 <ehird`> #rg"said"[<fm[<ip[x.<a"click here"["you said: "!!x]]<sub]]
22:54:30 <SimonRC> it has arc's main features
22:54:35 <ehird`> let's think..
22:54:40 <ehird`> SimonRC: NO! it misses fn->lambda
22:54:45 <SimonRC> true
22:55:03 <ehird`> #rg -> 1 tok -> 1
22:55:09 <ehird`> "said" -> 1 tok -> 2
22:55:16 <ehird`> (err, i can count strings as one token right? good)
22:55:22 <ehird`> [...] -> 1 nested -> 3
22:55:27 <ehird`> <fm -> 4
22:55:31 <ehird`> [...] -> 5
22:55:34 <ehird`> x -> 6
22:55:35 <ehird`> . -> 7
22:55:37 <ehird`> <a -> 8
22:55:40 <ehird`> "click here" -> 9
22:55:43 <ehird`> [...] -> 10
22:55:47 <ehird`> "you said: " -> 11
22:55:49 <ehird`> !! -> 12
22:55:51 <ehird`> x -> 13
22:55:52 <EgoBot> Huh?
22:55:53 <ehird`> <sub -> 14
22:55:58 <ehird`> woop
22:56:00 <ehird`> 14
22:56:15 <ehird`> arcs is 23
22:56:52 <SimonRC> do you have an implementation?
22:57:20 <ehird`> SimonRC: Just like all good languages -- no, and if I did I wouldn't have written the web server yet.
22:57:20 <ehird`> :)
22:57:29 <ehird`> by the way, here's a translation of that into english
22:57:31 <ehird`> #rg"said"[<fm[<ip[x.<a"click here"["you said: "!!x]]<sub]]
22:57:48 <ehird`> Register "said", doing:
22:57:52 <ehird`> Display a form with the elements:
22:58:03 <ehird`> An input field, with the action taking 'x':
22:58:12 <ehird`> A link, with the text "click here" leading to:
22:58:18 <ehird`> Concatentate "you said: " with x.
22:58:22 <ehird`> (end link, input field)
22:58:24 <ehird`> A submit button.
22:58:27 <ehird`> (end form, registration)
22:59:04 <ehird`> I might add <ii (reminiscent of html's "ISINDEX") for a form with just a text field, a submit button and optionally a prompt :P
22:59:07 <ehird`> then it'd be:
22:59:30 <ehird`> #rg"said"[<ii[x.<a"click here"["you said: "!!x]]]
22:59:40 <SimonRC> put a small spec online and re-try submitting that to PG
23:01:08 <ehird`> SimonRC: it would be incredibly incomplete. it's a many-nuanced language.
23:01:20 <ehird`> especially the parsing. there's no statement delimiters but variadic functions are possibly.
23:01:25 <ehird`> *possible
23:05:02 <ehird`> SimonRC: try and work out that one
23:05:03 <ehird`> :-)
23:05:14 <ehird`> gets(nil)
23:05:16 <ehird`> STDIN.read
23:05:19 * SimonRC considers SADOL
23:05:23 * SimonRC goes away
23:05:27 <ehird`> ooh
23:05:28 <ehird`> gets(0)
23:05:38 <ehird`> hm
23:05:39 <ehird`> doesn't work
23:07:08 <ehird`> haha
23:07:08 <ehird`> p eval gets(nil).gsub(",","*")
23:07:42 -!- timotiis has quit ("leaving").
23:10:06 <ehird`> woot
23:10:07 <ehird`> #!perl -n
23:10:07 <ehird`> s/,/*/g;print eval $_
23:12:59 <ehird`> main(_,a){gets(a);...} /* this is evil */
23:21:04 <ehird`> Wow.
23:21:27 <ehird`> http://www.google.com/translate?u=http%3A%2F%2Fwww.nmt.ne.jp%2F%7Eysas%2Fdiary%2F%3F200705b%23200705161&langpair=ja%7Cen&hl=en&ie=UTF8 Scroll down to the codeGolf Evil c compiler
23:21:31 <ehird`> someone actually wrote a ccompiler for it
23:21:36 <ehird`> non-mangled src:http://www.nmt.ne.jp/~ysas/diary/?200705b#200705161
23:51:22 <ehird`> who's alive
23:54:09 -!- sebbu has quit ("@+").
←2008-02-03 2008-02-04 2008-02-05→ ↑2008 ↑all