00:00:47 <nooga> it is BROKEN?!?!?!?!?!
00:01:28 <oklopol> only one character names for funcs etc?
00:01:49 <nooga> but you've got scopes
00:02:48 <nooga> and u can do things like ~f2 ?=#_00 {something} ?=#_01 {something else} {...} 0
00:03:02 <oklopol> lists are passed by reference?
00:03:24 <nooga> and then f0a is not the same as f1a
00:04:12 <oklopol> hard to make a binary sort if not...
00:04:41 <nooga> make a function that takes list as a parameter and returns new list
00:04:52 <oklopol> i was thinking of a sort again...
00:05:18 <nooga> http://regedit.gamedev.pl/BDSM/bubblesort.sad
00:14:24 -!- nooga has quit.
00:18:58 -!- jix_ has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
00:22:53 -!- oerjan has quit ("Good night").
00:37:38 -!- ihope__ has changed nick to ihope.
01:15:01 -!- calamari has quit ("Leaving").
01:31:45 -!- tgwizard has quit (Remote closed the connection).
01:52:16 <pikhq> GregorR: Like the changes in the current Plof build.
01:52:36 <pikhq> Still doesn't have my for semantics, but. . .
01:55:37 <oklopol> ~p1(3(2:b:a$0:s#:l#_00@#l-01?-1>:i[ls]ai]bi$2ab~q1?<#:f#_0-012f+q#:apf0q#a1
01:58:42 <oklopol> i figured it right after i'd said my thing
02:05:26 <pikhq> bsmntbombdood: And that's my modified for semantics.
02:05:59 <pikhq> for(reference, {while}, {update}, {code}); is what's current.
02:06:11 <pikhq> And update is evaluated before code.
02:06:22 <pikhq> (that is, in his current version)
02:06:39 <pikhq> A reference to a variable.
02:07:16 <pikhq> Well, sort-of like a pointer. . .
02:07:38 <pikhq> It's so that the variable is in the scope of while, update, and code. . .
02:07:58 <pikhq> Which is pointless, since that variable is *already* in their scope.
02:08:18 <pikhq> It's a piece that was written *before* his interpreter.
02:10:04 <pikhq> I think it was before his scoping rules were fully defined, as well.
02:18:54 -!- pikhq has quit ("leaving").
02:28:12 <CakeProphet> I need a language whose entire behavior is undefined.
03:51:07 -!- Sgeo has joined.
03:51:24 <Sgeo> Is that a bot?
03:51:42 <GregorR> pikhq: Stop making fun of me :P
03:52:00 <Sgeo> I mean, is it an automatic action to greet me?
03:52:26 -!- GregorR has left (?).
03:52:39 -!- GregorR has joined.
03:57:04 -!- bsmntbombdood has left (?).
03:57:04 -!- bsmntbombdood has joined.
03:57:28 <bsmntbombdood> ~exec print [i[0].pattern for i in self.raw_regex_queue]
03:58:32 <bsmntbombdood> ~exec for i in raw_regex_queue: i[0].pattern != '.*JOIN :#esoteric.*' or self.raw_regex_queue.remove(i)
03:58:36 -!- bsmntbombdood has left (?).
03:58:37 -!- bsmntbombdood has joined.
03:59:02 <bsmntbombdood> ~exec for i in self.raw_regex_queue: i[0].pattern != '.*JOIN :#esoteric.*' or self.raw_regex_queue.remove(i)
03:59:08 -!- bsmntbombdood has left (?).
03:59:10 -!- bsmntbombdood has joined.
04:02:45 <Sgeo> What is the code thingy?
04:04:41 <Sgeo> What did you change?
04:04:43 <Sgeo> And what lang?
04:05:13 <bsmntbombdood> And the "~exec for i in self.raw_regex_queue: i[0].pattern != '.*JOIN :#esoteric.*' or self.raw_regex_queue.remove(i)" took out the on-join hello message thing
04:12:01 -!- beastman has joined.
04:12:39 <bsmntbombdood> ~exec self.register_raw(".*(JOIN) :#esoteric.*", lambda x : bot.raw("PRIVMSG #esoteric :hi %s!" % re.compile("^:(\S+)!.*").match(x).group(1)))
04:13:28 <beastman> Please, some one write the first 16 numbers of the Fibonacci Sequence.
04:14:00 <beastman> http://esoteric.voxelperfect.net/wiki/IRP
04:15:25 -!- beastman has left (?).
05:40:12 -!- Sgeo has quit (Remote closed the connection).
06:00:35 -!- anonfunc has joined.
07:09:43 -!- oerjan has joined.
07:19:33 <oerjan> 1,1,3,5,8,13,21,34,55,89,144,233,377,610,987
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
10:21:35 <ivan`> 1,1,2,3,5,8,13,21,...
10:23:06 <oerjan> that's what i get for trying to calculate by hand
10:23:59 <oerjan> or rather, memorizing the start
11:38:04 -!- oerjan has quit ("Later").
11:44:56 -!- tgwizard has joined.
12:20:26 -!- jix_ has joined.
13:02:16 -!- ihope has quit (Connection timed out).
13:09:08 -!- gerard_ has joined.
15:07:40 -!- gerard_ has quit ("Leaving.").
16:21:20 -!- meolox has joined.
16:21:43 <meolox> print "test" || die "I'm dead for no reason"
16:25:29 <meolox> cout << anyonethere ? "yes" : "no";
16:27:48 -!- meolox has left (?).
17:49:37 -!- calamari has joined.
18:11:01 <oklopol> there already was a quicksort on the page
18:17:07 -!- okokokoko has joined.
18:17:08 -!- oklopol has quit (Read error: 54 (Connection reset by peer)).
18:17:52 -!- okokokoko has changed nick to oklopol.
19:05:09 -!- oerjan has joined.
19:12:26 -!- calamari has quit (Read error: 104 (Connection reset by peer)).
19:21:56 -!- okokoko has joined.
19:22:14 -!- oklopol has quit (Read error: 54 (Connection reset by peer)).
19:28:03 * CakeProphet is looking for a new language to play around with...
19:33:41 -!- calamari has joined.
19:44:06 -!- okokoko has changed nick to oklopol.
19:45:02 -!- oklobot2 has joined.
19:46:54 <oklopol> i'll now prove it to be turing complete
19:47:05 <oklopol> !exec "Hello, world!"PrntNl
19:57:29 <oerjan> !exec "Hello, world!"PrntNl
19:58:16 <oerjan> !exec "Argle bargle, glof glyp!"PrntNl
19:59:29 <oerjan> ok, it passed the Turing test in reverse :)
20:00:25 <oerjan> !exec "Argle bargle, "PrntNl "glyp glof!"PrntNl
20:01:59 <oerjan> (yes, there is a relatively unknown language named E)
20:03:54 <oerjan> in fact there appear to be at least two E languages
20:04:20 <oerjan> i was referring to the secure distributed one
20:05:48 <CakeProphet> I may check out Alice... solely because it has a cool name.
20:05:59 <CakeProphet> "E" is too bland of a name for my enjoyment.
20:07:39 <oklopol> !exec 5["Many hellos!"PrntNlDrp1SubDbl]
20:07:45 <oerjan> try programming in pure System F :)
20:11:22 <oerjan> !exec 3["Many hellos!"PrntNl1Sub]
20:11:56 <Sukoshi> CakeProphet: I know of A, B, C, D, and now E.
20:12:44 <Sukoshi> If only IRC servers followed the timeout principle of yesteryear.
20:12:51 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
20:12:52 <oerjan> i seem to have seriously misunderstood the [] command
20:13:10 <Sukoshi> BURN HIM BURN HIM BURN HIM!!!
20:13:52 <oklopol> just made it when i did the bot
20:13:53 <oerjan> i thought it worked like BF, and the Drp and Dbl were redundant
20:14:03 <Sukoshi> What sort of a language is NoName?
20:14:07 <oklopol> nope, stack-based, ut brainfuck []
20:14:26 <oklopol> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ that sort
20:15:06 <oklopol> you can do a lot of useless stuff with it but outputting sucks so i don't use it that much
20:15:32 <oklopol> very buggy, also, one night project :)
20:16:07 -!- oklobot2 has joined.
20:16:21 <Sukoshi> What's oklobot2 written in?
20:17:56 <oklopol> !exec 42 1 2 3SubSubSub2MulPrntNl
20:17:57 <GregorR> EgoBot is written in C++ *shrugs*
20:18:32 <Sukoshi> oklopol: Take a wild guess :P
20:20:04 <oerjan> !exec 2 1PrntNlDrpPrntNl
20:20:09 <oklopol> GregorR we could do some steamy code swapping but my code is too dirty
20:20:27 <GregorR> Also, my code is already out there available.
20:20:33 <Sukoshi> Forth is still the best stack based language I've seen.
20:20:50 <Sukoshi> oklobot2: Please tell me you write C++ code like GregorR does.
20:21:28 <GregorR> http://www.esolangs.org/files/egobot/
20:21:50 <pgimeno> oklopol: actually Gregor wrote the IRC code and the interface which executes processes et al; the languages are the actual interpreters by various authors, I think you mean that
20:22:40 <GregorR> And in various languages :)
20:22:53 <Sukoshi> Hey, y'all who know Forth.
20:22:57 <oklopol> hey can i include langs in it if i make em? :O
20:23:03 <Sukoshi> Anyone up for a Forth IRC library?
20:24:33 <GregorR> oklopol: So long as they have no I/O other than std{in,out}
20:24:33 <Sukoshi> You know too few languages GregorR :P
20:24:34 <pgimeno> oklopol: GregorR is the one who has to include them since he's who runs the bot, but you can run your own instance and incorporate a language written by you
20:25:26 <pgimeno> I knew a bit of forth like... 25 years ago or something
20:25:43 <Sukoshi> It's pretty easy to learn.
20:25:44 <pgimeno> (damn, now I feel overaged)
20:26:18 <oerjan> !exec 0 5[Dbl1SubDbl]Drp[MulSwpDbl]DrpPrntNl
20:26:23 <oklopol> GregorR does the bot take input?
20:26:39 <oerjan> !exec 0 10[Dbl1SubDbl]Drp[MulSwpDbl]DrpPrntNl
20:26:59 <Sukoshi> I challenge the community to make an alternative to EgoBot in CL or Forth.
20:27:07 <oklopol> you can't seriously be able to use that, oerjan?
20:27:32 <oerjan> like my factorial program? :)
20:29:03 <oerjan> no, you used that above
20:29:42 <oerjan> although i could have used just one loop if i knew what command does deep copy :)
20:30:41 <oerjan> getting a copy of something not on top of the stack
20:30:42 <GregorR> Oh wait, that's right - Hahahah
20:30:46 <GregorR> I disabled it last night :P
20:30:50 <GregorR> It still hasn't pinged out.
20:30:57 -!- EgoBot has quit (Read error: 104 (Connection reset by peer)).
20:31:13 <GregorR> That wasn't a ping timeout.
20:31:13 <oklopol> oerjan, there is no way to do that
20:31:28 -!- EgoBot has joined.
20:31:33 <EgoBot> Use: i <pid> <input> Function: send input to a process
20:31:46 <oerjan> however i can copy the second item by combining Rot and Dbl.
20:32:04 <oklopol> yes, but you cannot copy the nth item
20:32:13 <oklopol> it don't think it's turing complete
20:32:15 <Sukoshi> You should add in capability for words, like Forth.
20:32:43 <Sukoshi> That way you can extend the language, kinda.
20:32:44 <oklopol> !exec "Sukoshi""o"SubPrntNl
20:32:57 <GregorR> Is how a caveman asks if I'm his father.
20:33:16 <Sukoshi> I ... have... the POWER!!!!
20:34:13 <oklopol> oerjan, i've made fibonacci and factorials
20:34:27 <oklopol> and primes, tho don't remember what actually
20:34:43 <oerjan> !exec 1 10[DblRotMulSwp1SubDbl]DrpPrntNl
20:35:10 <oklopol> you cannot concatenate numbers into a string yet
20:36:11 <Sukoshi> Anyone accept my challenge?!
20:37:08 <oklopol> i don't know actually whether nums and strings can be concateneted
20:37:23 <oklopol> so i'll crash the bot now, prolly
20:37:56 <oklopol> survived but couldn't do it :)
20:39:52 <oerjan> it _might_ still be Turing complete. We have free use of three variables which should give us a universal Minsky machine.
20:40:34 <oklopol> but, seems it is supported already
20:40:44 <oerjan> although that assumes bignums
20:41:00 <oklopol> there seems to be a special error type
20:41:34 <oklopol> oklobot has only implementation spesific range for the nums
20:42:07 <oklopol> !exec 4 "a"4Add Drp PrntNl
20:42:41 <oerjan> !exec 3"test"MulPrntNl
20:44:43 <oklopol> !exec 6"test"Mul"test"2MulSubPrntNl
20:47:00 <oerjan> !exec "TestTest"2DivPrntNl
20:47:20 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
20:47:42 -!- oklobot2 has joined.
20:47:49 <oklopol> !exec 4" elephants"AddPrntNl
20:48:17 <oerjan> !exec 65"elephants"AddPrntNl
20:49:17 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
20:50:48 <pgimeno> heh, a few days ago I stumbled upon gcc bug 28545
20:52:00 <pgimeno> squaring a variable multiplied it with the wrong register
20:52:30 -!- oklobot2 has joined.
20:53:04 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
20:54:41 -!- oklobot2 has joined.
20:55:55 <oklopol> with bignums, 3 vars is an infinite amount of vars with minited access
20:56:12 <oklopol> what have i been smoking 8|
21:00:28 <oerjan> is there any way to pick apart strings?
21:01:52 <oklopol> subtraction is the only thing
21:03:55 <pgimeno> !exec "dabale arroz a la zorra el abad"NegPrntNl
21:03:57 <oklobot2> daba le arroz al a zorra elabad
21:04:34 <pgimeno> !exec "a man, a plan, a canal, panama"NegPrntNl
21:04:37 <oklobot2> amanap ,lanac a ,nalp a ,nam a
21:05:34 <oklopol> sorry, no way to do that xD
21:05:40 <oerjan> hard to get a quine then
21:07:46 <oerjan> any way to test strings?
21:08:07 <oerjan> say, for equality, or being empty
21:09:20 <oerjan> !exec "as" "asd"LesPrntNl
21:09:35 <oklopol> i've been thinking about considering making a better language....
21:09:42 <oerjan> !exec "as" "asd"MrePrntNl
21:10:21 <oklopol> i was gonna do K with code as just a list of ints
21:11:00 <oklopol> i just happened to bump into it as i was coding my lang and it had most of the features
21:11:10 <oklopol> i think it was created just to annoy me
21:12:21 <oerjan> i still don't know what K means
21:12:30 <oklopol> floats would require me to alter the raw code parser
21:12:44 <oklopol> it's a lang you should learn :)
21:13:45 <oklopol> http://www.answers.com/topic/k-programming-language-1
21:14:23 <oklopol> best use of infix i ever saw
21:16:54 <pgimeno> damn, soon there will be more than 26 single-letter languages
21:17:38 <oerjan> well, there is already Omega
21:18:27 <oklopol> gotta pick my letter fast before we run out!
21:19:15 <oerjan> well, there is pi calculus
21:20:52 <oerjan> and at least gamma and lambda
21:21:39 <oklopol> so many langs i don't know
21:21:53 <oklopol> luckily most are the same and can be learned in an hour
21:26:19 <oerjan> !exec 1 1 5[RotRotDblRotAddRot1SubDbl]DrpPrntNl
21:27:48 <oklopol> make it print 10 first in a row, hyphenated
21:31:49 <oerjan> !exec 1 1 9[RotRotDblRotPrnt"-"PrntDrpAddRot1SubDbl]DrpPrntNl
21:32:10 <oklobot2> 1PRIVMSG #esoteric :-PRIVMSG #esoteric :1PRIVMSG #esoteric :-PRIVMSG #esoteric :2PRIVMSG #esoteric :-PRIVMSG #esoteric :3PRIVMSG #esoteric :-PRIVMSG #esoteric :5PRIVMSG #esoteric :-PRIVMSG #esoteric :8PRIVMSG #esoteric :-PRIVMSG #esoteric :13PRIVMSG #esoteric :-PRIVMSG #esoteric :21PRIVMSG #esoteric :-PRIVMSG #esoteric :34PRIVMSG #esoteric :-PRIVMSG #esoteric :89
21:33:31 <oerjan> is there no way to print a string without newline?
21:34:15 <oerjan> or maybe the above may be considered a bug.
21:38:22 <oklopol> it was Prnt first but i separated the newline so that you could "append to irc" without realizing other stuff is sent too :)
21:38:50 <oklopol> supposed to work like that
21:39:46 <oerjan> the problem is i have already used up 3 variables so i don't have room to bring along a string.
21:41:39 <oklopol> you can end according to the sum instead of the number of fibonacci numbers
21:41:47 <oklopol> but it would be cheating, true
21:43:58 <oerjan> i see a solution, though it is ugly
21:44:29 <oerjan> !exec 1 1 3[RotRotDblRotAddRot1SubDbl]DrpPrntNl
21:45:41 <oklopol> yeah you can make it with O(n^2)
21:45:55 <oerjan> no, it is better than that.
21:52:09 <oklopol> i want that sadol guy here :(
22:02:32 <oerjan> !exec 1 1 8[RotRotDblRotAddRot1SubDbl]Drp""Rot[RotRotSwpDbl"-"SwpAddRotAddRotRotSwpDblRotSwpSubSwpRotRotDbl]DrpAddPrntNl
22:05:02 <oerjan> your idea of ending with the sum instead gave me the idea to carry the counter upwards, then the string downwards
22:05:26 <oerjan> since the basic fibonacci algorithm is reversible
22:07:08 <oerjan> although it does duplicate work in a way
22:08:00 <oklopol> true, but i would've made it O(n^2) so...
22:09:04 <oerjan> by recalculating completely for each value?
22:10:18 <oklopol> !exec 1 1 5[RotRotDblRotAddRot1SubDbl]DrpPrntNl
22:12:43 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp Rot "-"Add Swp 1 Sub Dbl ] I have no idea anymore... fucking headache :((
22:12:54 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp Rot "-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:13:29 <oklopol> maybe in the morning... can't think now
22:15:07 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp Rot Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:17:20 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp RotSwp Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:17:42 <oerjan> !exec "anyone there?"PrntNl
22:18:15 <oklopol> why don't we do an active debug session on that code?
22:19:21 <oklopol> oklobot2 is not that interactive
22:19:36 <oklopol> oerjan can you see my problem?
22:20:23 <oklopol> !exec 1 1 5[RotRotDblRotAddRot1SubDbl]DrpPrntNlDrpPrntNlDrpPrntNl
22:20:35 <oerjan> you certainly seem to have an overly low self-esteem...
22:21:04 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp SwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:21:09 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
22:21:38 <oerjan> i was just about to convince myself you needed that change
22:22:02 -!- oklobot2 has joined.
22:22:56 <oklopol> but i won't rewrite it from scratch!
22:23:08 <oklopol> even if it takes only a minute
22:23:43 <oklopol> !exec "" 10 [ Dbl 1 1 Rot 2Sub[RotRotDblRotAddRot1SubDbl]Drp PrntNl SwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:24:22 -!- oklobot2 has quit (Read error: 104 (Connection reset by peer)).
22:25:10 <oklopol> i do the thing for negative numbers
22:25:24 <oklopol> and for some reason it doesn't like it
22:25:51 <oklopol> my problem is the "module" which i regarded as "safe"
22:26:09 <oerjan> try using [ Dbl 0 1 Rot 1Sub
22:26:44 <oklopol> !exec "" 10 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]Drp PrntNl SwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:26:47 <oerjan> or even [Dbl 1Neg 0 Rot
22:27:22 <oklopol> !exec "" 10 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl ] PrntNl
22:28:03 <oklopol> i'd kick myself if i was op
22:28:26 -!- oklobot2 has joined.
22:28:30 <oklopol> !exec "" 10 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl ] DrpPrntNl
22:28:39 -!- oklobot2 has quit (Read error: 54 (Connection reset by peer)).
22:28:52 <oklopol> i have a non-irc debugger also
22:29:02 <oklopol> but would take me a year to locate the folder
22:29:16 -!- oklobot2 has joined.
22:29:16 <oerjan> i repeat: or even [Dbl 1Neg 0 Rot
22:30:28 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp RotSwp Add"-"Add Swp 1 Sub 1Gre ] DrpPrntNl
22:30:31 -!- oklobot2 has quit (Read error: 54 (Connection reset by peer)).
22:31:05 -!- oklobot2 has joined.
22:31:05 <oerjan> you need to keep the Dbl as well
22:31:34 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp RotSwp Add"-"Add Swp 1 Sub Dbl1Mre ] DrpPrntNl some day...
22:31:59 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp Rot Add"-"Add Swp 1 Sub Dbl1Mre ] DrpPrntNl
22:32:16 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp Rot "-"AddAdd Swp 1 Sub Dbl1Mre ] DrpPrntNl
22:33:41 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp Rot Add"-"SwpAdd Swp 1 Sub Dbl1Mre ] DrpPrntNl
22:33:58 <oklopol> !exec "" 11 [ Dbl 0 1 Rot 1Sub[RotRotDblRotAddRot1SubDbl]DrpSwpDrp Rot Add"-"SwpAdd Swp 1 Sub Dbl1Mre ] Drp"-"SubPrntNl
22:34:12 -!- lindi- has left (?).
22:34:23 <oklopol> i managed to make a worse version!
22:34:48 <oklopol> i'm not really that lousy, it's the head, must be :D
22:55:13 <CakeProphet> Hmmm... it reminds me of like... the stack of a prettier language.
22:55:25 <CakeProphet> the procedures appear after the input and such.
22:59:34 <oklopol> that one is a pretty standard bad stack-based language :)
22:59:37 <oklopol> you should see my esoteric ones
23:03:57 <oklopol> infix and stack-based are, that's why i usually make them :)
23:08:16 <oklopol> i've made two infix parsers
23:09:38 <oklopol> you know how you sometimes get the feeling you gotta make an infix parser
23:10:32 -!- oerjan has quit ("Good night").
23:12:18 -!- Asztal has joined.
23:12:57 <oklopol> what do you life for then?
23:13:45 <Sukoshi> I made an infix parser for my test-case CAS.
23:13:58 <oklopol> i want to sleep goddamned, is there a sleepy language? :\
23:14:01 <CakeProphet> I think parsing things in the order they are to be... evaluated... makes the most sense. :D
23:14:27 <Sukoshi> Well, it's not your most conceptually radical language on the block.
23:14:36 <Sukoshi> But it's fast and gets the job done.
23:16:10 * CakeProphet finds it confusing and annoying to work with.
23:16:45 <CakeProphet> That random goes off into undefined behavior.
23:16:57 <Sukoshi> The only reason C is confusing is because you're thinking too much.
23:17:07 <Sukoshi> There's almost no other reason for it to be confusing.
23:17:46 <Sukoshi> I think it's easier to train someone in C than it is a lot of other languages because the conceptual baggage is so small. Pointers are ``complicated'' ? Yeah right, compare pointers to multiple inheritance.
23:17:48 <oklopol> isn't thinking by definition the only thing that can cunfuse you?
23:17:48 <Asztal> C++ is far better for undefined behaviour
23:18:58 <Sukoshi> I think the only thing complicated about a pointer is that it's stupid terminology (why not simply call it an address?).
23:19:17 <Asztal> it doesn't have to be an address
23:19:24 <Sukoshi> Yeah, I was thinking that.
23:19:25 <Asztal> I don't think the C standard says that anywhere
23:19:48 <Sukoshi> Well, is a pointer a big sign with letters on it? No :P
23:20:27 <Asztal> Who knows, maybe someone will write a C interpreter, then it will just be a ... something :o
23:20:41 <Sukoshi> There are C interpreters out there, I'll betcha.
23:21:21 <Sukoshi> And I think maybe for a tad bit more ``cleanliness'' offer an alternative syntax for something like ``ptr int a; int b; a = (ptr) b;''
23:21:44 <Sukoshi> (Note: I didn't think that through for a long time, so if there are conceptual errors, guffaw for you.)
23:22:01 <Asztal> VB used to have AddressOf and ValueAt ;)
23:22:18 <Sukoshi> Woaha. VB had pointers? :D
23:22:58 <Sukoshi> CakeProphet: ..................... ?
23:23:24 <Sukoshi> Imagine you have a magic function `` int magic''
23:23:38 <CakeProphet> I mean... why do you want to explicitly define something to be a reference?
23:23:51 <Sukoshi> CakeProphet: How else would you?
23:23:52 <CakeProphet> You could just make everything a reference to an underlying thing in memory
23:24:17 <Sukoshi> Then how would you assign anything to anywhere?
23:24:55 <Sukoshi> (I think I understand your argument, but that's a question for more clarification.)
23:25:44 <CakeProphet> eh... it's how Python works. Although I don't exactly grasp the entire concept of a pointer, so I may have a bad idea of what they do.
23:25:57 <Sukoshi> No no, you've hit on the ages-old pointer gripe (I think).
23:26:11 <oklopol> a pointer is an integer :\
23:26:25 <Sukoshi> I think, and here I'm not sure even, that the concept of a pointer is seperated from a normal variable only for the sake of side-effects in code.
23:27:14 <Sukoshi> So that, a function can have a copy of something, modify it to he**, and make the rest of the program none the wiser. Now why referential passing isn't default behavior and value passing is is anyone's guess.
23:27:36 <Sukoshi> *and value passing a special case
23:29:23 <CakeProphet> in Python, everything is implicitly a reference, and there are ways to "copy" the value of an object so that it's a separate entity.
23:29:37 <Sukoshi> That's something I'm not too fond of.
23:29:51 <Sukoshi> Because the concept of a reference is implied, not explicity.
23:30:03 <CakeProphet> x = [1,2,3,4,5,6]; x = y; x.append(2); x == y <---True
23:30:34 <Sukoshi> Effeciency wise, that's slow. It's also annoying with low-level code. Plus it makes you memorize rules (like in Java, objects reference pass, but basic types value pass).
23:30:59 <CakeProphet> hmmm, seems intuitive to me, but Python is my first language soooo...
23:31:19 <Sukoshi> That's a'cuz you don't bit-twiddle much.
23:32:01 <Sukoshi> That distinction in conjunction with structs are what really give C power. My gripe is simply over the default distinction.
23:32:06 <CakeProphet> It's basically just for mutable sequences... immutable data can't be altered, and thus the difference reference and value is pretty much nothing.
23:32:39 <Sukoshi> But... you have to memorize what's mutable and immutable.
23:32:47 <Sukoshi> Giving you less flexibility on how you manage data.
23:33:27 <CakeProphet> tuples and strings are immutable. Lists and dictionaries are mutable.
23:34:33 <CakeProphet> and since OO in Python is basically just a pretty interface over dictionaries... classes and objects are mutable.
23:36:42 <Sukoshi> But why should a language even decide what data is or is not mutable?
23:37:04 <CakeProphet> *shrugs* It's just sort of the nature of the data itself that makes it so.
23:37:23 <Sukoshi> Remember where C is aimed. Not for building complex idioms or beautiful programs, it was originally designed to build OSs.
23:37:45 <CakeProphet> it's not an enforced thing... a mutable object can be duplicated.
23:37:48 <Sukoshi> You aren't going to get speed and control out of something that decides mutability for you.
23:38:32 <CakeProphet> and since I'm not building OSes... I don't see much of a need for the paranoid efficiency of C. :D
23:38:59 <Sukoshi> Anything low-level, including I can almost guarantee, Python's interpreter.
23:39:42 <Sukoshi> Copying files, talking on a network, etc, etc.
23:40:00 <CakeProphet> eh... Python isn't as slow as people make it out to be.
23:40:14 <CakeProphet> If you use it right, it works fine for normal environments.
23:40:30 <Sukoshi> But, I'm not going to use Python to make something that copies files for me.
23:40:45 <Sukoshi> Or handles enormous amounts of data with/without transformations.
23:40:54 <jix_> Sukoshi: well the harddisk will be the bottleneck even when you use python (for just copying)
23:41:07 <Sukoshi> jix_: Errr, I meant not *just* copying.
23:41:20 <jix_> well then yes....
23:41:46 <CakeProphet> I could consider file copying a "normal" situation.
23:41:52 <Sukoshi> Heck, some people even rewrite portions of libc and stdlib to get the speed they want in certain situations.
23:41:54 <CakeProphet> Python would work fine for file manipulations.
23:42:05 <jix_> doing things like a chess AI is a thing i don't want to do in c because writing it in c is a pain in the ass but i don't want to use other higher level languages because i use too much performance :/
23:42:12 <CakeProphet> Some people are insanely paranoid about speed.
23:42:50 <Sukoshi> CakeProphet: If you're writing a utility that's going to be widely used, portable on many OSs, or is something of that nature, you're going to use C.
23:43:23 <Sukoshi> I'm working on a project now (we're hoping to get it accepted into GNU) that deals a *lot* with sockets and files and parsers. This is C's domain.
23:43:35 <CakeProphet> That's simply because C is used everywhere.
23:43:42 <tokigun> I agree with Sukoshi. why I use C is mainly for portability, not for speed.
23:44:00 <Sukoshi> CakeProphet: Higher level languages are a pain to ensure portability for.
23:44:13 <Sukoshi> The higher the language, the harder to implement the idioms on different platforms.
23:44:39 <jix_> yeah most portable apps are written in c.....
23:44:48 <CakeProphet> I have a utility for Python that compiles the entire program into an .exe that can work independent of a python interpreter.
23:44:50 <jix_> or c++ that's pretty portable too
23:44:57 <CakeProphet> Sure... it adds a few MBs to the file size... but it's portable. :D
23:45:00 <jix_> CakeProphet: on mac os x?
23:45:16 <Sukoshi> Plus, the project I'm working on still is pretty slow compared to (one of) its competitor(s) (the project has multiple functions) -- GNU cp.
23:45:19 <jix_> CakeProphet: on some propertary(wrong spelling for sure... i hate that word) embedded device?
23:45:20 <CakeProphet> I use XP myself... but the utility is independent of OS
23:45:59 <Sukoshi> The mmap patch I recently committed sped it up, but we still need more optimizations.
23:46:06 <tokigun> jix_, but if you use somewhat difficult feature of C++, you could not get much portability
23:46:24 <jix_> tokigun: i don't know.... never coded c++ myself.. i don't like it
23:46:32 <Sukoshi> tokigun: Oh *GOD*, I remember trying to write a SWIG wrapper for some complex C++ code... it was a nightmare.
23:46:35 <CakeProphet> hmm... it might be windows-only though... so maybe not.
23:46:45 <jix_> but milkytracker is written in c++ and is pretty portable...
23:47:18 <tokigun> well, it is mainly due to compiler (not target platform), since specification of C++ is hard to implement.
23:47:53 <tokigun> if you use restricted set of features in C++ only, almost all compiler can compile your program. but you should be careful.
23:48:32 * CakeProphet doesn't worry much about portability... most of his projects are directed towards personal use or developer use.
23:48:39 <tokigun> for example Mozilla doesn't use "mutable" keyword, because some C++ compilers don't support it.
23:50:19 <tokigun> considering this, boost is very carefully written library to support almost major (including buggy) compilers.