00:00:00 --- log: started forth/13.01.01 00:27:23 anyone doing anything interestin? 00:27:39 s/?/g?/ 01:46:05 --- join: anannie (~anannie@95.211.99.11) joined #forth 01:46:05 --- mode: ChanServ set +v anannie 03:31:41 --- quit: obobo (Read error: Connection reset by peer) 03:31:54 --- join: obobo (~chatzilla@dyn-dsl-mb-98-124-28-49.nexicom.net) joined #forth 03:31:54 --- mode: ChanServ set +v obobo 03:32:26 Hey obobo 03:55:35 anannie: do you mean protist? :P 03:55:54 protist: Hey there, how are you doing? 03:56:41 I am doing well, and you? :) 03:56:45 I am tired though :/ 03:57:54 as am I 03:58:36 we should sleep together :3 03:59:15 Errr? 04:00:49 I've been BSing too much in another channel, sorry :) 04:00:52 what are you up to? 04:01:16 I'm talking to someone who is quite close to me... 04:18:01 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 04:18:02 --- mode: ChanServ set +v MayDaniel 04:45:43 anannie: how is Ruby? 04:46:19 anannie: i really was surprised when i saw your Ruby code...I heard Ruby was similar to Perl in some ways...so I expected similar syntax 04:46:25 I'm reading the pragmatic programmers guide on ruby 04:47:06 Well I don't know if my ruby code is supposed to be the way ruby is implemented, but ruby people do pride themselves on clarity and readability 04:48:12 anannie: the "messyness of Perl" (the sigils and choice) actually add to the power of the language...but it was interesting to see how ruby looks more like Python 04:48:42 anannie: in Ruby...can you use regexes without importing them? 04:48:58 yes protist 04:49:01 anannie: i assume so because i saw Ruby has special forms for regex binding 04:49:09 anannie: good :) 04:49:18 protist: You can use regexes directly 04:49:37 anannie: that is something that bothers me about Python....Python imports regexes then uses these messy function wrappers that make it feel like C 04:50:18 well in ruby you can directly do a reg ex search 04:50:25 lemme show you some code which has that 04:52:45 anannie: in perl you can do stuff like if ($thing=~m/PaTtErN/){code} or for a find and substitute $thing=~s/pattern/replacement/; 04:53:04 yes you can do just that in ruby 04:53:13 https://www.dropbox.com/s/dugdirgo2h5mvlz/ex36b.rb 04:53:13 ah nice :) 04:53:22 That's very early code of mine 04:53:27 and it features an input parser of sorts 04:54:50 ah interesting 04:55:11 looks a little too OO for my taste, but a definite step up from Python regex handling 04:55:34 I made a text based adventure game in ruby 04:57:22 nice :) 04:57:43 here is a compiler i started and abandoned in Perl: http://ideone.com/amWeKR 04:58:20 there is a lot of assembly mised into the text, especially the parts in red 04:58:55 mixed* 04:59:14 but it does demonstrate the full extent of how weird Perl "regexes" can be 05:01:54 """my $balanced = qr/(\((?:[^()]++|(?-1))*+\))/;""" 05:01:58 * anannie faints. 05:02:05 That's like greek to me 05:02:24 haha 05:02:50 that is a demonstration of something Perl can do, that even many perlmonks may not know how to do 05:03:22 that is a recursive regex that finds a section of text with matching parenthesis 05:03:44 A recursive regex 05:03:46 Wow. 05:03:52 so it is like a parsing expression grammar 05:03:52 I don't even know how to begin reading it 05:03:59 it does recursive descent parsing 05:04:03 I would love to learn though 05:04:06 anannie: haha :D 05:04:32 * anannie is kinda dumb... :p 05:04:33 anannie: that is the power of Perl....other languages claim to have "Perl 5 regexes"....They don't. 05:05:35 anannie: you seem intelligent to me...I think you can handle those weird things if you take the time 05:05:54 anannie: and after you learn the syntax and particulars of Perl regexes 05:06:14 anannie: note: I am sexist, it is quite rare I suspect a girl of being intelligent 05:06:20 ;) 05:06:34 lol 05:07:15 It's just that this stuff is incomprehensible to me right now and there are people my age starting up companies and doing stuff like this 05:07:21 it's very, very embarrassing 05:07:39 they likely are not writing regular expressions like that 05:07:50 most people tell me I am crazy for not using modules for stuff like that 05:09:06 Meh I'll just work until I get there. 05:09:35 how old are you? 05:09:41 you said "people my age" 05:10:04 20 05:10:10 me too 05:10:11 :D 05:10:24 until the 7th haha 05:10:39 You're 20? 05:10:44 yes ma'am 05:11:03 Wow. 05:11:09 I thought you must be 26 or something 05:11:14 There I'm ashamed of you. 05:11:25 i just took a douchey picture because we were having a beard contest in ##programming: http://imgur.com/wyuAL 05:11:32 * of myself not you 05:11:36 sorry had a brain parse error 05:11:42 why ashamed? lol 05:12:57 i figured you were probably late 20's, as well...because you had a job and your boss gave you a laptop 05:13:20 Well I know nothing compared to you 05:14:07 I've had 5 months of living and breathing nothing but programming 05:15:00 I got to New Zealand and my visa was messed up...i couldn't do uni or work here...I eventually got tired of playing games online, wiped off windows, installed linux, and started programming all day 05:16:38 Wow you did this within 5 months? 05:17:03 yes :) ...i did have two Java courses that taught me nothing like 2 years ago, though 05:17:28 i have a rule....20 pages a day minimum 05:17:40 if you do that, you cover 600 pages a month, minimum 05:18:10 Yes. 05:18:47 Do you make notes about the pages you read? 05:18:58 no 05:19:10 I practice things as I feel a need, though 05:19:11 How do you ensure retention? 05:19:33 practice...but generally, if I am interested, I retain 05:19:58 I am passionate about CS now :) 05:20:21 ah I'm different. I get very nervous about retaining things 05:20:36 if I don't know if I'm about to retain something then I get tied up in knots about it 05:20:49 I'm trying to set up spaced repetition around concepts to do that 05:22:29 one thing I think I do without thinking about it now is the following....if you read something and you are worried about retaining it, then look away and see if you can repeat it to yourself, mentally (especially syntax and code)....if you can't, then read that part again....repeat until you feel comfortable 05:23:08 and if you still don't feel comfortable....write programs that use the concept, and try not to copy from the book....make sure you hold it in your head then type it, peice by peice if you have to 05:24:37 Thanks that sounds perfect. I'll use that trick 05:25:44 good :) ... you sound like a capable person, from what I have seen of you 05:26:21 I try to be. I try to be. Fake it until you make it ;) 05:27:13 haha :) 05:27:55 ah damn I have to take the trash out 05:40:59 anannie: back 05:41:05 Welcome back 05:41:13 anannie: thank you :) 05:41:21 Did you solve PE problem #6 btw? 05:42:27 i have solved it...but i haven't went through your method :) 05:42:54 your method is more interesting than the problem 05:43:47 Sorry I meant problem #5 05:43:52 ah! 05:43:53 sec 05:44:00 I'm currently solving it and it's giving me a headache 05:44:08 I can't see an efficient solution over here 05:44:24 and I just know that the project euler fellows will come back with a simple linear solution 05:44:31 my internet is so slow right now 05:45:20 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? 05:46:00 ah 05:46:05 i think I did that one in assembly 05:46:14 but i also probably did it in other languages 05:46:38 i didn't do anything magical...i didn't even optimize 05:46:59 you just kept on looping until you got it? 05:47:32 i might have skipped checking 1, 2, 3, 4, 5, 8, and 9 or something ....but it isn't needed 05:47:47 yeah the first few problems will solve fast without optimizations 05:48:20 depends on what you find fun, but there are plenty of problems that really will take a month or longer if you don't optimize 05:49:23 oh....you could also start your check at 11 * 17 * 7 * 5 * 3 * 19 or something 05:49:42 because the number must be a multiple of those primes 05:50:43 I'm actually doing a rather simple algorithm 05:51:23 instead of looping from 1 and then dividing each of these numbers to see if it's the minimum number and then hitting stop when I arrive at one 05:52:17 what I'm doing is that I'm working through the maximum number of factors for each of the numbers and then I'm inserting them into an array and then I'm multiplying them to get my result 05:52:51 for example 20 has 2 two times, clearly the number will have the factor of two occurring at least two times for it to be evenly divisible by 20 05:53:08 therefore we're searching for a number which has 4 as a factor and so on 05:53:16 but then we have 8 that means it must be at least 3 05:53:28 exactly...why i was saying skip 1, 2, 3, 4, 5, 8, , and 9 05:53:28 and so we revise the estimate and we keep on going until we do it 05:53:48 16 is divisible by 8,4,2 05:54:01 18 is divisible by 9, 2 05:54:04 yes but what I'm doing is inverse of a search through numbers 05:54:10 and 6 05:54:13 I'm focussing on the list itself to get the minimum number 05:54:21 it's harder to code 05:54:22 and 3 lol...ill stop listing 05:54:29 hmmm 06:05:30 ha! 06:05:34 i figured out some tricks 06:09:39 anannie: *SPOILER ALERT* 06:09:47 NOOOO!!! 06:09:48 :p 06:09:51 ok 06:09:52 i wont 06:09:59 I'm solving it 06:10:03 I have a partial solution down 06:10:19 I'm using a hash based solution to do it 06:10:28 ah :) 06:16:11 I am lambdanu on pe....you can see my solution in the forum for the problem after you have solved it to your satisfaction :) 06:25:12 Hrm apparently my approach is conceptually wrong, because I find the LCM not the least evenly divisble number 06:26:28 what is LCM? 06:27:32 least common multiple 06:28:00 ah 06:28:24 you don't actually have to use it for this problem...but you do know the modulo operator, right? 06:28:27 % 06:31:40 That's what I'm doing 06:31:50 and I checked the definition I'm conceptually right 06:31:56 I don't know where I'm going wrong though 06:32:05 may i see your code? 06:42:29 https://www.dropbox.com/s/lrxxpnv5qszci8k/pe5.rb 06:42:38 ^ protist 06:42:43 Sorry it took me that long to upload 06:43:39 sec 06:45:05 i think your approach may be incorrect...but it will take me a bit to fully comprehend whether it /is/ wrong 06:46:25 that code really looks like python :P 06:46:32 i was just writing a prime routine for python 06:47:43 anannie: i think you are overthinking this problem 06:48:12 the story of my life 06:48:14 anannie: you do not need to find factors of each number you encounter....only check for divisibility 06:48:29 I'm not finding factors for each number I encounter 06:48:36 instead I'm not searching through numbers at all 06:48:44 I'm doing something different 06:49:02 anannie: ah!...i think i know what you are trying to do 06:49:06 I'm going through the list from 2 to 20 and then for each one of them I'm figuring out the factors 06:49:22 if the number of factors is larger than what is stored in the hash 06:49:37 then the factors get stored into a hash 06:49:55 so what I'm doing is that I'm creating a list of the maximum number of times each factor occurs 06:50:04 and then I'm multiplying them to arrive at a number 06:50:47 which should be theoretically the least number which is evenly divisible by the set 06:51:08 anannie: what is the << operator in Ruby? 06:51:23 bitshift?! 06:51:39 no it's insert number into the array 06:51:45 ah good 06:53:38 This should be a simple, elegant recourse to the problem 06:53:41 and damn it isn't 06:54:46 what you are doing in factorisation is what i did by progressively rewriting my program 06:55:12 this is interesting...i am going to stare at it more 06:55:36 Oh god I figured out what I'm doing wrong 06:55:38 YAY! 06:56:12 ah 06:56:19 you need to restart index at 0 i think 06:56:29 otherwise the while exits early? 06:56:52 maybe you found something else, or i have it wrong :) 07:02:22 Nah 07:02:31 I was taking a multiple when I should have been doing an exponential 07:02:37 it was as easy as that 07:04:09 is it closer to working :) 07:04:10 ? 07:06:26 it works 07:06:32 :D 07:06:34 refresh the screen for the latest version 07:06:47 and run it in the ruby that came with your machine 07:07:24 ah your changes must be farther down than I read :) 07:07:49 I'll teach you ruby if you teach me Forth :p 07:07:53 i actually don't have ruby 07:07:58 sec i'll install 07:08:21 this could take a while :) 07:08:32 look on the last page of the forum for that question 07:08:38 I am lambdanu on PE 07:09:46 Yes I saw your solution 07:09:48 it was cheating 07:09:50 :p 07:09:52 :D 07:10:08 the Forth one? 07:10:23 i actually wrote it out in assembly...but i brute forced 07:10:29 that was a month or two ago 07:10:34 1 prob 07:13:03 Yes the forth one 07:13:59 :) 07:15:01 I love trolling people's brains 07:16:19 how so? 07:16:49 i like what you did with your solution, it is really is interesting logic 07:16:51 protist: Offering to teach Ruby is a programming skill attenuator. ;) 07:17:54 ttmrichter: i had to look up attenuator haha 07:18:18 * ttmrichter was riffing off Forth being a programming skill amplifier. 07:18:23 ttmrichter: I am supposing you are saying that it would attenuate my programming skills to be taught Ruby? 07:18:29 Yes. 07:18:33 ah haha 07:19:08 sadly i wasn't quick enough to get the reference :P 07:19:21 lol ttmrichter 07:19:27 You really hate Ruby don't you? 07:19:33 Actually I like Ruby. 07:19:36 As a SCRIPTING language. 07:19:49 It's the first language I learned and well I'm still learning it... 07:20:22 It's when it gets distorted into something it was never intended to that it bugs me. 07:20:41 And it's when Rubyists invade other language zones and start insisting that everybody turn their language into Ruby that it pisses me off actively. 07:21:13 For some reason Erlang is a major target of this. 07:21:40 There's been not one, not two but THREE attempts to basically build Ruby atop the Erlang VM (named BEAM). 07:21:52 And each one followed the same pattern. 07:22:07 ewww....leave Erlang alone! 07:22:07 ttmrichter: I'm guessing that's a bad thing? 07:22:22 Erland never hurt nobody...unless they were hurt by stability 07:22:26 Erlang* 07:22:27 "Hey guys! I just found Erlang and really like it. But I don't like and I think it would be better if it worked like ." 07:22:47 hehe 07:23:00 "Guys, since nobody's doing what I want with Erlang, I've decided to make myself a language that looks the way I want." 07:23:08 anannie: Ruby looks solid....more so that Python from what I see 07:23:11 "WHY ARE YOU GUYS SO MEAN AND NOT FLOCKING TO MY OBVIOUSLY FAR SUPERIOR LANGUAGE?!" 07:23:15 anannie: more so than* 07:23:32 protist: Ruby *is* solid. As a scripting language. Provided you don't use the dangerous bits. 07:23:34 But ... 07:23:40 Rubyists use it for more than scripting. 07:23:48 And they LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOVE them the dangerous bits. 07:23:50 what exactly is scripting btw? 07:24:04 anannie: Typically task automation. 07:24:33 For example if I want to analyze my HTTP server log files I might write a quick program (called a "script") in Awk or Perl or Ruby or the like. 07:25:10 Or if I want to add programmability to some code I've written I might embed a Lua or Python or Tcl or even Ruby interpreter in my program. 07:25:29 So the bulk of the work is done in my program, but users can automate things with, again, scripts. 07:25:38 In this role, Ruby is actually very pleasant. 07:25:49 But then what are core programming languages? 07:25:51 anannie: scripting is basically anything other than making a commercial product or systems-level (low level) programming 07:26:06 * ttmrichter isn't familiar with the term "core programming language". 07:26:39 A good (if ill-defined) set of terms to use is "systems", "application" and "script" programming. 07:27:00 C, for example, is pretty good (not ideal!) for systems programming. It's pretty lousy for applications and unusable for scripting. 07:27:36 Erlang is pretty good for certain classes of application programming, OK for scripting (via escript) and unusable for systems programming. 07:27:57 Ruby is good for scripting, useless for systems and terrible for application programming. 07:28:12 Anyway, bedtime. 07:28:14 Chat later. 07:28:17 goodnight 07:28:22 thank you for teaching me ttmrichter 07:28:38 anannie: goodnight :) 07:28:50 anannie: btw Python and Perl are scripting as well 07:28:51 You're going to bed as wel? 07:29:05 anannie: no...i just say goodnight when people say it to me 07:29:18 oh 07:29:28 you aren't the one leaving lol 07:29:35 ttmrichter: goodnight 07:33:31 anannie: i know what problem 10 wants me to do...but i am stubborn so I am giving it 10 minutes 07:33:53 anannie: i guess i might as well do what it wants :/ 07:34:38 works for me 07:34:48 oops. 07:34:53 I can whip up the prime number problem in a few minutes 07:35:06 anannie: number 10? 07:35:13 I was caught in backscroll, nevermind. That was wrt to "see dup" locking up in gforth 0.7.0 07:35:35 anannie: it is not difficult at face-value...it is a question of efficiency 07:36:11 anannie: even rudimentary optimizations don't solve it well enough...i am about to switch algorithms 07:36:14 protist: Finally you're getting into my mode :) 07:36:38 --- quit: proteusguy (Read error: Connection reset by peer) 07:36:45 anannie: PE will force it after a certain point :D 07:37:16 Here's one... the sieve of Eratosthenes 07:37:28 anannie: i'm going to be practicing Python for now...i coudl whip this up in Scheme very quickly 07:37:38 anannie: I already wrote the sieve 07:37:47 anannie: sieve isn't good enough for #10 07:37:49 okay then here's another 07:37:58 anannie: Fermat test is needed 07:38:08 do root(num) and then use a prime list less than that 07:38:25 anannie: you do that then...i will do Fermat :D 07:40:23 anannie: hmmm...fermat could actually overflow the space of a variable 07:40:45 Fermat is basically random sampling... 07:42:05 --- quit: obobo (Ping timeout: 255 seconds) 07:42:25 it still has good complexity 07:42:27 btw, ^D broke out of a lockup of see 07:43:03 PoppaVic: what? 07:43:11 oh 07:43:14 :) 07:43:23 was it see dup again? 07:43:26 or was that someone else? 07:44:29 I was tinkering last night and the ^D cut me loose - it triggered a short hexdump and all was well 07:53:20 --- join: proteusguy (~proteusgu@ppp-115-87-214-214.revip4.asianet.co.th) joined #forth 07:53:20 --- mode: ChanServ set +v proteusguy 07:55:58 --- join: obobo (~chatzilla@dyn-dsl-mb-216-168-124-204.nexicom.net) joined #forth 07:55:59 --- mode: ChanServ set +v obobo 07:56:24 anannie: are you sure about that root rule...it seems odd here 07:56:49 A numbers prime factors are a always less than root(num) 07:57:17 anannie: kk....if my print doesn't fail i should have it soon :) 07:57:35 err how have you implemented it? 07:57:43 I'll write a solution and I'll show it to you 07:58:12 anannie: i got it wrong :( 07:58:23 that's okay 07:58:43 anannie: i have a working seive i wrote...and i threw in the root rule 07:58:56 anannie: i could just have written my python incorrectly...i am just learning python 08:01:00 Well you'll get there 08:01:35 anannie: oh...they didn't count 1 as prime 08:01:45 anannie: i added one to my answer xD 08:01:49 anannie: i got it now :) 08:01:50 1 isn't a prime 08:01:51 Ouch 08:01:54 Yay!!!!! 08:02:22 :D 08:02:28 your turn >:) 08:03:17 That's evil 08:03:33 hence the evil smiley >:) 08:03:34 but you know I shall pick you up on that one 08:04:38 --- quit: protist (Read error: Connection reset by peer) 08:06:05 --- join: protist (~protist@125-237-130-19.jetstream.xtra.co.nz) joined #forth 08:06:05 --- mode: ChanServ set +v protist 08:06:16 anannie: my netbook didn't like me Eulering over and over 08:06:26 anannie: it restarted to teach me a lesson 08:06:27 protist: :-/ 08:06:32 haha 08:06:35 Can I reuse old code? 08:06:42 no :( 08:06:42 I've already solved this problem before 08:06:45 oh 08:06:50 if you wrote it then go ahead 08:07:56 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 08:07:56 --- mode: ChanServ set +v ncv 08:09:57 My old code is dizzying 08:10:41 --- join: I440r (~zhiming@230.sub-70-194-73.myvzw.com) joined #forth 08:10:41 --- mode: ChanServ set +o I440r 08:11:24 I have no clue what this does https://www.dropbox.com/s/zqysmyvhjgjrxsq/pe3.rb protist 08:11:35 and I wrote it! 08:12:13 haha 08:12:14 sec 08:12:20 /me looks !!! 08:13:10 anannie: you should probably have implemented seive to call another function...then you would have less trouble reading your code :) 08:13:39 https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes 08:14:26 Yup 08:14:30 That's what I'm trying to do 08:14:37 anannie: if y!=prime (y%prime)==0 end ....that seems really fishy 08:14:51 everyone rewriting those things always seems like a waste of time. 08:15:00 anannie: a boolean that then says do a boolean?...i guess i just don't know Ruby? 08:15:04 not a waste of time 08:15:08 its good practice 08:15:35 never bothered with sieve & primes or whatever in my life. 08:16:36 i prefer fibonacci to primes 08:16:49 : fib 0 1 rot 1+ 1 do tuck + loop nip ; 08:16:53 40 fib . 08:17:17 : nextfib tuck + ; 08:17:31 someone showed me that...i can't take credit 08:17:38 but doing a sieve is good practice for working with arrays 08:18:07 they based it on my code above which is a method for doing fibs that i implemented years ago 08:18:16 everyone else uses recursion 08:18:23 doing a seive is good practice for control flow or learning a new language 08:18:42 to calculate the 40th fib usinga recursive technique your code will recurse on itself ONE HUNDRED AND THIRTEEN MILLION TIMES 08:18:57 Whoa 08:19:21 I440r: my return stack is whimpering PLEASE DON'T!!! 08:19:22 i put a incr> counter at the top of a recursive implementation 08:19:51 protist, simple. for any given algorithm that uses recursion there is always a much better itterative method 08:19:57 except for ackerman functions 08:20:17 i.e. you go ahead and use "quick sort" and you will be eating the dust of my radix counting sort 08:21:16 I440r: there is a difference between a recursive process and a recursive routine.....a recursive routine can be an iterative process (might require tail call optimization to fully-realize it, though?) 08:22:15 yer all makin' my eyes bleed ;-) 08:22:19 protist, a tail optimization is just where when you do a call followed by a ret you just JUMP. recursion is just a means of doing loops tho wieth recursion thers usually 2 loops, a wind up loop and a wind down loop 08:22:28 smelly computer *scientists* ;-> 08:22:30 most wind down loops are just successive rets 08:23:14 recusion is BAD. instead of doing : foo ......... recurse ; and hoping the optimizer optimizes that recurse just fucking do : foo begin ....... again ; or whatever 08:23:36 any kind of recusion is automatically a CLUSTER FUCK. it makes the code way more difficult to read 08:23:55 I440r: doesn't colorforth ONLY offer recursion or something? 08:24:02 I find recursion to be elegant though... 08:24:05 my comment on isforths recurse definition is "foot in self shoot" 08:24:09 I440r: Chuck Moore prefers recursion for simplicity 08:24:37 I440r: or so he seems to say in a large speech of his I read 08:25:01 anannie, yes. quick sort is "elecant" when done recursivly, one look at the gny itterative quick sort code shows that 08:25:11 but thers better, faster, simpler ITTERATIVE methods 08:25:41 protist, instead of do loops he uses for loops 08:26:16 but do loops can still be a better choice sometimes. like counting backwards from X to Y where y is non 0 or even negative 08:26:50 I'md too used to C looping - I need to re examine the forth constructs,, I always found do-loops clunky 08:27:06 do loops are very powerful... and klunky 08:27:26 as long as we intersect on Clunky ;-) 08:28:09 would be funny if Forth offered DO ..... JNE/JNZ/JNA or some such 08:28:37 i suppose we do have BEGIN UNTIL 08:28:52 they are more difficult to set up. the start of a for loop is takes 2 parameters off the stack PLUS a compiled inline literal address of the exit of the loop.. the start and end indicies are "fudged". the exit point is pushed onto the return stack then the 2 fudged indicies 08:29:12 thefudging makes loop increment the top of return stack which will cause an overflow on completion of the loop 08:29:29 to get the unfudged index of the loop you add the 2 fudged values. 08:29:46 to exit from a loop you literally only need to do 2r> 2drop exit 08:30:17 leave is basically : leave 2r> 2drop exit ; but in code of course because the high level would be nested into lol 08:30:22 but thats what it does 08:30:44 damn my Python looks good next to the other Pythonistas I am seeing on PE 08:30:54 shhh.. I been thinking similar. 08:30:55 that'd be BEGIN 08:31:04 or you can do : blah 10 0 do i 5 = if 2r> 2drop exit then i . loop ." were done" cr ; 08:31:17 the "Exit" in the middle of the loop will exit to the ." were done" part 08:32:14 or : foo 10 0 do i 5 = ?leave i . loop ." were done" cr ; is how you would actualy code it 08:32:58 if yu want toactually exit the funcion and skip the code after the "loop" you would do "undo exit" inside the loop. 08:33:06 ans forth limp wristedly calls undo "unloop" 08:33:14 its fucking called UNDO and it UNDOES a DO LOOP 08:33:26 i hate ans stupid shit like that witha passion 08:34:02 bw protist this; if y != prime ; (y % prime) == 0 ; end works because ruby returns the last value it evaluated so it returns true or false depending upon the result 08:34:04 idk why they fuck with the word choice of the authors 08:34:31 standardizing implementation details /can/ be useful....having a comitee decide on what sounds good is a horrible idea 08:34:43 (y % prime) == 0 is clever then lol 08:34:55 thank you 08:35:01 anannie: ah :) 08:35:03 you dont need to say "Return blah" you just do "blah" at the end :) 08:35:06 i like that 08:35:17 Yes Ruby can be pretty I440r 08:35:29 anannie: it seemed to deeply nested for me to imagine it was an implicit return 08:35:59 I440r: Perl has implicite returns too ....in C it is UB :(! 08:36:05 implicit* 08:36:12 protist: That's okay ruby is weird like that 08:36:14 what means "ub" ? 08:36:20 undefined behavior 08:36:24 oh 08:36:34 99% of C is undefined behavior 08:36:51 I'm sorry it took me a while to reply. I zoned out 08:36:59 I440r: pretty much 08:37:02 anannie, lol tired? 08:37:03 anannie: that is fine :) 08:37:07 ill come tuck you in :))) 08:37:14 I440r: Pulled an all nighter 08:37:20 anannie: i was admiring my Python code and patting myself on the back 08:37:29 anannie, yea i was tempted to do thyat but started feeling speepy by 1 am 08:37:34 A friend of mine was applying to the Thiel fellowship and he couldn't write the application... So I helped him write it 08:37:46 anannie: what application? 08:37:53 protist: Your pythong code is pretty 08:38:01 The application for the Thiel Fellowship protist 08:38:03 anannie: do you see it? :D 08:38:13 * python 08:38:19 not py thong Errr. 08:38:43 anannie, i have some freshly roasted coffee here... that always helps after an all nighter :) 08:38:50 hope you dont have work today! 08:39:06 call in dead! "sorry i cant come in today im dead, see you tomorrow" 08:39:12 I440r: Nah, everyone is on a holiday 08:39:27 anannie: did you get problem 10?...I am waiting to see what your Ruby looks like with PE syntax highlighting :) 08:39:39 proteusguy, PE? 08:39:44 project euler 08:39:50 I'll write it tomorrow if you don't mind protist 08:39:54 protist, go look at sublime text 2 08:39:56 sorry to be "that guy"...the annoying abbreviation guy 08:40:09 lol 08:40:10 anannie: that is fine :) 08:40:45 no keep using abreviations i prefer function names like "@" over the more ansy "fetchitemfromaddresssoecifiedattopofstack" 08:40:48 I440r: I am a member of the vim 08:40:59 the vim? 08:41:06 vi improved 08:41:08 the editor 08:41:16 i was joking about being a member of it 08:41:21 sublime text 2 has a "Vintage mode" for vi users 08:41:31 like people say "The Church of EMACS" 08:41:47 eighty megs and constantly swapping 08:41:54 a nice operating system but it lacks a decent editor 08:42:09 ....does it run in non-gui....idk :/...i like to keep things simple 08:42:21 its gui 08:42:29 but go watch the vids i linked to anannie :) 08:42:43 sublime text is beautiful 08:42:44 I440r: hahaha...making fun of emacs people who aren't around is fun, we should meet here and do it again 08:42:52 I'm buying a licence 08:43:07 anannie, for st2? 08:43:13 Yup. 08:43:32 I440r: someday i should learn to use TECO :P 08:43:55 yea... that multiple cursors and the ability to do very complex very common editing operations in a few "hard to remember keypresses" is awesome lol 08:44:06 you just got to remember all the keyboard shortcuts 08:44:14 hmm "pythong".. 08:44:21 I440r: have you used it? 08:44:27 also. if you license it you can have a mac copy,. a linux copy and a windows copy 08:44:37 used what? st2 ??? 08:44:39 I440r: we should start a TECO club and write an operating system in APL 08:44:41 i registered it lol 08:44:47 wtf is teco? lol 08:45:08 I440r: the editor that cam before Emacs 08:45:13 oh 08:45:20 I440r: i stands for Tape Editor something i think 08:45:26 emacs is bloatware worse than anything m$ ever produced 08:45:34 I440r: it is more like a programming language than an editor 08:46:06 multi edit has a very powerful macro language built into the editor. the editor is written in said macro language for the most part 08:46:18 I440r: http://en.wikipedia.org/wiki/TECO_(text_editor)#Example_programs 08:46:26 but i never used ME after version 3.01 (under dos) 08:47:40 i guess tico users like lots of $$$XX$$$XX$$$$$$ dollar signs interleved into their code to help make taht shit unreadable lol 08:48:30 well they have a brainfuck interpreter! amg lol 08:48:37 I440r: hahaha 08:48:47 the only programming language less readable than brainfuck is whitespace 08:48:53 I440r: that code example is so lulzy...it seems like a troll example 08:49:24 i considered writing a brainfuck COMPILER in forth 08:49:25 I440r: doesn't whitespace only use invis chars? 08:49:31 correct 08:49:42 spaces, tabs and cr's and lf's etc 08:49:44 I440r: with syntax highlighting it would be better than unlambda...ide imagine 08:49:47 not sure if it uses vertical tabs 08:50:14 vertical tabs...that is mean :) 08:50:32 maybe not as mean as backspace chars in the source? 08:50:37 sort of like a formfeed in both directions 08:51:02 lol 08:51:12 they probably use backspaces 08:51:17 haha 08:51:26 ive not actually looked at their syntax 08:51:43 they should provide an IDE, that properly accepts backspaces thus you can't erase code 08:51:51 --- part: PoppaVic left #forth 08:52:16 i guess i mostly use vim commands to delete anyways 08:52:17 you could "Control backspace" to perform the bakspace instead of inserting it 08:52:36 I440r: don't make me think like that 08:52:47 did you know that the guy that wrote vi is the one that invented termap which is what erminfo is derived from? 08:53:03 what is erminfo? 08:53:05 terminfo 08:53:07 a typo 08:53:24 anannie, is sleeping on her keyboard now :) 08:53:50 odd...i have terminfo, i guess it is standard....idk what it is 08:53:59 I440r: i think she is 08:54:31 terminfo is a database of terminal capabilities and format strings for escape squences for doing cursor control and the like 08:54:38 terminfo is now part of libncurses 08:54:47 hmmm 08:54:54 i wrote a terminfo parser for isforth 08:55:08 so i can do cursor positioning on any linux terminal.. or SHOULD be able to 08:55:24 except the people who put terminfo files together are morons and leave important shit out 08:55:35 I would like a computer with a Forth OS 08:55:49 that just sounds fun 08:56:11 maybe i should get a ga144 and play with it sometime 08:56:25 if some rich millionaire would like to back me i would love to create a forth os for the raspberry pi. including porting all the video drivers etc etc to forth 08:56:50 I440r: that would be awesome 08:56:59 I440r: i guess making it would be the fun part 08:57:00 :P 08:57:05 inorite! some rich dood giving me money to PLAY !!! amg ol 08:57:12 hahaha! 08:57:57 I hope when i start my CS major they allow me to do stuff my way 08:58:01 like not use an IDE 08:58:13 protist, in vim when you have 50 variables called "foo" that got renamed to "foobar" how do you make the edit? 08:58:22 the website says the comps at the uni have linux dual-boot....but websites are not always right 08:58:49 I440r: i tend to just use sed for something like that...or perl 08:58:57 --- join: RodgerTheGreat (~rodger@71-13-215-242.dhcp.mrqt.mi.charter.com) joined #forth 08:58:57 --- mode: ChanServ set +v RodgerTheGreat 08:59:12 I440r: but vim prob offers ways...i just haven't learned as much as i should 08:59:19 https://tutsplus.com/lesson/multiple-cursors-and-incremental-search/ 08:59:21 watch this... 08:59:27 kk 08:59:49 --- join: kumul (~kumul@67.224.165.150) joined #forth 08:59:49 --- mode: ChanServ set +v kumul 09:02:18 I440r: I happen to know Eben Upton, would you like me to carry out an introduction? 09:02:30 I440r: And yes I did fall asleep on my keyboard 09:02:38 I440r: http://vim.wikia.com/wiki/Search_and_replace 09:02:42 who is eben upton? a rich dood who would finance my play time? :) 09:02:52 I440r: i can apparently do sed-like stuff from within vim 09:02:55 I440r: The guy who started Raspberry Pi 09:02:58 anannie, let me come tuck you in lol 09:03:02 oooooohhhhhh duh 09:03:05 of course lol 09:03:06 I440r: I also know a bunch of venture capitalists 09:03:08 you KNOW him? 09:03:12 are you in cambs? 09:03:13 I440r: Yeah.. 09:03:35 I440r: sublime seems nice for a gui editor....i despise the mouse, though 09:03:43 i used to live in cambs. my mother worked at fulbourne hospital 09:03:53 Nope, but the company I work for is... I tried to get the raspberry pi board to agree to a government funded commercial project in the early days... 09:03:59 that multiple cursors thing is pretty spiffy, but it seems like it would only be useful for a small number of instances (they all must be onscreen at once) and it also seems like the cases where you'd want it are violating DRY 09:04:08 protist, the entire point of sublime is to MINIMIZE the use of the mouse 09:04:29 he is using it alot in those videos because he needs to point at things for the people watching the tutorials 09:05:51 I440r: also i can't imagine needing to do those things much :) 09:06:19 protist, work on a project as big as isforths sources sometime... and isforth is a SMALL project 09:06:41 I440r: even if he uses the keyboard for most everything....if you have to go back and forth Terminal => editor...then that is sad :( 09:07:07 change a function name. easilly find and edit all references to the function in VERY FEW key presses and absolutely no use of the mouse 09:07:21 why would you need to go back and forth? 09:07:30 I440r: i can always :%s/pattern/replacement/g in sed 09:07:55 I440r: does sublie run on the terminal? 09:08:01 I440r: sublime* 09:08:05 protist, you have a function called "foo" and a function called "Barfoo" and you want to change all the foo's to "foobar" 09:08:10 I440r: i do everything through the terminal 09:08:20 you dont want to change all the barfoo into foobarfoo 09:08:34 st2 is gui 09:09:09 I440r: if they are at the beginning of the line then :%s/^foo/foobar/g 09:09:21 protist, cannot guarantee that 09:09:26 I440r: otherwise i might have to check how much regex vim rly supports 09:09:55 I440r: if not at beginning i can :%s/ foo/foobar/ 09:10:01 a graphical application doesn't necessarily need to use a mouse 09:10:02 and this is a simple contrived example. there could be much much worse examples and figuring out the exact regex to perform the correct action reliably would be a major pita 09:10:05 so would typing it 09:10:22 RodgerTheGreat, st2 was designed to minimize mouse usage 09:10:29 I440r: I know Perl....if that rare situation arises...it can be handled 09:11:01 I440r: but yes, I see...it is spiffy, and occasionally useful it seems 09:11:22 I can see advantages to apps that don't require you to take your hands off the keyboard. Really, the only advantage a terminal-based editor has is the fact that it's much easier to tunnel over SSH or the like than a graphical editor. 09:11:22 protist, knowing perl and being able to instantly SEE the right regex including lookaheads and lookbehinds.... damn by the time had the regex typed out i would already be on the next edit :) 09:11:48 I440r: :) 09:12:21 RodgerTheGreat: I don't follow you...you said two things that conflict 09:12:48 terminal-based -> textmode 09:13:46 RodgerTheGreat: but you said you can see "the advantage/S/....the only advantage..." 09:14:24 RodgerTheGreat: and you mentioned the hands thing...i can't tell whether you like terminal-based things or not :) 09:14:48 st2 can do git fetches. then you edit and your save is automatically a git commit 09:15:03 for all you git lovers out there :P 09:15:23 I440r: :%s/\/bar/gc 09:15:24 Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation. 09:15:29 I noted a pro to a general approach to user interface design, and the fact that textmode is not necessarily what it's cracked up to be in all cases 09:15:32 I440r: from the link i gave 09:15:54 RodgerTheGreat: ah 09:16:16 RodgerTheGreat, go write a replacement for libncurses sometime, you will gain a very healthy respect for the guy that maintains that mess 09:16:25 terminal I/O is a horrendous mess 09:16:25 I 09:16:36 lazyness tells me to not use a mouse...i find myself wanting to type vim commands everywhere 09:16:38 I have programmed against it enough to understand the depth of horror 09:16:49 i even $ set -o vi on my terminal 09:16:55 RodgerTheGreat, do you code forth at all? 09:17:02 yes 09:17:13 go check out www.isforth.com and download my sources... i have a complete terminfo parser in there :) 09:17:36 tho i just found a bug in the version yo will be looking at 09:17:57 src/terminal/ I presume? 09:18:03 yes 09:18:25 tho i moved that to src/ext/terminal because it IS an extension lol 09:18:43 terminfo.f is the terminfo parser 09:18:58 it parses the terminfo format strings and compiles the terminal escape sequences based on them 09:19:11 the tui directory is an incomplete text user interface 09:19:21 hm 09:19:24 it does windowing but thers alot more that needs to be done 09:19:39 do ./isforth -fload src/dots/wmdots.f 09:19:50 then when ur at the forth ok prompt run "main" 09:20:06 make your font really small and your terminal size really big :) 09:20:09 looks better! 09:20:35 hrm 09:20:42 I'll have to recompile it- I'm on OSX 09:20:48 oh 09:20:57 osx is a bsd derivative 09:21:04 isforth does not currently work on bsd derivatives 09:21:11 welp 09:21:16 you woud have to modify the syscall mechanism :/ 09:21:23 ah, that makes sense 09:21:46 i used to have a fbsd version of isforth but it no longer works 09:21:55 I noticed that on your page 09:21:57 i think it was a heap randomization problem which i fixed in linux 09:22:18 i.e. the linux version of isforth now works on a system that has heap randomization enabled 09:22:31 yeah 09:23:02 well maybe you could show us a screenshot of the GUI you were describing 09:23:16 actually right now i cant lol 09:23:28 im in the middle of a "its broke till i finish" edit :) 09:23:31 oh 09:23:38 i can use an older version give me a sec 09:24:03 if you're using a source control system it should be possible to check out a stable revision 09:25:08 crap 09:25:16 how do i do a screen capture on one window? 09:25:35 I don't know how to do it on an arbitrary flavor of linux 09:25:53 most capture utilities at least let you capture a selection 09:30:04 i used the gimp 09:30:08 t allows capture of a window 09:30:54 looking for something but i guess i deleted that source file. i had a bunch of text widnow example stuff written but i just totally rewrote the text windowing and the example code probably needed to be rewritten 09:33:53 ok hang on 09:34:09 are you not using source control? 09:34:14 yes 09:34:17 well yes and no 09:34:24 i just ssh'd over to my svn server 09:34:33 and ran out of an older versioned directory directly :) 09:34:37 ah 09:34:52 I am tired 09:34:57 goodnight #forth 09:35:09 nite lol 09:35:19 --- quit: protist (Quit: leaving) 09:35:25 http://www.isforth.com/cap1.png 09:35:34 thats a little difficult to see but thats a rotating cube 09:36:26 http://www.isforth.com/cap2.png this capture was running on that old windowing example i talked aobut 09:36:42 the window in the background is moving back and forth horizontally which is why it has the jaggies on it 09:36:48 youy dont see that 09:36:58 but the capture didnt work perfectly lol 09:37:09 --- join: Onionnion|Eee (~ryan@adsl-68-254-166-23.dsl.milwwi.ameritech.net) joined #forth 09:37:09 --- mode: ChanServ set +v Onionnion|Eee 09:37:32 the black window is behind the blue window traveling left. as it comes back to the right it will be in front of the blue window but once it gets all the way right it gets pushed to the back 09:37:45 the blue window scrolls the text UP and then DOWN and then up again etc etc 09:38:30 you do not see the jaggies on the black window when your watching the demo, thats a byproduct of the screen capture 09:39:13 and the crinkly corners on the box charset is because the terminal emulator im using is a pile of crap 09:39:57 i can scroll windows up, down and left and right 09:40:06 i did not implement sub windowing within a window. no need 09:40:41 the unreadable green bar at the top would be a menu bar when im finished 09:41:08 it would work similar to how osx and amiga os worked. you have one menu bar and its contents depends on which window you have active 09:43:06 did i get disconnected? 09:45:41 don't think so 09:45:45 phew lol 09:46:12 obviously the screenshots don't tell the whole story but it sounds pretty cool 09:47:25 i compiled the windowing demo as a stand alone and shipped it to the ncurses author about 5 years ago. he said doing what i was doing within ncurses wouldn be VERY difficult 09:56:29 --- join: kylert (~kylert@c-65-96-213-133.hsd1.ma.comcast.net) joined #forth 09:56:29 --- mode: ChanServ set +v kylert 10:45:31 --- quit: karswell (Read error: Connection reset by peer) 10:49:02 --- quit: Bahman (Quit: .zZ) 10:55:49 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #forth 10:55:49 --- mode: ChanServ set +v karswell 11:25:22 --- quit: anannie (Changing host) 11:25:22 --- join: anannie (~anannie@unaffiliated/anannie) joined #forth 11:25:22 --- mode: hubbard.freenode.net set +v anannie 11:33:47 I'm considering modifying the next retro release to be case insensitive by default. (The current release is case sensitive only). 11:42:35 --- quit: kumul (Quit: WeeChat 0.3.9.2) 11:46:50 crc: what is the argument in favor of case-insensitivity exactly? Making sure that people don't abuse wOrD != WoRd naming conventions? 11:54:13 --- quit: kylert (Quit: Leaving) 12:11:30 It would make things a little easier to remember (retro has a lot of mixed case function names), and possibly easier to enter on devices without a physical keyboard. 12:11:45 hm 12:57:57 --- join: Nisstyre-laptop (~yours@oftn/member/Nisstyre) joined #forth 12:57:57 --- mode: ChanServ set +v Nisstyre-laptop 13:51:58 --- quit: segher (Ping timeout: 245 seconds) 13:53:52 --- join: segher (~segher@5ED3C8DF.cm-7-4d.dynamic.ziggo.nl) joined #forth 13:53:52 --- mode: ChanServ set +v segher 13:57:23 --- join: kumul (~kumul@67.224.165.150) joined #forth 13:57:23 --- mode: ChanServ set +v kumul 14:04:29 --- quit: ncv (Remote host closed the connection) 14:27:57 --- quit: Onionnion|Eee (Quit: Leaving) 15:34:21 --- join: Fox78 (~fox@111.161.17.106) joined #forth 15:34:21 --- mode: ChanServ set +v Fox78 15:38:23 --- quit: anannie (Remote host closed the connection) 16:02:53 --- quit: proteusguy (Ping timeout: 264 seconds) 16:07:56 --- quit: Fox78 (Remote host closed the connection) 16:22:57 --- quit: karswell (Remote host closed the connection) 16:33:14 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #forth 16:33:14 --- mode: ChanServ set +v karswell 16:35:56 --- quit: Nisstyre-laptop (Read error: Connection reset by peer) 16:49:01 --- quit: MayDaniel (Read error: Connection reset by peer) 16:59:29 --- quit: karswell (Remote host closed the connection) 17:09:46 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #forth 17:09:46 --- mode: ChanServ set +v karswell 17:40:58 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 17:40:58 --- mode: ChanServ set +v Nisstyre 17:46:26 --- join: Fox78 (~fox@111.161.17.106) joined #forth 17:46:26 --- mode: ChanServ set +v Fox78 17:51:43 --- quit: Fox78 (Remote host closed the connection) 18:42:21 yay fixed my shebang bug 19:18:33 --- join: PoppaVic (~pv@unaffiliated/poppavic) joined #forth 19:18:33 --- mode: ChanServ set +v PoppaVic 19:20:14 let's see some signs of life, dammit 19:20:49 * RodgerTheGreat breathes oxygen and produces carbon dioxide 19:20:52 im alive. problem is ana isnt here so everyone else isnt either :P 19:21:50 hahaha - now LOOG, frig it all.. I pay $100 for 15 minutes of service, drive across california and *accidentally* discover free wifi better than my figgin' LOT had - I expect action! Entertainment! 19:21:58 LOOK, two 19:22:32 hm. Action. Entertainment. 19:23:15 I don't think we do those here. 19:23:20 Tapdance or sumpin' - just no vehicular traffic for a couple hours, please 19:23:45 you can't see it, but know that I am tapdancing 19:23:59 cool - head of the pin, of course? 19:24:11 do I look like an angel to you? 19:24:48 I dunno - weechat paints you dark-blue, and the screen is on it's last legs.. I sure hope I score a lot and a job quick, so I can ship this in for service 19:25:28 here, have a Logo interpreter implemented in Forth: https://github.com/JohnEarnest/Mako/blob/master/demos/Loko/Loko.fs 19:39:30 --- quit: kumul (Quit: WeeChat 0.3.9.2) 19:44:32 poppa you have a linux box there yes? 19:46:46 damned right - and I am by the gods watching HULU for the first time in over a month! 19:47:03 ..and starbucks is at least 500' down the road 19:47:37 i4: I repartitioned the toshiba and left doze in front, but linux dual boots - satisfies all needs for hw 19:50:04 yea 19:50:10 u booted to linux right now? 19:50:23 oh... is it a debian derived system? 19:51:02 ubuntu, yes (Lubuntu) 19:51:12 blargh nvm 19:51:34 unless debian fixes their stupid bullshit of putting terminfo in /lib this wont do you any good 19:51:35 * PoppaVic smirks - no gentoo here ;-) 19:51:57 no theres more than gentoo as an alternative to debian based breakage 19:52:06 I'm sure 19:52:33 #debian says they put terminfo in /lib instead of in /usr/share because they want to be able to use terminal stuff even if /usr is not mounted 19:52:39 its NOT possible to not mount /usr 19:52:51 not any more. and never will be again as long as udev is used 19:53:11 heh 19:53:27 Dude, I stopped guessing about kernels and shit years ago. 19:53:43 im not guessing. 19:54:05 im just refusing to fix MY perfectly working code to accomodate their stupidly broken system 19:54:47 I don't want to admin, which is what most alternatives require. I keep wanting to try freebsd, but not if I gotta' babysit and massage it 19:55:14 ive installed fbsd about 4 times or so. ive made a perfect BRICK install every time 19:55:29 ive talked people through gentoo installs over yahoo messanger 19:55:48 I just ignore it and install ubuntu. 20:20:09 --- join: Bahman (~Bahman@static.88-198-159-196.clients.your-server.de) joined #forth 20:20:10 --- mode: ChanServ set +v Bahman 20:33:03 --- join: Onionnion|Eee (~ryan@adsl-68-254-166-23.dsl.milwwi.ameritech.net) joined #forth 20:33:03 --- mode: ChanServ set +v Onionnion|Eee 21:57:40 --- quit: RodgerTheGreat (Quit: RodgerTheGreat) 21:58:40 --- quit: I440r (Remote host closed the connection) 22:59:59 --- quit: Bahman (Ping timeout: 245 seconds) 23:25:38 --- join: proteusguy (~proteusgu@cm-171-98-97-11.revip7.asianet.co.th) joined #forth 23:25:43 --- mode: ChanServ set +v proteusguy 23:41:10 --- join: Nisstyre-laptop (~yours@oftn/member/Nisstyre) joined #forth 23:41:10 --- mode: ChanServ set +v Nisstyre-laptop 23:59:59 --- log: ended forth/13.01.01