<<15-02-2013>>

00:48:05*q66 quit (Remote host closed the connection)
00:52:52*q66 joined #nimrod
01:49:59*XAMPP quit (Quit: My code has no bug's, just random features)
02:01:21*XAMPP joined #nimrod
02:10:51*filwit joined #nimrod
02:11:06filwitAraq, are you around?
02:11:28dom96welcome back filwit!
02:11:46dom96It's 3am where Araq is, I'm quite certain he is sleeping.
02:25:30filwithi dom96 :) would say "long time" but we've been talking over Steam for awhile now
02:25:39dom96;)
02:26:13*q66 quit (Remote host closed the connection)
02:57:05filwitHey Araq, after talking to Dom for awhile on Steam, I realized I should stop in and, at least, apologize for the way I ditched out on Nimrod awhile ago.
03:02:03*filwit quit (Ping timeout: 260 seconds)
03:15:17*filwit joined #nimrod
03:19:35reactormonkfilwit, want to code anything? ^^
03:19:52reactormonkfilwit, or tinker around?
03:20:15reactormonkfilwit, I'd like to know how to use nimrod serve, but zahary didn't leave any docs
03:20:35*filwit quit (Ping timeout: 255 seconds)
03:25:23*filwit joined #nimrod
03:26:20filwitreactormonk: sorry, got disconnected. could you reiterate what you where saying?
03:28:15dom96reactormonk: I don't think filwit knows anything about nimrod serve.
03:28:19filwitreactormonk: I'm not sure what you mean by "nimrod serve". I was never a core developer of Nimrod.
03:36:42dom96good night
03:38:39reactormonkfilwit, I know. Read the source ;-)
03:43:31reactormonkand fiddle around with input
03:46:07filwithey, sorry i missed par of the conversation and now don't have the logs
03:46:20filwitso i'm not sure what the source is :-/
03:46:58filwitor did you mean, just read the Nimrod source?
03:47:21filwitin that case, I have actually read a bit of it
03:51:50reactormonkfilwit, yeah, find out how nimrod serve works and document it - zahary doesn't seem to do it :-(
03:52:52filwitahh, i see. Yeah documentation on the Nimrod internals was scarce when I was looking at it
03:54:52reactormonkfilwit, not-so-much internal there
03:54:56reactormonkidetools got some documentation
03:55:39filwiti haven't followed the Nimrod updates in awhile, so I'm not sure what has changed
03:59:17*Anaphaxeton joined #nimrod
04:03:27reactormonkfilwit, zahary added nimrod serve as compiler where you connect to via tcp or pipes
04:03:34reactormonkbut I have no clue how to talk to it
04:03:47*fowl quit (Ping timeout: 248 seconds)
04:03:48reactormonkBig bonus: implement swank :-)
04:04:25filwitoh i see what you're saying now. Yes Dom told me compiler-as-a-service was added
04:05:16filwitvery cool i know Dom wants to use if for Aporia
04:05:43filwitI'm not really here to start working on Nimrod again though
04:06:15reactormonkworth a try
04:07:27filwitI like the project and think Araq is an top-notch developer, but I think there are some big problems with Nimrod, for my purposes
04:09:12filwitI am mostly just here because I used to enjoy talking with everyone, and I left rather abruptly and never came back with explanation.
04:09:26reactormonkfix them :>
04:10:03filwitthat is the problem, originally i thought Nimrod was practically perfect, it just lacked a few things
04:10:50filwitnow I believe there are some fundamental design choices that stand in it's way, and are not good
04:11:05filwitand suggesting to change those things is completely unrealistic
04:12:03reactormonknow you are with?
04:12:12filwitno one
04:12:48filwitthings happened in my life which removed a lot of my spare time to fiddle with languages
04:13:00filwitbut i do comments and support D
04:13:05filwitcomment on**
04:13:36filwitand for a time, I thought that was more suited for my game engines (and still do)
04:14:10filwitthe problem I see with Nimrod, mostly has to do with consistency and encapsulation (i'm more of an OOP purist, in a way)
04:15:16filwitI wanted a language which would be useful as a game scripting language, and though nimrod fit that bill well
04:16:08filwitthe problem is it's difficult to instantiate objects and work with type-specific global variables (static vars) in Nimrod
04:17:00filwitwhich would really complicate the game scripts overall, and I think fundamentally goes against the way humans mentally search for information
04:18:51filwitthe problem is changing something like that in Nimrod would require waaay to much work, it would virtually be requesting a new language, and that's not fare of me to ask of someone else without contributing and equal amount of work in return (which I don't have time for).
04:19:10filwitwhich is the reason I basically ditched out awhile back.
04:20:52filwitThat said, I really respect Araq as a developer and think he's one of the smartest people I've ever met. I just disagree with him on some fundamental issues (like hierarchy and encapsulation, like I said).
04:38:59*fowl joined #nimrod
04:57:59*filwit quit (Quit: Leaving)
05:14:58*Anaphaxeton quit (Remote host closed the connection)
05:15:54*Anaphaxeton joined #nimrod
05:41:53*Anaphaxeton quit (Ping timeout: 255 seconds)
06:33:11*fowl quit (Ping timeout: 255 seconds)
06:42:00*gour joined #nimrod
07:13:24*FreeArtMan joined #nimrod
07:29:09*fowl joined #nimrod
09:06:36*gour quit (Disconnected by services)
09:06:37*gour_ joined #nimrod
10:39:31*fowl quit (Ping timeout: 248 seconds)
10:45:28*XAMPP_8 joined #nimrod
11:24:49*q66 joined #nimrod
11:57:47*XAMPP_8_ joined #nimrod
12:01:07*XAMPP_8 quit (Ping timeout: 248 seconds)
12:23:32*Anaphaxeton joined #nimrod
12:52:21*Anaphaxeton quit (Quit: Αποχώρησε)
13:18:30*q66 quit (Remote host closed the connection)
13:19:21*q66 joined #nimrod
13:20:43*q66 quit (Remote host closed the connection)
13:24:30*q66 joined #nimrod
13:27:11*q66 quit (Remote host closed the connection)
13:34:10*q66 joined #nimrod
13:40:01*XAMPP_8_ quit (Ping timeout: 245 seconds)
14:23:52*Anaphaxeton joined #nimrod
14:36:02*FreeArtMan quit (Read error: Operation timed out)
14:37:09*q66 quit (Remote host closed the connection)
14:38:29*q66 joined #nimrod
14:39:59*zahary joined #nimrod
14:44:57*Anaphaxeton quit (Quit: Αποχώρησε)
14:46:55*Anaphaxeton joined #nimrod
14:48:37*q66 quit (Remote host closed the connection)
14:51:54*q66 joined #nimrod
14:55:27*q66 quit (Remote host closed the connection)
14:55:37*Anaphaxeton quit (Read error: Connection reset by peer)
15:01:04*q66 joined #nimrod
15:04:01*FreeArtMan joined #nimrod
15:16:09*Anaphaxeton joined #nimrod
15:21:50*FreeArtMan quit (Quit: rm -rf /)
15:26:43*gour_ is now known as gour
15:58:10*Anaphaxeton quit (Quit: Αποχώρησε)
16:10:21*Anaphaxeton joined #nimrod
16:14:40*q66 quit (Remote host closed the connection)
16:14:57*q66 joined #nimrod
16:27:48*Anaphaxeton quit (Read error: Connection reset by peer)
16:39:48gour"Later versions of Nimrod will support the FFI at compile time." means post 1.0?
16:44:07reactormonkgour, possible.
16:44:20*filwit joined #nimrod
16:44:42filwithello Nimrod peoples!
16:45:28filwitis Araq around?
16:45:32gourhiya filwit
16:45:40filwithi gour
16:46:54gournot yet
16:47:18filwitokay, that's fine
16:47:37filwitguess I'll just wait around in here for awhile
16:51:03gourinterested for nimrod again?
16:51:56filwithalf-n-half
16:52:39filwiti used to think Nimrod was close to perfect, but many of my ideas have changed since then on language design
16:53:26gourreally?
16:53:27filwitthat said, i still think Nimrod is "one of the few" language that gets most things right (performance, GC, power)
16:53:49filwitand i would love to see Nimrod get bigger
16:53:58gouri've decided to use nimrod for my project (multi-platform gui desktop app) as general-programming lang
16:54:14filwitawesome!
16:54:28filwitwhat kind of project exactly?
16:54:52goursomething like http://saravali.de/
16:55:35filwitoh interesting
16:55:56gourno gaming here :-)
16:56:05filwit:)
16:56:46gouri've chosen nimrod from the {ada,fpc/lazarus,nimrod,ocaml} set
16:57:15gourso far, i practically like all the design choices
16:57:41gourand yes, i was considering haskell & D2 in the past ;)
16:57:51filwitwell I'm glad you like it. I disagree with some fundamental things
16:58:06goure.g.?
16:58:17filwiti've sorta stepped between D and Nimrod as far as language design goes
16:58:35filwitboth get things right where the other doesn't, IMO
16:58:41gourtoo much chaos in D for my taste
16:58:52filwityes, i agree
16:59:10filwitthe syntax is too complicated, and there's too many keywords
16:59:18*gour nods
16:59:28filwitthough Nimrod is only just shy of that
16:59:43filwitit does make things better when using generics, etc
16:59:48filwit(to the user anyways)
17:00:11Araqso filwit I'm here and welcome back :-)
17:00:18filwithi Araq
17:00:26filwitit's been awhile
17:00:42filwitgood to talk to you again, though
17:01:16filwitidk if you read the log from last night, but I really wanted to say sorry for the way i ditched out suddenly on Nimrod before
17:01:39gourAraq: am i considered as being uninterrupted Nimrod 'user' ?
17:01:49Araqyeah I read the logs
17:02:00Araqnice you come back to apologize
17:02:18Araqas I implemented a few features just for you ;-)
17:02:20filwitthere was multiple things that happened, but ultimately the reason why i didn't show back up here again is because I felt bad for basically ditching right after I said (to you directly) that I "would just leave"
17:02:51filwitgreat, i'm glad to hear things are move along
17:02:57filwitI would like to hear about the new features
17:03:12Araqno, I meant the closed features requests
17:03:34Araqyou should have got a github notification for those
17:03:35filwityeah I saw that those had been closed :)
17:03:45Araqgour: you are not considered to be a nimrod user yet :P
17:04:01Araqgour: as you still think you'll come very far with .noSideEffect. :P
17:04:13gourAraq: ohh, what shall i do to qualify?
17:04:27gourlol
17:05:06Araqfilwit: you know that 'class' can be implemented as a macro, right?
17:05:11reactormonkAraq, can the idetools get whether you inferenced nosideffect?
17:05:15Araqand in fact, people have done exactly that
17:05:31Araqreactormonk: not yet, but it's not hard either
17:05:43filwitAraq: with statics & sub-classes?
17:06:25filwitAraq: a lot of the designs I used to think worked well before (like UFCS) I really don't like today
17:06:25Araqfilwit: it can be done, I'm not sure if there are macros out there that support them
17:06:41gourany plan for mailing list or you'll stay with irc & forum?
17:07:07Araqwe also have a stack overflow group which I never visit, gour
17:07:17Araqso ... please no mailing list
17:07:19reactormonkAraq, issue?
17:07:23gourok
17:07:40Araqreactormonk: ugh, please not now, we already have to many open tickets
17:07:48reactormonkAraq, ok
17:08:04Araqfilwit: so tell me about the designs you like
17:08:04filwiti noticed the number of open issues has grown a lot
17:08:45Araqyeah, partly due to lack of time on my part
17:09:20filwitpure OOP & strict, simple consistency
17:09:41reactormonkAraq, my pull request should kill two of them
17:09:49filwitah i thought it might have just been more people where using and reporting issues :}
17:09:59Araqthat the reason, yes
17:10:04Araq*the other
17:10:17filwitI say "pure OOP" btw, but I don't really mean it in the classical C# sense
17:10:47Araqthe problem is: OO is not well defined
17:10:49filwiti just mean it as the first form of encapsulation (and therefore how we search for variable names)
17:11:01filwityes, i know
17:11:02AraqI tend to define it as "dynamic binding"
17:11:15Araqand with that definition, there is no pure OO ;-)
17:11:32Araqas you cannot replace every 'if' with polymorphism
17:11:34filwitwell that only accounts for function execution
17:11:41Araqyou can make 'if' part of the bool object
17:11:45Araqlike smalltalk does
17:12:01filwiti don't really OOP as a way of execution
17:12:14filwitbut a way of catagorizing data
17:12:37filwiti was trying to explain to Dom last night about statics vs globals
17:12:51filwit(statics in an OOP language vs Nimrod globals)
17:12:56Araqbut that's not OO, that's most likely an abstract data type
17:13:27filwitsure it is, all Object Oriented means things are "thought of" as objects
17:13:41filwitand that included their global, object-specific settings
17:14:26Araqstatics are globals, only the scoping rules are different
17:14:39filwityes exactly
17:14:56filwitand that's an important difference when trying to look of a variable (mentally)
17:15:38filwitthe think I really don't like about C-style type/func/global separation, and UFCS
17:16:04filwitis it really complicates how the end-developer remembers where a specific variable is
17:16:10filwitor a specific function
17:16:48filwiti didn't realize that until I tried making issue 132 (https://github.com/Araq/Nimrod/issues/132)
17:17:23filwitand i had to try and follow your crazy abbreviation all over the place :P
17:17:54filwitno but seriously, it is a fundamental issue
17:18:00Araqit's not
17:18:05Araqit is just some aesthetic preference
17:18:17Araqyou like nouns, I like verbs
17:18:40filwiti knew you where going to say that :)
17:18:41gourverbs = action :-)
17:18:54filwitbut i actually think it's more scientific that just oppinion
17:18:58Araqand a macro can easily patch over it
17:18:59filwitopinion*
17:19:32dom96hi there filwit
17:19:42filwitwell, if it's a fundamental issue (like i believe), then macros should be needed to patch it
17:19:46filwithi Dom :)
17:20:27filwitsee, the reason it's not just a matter of opinion, is due to how someone finds something when looking through code he's not familiar with
17:20:34filwit(in my opinion)
17:20:50filwitwhen I see a function "foo(x, y)"
17:21:18filwitin Nimrod or C, it could be comming from anywhere in the 50 includes (or their includes)
17:21:43filwitin C#, that's not the case. Find the type, find the functions/var/whatever
17:21:54filwitand in reverse, when you're writing code
17:22:04reactormonkfilwit, idetools tells you straight ahead where your proc is coming from
17:22:05filwityou think "i need to write this to the Console"
17:22:22Araqyou are wrong about C#
17:22:28filwitso you start by typing "Console", and you know exactly what your options are after that
17:22:31Araqit has overloading just like Nimrod
17:22:32Araqin fact
17:22:40Araqit has like 5 different contexts
17:22:48Araqeach with different overloading/lookup rules
17:22:58*FreeArtMan joined #nimrod
17:23:03Araqin Nimrod you only have 1-2 contexts depending on how you look at it
17:23:05filwityes, Partial types, extension functions, hierarchy
17:23:06filwiti know
17:23:14*Anaphaxeton joined #nimrod
17:23:45Araqif you really care about that, you need to do it like Go does
17:23:47filwitI don't think C# is perfect, btw (far from it), but I even with those things, "pure OOP" helps you find what you're looking for
17:24:25filwitwhat exactly does Go do that you're talking about?
17:24:32Araqonce idetools works you indeed have to move your mouse over the 'foo' to see where it is coming from
17:24:40Araqbig deal :P
17:24:55filwiti also mentioned how you write code
17:25:02filwitit makes a big difference
17:25:16Araqobj.| # suggestions here please
17:25:22Araqworks too in aporia
17:25:39Araqwell as good as the idetools implementation is working right now anyway
17:25:41filwityes, now do global varaibles
17:25:45filwitvariables
17:25:50AraqgObj.| ?
17:25:51filwitand sub-types
17:26:13filwityes exactly, you had to change the name
17:26:23Araqnot really
17:26:27Araqmodule.obj.|
17:26:28filwitGC.dosomething vs GC_somevar
17:26:45Araqyeah, big difference
17:26:52Araq'.' is sexy, '_' is not
17:27:09filwitit's not just about "sexy" it's consistency
17:27:23filwitit's about finding and associating information
17:28:02filwitwhen you separate things, it doesn't enforce and rules on how to classify things
17:28:26filwitultimately a programmer can categorize something however
17:28:41filwiti know you're going to say it's completely arbitrary
17:28:47filwitand ultimately, you're right
17:29:21filwiti can write bad names for things
17:29:49filwitmy points, is that if they'res not any rules to it, you're going to get a ton of people writing bad names waay more often
17:29:58filwitand it's going to really confuse "the right way"
17:30:15filwitand that becomes a problem with reading other peoples code
17:30:37filwitwhen I hacked on Aporia, everything was easy
17:31:04filwitbut when I tried to modify Nimrod itself, it was incredibly difficult to even find what I was looking for
17:31:05Araquntil?
17:31:29gourfilwit: that's hacking app vs compiler. isn't it a big difference?
17:31:44Araqthe compiler also uses dynamic typing
17:31:51filwiti have hacked on large projects before, gour
17:32:04Araqwhich is the real issue you encountered
17:32:30filwitdynamic typing?
17:32:35Araqit basically only uses PSym, PType and PNode everywhere
17:32:44filwitah i see
17:32:44Araq3 types
17:32:56Araqdynamic typing would mean 1 type, ok ;-)
17:33:24Araqand it's been translated from Pascal btw
17:33:49Araqwhich put some restrictions on the design
17:34:09filwityeah i remember that, and please don't think I'm putting down your work. Obviously you can code better than most everyone I know.
17:34:53Araqplus the compiler contains a big recursive dependency
17:34:53filwiti understand that Nimrod is a big project, and not all the code internals are perfect
17:35:05Araqand Nimrod's module system doesn't handle cycles well
17:35:24Araqwhich means often I resorted to include instead of import
17:35:42Araqwhich means it's even more difficult to find stuff
17:36:11gourfilwit: i did not mean small vs big, but the nature of projects
17:37:35filwitgour: sure, but it doesn't really have too much to with what I'm saying
17:38:26filwitgour: ultimately i was using Aporia vs. Nimrod as a code complexity level at which Nimrods flat function calls breaks down (IMO)
17:38:35filwitto illustrate **
17:39:06filwitbtw, when D first added UFCS, i was all for the feature, now I think it's a big problem for the language
17:39:53Araqbrb
17:40:18filwiti hope the best for both Nimrod and D, but I'm admittedly a perfectionist, and there are things I disagree with about both strongly
17:40:50gourthere is no perfection in CS ;)
17:41:04filwitCS ?
17:41:11gourcomputer science
17:41:12filwitoh, nvr
17:41:21filwityeah, don't know why that didn't register
17:41:39filwitand yeah, things are really hard to get right in language design, i agree
17:41:58filwiti actually started making my own Toy language (like I told Dom last night)
17:42:23gouri like that nimrod is very pragmatic for real world with beautiful syntax...something i haven't encountered since haskell
17:42:53filwityes I really like certain things about Nimrod's syntax
17:42:58filwitno ';'
17:43:02gour..but much more useful for practical worl
17:43:04gour*work
17:43:08filwitkeywords are simple, etc
17:43:21gourvery clean and readable
17:43:48filwitwhat I find very telling about Nimrod, is that you have two different "new()" functions to create a type vs an array
17:43:56gournot bloated as ada..
17:44:23filwitI've never used ADA but I really don't like VB-style syntax
17:45:16gouri'm also not at all impressed with Go & Rust attempts...so nothing much is left if we exclude lispy-ones & java stuff
17:45:36filwitGo is not so bad
17:45:40filwitRust is horrible
17:45:47filwitwaaay to many symbols
17:46:10dom96I don't find Go all that impressive. It doesn't have generics for example.
17:46:42filwitGo generics just haven't been made yet
17:46:48filwitbut it was always intended to have them
17:46:53filwitthat said, i agree with you
17:47:00filwiti don't like Go for other reasons
17:47:08filwit(no overloads or operators)
17:47:19dom96Also that visibility is determined by whether the first letter of a symbol is uppercase...
17:47:21filwitand no hierarchy
17:47:23Araqand yet you argued against overloading
17:47:38filwiti never argued against overloading...
17:47:47filwiti think overloading is very important
17:47:56Araqfoo(a, b) is not as "readable" with overloading
17:48:16Araqwell it's superficial anyway as it's resolved at compile-time
17:48:26filwitsure it is, because you know what 'a' and 'b'
17:48:38Araqnot really, it can get complex
17:48:40filwiteven if it's foo(GlobObj.a, b)
17:48:49Araqbut as I said, it's a mouse-over away
17:49:02Araqlike type inference
17:49:02filwitit should be an "eyes over"
17:49:23Araqwith the proper device it may be one day ;-)
17:49:51Araqalso I'm a bit annoyed that you consider Nimrod's syntax VB-like
17:50:00filwitno i never said that
17:50:04filwiti was talking about ADA
17:50:10Araqoh alright
17:50:45filwita bit off-topic. I have found a way to do memory safety without a GC
17:50:57Araqno you have not
17:51:09filwityeah that's what i thought too
17:51:11filwitfor the longest time
17:51:19Araq*I* thought I found a way
17:51:29Araquntil I realized I subtly changed the requirements :P
17:51:33filwitthen I hear that Parasail language is actually doing (my same) idea now
17:51:55filwitoh it's true, Dynamic arrays still require extra bookkeeping
17:52:01filwitbut they are the only ones
17:52:11filwitand they *can be* self contained
17:52:21Araqwell it depends on how you define memory safety
17:52:22filwit(ie, they manage their own lists)
17:52:32Araqit's either easy or impossible to do without a GC then
17:52:58filwitmemory safety meaning: if you check a reference to a variable that was deleted, it is NULL
17:53:11*exhu joined #nimrod
17:53:12filwitand variables are automatically cleaned up
17:53:22filwit(implicitly)
17:53:23AraqAda is memory safe without a GC since the 80ies
17:53:31filwitwhat really?
17:53:48Araqif you don't use the heap, yes :P
17:54:02filwitwell that's not fair
17:54:10gourwhy not?
17:54:11filwitlol
17:54:22filwitcause you _have_ to use the heap
17:54:24filwitat some point
17:54:45Araqnah
17:55:07Araqyou can "easily" avoid it. always.
17:55:34filwitwell anyways, my idea is very simple and it works** (on paper)
17:55:38Araqbut you have to give up your dynamically sized arrays then
17:56:19Araqwhich is what you need to do for guaranteed bounded memory usage anyway
17:56:21filwitare you talking about ADA or my idea?
17:56:25Araqabout ada
17:56:31filwitoh
17:56:59filwityeah that sounds restrictive
17:58:51filwitanyways, I'm glad to be talking with you folks again
17:59:17filwitsorry i left so suddenly.
17:59:29filwiti will help in small ways (like graphics and stuff) if I can
18:01:09Araqawesome
18:01:15filwitand I do hope Nimrod does well, it does get many thing right
18:01:35Araqthanks
18:02:13Araqabout memory safety:
18:02:36Araqwhen you have traditional alloc/free, there are 3 things that can go wrong:
18:02:42Araqa) forget to 'free' something
18:02:49Araqb) 'free' something twice
18:03:04Araqc) access to something that has been freed
18:03:18Araq(c) is the crucial point
18:03:25Araq(a) does not produce crashes
18:03:53Araqand (b) can be easily checked in the memory allocator if it uses per type/per size allocations
18:04:26filwitmy idea handles all three
18:04:38Araqthen I'm interested :-)
18:05:03filwitin my idea, you have a strict distinction between a "memory owner" (var), and a "memory reference" (ref)
18:05:13filwit(there's also unmanaged 'ptr' types)
18:05:34filwitvars are non-null, they are allocated "at definition"
18:05:46filwitrefs cannot "own" memory
18:06:16filwitvars are automatically cleaned at the end of the scope (or deleted with their containing type, etc)
18:06:25goura) produces leaks which can eventually cause crashe, right?
18:07:06Araq"out of memory" doesn't count as crash ;-)
18:07:07filwitrefs are automatically set to null at the end of the scope, either statically (when the compiler can determine it) or though a dynamic ref list
18:07:21filwitthere are some tricks, but it works
18:07:30filwitthe biggest problem is Dynamic Arrays
18:07:37filwitwhich i have found a good solution too
18:08:00filwitfor the longest time i thought there was some obvious thing I was missing about the design
18:08:12Araq"a dynamic ref list"? does that mean you track the locations that contain the pointer?
18:08:15filwitbut then the new language Parasail basically said it was doing the same thing
18:08:58filwitno... it's hard to picture.. let me right a simple Gist so you can see real quick
18:09:24filwitbasically var/ref are very tightly linked to their containing scope
18:09:30filwitone sec
18:12:02filwithttps://gist.github.com/PhilipWitte/4962210
18:13:33filwitso that's the basic idea, there is more to it obviously (like how functions return variables, etc)
18:14:56filwit(basically a returned var isn't cleaned up, but instead "injected" [theoretically speaking] into the scope that called the function, and it's cleaned up at the end of that [unless returned from their as well])
18:18:00gourAraq: have you ever used modula-2?
18:18:23Araqgour: only played with it for a couple of days iirc
18:18:41AraqI was happy to find an implementation for the PC
18:18:57Araqit was some commercial compiler, I don't remember the name
18:19:22Araqfilwit: your gist doesn't show up for me
18:19:58filwithmm....
18:20:11Araqfilwit: interesting, it was my thought too that part of the problem is that algol conflated the execution stack with the data stack
18:20:51gourAraq: was it, in your opinion, improvement over pascal?
18:21:14Araqso that the data's lifetime ends when the proc returns and so it has to copy things back or pass an implicit pointer to the result
18:21:49filwitAraq: yeah exactly
18:21:50filwithttps://gist.github.com/PhilipWitte/4962210
18:21:54filwit^ can you see that?
18:22:11*gour could see it
18:22:39filwitalso: here's an illustration of the Dynamic Array problem: https://gist.github.com/PhilipWitte/4962210
18:22:48filwitshit.. that's the same one...
18:23:00filwithttps://gist.github.com/PhilipWitte/4962255
18:23:15filwit^dynamic array problem. (I have a solution)
18:23:47filwit(it's sorta-simple, but complicated to explain)
18:24:07filwitbut yes, basically the lifetime of an object is directly tied to its scope
18:24:18filwitrefs are only there to point to other variables
18:24:30filwitto link things together dynamically
18:24:46filwitbut they can never own data, and you can't "delete" a var
18:25:00filwitso you'll never get a "dangling reference" and then loose it
18:25:01*XAMPP_8_ joined #nimrod
18:25:53filwitalso, not there's a difference (in my pseudo code) between '=' and '=>'
18:26:23filwit'=' is always "copy data", and '=>' is "set reference"
18:26:35filwit=> can only be used on ref types
18:27:10filwitbut refs (if not null) can also use '='
18:28:00exhufilwit, not sure if it'll work with recursion/cycles
18:28:04filwitin that way, you only really need on "type" (no struct/class)... granted, you'd have to do a lot of static analysis to optimize away virtual tables, etc
18:28:19filwitexhu: how so?
18:28:30filwitexhu: what are your thoughts?
18:29:00filwiti'm pretty sure recursion should work (to an extent) though idk what you mean by "cycles" exactly
18:29:15filwiti also never liked recursion as a programming practice...
18:30:08filwit... so i wouldn't even really care if something else was done in it's place (if that's even possible)
18:30:20Araqgour: modula 2 is not too bad, better than ISO pascal and oberon, but it's dead
18:30:24filwitalso, remember there's always the "ptr" type, which is entirely unmanaged
18:30:38exhufilwit, you have to create object somewhere (heap), how can it store all in a function
18:30:50filwitso any issues involving the var/ref structure could be worked around (manually) with 'ptr'
18:31:28Araqso essentially 'ref' is a *weak* reference in your language
18:31:31filwitexhu: var's are actually references when they need to be. It's not about heap vs stack
18:31:40filwitexhu: it's about "ownership"
18:32:05filwitAraq: yes, but no ref-counting required
18:32:33filwitAraq: plus, all references are direct (like C), no need to point to a managed heap
18:32:57gourhow long is 'do notation' presenrt in nimrod? i haven't notice it before
18:33:15filwitAraq: so it's also should be faster to access type data (Type* vs Type** <- GC languages)
18:33:16Araqgour: it's currently broken, that's how new it is
18:33:25gour:-)
18:33:47filwitanyways, thanks for taking a look at it Araq
18:33:57filwit(and exhu, gour)
18:34:11Araqfilwit: the problem is: is 'ref' a first class citizen in your language?
18:34:18filwityes
18:35:19filwithowever, 'ref' aren't guaranteed to "own" their data. They're just pointers that get automatically set to null when their pointed data is deleted
18:35:45filwityou can't do: ref r = new Foo()
18:35:51Araqbut you cannot do that without runtime overhead in the general case
18:36:27filwitactually, i've thought about it awhile, and many man cases can be statically optimized out
18:36:45filwitbecause vars are always tied to their scope
18:36:53filwitthe compiler can figure a lot of stuff out
18:37:08filwitbut yes, in some cases (like with Dynamic Arrays), you need more bookkeeping
18:37:13AraqarrayOfRefs[complexFoo(x,y)] => someRef
18:37:32Araq# resets every ref at scope exit?
18:37:59filwitno, the bookkeeping is handedled by the dynamic array itself
18:38:43filwitwait one sec, let me think about that
18:38:54Araqyou need to create a list of locations to set to 'nil' at scope exit for the general case
18:39:08filwityes exactly
18:39:10Araqit's true you can sometimes optimize it away
18:39:32Araqbut note that the list needs to be growable at runtime for the general case
18:39:40filwitoften you can (because of the other restrictions), but yes Dynamic Arrays need to retain a "reverse ref list"
18:40:15Araqyou cannot keep that list in the dynamic array
18:40:31Araqyou would need a stack of these lists then in the dynamic array
18:40:32filwitthat "revers list" is used to set check-n-null references when an item is removed from the array, etc
18:40:42filwitdamn.. Araq
18:40:47filwityour freaking smart
18:41:08Araqthe list is scope bound
18:41:18Araqbut not to the same scope as your dynamic array
18:41:21Araq;-)
18:42:02filwitwell that's not a problem
18:42:11filwitall the list is used for is to set refs to null
18:42:28filwitand it's just a stack that can be used by any dynamic array
18:42:46filwit(so they're not constantly allocating every time you reference something in them)
18:42:53filwit(it's more for optimization)
18:43:15Araqwell yeah you have a shadow stack
18:43:15filwitThere's also another layer
18:43:41filwitsee the problem is you would have a lot of those "reverse references" being created
18:43:57filwitsay you have a loop, which references something, then dereferences it
18:44:02Araqyep
18:44:30filwityou wouldn't want to, on dereference, search the shadow-stack just to see if the ref was pointing to the dynamic array
18:44:35filwit(if that makes sense)
18:44:53filwitso what you can do, is make two types of refs
18:45:01filwitone that's dynamic, and one that's static
18:45:15filwityou still only have one ref keyword
18:45:19filwitand the compiler chooses
18:46:01filwitbut the dynamic ref will contain and extra reference to the shadow stack, then when you reset that ref, it tell informs the shadow stack
18:46:23filwitso you avoid searching the list that way
18:46:34Araqperhaps but you're reinventing automatic memory management aka GC
18:46:45filwitlol
18:46:48Araqthe question is: why?
18:46:59Araqwhat is your problem with GC?
18:47:10filwitno problem, just an improvement
18:47:34reactormonkAraq, too much attention seeking people in the IRC to get coding` ^^
18:48:09filwitreactormonk: sorry if i'm taking to much of everyone's time
18:48:42reactormonkfilwit, I enjoy these theoretic discussions as well, but they are not bound to get us anywhere
18:49:08filwitnp, I will leave you to it then
18:49:33reactormonkfilwit, ask Araq, it's his time.
18:50:00exhua bit offtopic (GC stuff is not my strongest side, especially after some beer =), but is there a yaml parser in/for nimrod?
18:50:10AraqI have a headache anyway, reactormonk :P
18:50:23reactormonkAraq, too much beer?
18:50:28reactormonkexhu, iirc nope
18:50:31reactormonkexhu, use JSON
18:50:43Araqexhu: reactormonk is right
18:50:48exhureactormonk, i don't like curly braces =)
18:51:16Araquse c2nim to wrap a yaml parser then
18:51:28AraqI started a yaml parser once and then decided the spec is too big
18:51:46Araqit's overengineered IMHO
18:51:48reactormonkexhu, maybe bring the spirit of nimrod over a yaml parser
18:52:00Araqand yet is not really as nice for config stuff as ini files
18:52:42AraqJSON on the hand lacks important syntactic sugar for config files ...
18:53:09Araqand is underengineered with quotes everywhere
18:53:19reactormonkAraq, it's a simple XML
18:53:28Araqargh not again
18:53:37reactormonk>:)
18:53:41AraqXML is for *documents* aka semi-structured data
18:53:46AraqJSON is not
18:54:01reactormonkJSON is kinda structured data
18:54:17AraqJSON is not semistructured, it is structured, yes
18:54:51exhuthe company i work for has released several game titles with a lot of yaml for configs, UI etc. so i don't see why ini/json is syntactically better. however i'd choose the already implemented json/ini parser, ok.
18:55:13exhuXML is hell!
18:55:17Araqexhu: alright interesting
18:56:04Araqit's a question of taste, I still prefer ini files over yaml
18:56:26exhuhave not used ini since 1990s
18:57:31Araqzahary: I came up with a generational GC algorithm for the compiler and then I found it's quite like this one: http://doc.pypy.org/en/latest/garbage_collection.html#minimark-gc
18:58:52Araqexcept that mine will not use a moving collector for the nursery
18:59:44exhuBTW i have started writing ORM in nimrod for my small sqlite app, but then confronted the problem of limited RTTI (TAny can tell you that the field is of type "object" and not TMyEntity, TMyAnotherEntity etc. And then i found a lot of articles in the internet about how bad ORM is at all -) Now thinking over the method to describe my tables and runtime representation in one place...
19:01:36AraqI would use a DSL for that
19:01:47Araqand let macros generate a typesafe ORM
19:02:16Araqbut I think it's currently too hard as the type API is incomplete
19:03:08exhuI tried to develop a solution with templates and macros, but it's too complex. Another idea was to describe data structures in yaml and generate sql schema and requests, validation etc from yaml.
19:03:37Araqsounds like a plan
19:03:47exhui don't want to make the same overengineering as java frameworks do.
19:05:08exhuso i decided to not write ORM but to use strings and dynamic hash tables rather than objects/tuples.
19:05:33Araqyou can "easily" convert the hash back into an object
19:06:10Araqdon't ask me how, copy&paste how marshal.nim does it :P
19:10:59exhuAraq, thanks, this module may be of some use to me.
19:12:05exhuabout INI files, how hierarchies/trees can be handled in ini files? it's about sections and name=value AFAIK
19:31:10Araqexhu: true but that's a feature
19:31:25Araqbut I always thought you could easily extend the syntax a bit:
19:31:29Araq[section]
19:31:37Araq[[subsection A]]
19:31:41Araqkey = value
19:31:47Araq[[subsection B]]
19:31:49Araqetc.
19:55:46exhui see
19:55:59exhui'll also try lua -)
20:25:46*exhu quit (Quit: Ex-Chat)
20:26:16*XAMPP_8_ quit (Ping timeout: 245 seconds)
20:37:12NimBotAraq/Nimrod 8009eb2 Simon Hafner [+5 ±21 -5]: EcmaScript => JS. Fixes #330... 3 more lines
20:37:12NimBotAraq/Nimrod e59ae14 Araq [+5 ±21 -5]: Merge pull request #333 from Tass/master... 3 more lines
21:13:00*filwit quit (Quit: Leaving)
21:21:30*FreeArtMan quit (Quit: rm -rf /)
21:25:20*gour quit (Quit: WeeChat 0.4.0)
21:55:06*Anaphaxeton quit (Quit: Αποχώρησε)
22:01:59*Anaphaxeton joined #nimrod
22:08:33reactormonkAraq, how would I set node to run the js tests?
22:09:02Araqwell the 'node' executable has to be in your path
22:09:20Araqand you need to pass -d:nodejs to the compiler but you know that
22:12:32reactormonkAraq, yep, but does it run it with node?
22:12:48Araqwhat do you mean?
22:13:07reactormonkthe tests.
22:13:11Araqnimrod js -r -d:nodejs helloworld.nim
22:13:14Araqworks for me
22:13:20reactormonkoh. ok.
22:13:30reactormonkstuff in tests/ that is
22:13:32Araqand the tests don't work
22:14:30*XAMPP-8 joined #nimrod
22:15:04Araqhave a look at tests/specials, runJsTests
22:15:26Araqthey are not active as the test machines have no node installed
22:27:59reactormonkhuh
22:28:02reactormonkinstall it?
22:29:50AraqI can't be bothered :P
23:06:09*Zerathul joined #nimrod
23:06:11*XAMPP-8 quit (Ping timeout: 248 seconds)
23:49:21*Zerathul quit (Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201065344])
23:50:00reactormonkshould be easy on a linux box
23:51:58reactormonkAraq, btw: http://asmjs.org/spec/latest/