<<08-03-2013>>

00:00:08filwitgradha: there are many different designs
00:00:27Araqbtw you remember you can have a 'class' macro, right?
00:00:35filwitin Unity 3D, a "script" (MonoBehavior) is an self-contained object, and that has it's benefits
00:00:50filwitfor instance, you can apply the same (and multiple) scripts to different objects
00:01:17filwitAraq: i know, it's ugly, i have ideas, lets talk sometime
00:01:35Araqfilwit: alright
00:01:49filwitin my Game Engine design (similar to WPF), we use the concept of signals
00:02:17filwitthere are not "Script Objects", there is only an "Object" but it has callbacks and uses self-contained functionality
00:02:54gradhaone thing is sure: your pretty class of objects for the art toolchain doesn't resemble a bit what ends up in a game engine, which tends to be the "flattened" version of a fancy object hierarchy
00:02:56filwitvirtual functions are useful in it, but it's true usually you don't use those
00:03:14filwitwhich is the reason for my 'mode' design.... (in my language)
00:03:19gradhaunless you are doing non performance critical games
00:03:19filwitbut that's an extension to OOP
00:03:27filwitwhich, like i said, I'm not against
00:04:02filwitno, it's much more complicated than that gradha
00:04:20filwitfirst, even without "character as a class" you don't need to flatten every part
00:04:29filwitthere is still a lot of virtual function use
00:04:53filwitand many small, hand written games are fine with classical OOP
00:05:10filwitthe problem comes when you have to batch things for performance
00:05:22Araqfilwit: the pdf argues that the code not only becomes faster
00:05:26Araqbut also simpler btw
00:05:27filwitand no matter what you do, you can't get away from that, OOP or otherwise
00:05:44Araqand it's interesting it says "methods left out for clarity"
00:06:01Araqso the slide only contains the 'struct' part of the class ...
00:06:18filwitAraq: yes, because all they're doing is breaking a monolithic construct into manageable pieces... something which OOP fits just fine.
00:06:42filwitremember, i also like the idea of free-functions
00:06:49Araqwhat?
00:06:53Araqsince when?
00:06:57filwiti just don't want them to float around when you include a module
00:07:10filwitand my reasoning for that is readability
00:07:20filwitConsole.write()
00:07:23filwitvs
00:07:27filwitwriteln()
00:07:40AraqComputer.Console.write()? :P
00:08:01filwitno need for that extra layer
00:08:11filwitbut you can orginize that way if you want
00:08:27filwitthe point is, we mentally associate things into groups
00:08:33*XAMPP joined #nimrod
00:08:55gradhafilwit: have you heard of this "functional" programming fad?
00:09:40Araqgradha, filwit, Araq: enough of it
00:09:41filwiti'm sorry, but you're making a "argument from popularity" which isn't convincing to me
00:10:15filwitAraq: okay sure, again though I didn't bring this up :)
00:10:20gradhahrm... I wonder now if it's functionality what ticks people or the lack of side effects...
00:10:39filwitjust my presents here seems to spark these conversations because you folks know i have different ideas
00:11:01Araqthe problem is not that you think differently about it
00:11:15Araqthe problem is you think it matters for nimrod's popularity
00:11:30AraqI see many other reasons why Nimrod is where it is
00:11:52gradhaoh, right, we were talking about nimrod popularity
00:11:59filwiti never said it was the _sole_ reason, but i do think it's very big
00:12:00gradhaman, had forgotten about that
00:12:30Araqand I think you vastly overestimate this issue, but we'll skype about it
00:12:34gradhaso going back to popular things, now that nimrod gets a fancy crown logo, what's the mascot, a king?
00:12:44filwitso i guess you're "arguments from popularity" where valid, in context of our orginal point
00:12:59Araqthanks :-)
00:13:07filwitgradha: yes, i offered to design a mascot, but Araq didn't want it
00:13:14Araqwhat?
00:13:20Araqoh yeah
00:13:28filwitAraq: that doesn't mean there aren't a bunch of popular languages (i would argue the most popular) that use OOP
00:13:36filwitso i still think it's invalid
00:13:39gradhawhat else can graciously wear a crown?
00:13:46AraqI don't think a PL needs a mascot
00:14:03gradhaa disabled mascot
00:14:04Araqand I don't think I've ever seen a mascot that I like
00:14:08filwitplus, the languages that are procedural (non OOP) that are popular, i would argue are popular for other reasons
00:14:13filwitlike C and JS
00:14:34Araqthere are lots of people who love C for being procedural
00:14:35gradhaC is popular because it came with unix, and js came with browsers?
00:14:45filwitare popular because one has no side-effects (in theory), and the other because of it's history on the web
00:15:16filwitC is great for low-level programming, and linking
00:15:20gradhaC without side effects? what parallel universe is this? am I sleeping?
00:15:41Araqgradha: he means functional programming
00:15:44filwitso if you have something that's designed to be used in other langauges, you're pretty much going to have to flatten your structures into flat-C anyways
00:16:08filwitJS, yes because it came with the web
00:16:19filwitand look how many people are trying to remake it (Coffee Scripe, Dart, etc)
00:16:58gradhaunforunately most people lack imagination, so most people can only do minimal incremental improvements on what they know
00:17:11filwitgradha: i mean C without hidden functionality
00:17:19filwitmeaning you get what you see
00:17:29filwitthere's nothing too the structure really
00:17:50filwitlike Nimrod, only without hierarchy of any kind.
00:18:06filwitso you don't have to refer to a language spec to know what your memory looks like
00:18:43filwitgradha: i have a lot of imagination and my language changes things in many different ways
00:18:58gradhayet you are still thinking in objects
00:19:14filwiteven the issue of broken encapsulation in games i'm trying to address with an OOP way
00:19:55filwitgradha: yet you're still thinking procedurally :P isnt' your own argument that there's a "fad" going around?
00:20:07*Trix[a]r_za is now known as Trixar_za
00:20:34NimBotAraq/Nimrod 6e97453 Araq [+1 ±4 -0]: object constructors work now
00:20:57Araqand with this push I shall finally sleep
00:21:11Araqgood night guys
00:21:37gradhaI don't know anything about functional, I was just surprised you seem to think everything in terms of OOP but there are successful languages without such constructs
00:21:39filwitnight
00:22:18filwityes, there are successful languages that are purely functional
00:22:20gradhaI always read about erlang being an example of encapsulation and hot-swappable code, does it have oop?
00:22:36filwitbut i find it telling that the most popular languages for large applications are not
00:22:45filwitbesides C
00:22:45filwitwhich is used for other reasons
00:22:50filwitJava, C++, now C#
00:23:03gradhawell, popular doesn't necessarily mean good
00:23:11filwityes of course not
00:23:21filwitbut popularity is important for a language
00:23:36filwitbecause the only way a language exists is because people write it
00:23:39AraqAda has been used for millions of lines too btw
00:23:43filwitand people (today) need to get paid
00:23:50gradhahrm.. let's change programming languages for music: do you think popularity is required for death metal to succeed in the musical landscape?
00:23:54filwitdoesn't ADA have Objects?
00:24:10Araqfilwit: it's OO structure is quite like Nimrod's
00:24:25Araqand the original Ada had none OO to speak of
00:24:45Araqbut sure, it's not popular
00:24:48filwiteither way, I never thoght Nimrods structure was entirely horrible in every way
00:24:58filwiti think it makes things complicated when it doens't need to
00:25:04filwitlike with creating objects
00:25:15filwitand with it's ability to define everything
00:25:22Araqcreating objects is inherently complicated :P
00:25:27filwitso you don't really know what a symbol means unless you read the docs
00:25:38filwitit doesn't have to be at all
00:25:44gradhafilwit: what?
00:26:03*q66 quit (Remote host closed the connection)
00:26:05gradhaplease ellaborate on "you don't really know what a symbol means unless you read the docs"
00:26:30filwitproc '#" (f:TFOO) = ...
00:26:33filwitin the standard lib
00:26:43filwitand all over the place in any custom libs
00:26:59filwityou have to know what these symbols mean
00:27:04filwitit's not written english
00:27:13filwitso you can't make assumptions by their name
00:27:31filwiti don't mind abbreviations or special sugar
00:28:10filwitbut i think the language and stdlib should be both clear, and encourage people from poor mistakes like defining a bunch of custom operators that do things
00:28:42filwittype stuttering is an issue, this is why in my design, you can realiase things
00:28:53filwitfunc write = Console.write
00:28:59filwitthen use use: write("...")
00:29:06filwitbut you have to do with for each file
00:29:18filwitso someone reading the code has a very clear picture of what's going on
00:29:30filwitwithout hunting through a bunch of docs/other-files
00:29:51gradhajust like int printf() in the standard library?
00:29:51gradhaor to be more in C++, operator overloading
00:29:52gradhadid you see nimrod's use of / for path joining? that's excellent
00:29:52gradhanow I see every other language as inferior because I can't do that
00:29:52gradhabut since you are an advocate for IDEs, the IDE will deal with that, showing a bubble with documentation and context
00:29:52gradhaso... make an IDE for nimrod!
00:29:52gradhaoh, wait, Aporia
00:29:52gradhayeah, looks like you have to roll your own language
00:30:00filwitwoah... lag
00:30:08filwitone sec, don't know when you posted all that
00:30:45gradhayep, lag, good we aren't playing a fps
00:30:49Araqthe stdlib is not full of uncommon operators
00:30:49Araqit's quite conservative in fact
00:30:49Araqbut I really have to sleep, good night
00:30:53filwitno, i like Operator overloading, but only for math object or for the concept of adding/subtracting
00:31:06filwitnight, Araq
00:31:08gradhagood night
00:31:30filwitgradha: i don't like custome operators
00:31:37filwitmeaning you can't define "#"
00:31:53gradhaI'm not sure why
00:31:54filwitcause it has not _commonly understood_ meaning
00:32:01filwitthat is the key
00:32:19filwita langauge should be easy to learn, and easy to read
00:32:29gradhabut commonly understood meaning means you can't do anything which deviates too stringly from what people already know, that's really boring
00:32:43filwitit's really productive
00:32:48gradhaif a language doesn't show me things in a different way, why would I learn another just mee-too lang?
00:32:52filwiti don't care if it's boring or not
00:32:59filwitlangauges are used to make interesting things
00:33:12filwitthey shouldn't be a challenge themselves
00:33:33filwitbut about the "why should i learn".. many reasons...
00:33:41filwitfirst, people want a better C++
00:33:43filwitfor games
00:33:45filwitfor apps
00:33:50filwitcause C++ doesn't have a GC
00:34:04filwitcause it's fast, but has OOP
00:34:08filwit(aka, not C)
00:34:16filwitD is almost that
00:34:24filwitand look how popular it's becoming
00:34:27gradhayeah, people from C++ seem to be blind to objc, just they dislike brackets
00:34:41filwitbut peoples biggest gribes about D, is that it requires a GC
00:34:48gradhaactually, objc is more popular than D!
00:34:56gradhaall hail objc
00:35:01filwitObjective C is so ugly only it's mother (Apple) could love it
00:35:10filwitand i've written a fair bit of it
00:35:19gradhaany recently?
00:35:24filwityes
00:35:30filwitas in a month or so ago
00:35:39gradhahalf of the good things were added in the last two years
00:36:06filwityes, but Objective C is only really bad cause it chose syntax which didn't conflict with C
00:36:23filwiteither that or the designer was retarded
00:36:31filwit:P
00:36:32gradhaso you want different syntax, but don't want to redefine #...
00:36:39gradhaok
00:36:43filwitactually, i like Nimrod syntax a lot
00:37:02filwiti like keywords like "var/ref/prt/type/func/etc"
00:37:13filwitand i like comments with "#" not "//"
00:37:23filwitbut i prefer curly brackets
00:37:29filwitthough i don't care all that much
00:37:37filwiti think it's visually easier to parse
00:37:48gradhaI like languages by how much work it takes me to get from a mental picture to working code, syntax is irrelevant (unless it's overly verbose like java)
00:38:08filwityes, Java is overly verbose
00:38:21filwithowever, both Java and C# understand that names should be descriptive
00:38:25filwitthey just take it too far
00:38:55filwitlike i said, I don't mind abbreviation, but things should be clear
00:39:06filwitand uncommon things should be extra clear
00:39:15filwitfor instance, "int" vs "Integer"
00:39:23filwitis so commonly used, it makes sense
00:39:41gradhaI think you might be arguing too hard about minor details
00:39:44filwitcause the cost of learning it doesn't outweight the annoyance to typing the longer name
00:39:57filwitbut library functions should be very clear
00:40:06gradhamacros are something people won't understand coming from most languages
00:40:12gradhahow do you make that easy?
00:40:19filwitlike this:
00:40:24filwitfunc foo(x, y)
00:40:29filwitfunc foo(x:int, y:int)
00:40:34filwitone is typeless
00:40:44filwitthe other requires "int,int"
00:40:52filwitthe typeless one is compiler-type checked
00:41:01filwitand is the same thing as Nimrods macros
00:41:06filwitwell...
00:41:12filwitnot really
00:41:15filwitthis would be:
00:41:17gradhanot at all
00:41:30filwitfunc foo(x:Compiler.Expressoin)
00:41:43filwitno wait...
00:41:45filwitthis...
00:42:13filwitfunc foo(e:Compiler.Expression) : Compiler.Code { ... }
00:42:20filwitor something like that
00:42:28gradhacool, so what about the macro?
00:42:38filwitwhat about it?
00:42:39gradhahow do you explain to somebody he can emit code at compile time?
00:42:53gradhahow do you make that "natural" and "without surprises"
00:42:58filwitthat get's into advanced features of the documentation
00:43:23filwityou have a beginners area, and an advanced area
00:43:34filwitand macro functions are advanced
00:43:39filwitbut other typeless functions are not
00:43:42filwitfor instance:
00:43:49filwitfunc add(a, b) { return a + b }
00:44:03filwitmakes sense, even though it's a template function (in C++/D)
00:44:10filwitand is very easy to learn
00:44:24filwitin fact, i think Nimrod already does that
00:44:31filwitor is in the process of doing it
00:44:46filwitAraq mentioned it the other day, and we had talked about it months ago
00:45:00gradhaI think you can do that with templates, where a/b are expr
00:45:10filwityes
00:45:18filwitbut my design only has "func"
00:45:25filwitso it's easier to learn
00:45:41filwitremember, my design is only really just that ATM
00:45:42filwiti only have a basic compiler working
00:45:47filwit(it can add ints)
00:45:55filwit(and only in interprited mode)
00:46:00gradhahrm... so if you drop the type and presume expr, and make all functions accepting expressions templates, you have what you want?
00:46:13filwitno, Expr is not assumed
00:46:24filwitwell... actually it might be
00:46:39gradhahow else would it work, the compiler is doing your work
00:46:57gradhafancy word: type inference
00:47:07filwityes basically it would be Expr, you're right
00:47:14filwiti haven't gotten that far yet
00:47:21filwiti have something special with types
00:47:35filwitlike Nimrod's distinct type
00:47:39filwitbut mine is different
00:47:50filwitfor instance i have this:
00:47:53filwitint - int
00:47:55filwitdef - float
00:48:00filwitnum - int or dec
00:48:04filwitso you can do this:
00:48:09filwitfunc foo(x:num)
00:48:17filwitwhich can take either a int or dec
00:48:27filwitbut not a string, etc
00:48:52filwiti have a ton of other areas that are different about my language
00:49:05filwithttps://gist.github.com/PhilipWitte/4974439
00:49:10gradhathat would be like a template which can be specialized to a specific list of allowed types
00:49:13filwiti'm still working on that gist
00:49:36filwitgradha: yes exactly, only the syntax is clean, easy to learn, and consistent
00:49:45gradhabtw, why would you want to restrict that to not strings?
00:50:04filwitit depends on what the function is doing....
00:50:24filwitif something can work with num types, it means it's doing math or something
00:50:43filwitand you don't want to have to duplicate the function for both types
00:50:58gradhaI think you can fake that in nimrod with some boilerplate, which would make for an interesting macro
00:51:13filwityes, you can fake a lot of things in Nimrod
00:51:14gradhaimagine a template with expression, and inside a when for the types you want, else error
00:51:28filwitand before i was trying to come up with clever ways of doing what i wanted, in Nimrod
00:51:30gradhaI wonder if that's possible
00:51:57filwitbut I came to some convictions about language design that i think make Nimrod fundamentally flawed
00:52:14filwitand all languages that do similar things... like D, and C++
00:52:44gradhaI understand you still argue here because you aren't fully decided yet?
00:52:49filwitgradha: i'm not sure about global 'when' statements
00:53:13filwitno, i still argue here cause I am a friend of Araq and dom96's
00:53:31filwitand i ultimately wish we could find common ground and work together
00:53:37gradhaenjoying the verbal exchange
00:53:43filwityes
00:53:56filwitand if you haven't noticed, i don't always bring this up
00:54:03filwitbut i do defend my ideas
00:54:10filwitbecause i think they have validity
00:54:15filwitand sometimes that gets wordy
00:54:26gradhaI'm more of the "demonstrate shit" camp, sorry
00:54:38filwityes i understand that
00:54:44gradhathat's why I couldn't follow half the things you were talking about, I don't even know the words they use for them
00:54:57filwitand that's ultimately what i am going to need to do to convince you folks, i know
00:55:26filwityes i know, things get lost in the translation
00:55:34filwityou folks are also Spanish/German speakers
00:55:40filwitand i'm english only
00:55:42filwit(US)
00:55:48filwitso there's also that
00:55:48gradhathat's an advantage
00:56:05filwityes, it's good to have more perspectives
00:56:22filwitbut it means we're using different terms maybe for something things
00:56:28filwitor some terms aren't as common
00:56:33filwitso they aren't as clear
00:56:34filwitetc
00:56:51gradhaactually, I thought being US is an advantage
00:56:59gradhayou don't need to think twice to understand words
00:57:04filwitare you religious?
00:57:17filwitif so, you will be good here
00:57:27gradhacrap
00:57:29filwitif not, then it's harder, depending on where you live
00:57:35filwiti'm not
00:57:50filwitso i can relate to a lot of Europeans more sometimes
00:58:02gradhaah, yes, in the USA being atheist is worse than being satan
00:58:15filwitpeople aren't just religious though,... it kinda permeates through their other ideas...
00:58:18filwitlol
00:58:25filwityes, it is
00:58:46filwityou don't know how many times my father has called said I'm aligned with the devil
00:58:46gradhawell, you can't have social inequality without population mind control
00:59:08filwitor how misconstruction people assume you are
00:59:20gradhahere we joke being the devil is cool and fun
00:59:23filwitbeing an Atheist here is "a teenage phase" in most peoples eyes
01:00:15filwityes, the social inequality is what i meant by "religious ideas permeating to other areas of thought"
01:00:50filwitmost people here see nothing wrong with "the pledge of allegiance" we force our kids to say in schools
01:01:15filwitand when you bring those kinds of things up (depending on where you are) you get looked at funny
01:01:24gradhawell, most people here see nothing wrong with santa or the tooth fairy, yet they are also imaginary friends and lies
01:01:27filwitlike you just asked someone if they wanted to smoke crack with you
01:02:08filwitlol, yes
01:03:09filwitit's silly how so many people can't make the logical connection between other imaginary things and the god their believe in
01:03:29filwiti guess cause it is a more complex topic
01:03:46gradhado you know about the asian squat?
01:04:05filwitand there's the possibility that things have and odd physical feed-back loop or some other yet-undiscovered thing
01:04:16filwitno, never heard to the asian squat
01:04:22gradhahttp://www.youtube.com/watch?v=gWTmg4dHiKg
01:04:48gradhabasically, asians squat in a different way than easterns
01:04:58gradhawhat is interesting is why/how they do that
01:05:05filwitlol
01:05:16gradhaI can't do the asian squat because I never did it when I was small
01:05:22gradhaI lost the flexibility of that movement
01:05:32filwitthat sux
01:05:34gradhain my eyes, I'm a crippled person compared to somebody who exercised their flexibility
01:05:36filwiti work from home
01:05:46filwitso i do pushups and stuff randomly through the day
01:05:59filwitwhich i couldn't really do in an office...
01:06:01gradhareligion is the same, it cripples your curiosity and capacity to question things
01:06:28gradhathat's why religious people sometimes don't see the connection non religious people do
01:06:33filwitinteresting analogy
01:06:35gradhathey aren't used to that way of thinking
01:06:44filwitvery true
01:06:48gradhaand that's why religion, when you are an adult is harmless
01:06:54gradhathe problem is when you are a kid
01:07:00filwitand funny how that behavior is evident in other areas of American society
01:07:09gradhayou don't see adults changing religion every year
01:07:10filwit(like McDonals fat people)
01:07:35filwityes, ture
01:07:49filwitbut i have seen grown-up loose their faith
01:07:54filwitgranted, not many
01:07:59filwitcompared to how many don't
01:08:06gradhayes, but they don't loose faith to another religion
01:08:18gradhathey just realise "what the hell was I thinking?"
01:08:51filwitso, i always like to ask this to other Atheists, do you know about the Zeitgeist Movement?
01:09:01gradhano
01:09:07filwitk, nevermind
01:09:07gradhabtw, I'm not an atheist
01:09:15gradhaI'm a member of a minor sect
01:09:22filwitoh, well you're obviously not hugely religious
01:09:31gradhawe are like about six people I think
01:09:36filwitwhat do you call yourself?
01:09:37gradhaand we hail satan
01:09:42filwithahaha
01:09:48gradhabut our prophet is one friend
01:09:50filwitwait... seriously?
01:09:52gradhaso we are his disciples
01:09:57gradhasure, he's a geologist
01:10:07gradhacan't get wrong with somebody who knows how old earth is
01:10:08filwitlol, this must be a joke...
01:10:16gradhawe even have a mailing list
01:10:30gradhaunfortunately we always end up talking about kpop rather than world domination
01:10:36filwitlol
01:10:44filwiti see, so Atheist with a sense of humor
01:11:22gradhain theory we were to commit mass suicide the sixth of june of 2006 in front of Spain's Guggenheim museum
01:11:42gradhabut our profet's girlfriend had her birthday, so we postponed it
01:12:15gradhaah, those were the good days
01:12:26filwitlol
01:13:15filwitwell man, i'm going play a game or something
01:13:24filwitwas nice talking to you
01:13:37gradhasure, bye, and have no lag
01:13:48filwitthanks, bye!
01:13:50*filwit quit (Quit: Leaving)
01:36:01*gradha quit (Quit: bbl, have youtube videos to watch)
03:00:39*ccssnet quit (Read error: Connection reset by peer)
03:05:11*Trixar_za is now known as Trix[a]r_za
03:19:15*ccssnet joined #nimrod
05:57:51*xcombelle joined #nimrod
07:47:00*gour joined #nimrod
08:20:48*xcombelle quit (Remote host closed the connection)
09:11:32*Araq_ joined #nimrod
09:20:46*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331])
10:54:00*gradha joined #nimrod
10:56:27gradhadom96: just a quick note, my laptop did overheat a few times in recent days and after stopping all tasks it kept burning fuel, so to speak
10:56:46gradhalooking at the cpu usage it seems that the builder program is not really idle http://dl.dropbox.com/u/145894/t/builder_not_so_idle.png
10:57:07gradhathere you can see it gobling the CPU for itself, yet on the right you can see the log of pings, it wasn't doing anything at all
10:57:36gradhaI don't want to burn my desk so I'm disabling the builder for the time being
10:57:55gradhaI can assist you later to find out what's wrong with it and why it is not idle
10:58:11*gradha quit (Client Quit)
12:01:48*Boscop quit (Quit: Boscop)
12:43:35*Trix[a]r_za is now known as Trixar_za
13:05:19gourthere was heated discussion with filwit yesterday about (possible) reasons preventing nimrod to become more popular...
13:29:18*gour quit (Ping timeout: 245 seconds)
13:37:11*Trixar_za is now known as Trix[a]r_za
13:59:22*q66 joined #nimrod
16:27:21*Araq_ joined #nimrod
16:31:05*Araq_ quit (Client Quit)
16:43:56*XAMPP quit (Read error: Connection reset by peer)
16:44:02*XAMPP_ joined #nimrod
18:48:21*avarus joined #nimrod
20:45:18*avarus quit (Remote host closed the connection)
21:22:31*filwit joined #nimrod
21:27:40reactormonkAraq, might you kick me a bit for implementing the lambda lifting?
21:28:28Araqreactormonk: sure; first step is to activate the transformation for the JS backend
21:28:42Araqit's in transf.nim iirc
21:30:01reactormonkyou have two when false in there btw
21:30:06reactormonkerr, 3
21:30:18Araqso what?
21:30:56reactormonkenable? How so? There do not seem to be any whens around for the JS backend
21:31:06filwitbtw, i discovered that GEdit comments/uncomments based the .lang file
21:31:25filwitso the block comment extension works well with '#' style comments
21:31:45Araqnice but we don't use gedit anymore :P
21:31:46filwitAporia should follow that design I think, dom96
21:32:05filwityes, i was just saying i discovered it the other day
21:32:17filwitand that it worked out very well automatically
21:32:27Araqalright
21:32:29dom96Well you see, if you were to test Aporia you would see that Aporia already does ;)
21:32:38filwitoh does it?
21:32:39filwitnice
21:32:57filwitAraq said something the other day about it using "when false:"
21:32:57dom96yeah, although I broke it recently :P
21:33:01filwitso I assumed that
21:33:09dom96But it's a minor thing
21:33:17filwityes, well that's good to hear
21:34:13filwitGEdit also has the "forget you're not using tabs" extension
21:34:30filwitwhich is basically what i was trying to make in Aporia before
21:35:03filwitjust thought those two things where nice for Python-style coding
21:35:56Araqdom96: when I tested it it inserted discard """ """
21:37:29dom96Araq: yeah, it does that.
21:38:10Araqwell filwit wants insertion of #
21:38:19Araqand I want 'when false:' ;-)
21:38:57dom96yeah, I'll implement that
21:42:10filwitoh, do whatever you think is best
21:42:19filwiti was just saying i like that way is all
21:42:31Araqreactormonk: my bad, the checks are in lambdalifting.nim; if gCmd == cmdCompileToJS
21:42:33filwitand block commenting something works well in GEdit like that...
21:42:48filwitone thing i like about having actual comments is that things are "greyed out"
21:43:13filwitwhereas "when false:" is difficult to distinguish if there's a lot of code
21:43:26Araqyou can grey out it too
21:43:34Araqbut it's more difficult to implement
21:43:45filwityeah
21:44:11Araqthough it's not that different from any other block really
21:44:12dom96greying out discard """ """ would be quite easy
21:45:02filwitif it was up to me, I would have made "when false:" a compiler error and not had the "discard """" thing
21:45:08filwit... but it's not up to me of course
21:45:25filwiti just don't know why they're in there i guess
21:45:34Araqhuh?
21:45:48Araqdiscard """ """ is a feature that has been discovered
21:46:01Araqit was not designed to mean "comment like"
21:46:12filwityes well, i understand that one
21:46:17filwitnevermind
21:46:32Araqand how could 'when false' be a compiler error?
21:47:03filwitif it finds a when statement which has 'false' literal
21:47:09Araqand why is it bad to distinguish between old code and an actual *comment*?
21:47:10filwitit throws and error
21:47:30filwitnevermind, i don't know why i brought it up
21:47:33Araqso you would make it a special case
21:47:44filwityes, for debugging
21:47:58filwitjust like how D prevents doing this: for (...);
21:48:02Araqfor debugging?
21:48:25filwitit will barf, so you don't accidentally add and ending mark to that
21:48:51Araqso you think you write 'when false' accidentally?
21:48:53filwitit's a special case in the compiler, but designed to catch common, hard to see mistakes
21:49:04filwitno, but you might forget you did
21:49:11filwitor not notice it in someone elses code
21:49:20AraqI fail to see how you can compare a semicolon with "when false"
21:49:32filwitit's not a perfect comparison
21:50:07filwitbut it's inline with the same idea: "catch dumb mistakes that arise out of code not being easy to read"
21:50:17dom96Yes, when false is hard to notice because it's highlighted just like everything else.
21:50:26dom96Same with "if false"
21:50:38Araqso?
21:50:39dom96(Which I've noticed people using to comment code in JS for example)
21:50:59Araqyour code can contain lots of other dead code
21:51:17Araqwhich is not greyed out either and you never complained about
21:51:29filwit*sigh*
21:51:33filwitnevermind dude
21:51:59Araq"when false" is not a dumb mistake
21:52:06reactormonkAraq, let's see what happens when I boot it :D
21:52:55filwitnever said it was a mistake made by the person who wrote it (at least not when he wrote it)
21:53:08filwitand this isn't about dead-code removal
21:53:21filwitit's about someone looking at code, and thinking it's being executed
21:53:27filwitbecause they don't see the "when false:"
21:53:30filwitat the top
21:53:37filwitand compile tree times before they notice it
21:53:40filwitthat is all
21:53:51Araqyou know
21:54:13Araqthese kind of arguments start to become convincing when they happened in real life
21:54:34filwiti don't know what you mean by that
21:55:01Araqwhen you looked at some piece of code written in Nimrod, scratched your head
21:55:02reactormonkAraq, assertion failed. should I iterate and see what I can fix it or is understanding beneficial?
21:55:26Araqand then noticed "ugh, it's in a when false"
21:55:52reactormonkAraq, any way to make assert as verbose as check?
21:56:07Araqreactormonk: replace with InternalAssert?
21:56:12filwiti don't need to fall into a pit before i plan to avoid it
21:56:21filwitit was just a simple argument
21:56:36filwitnot like a major "Nimrod is going to die cause of this"
21:56:49Araqno, it's a very common thing people do:
21:57:02Araq"omg it's different, so it must bad: WHAT IF ... ?"
21:57:23Araqand then people come up with lots of absurdities
21:57:24filwitthat would be valid if that was my actual argument
21:57:35Araqlets see:
21:57:35filwitbut it isn't
21:57:41filwitand that's a straw man
21:58:33Araq"omg, you can nest if statements arbitrarily deep? what if some programmer uses 20 nested if statements? The compiler should really forbit it"
21:58:50Araqyou can apply it to everything
21:58:51reactormonkAraq, nope, still no $ of either side
21:59:19Araqyou can't design a language with this attitude IMO
21:59:33reactormonkAraq, sure you can, then you get C
21:59:56filwitso we should disregard all potential improvements (with valid reasoning) because it's the wrong attitude?
22:00:04filwiti never said it was a huge deal man
22:00:12filwitbut i am defending a position
22:00:17Araqarbitrary restrictions are no potential improvements
22:00:31filwitthat is a complete disregard of my argument
22:00:43Araqyou want to forbit "when false"
22:01:05filwiti gave what i feel is valid reason for something, and you come back with "it's only convincing if someone has constantly run into it"
22:01:45Araqarbitrary restrictions are aweful
22:01:57filwiti don't care if "when false:" is forbidden man, i said "if i was designing it" which i think you took as "you did something wrong"
22:02:10filwiti understand you can't make every little feature
22:02:13filwitit's impractical
22:02:30Araqno, I'm telling you that your way of approaching language design is wrong :P
22:02:42Araqbecause I know you're designing one
22:02:50filwitokay, i see
22:03:07filwitwell in that case, i don't think arbitrary restrictions are bad in this case
22:03:30filwitbecause the only purpose that syntax provides, is a duplicate of comment syntax
22:03:42Araqbut it's not
22:03:54Araqdeactivated code is not the same as a comment
22:03:55filwitand it does have the potential of creating hard-to-read code situations, even if that's only a minor issue
22:04:00Araqa comment is in natural language
22:04:22filwitit's not deactivated by any variable though
22:04:27filwitit's deactivated by a literal
22:04:29Araqusing comments for deactivating sections of code is in fact the misfeature
22:04:56filwitokay, then that spec should be fully realized
22:05:05Araqbut it is
22:05:09filwitand there should only be one way to do "deactivate" code
22:05:13Araqthe code is still *parsed* in 'when false'
22:05:28Araqand yes, 'when false' is the supposed way to deactivate code
22:05:33reactormonkAraq, gotta love compiling the compiler in ~5s
22:05:37filwitof course, that is a flawed design really, since you kill two-birds-with-one-stone by just using comments, or some form of them
22:05:44reactormonkhmm, maybe 10
22:06:10Araqfilwit: you can also get rid of all control flow by introducing 'goto'
22:06:11filwitit's unrealistic to expect people to not comment out code to deactivate
22:06:29dom96Araq: What's the advantage of the code still being parsed? Would you actually edit the code and leave it in the when false: ?
22:06:42Araqdom96: I would
22:06:56filwitall that does is slow down the compiler
22:06:58AraqI like to keep it around to say "look, you've tried that before and it didn't work"
22:06:59filwitand complicated the syntax
22:07:21filwitpeople are always just going to comment out code
22:07:27filwitcause one tool does both things
22:07:35filwitso they only need that single tool in their belts
22:07:45Araqfilwit: 'when' is not introduced for it, 'when' has lots of other different uses
22:07:58filwiti know man, that's my point
22:08:00Araqso it doesn't complicate anything
22:08:10Araqit's always been there
22:08:21filwitthat doesn't apply to the topic
22:08:31filwitwhen is useful for stuff, yes
22:08:49filwitthat's specifically why it shouldn't be able to be used as a "comment"
22:09:11filwitand again, it presents a readability issue
22:09:51filwitwhen someone sees the "when" statement, it should be doing something meaningful, not duplicating what comments do (and what people will use them for)
22:10:03Araq*shrug*
22:10:13Araqit's no readability issue for me
22:10:21Araqand I have the feeling it's no for you
22:10:30reactormonkAraq, so I need to generate an nkDotExpr
22:10:31filwitit's not a huge issue
22:10:31Araqyou simply don't like it because it's different
22:10:35filwitno
22:10:51filwitit's not a huge issue, but i don't just not like it cause it's different
22:11:03Araqreactormonk: hmm, no ..
22:12:22Araqfilwit: one point in a higher level language is to try to encourage the programmer to write down his *intends*; this means distinguishing between ptr and ref for instance
22:12:40Araq*intents
22:12:53Araq# vs 'when false' is another example for that
22:13:39filwitsure, but i think that is much better expressed with # vs ## or @ or something
22:14:09*gradha joined #nimrod
22:14:23filwitit also doesn't address the readability issue, but like you said, you believe it's not any harder... so we're both just making arguments from experience on that point
22:15:22filwitmore opinions are needed there, but I would put money on people a) using comments to block out code, and b) finding 'when false' hard to see in some cases where comments would not be
22:15:38filwitagain... just an argument from authority
22:15:45filwitdont actually expect you to accept that
22:16:04filwitsorry, argument from experience
22:17:14Araqreactormonk: you need to ignore nkDotExpr in a var/let statement; just make the loop continue
22:17:37dom96gradha: You can try increasing the poll timeout in line 858 of builder.nim.
22:19:02dom96perhaps it's an issue with select on Mac OS X though.
22:19:18gradhathe default is 500, ms? do I try 2000?
22:19:34dom96yeah
22:20:47gradhais there any way i can patch nimbuild to actually do nothing? I mean, to test if it still consumes CPU
22:21:04gradhalike putting a return before the call to git/compile/whatever
22:22:10gradhameh, let's try it first anyway
22:22:38dom96just run it without the requestNewest set to "False"
22:23:01dom96(it's false by default, make sure it's not set to True in the builder's ini file)
22:23:05gradhadoes it make any difference if nimbuild is -d:release or not?
22:23:18dom96it shouldn't.
22:23:35dom96well obviously it's faster, but I don't think it matters much.
22:23:40dom96I always build a debug version
22:24:09reactormonkAraq, internal error now :-(
22:24:25gradhano signs of cpu usage for the moment, will see tomorrow
22:24:59dom96good
22:25:05reactormonkAraq, wait.
22:25:12Araqreactormonk: yeah you need to update the JS codegen in 2-3 places to support closures
22:25:39reactormonkfoo.nim(4, 16) Error: internal error: gen: unknown node type: nkClosure
22:25:41reactormonkthat's better
22:25:47gradhaone thing you can notice from the screenshot is that maybe the problem is with nimrod's way of doing something, notice how the CPU usage of nimbuild was very similar to kernel_task
22:26:02gradhathat suggest it's some OS call that is getting blocked
22:26:19reactormonkAraq, of nkClosure: genClosure(p, n, r) I suppose
22:26:31Araqreactormonk: nice start
22:26:36Araqbut I have to go now
22:26:44Araqsorry
22:26:45filwitbye Araq
22:26:49reactormonkAraq, let's see
22:27:03gradhanow that nimbuild was off it seems the kernel_task cpu usage grows at a rate of half hour per day
22:27:17reactormonk internalError(n.info, "first class iterators not implemented")
22:27:23gradhasince my uptime is 1 d and 10h it's a little fishy to be already at 7h
22:27:25reactormonk*ehhem*
22:29:06Araqbye
22:41:06*filwit quit (Quit: Leaving)
23:32:56*gradha quit (Quit: bbl, have youtube videos to watch)