<<07-04-2013>>

00:00:17apotheonI'm not so sure it's all *that* easy to speed up Ruby. Part of the reason it's slow is all the ungodly heaps of dynamic stuff it does.
00:00:38apotheonEssentially *anything* can change at runtime.
00:01:17fowl<- wants to write a ruby implementation in nimrod >_>
00:01:42Araqfowl: what do you need a preprocessor for? you know about #def ...
00:02:10apotheonfowl: Doo eet.
00:02:13apotheonI'd like to see that.
00:02:35apotheonIt'd actually probably be easier to take inspiration from Rubinius to do that than from YARV.
00:03:20apotheonfowl: Write a Python implementation in Nimrod.
00:08:30fowlAraq: because some macros need to be expanded to parse correctly
00:09:21Araqfowl: that's what #def does ...
00:10:45fowlok then ill just make it use #def for complex #defines
00:14:14Araqmaybe I should have implemented a heuristic if to handle #define as #def or #define
01:08:08*q66 quit (Remote host closed the connection)
01:23:41NimBotAraq/Nimrod 399b3db Araq [+0 ±1 -0]: optimized evals.nim a bit
02:36:17*erlnoob joined #nimrod
02:36:23erlnoobhello
02:39:32reactormonkerlnoob, hey
02:39:57reactormonkerlnoob, most of the activity is during CET, but I'm here around CT
02:41:17erlnoobhi new to nimrod, so far so good -- just following along the tutorial -- but there's a slight omission in the download page, it should mention something like "ln -s $your_install_dir/lib /usr/lib/nimrod"
02:41:35erlnoobit shouldn't be a problem, just for completeness sake :)
02:43:30fowlerlnoob: that is not necessary
02:44:27fowlunless you're on freebsd
02:44:32fowlmaybe
02:46:07erlnoobfowl i'm on osx... i only did ln -s the binary and got a warning on my first compile
02:46:41fowloo ok
02:46:54reactormonkerlnoob, editing PATH should be enough.
02:47:45erlnoobyea the problem is fixed, just thought to mention it here :)
02:48:29reactormonkerlnoob, https://github.com/Araq/Nimrod/blob/master/doc/tut1.txt
02:48:44reactormonkfeel free to edit
02:51:55erlnoobcool
02:53:45reactormonkerlnoob, I'll accept your PR if it makes sense - if Araq doesn't like it at all, he can still revert it.
03:24:18*ccssnet quit (Quit: http://atccss.net)
03:25:11*ccssnet joined #nimrod
03:53:22reactormonkerlnoob, not interested? :-(
03:54:00erlnoobinterested, will probably push a PR later in the day if that's ok
03:54:18reactormonkerlnoob, that's totally fine, I'll sleep soon
03:54:27erlnoobok thanks for your help
03:58:10*ccssnet left #nimrod ("http://atccss.net")
06:26:07*erlnoob quit (Quit: erlnoob)
07:02:54*zahary1 joined #nimrod
08:58:52*zahary1 quit (Read error: Operation timed out)
09:13:21*zahary1 joined #nimrod
10:20:38JStokerdom96: About the nimrod article you're writing, https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Nimrod_(programming_language) is pretty obviously saying more non-primary sources (as that isn't exactly independent)... So, does nimrod have any use outside nimrod-code.org? :p
10:23:38dom96Yeah, that may be a problem. We don't really have any non-primary sources.
10:24:00dom96But i've seen programming language articles with even less references and they are still alive.
10:24:11dom96So I will argue with them this time :P
10:27:10*q66 joined #nimrod
10:48:44NimBotnimrod-code/nimbuild bc69fc2 Dominik Picheta [+0 ±3 -0]: Builder: permissions are now applied to uploaded files.
10:49:22JStokerSuch as?
10:49:42JStokerIt doesn't matter the quantity of the references, if they're all from the same source
10:51:03dom96http://en.wikipedia.org/wiki/Visual_Prolog
10:51:08dom96Doesn't even have any references
10:52:17*zahary1 quit (Quit: Leaving.)
10:53:34dom96http://en.wikipedia.org/wiki/Claire_%28programming_language%29
10:53:36dom96Same with that
10:55:22JStokerJust because others do it, doesn't mean you should? ;p
10:55:40Araqwe can easily set up another URL not starting with nimrod-code.org and have a 2nd source :P
10:55:45JStoker... xD
10:56:20JStokerAs long as it's not content written by the 'core developers', that's probably fine
10:56:30dom96Maybe I should start linking to discussions about Nimrod on forums and such.
11:03:39dom96But I already have some references which link to websites outside of nimrod-code.org
11:03:51dom96and I just added a reference to a stack overflow question
11:15:58*Araq wonders how macros.nestList could ever have worked in the first place ...
11:18:50dom96hrm, someone should create some cool pattern matching macro.
11:29:32Araqdom96: do it
11:29:46dom96I don't have timeeee
12:02:59dom96haha, a Portuguese version of the Nimrod article still exists: http://pt.wikipedia.org/wiki/Nimrod_%28linguagem_de_programa%C3%A7%C3%A3o%29
12:03:51Araqah that's why we have so many people from Portugal here :-)
12:12:25NimBotAraq/Nimrod 6a040dd Araq [+0 ±2 -0]: bugfix evals.nim
12:38:21NimBotnimrod-code/nimbuild 4d4ff56 Dominik Picheta [+0 ±1 -0]: Builder: Bugfix: Streams belonging to a process should not be freed.
12:40:55NimBotAraq/Nimrod 8c28d37 Dominik Picheta [+0 ±1 -0]: A file stream now makes sure to only close its file descriptor once.
12:50:27*zahary1 joined #nimrod
13:52:50*gradha joined #nimrod
14:20:29gradhaamazing http://stackoverflow.com/a/6807599/172690 did anybody know about $XDG_DATA_HOME/Trash ?
14:51:25dom96nope
14:52:41fowli dont have it
14:53:07gradhaare you using a desktop?
14:53:38fowlyes xfce
14:53:51gradhamaybe it lacks certification?
14:56:26dom96same here: it's not set to anything
15:01:43fowlapparently my trash is at Trash:/// -_-
15:02:39fowloh its at ~/.local/share/Trash/files
15:05:19gradhahow do you go from Trash:/// to ~/.local/share/Trash/files?
15:06:01fowli read it on SO then i touched a file in ~/.local/share/Trash/files to see if it would come up in in trash:/// and it did
15:07:22dom96I have .Trash-1000 folders on each partition
15:07:49gradha1000 sounds like your uid, on macosx mine is 501
15:08:39fowlyea i have .Trash-1000s on my other partitions too
15:29:27*gradha quit (Ping timeout: 260 seconds)
15:31:35*gradha joined #nimrod
16:43:04*zahary1 quit (Read error: Connection reset by peer)
16:43:34*zahary1 joined #nimrod
16:47:29*xcombelle joined #nimrod
16:49:57gradhaamazing, the forum rss actually works
16:59:33Araqugh gradha
16:59:51Araqdo you recall what we discussed about the standalone except statement?
16:59:59gradhaI'm answering that
17:00:01Araqyou wanted to improve its docs iirc ... ;-)
17:00:08Araqoh alright
17:00:22gradhaIIRC except was without type
17:00:35Araqyes
17:00:48Araqit can be read as 'on error do'
17:01:18Araqor wrapped in a template/macro
17:28:27*fowl quit (Ping timeout: 260 seconds)
17:30:18gradhadoes something like bash send-process-to-background aka & exist in nimrod? I guess I could create a daemon thread and let it do something for a while before dying
17:31:55*fowl joined #nimrod
17:38:21Araqhrm you can create a background thread that spawns a process via osproc
17:38:35Araqnot sure you need that thread
17:39:02gradhayes, processes all the way
17:39:51gradhait seems I have to actually wait in my process for an OS sound to complete before I can exit, otherwise the sound is not heard
17:40:19gradhaI was expecting the OS to already provide a sort of deamon like process for these kind of sounds, at least it does so on iOS
17:43:23gradhano fork in nimrod?
17:44:49gradhaoh yes, posix module
17:44:57gradhanice docs
17:45:37Araqhmm are you sure you want to use fork directly?
17:45:56Araqosproc is the wrapper you're supposed to use instead
17:45:56gradhasure
17:46:11gradhaI don't need to run another process, I need to run myself in the background
17:46:39Araqsounds unportable :P
17:46:52gradhawell, it's all "when defined(macosx)" so I don't care
17:47:19gradhaand I'm using hardcoded paths like /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/dock/drag to trash.aif
17:47:28gradhathat's not even protable across macosx versions
17:48:14gradhaI'll leave the recycle bin portability to real men using real operative systems when I release the module
17:48:47gradhahah, where's gour when you need him
17:49:09Araqgour uses Ada now ;-)
17:49:33gradhadid read some nice things about ada at http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
17:49:48AraqI have no idea why, its UI situation is worse than Nimrod's fwiw
17:50:35gradhaI love the haskell ones
17:50:45gradhamakes me wanna learn haskell
18:05:36*fowl quit (Ping timeout: 264 seconds)
18:06:22*fowl joined #nimrod
18:20:44*zahary1 quit (Quit: Leaving.)
18:23:18*zahary1 joined #nimrod
18:24:19gradhaI found out what my yesterday's "nimcache weird" claims actually were: https://github.com/Araq/Nimrod/issues/379
18:59:30dom96woo 111 watchers
19:00:16Araqdom96: yeah I noticed
19:00:24Araqall thanks to HN
19:00:31dom96:D
19:00:58dom96So what else does the wiki article need before I submit it?
19:01:01dom96I want to submit it ASAP
19:03:06AraqI thought you wanted to link to my blog ...
19:03:56dom96*shrug*
19:04:07Araqdon't shrug me :P
19:04:26*dom96 begins to shrug repeatedly
19:04:28Araqshrugging off is only allowed for dictators here
19:05:07dom96That's not fair :(
19:05:40AraqQuod licet Iovi, non licet bovi :P
19:06:05*xcombelle quit (Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.)
19:06:12dom96Anyway, please answer my question :P
19:06:29Araqwhich question?
19:06:36dom96<dom96> So what else does the wiki article need before I submit it?
19:06:39gradhaI look away for a moment and you are speaking about jon bon jovi?
19:07:10gradhaAraq: where's your blog
19:07:22Araqgradha: here's the German version for you: Wenn zwei das gleiche tun, ist es noch lange nicht dasselbe.
19:07:37Araqdom96: a link to my blog?
19:08:01dom96Araq: Here is a Polish version for you: Nie mam pojęcia oczym ty pierdolisz :P
19:08:05gradhaauch wenn zwei nichts machen?
19:08:26Araqgradha: dann erst recht ;-)
19:08:41dom96Araq: Hurry up with the blog then.
19:09:11Araqdom96: ok
19:09:37gradhadom96: just for reference, mama huevo is badly spelled slang for "suck balls"
19:10:48dom96gradha: Yeah, glad I kicked him. Any ideas what is up with these spanish people?
19:11:00gradhano idea, I prefer to not talk to any
19:17:05Araqgradha: yeah spanish girls have too much body hair ...
19:17:50Araqwhich they never shave
19:18:57gradhahair is so practical to fend of the hot summer though
19:22:13gradhaawww... something sigsevs when I call my objc native function from a forked process
19:30:17Araqping zahary
19:32:38zahary1hi Araq, I'm chasing the rod files crash
19:33:10Araqthanks but I wanted to ask where the destructor tests are hiding
19:33:27Araqor do we have none?
19:35:12zahary1hmm, maybe I never added tests to the test suite
19:36:51Araqalright, I'm adding tests then
19:37:27AraqI still think they are full of problems btw
19:38:06zahary1besides the temp var handling?
19:38:09Araqin C++ they can be optimized away even though they can have side effects
19:38:20Araqyes besides implementation issues
19:39:05zahary1copies can be optimized away, not destructors
19:39:26Araqhmm yeah
19:40:08AraqtakeOwnerShip(createObj())
19:40:31Araq# destructor called for the createObj call?
19:41:28zahary1well, in C++ a real takeOwnership proc will accept a heap address
19:42:08zahary1so the question is a bit bogus, but yes, there will be a destructor call here
19:42:26AraqF# uses 'use x = expr' vs. 'let x = expr' and only for 'use' the destructor is invoked at the scope exit
19:43:06zahary1well, this is the IDisposable interface from C# (using blocks), right?
19:43:12Araqright
19:43:22Araqbut it doesn't matter, does it?
19:43:48zahary1it has similar purpose, but I don't see your point
19:44:45Araqwell I think it's a good compromise to only call the destructor in the let/var x = expr context
19:45:05zahary1as I have argued before, the C++ way of RAII is bit more useful when you have composite objects made of other destructable parts
19:45:48Araqbut I'm talking about 'let x = expr' vs. p(expr) contexts here
19:46:05zahary1you can make the responsibility of the called function to destroy the object
19:46:49Araqthe problem is: sometimes you want to take ownership, sometimes you don't
19:47:02Araqp(expr) can mean both
19:47:06zahary1that would be semantically similar to the C++ behavior. otherwise, the semantics are just broken (not calling the destructor at all)
19:47:54Araqwell I'm implementing a check that forbids p(expr) if expr has an attached destructor
19:47:54zahary1yes, I guess that requires 2 compiled versions of p which is not nice
19:48:16zahary1that may be a reasonable compromise
19:48:36Araqyeah that's what I thought
19:48:46Araqturns out, it's not so easy ;-)
19:48:53Araqproc destruct(o: var TMyObj) {.destructor.} =
19:48:54Araq if o.p != nil: dealloc o.p
19:49:08Araq--> "Error: usage of a type with a destructor in a non destructible context"
19:49:24Araqfor the 'o.p' part
19:50:44Araqso it mustn't trigger for parameters
19:50:58AraqI wonder what's the rule here
19:51:08zahary1but why does it trigger here? which variable is a temp?
19:51:36AraqI guess I need to attach it to nkCall ;-)
19:51:38zahary1I think the rule is just "a temp variable cannot have a destructor"
19:51:58Araqthere are no explicit temp variables in semexprs though
19:52:49zahary1yes, but it's easy to write isTemp(expr) proc
19:53:18Araqreally? how does it look like? ;-) that's what I'm wondering
19:54:07zahary1it's either a proc call that returns a value (not var, ref, etc) or a constructor expression
19:55:07Araqalright
19:55:50Araqproc open: TMyObj =
19:55:51Araq result = TMyObj(x: 1, y: 2, p: alloc(3))
19:55:55Araq# oops ;-)
19:56:27Araqit's valid if it escapes :P
19:56:38Araqotherwise you can't write constructors
19:57:46Araqbut I can fix that too
19:58:05Araqwell I think this rule is a good compromise for 0.9.2
19:58:16Araqbut for later versions I think it's crappy
19:58:31zahary1so why would it trigger here? it's also valid for var x = TMyObj(…) so it must be checked only in param positions
19:59:12Araqyeah ok, but var/let already got special treatment
19:59:13zahary1why don't you try the rewrite-to-let-location approach? only the interaction with term rewriting scare you?
19:59:36Araqit's easier to create an error message then rewriting it properly
19:59:57Araqand your "only check in param positions" is wrong:
20:00:13Araqif TMyObj(...): # invalid too
20:00:39Araqunless an if condition context is a param position for you ;-)
20:00:55zahary1true
20:01:29zahary1but still there are finite number expressions that can produce a destructable temp variable
20:04:16Araqhmm, what about 'x.o = TMyObj()'
20:04:42Araqit's valid if 'x' is result, invalid otherwise?
20:05:12Araqbut that's wrong anyway:
20:05:29Araq while true: result.x = TMyObj() # leaks
20:06:29zahary1that's in place construction of the x variable (C++ will destroy the temp var in practice, but the situation in theory can be handled with something like RVO)
20:06:52Araqhow the hell got C++ away with attaching it to a type anyway, I still think it needs to be attached to a constructor
20:07:16zahary1so TMyOBj gets the lifetime of the x variable (which is in turn bound to the lifetime of the result)
20:08:46Araqattaching it to a constructor makes much more sense: var f: TFile = autoOpen("file.txt")
20:09:03zahary1I don't follow your argument. what's wrong with attaching it to the type in this situation? I explained why attaching it to the type is superior in composite objects so I'm not convinced about the GO way of doing it
20:09:31AraqGo does it differently than what I propose
20:09:52zahary1var f = open("file.txt") # RVO makes sure that f is the only constructed object here
20:10:13Araqbut often you want to do:
20:10:45Araqp(f) where p takes ownership and thus it shouldn't be closed
20:11:15zahary1takes ownership of what? the resources inside the File object?
20:11:24Araqthe File object
20:11:25zahary1or the object itself
20:11:32Araqof the object itself
20:11:41zahary1well, how can it take ownership when the object is passed by value?
20:12:05Araqok, files are not the best example here
20:12:29Araqconstruct a tree and it makes lots of sense
20:13:03Araqat the end you can have an: let x = createTree(...) and it will free the tree
20:13:09Araqat scope end
20:13:35Araqyou can always do this with a wrapper type of course
20:14:16Araqhowever destructors undo construction so they should be tied to those imho
20:14:56zahary1now, if I wrote a destructor for the tree I probably had some reason to prefer this behavior. there are pointers to tree that don't have destructors, all kinds of shared ownership smart pointers, etc
20:15:29zahary1what is different in this example if you tie destructors to constructors?
20:15:57Araqthat you can have procs that construct subtrees without any attached destructor
20:16:00zahary1createTree is such a constructor? there is another one that doesn't destroy the object?
20:16:08Araqexactly
20:16:31zahary1well, that's what smart pointers are for
20:16:59Araqtying them to constructors had however some problems wrt dynamic control flow iirc:
20:17:22Araqlet x = if cond: ctorWithDtor() else: ctorWithoutDtor()
20:18:17zahary1again, smart pointers work better for composite objects and so on. you can build things out of them
20:19:50zahary1finally, if you just like the idea of a function that registers a "destroy" side effect in the current scope, this is very easy to do with type-bound destructors and templates
20:20:41Araqalright alright, lets get back to the while true: result.x = TMyObj() problem
20:21:11zahary1template myDestuctorInjectingProc(x, y): expr = let r = SomeImplemention(x, y); finally: destroy r; r
20:22:17Araqthat kind of misses the point though
20:22:40Araqwe have quite some types that expose a 'close' proc now
20:23:05Araqadding an 'autoOpen' proc is nicer than providing wrapper types but ymmv
20:25:46zahary1we should migrate the more important types to proper destructable definitions as this haves more benefits long-term, but otherwise a general-purpose "with/using" template could be useful
20:26:01zahary1but ok, let's go back the previous issue
20:28:18Araqwell I think for now we should disallow it too
20:28:51Araqit's however a problem:
20:29:02Araqwhile true: result = TMyObj()
20:29:17Araqwe said the assignment to 'result' is special and allows object construction
20:29:58Araqhowever we wouldn't generate any destructor call for it, so the example would leak :-/
20:30:34Araqso we're back to requiring flow analysis
20:31:07Araqin fact, no need for a loop here: result = TMyObj(); result = TMyObj() has the problem already
20:31:15zahary1well, this example requires more complete value semantics to work properly
20:32:06zahary1but let's look at it with a real destructable type like TFile
20:32:06zahary1for i in 1..10: result.file = openFile("foo" & i & ".txt")
20:32:19zahary1obviously, you want to open 10 files here and to close them
20:33:20zahary1so for this to work, you must either have overriding of the `=` operator, where you'll close the currently open file in result.file
20:33:48Araqoverriding of = operator is on my todo anyway already
20:34:17zahary1or you must have some kind of scheme, where you have copy constructors that ref-count on some underlying resouce handle
20:35:08Araqanyway it's simple to hack around for now :-) I'll only allow it in 'return' not in 'result =' ;-)
20:36:24zahary1btw, I've previously asked for placement new. we need it for implementing some custom memory allocation schemes like arenas, etc
20:36:53zahary1it requires a magic that exposes the codegen construction calling scheme
20:37:07Araqnot sure what you mean
20:37:42zahary1var memory = malloc(sizeof TFoo)
20:37:56zahary1memory <—TFoo(x: 10, y: 20)
20:38:04Araqyou can already overload 'new' for a user defined type
20:38:15zahary1this constructs TFoo inside the memory I provided
20:39:09Araqwell that doesn't even work with the builtin new for now I think
20:40:14zahary1so we need a patch that implements both :)
20:40:40Araqyeah I wanted to optimize 'new' further
20:40:59Araqhowever the new constructors don't help here
20:41:17Araqas they are mapped to system.new in the backend when it's too late
20:42:08zahary1this can work with a bit more type safe interface too. I suggest that we add a type called TMemSlot[T], TLocation, TStorage[T], etc. the placement new operator will allow only construction of the proper type
20:42:08Araqyou'd want to transform it to 'new' in the fronted so overloading of 'new' works
20:42:59Araqoh it's already restricted to 'ref T'
20:43:31zahary1I'm calling the feature "placement new", because that's how it's called in C++
20:43:43AraqI noticed ;-)
20:43:53zahary1there is no relation to the managed heap allocation function 'new'
20:44:25Araqarguably placement new is only necessary because of the special 'new' syntax in C++, right?
20:44:59zahary1not really. as you see, we need it here in order to be able to implement custom allocation scheme
20:45:46zahary1you may argue the other way around. that the special new syntax was invented, because of the need for placement new
20:46:35zahary1the fundamental operation is "construct this object over this raw memory"
20:47:32zahary1the new operator in C++ performs allocation and then executes this fundamentally required operation
20:47:41zahary1placement new skips the allocation part
20:47:56zahary1… (in C++)
20:50:58zahary1custom_new(TFoo(x: 10, y: 20)); in nimrod could be implemented like this: template custom_new(constuction: expr): expr = custom_alloc(sizeof(construction)) <— construction
20:51:51Araqwith a magic <-- operator?
20:51:57zahary1yes
20:52:25Araqnot sure we need it
20:52:57Araqyou can also pass 'construction' to a proc via a 'var' param
20:53:26Araqin fact, I'm not sure how this inplace construction can work in C++
20:53:43Araqyou need to rewrite the 'construction' expression
20:54:07Araqotherwise you end up with some final memcopy into the dest
20:54:35zahary1this is about the location where the object will be constructed (the RVO address in the constructor function)
20:56:50zahary1var x = MakeFoo(1, 2) is translated to MakeFoo(1, 2, &x);
20:56:50zahary1memory <— MakeFoo(1, 2) is translated to MakeFoo(1, 2, memory);
20:57:23Araqlooks like a rather simple TR macro to me
20:58:27zahary1argh, what is missing is this codegen magic that takes care of the hidden last parameter of the construction function
21:01:55AraqI still can't follow you. What's so special about custom_new(TFoo(...)) in the first place?
21:02:48Araqwhere is the advantage over newFoo(...) ?
21:05:38zahary1the goal is to be able to support custom allocation schemes as said (arenas, our per-frame bump-pointer allocator, etc)
21:07:23zahary1so you want to be able to construct objects will not POD value semantics over the raw memory that your custom allocation scheme will provide
21:07:43Araqthe problem is though: if I have an initFoo(): TFoo proc it's too late already
21:08:04zahary1it's not. memory <— initFoo() does the right thing
21:08:15Araqit can't
21:08:21zahary1why not?
21:08:44Araqunless initFoo has been compiled as initFoo(x: var TFoo) in the first place
21:09:04zahary1well, it is compiled like this if it's a struct type
21:09:22Araqit is? who says that? :-)
21:09:27zahary1I mean in the codegen
21:09:34zahary1that's the return-value-optimization
21:10:35Araqdon't tell that the guys who special cased complex numbers to be returned in 2 registers
21:11:00Araqbut I see
21:11:27Araqyou define the ABI so that it works this way
21:11:55zahary1types returned in 2 registers are POD types almost by definition
21:12:20zahary1so you can have a little less optimal copying placement operator for them
21:12:30Araqhrm I overread that POD part in your answer
21:20:21Araqbtw there is now a rod file reader, compile rodread as a main program
21:26:27zahary1yes, I'm using it already
21:26:48zahary1btw, the problem was not related to the file id changes as I hoped for
21:27:24Araqno but only because I fixed that already
21:27:28zahary1the reader itself crashes when trying to print the system.nim rodfile. the crash is very early in the data section on the bool enum definition
21:27:45AraqI know
21:28:07Araqthe problem is that somehow SystemModule points to the wrong symbol I think
21:28:32Araqso systemModule.tab refers to some wrong table
21:29:10zahary1I was going to step in through the parsing of the enum there, does it reference system.nim somehow (the bool enum?)
21:29:51Araqit loads the 'bool' type twice; however the second loading returns another pointer
21:30:19Araqboth have the same ID though
21:30:29Araqand the rodfile is consistent I think
21:31:00NimBotAraq/Nimrod 6f1adf6 Zahary Karadjov [+0 ±2 -0]: use file IDs consistently instead of file paths in the rod files handling
21:31:09Araqmy bet is that we have 2 system module PSym
21:31:36Araqand SystemModule points to the wrong one
21:31:44AraqI mean magicsys.SystemModule
21:31:44zahary1hmm, I guess you are referring to the loadStub crash when you try to recompile a simple module like hallo.nim
21:31:51Araqyes
21:32:01zahary1try running rodread on the system.rod itself
21:32:08zahary1it crashes too (no loadStub there)
21:32:09AraqI did
21:32:18Araqworked for me the last time
21:32:29AraqI tried tests/rodfile/aconv though
21:32:38zahary1hmm, try debug version of rodread
21:33:09Araqusing file ids instead of file paths is wrong btw
21:33:19Araqso I changed that back
21:33:29zahary1I'm not writing them inside the rod file
21:33:43zahary1just a minor optimization in the in-memory data
21:34:00zahary1and less calls to fileInfoIdx which is a bit expensive
21:34:33dom96hrm, is there a reason why the docs for the unittest module are not generated?
21:35:11Araqdom96: check if unittest is listed in web/nimrod.ini
21:35:34dom96Looking at the source of the module the exported procedures don't really have much documentation...
21:35:58Araqwell it's missing in nimrod.ini, so that's why
21:37:04dom96yes, well I know that much.
21:37:28Araqwell that means we forgot to add it
21:39:58Araqwe should really do: 'type TFileIdx = distinct int32' btw
21:42:34zahary1there is such a type, but I avoid adding new imports and int32 remained in quite a few places so I gave up using it
21:43:06Araqthat's sad :-)
21:43:36Araqthe lineinfo stuff needs to cut out of msgs.nim and then adding this import is fine
21:57:11Araq let x = open()
21:57:19AraqError: for a 'var' type a variable needs to be passed
21:57:35Araqhrm
21:57:44Araqpeople may not like that
21:58:03Araqthe problem is that the destructor expects a 'var T'
21:58:23Araqand you can't pass a let to a var T
21:58:25zahary1that's not mandatory I think
21:58:57Araqwhat do you mean?
21:59:08Araqit's fine to enforce var x = open() here?
21:59:59Araqbtw your transformation is not triggered for global statements but I guess that's fine
22:00:00zahary1I meant, technically it's possible to define destructor not taking a var param, but I agree that would be strange and I see your point in the example
22:01:15Araq*shrug* it would introduce a special case in the language, so I won't do anything about it
22:01:38Araqit's fine the compiler enforces it to be 'var' for me
22:01:53zahary1it's not big deal, yes
22:02:10*Trix[a]r_za is now known as Trixar_za
22:03:35*gradha_ joined #nimrod
22:03:39*gradha quit (Read error: Connection reset by peer)
22:05:33zahary1I'm falling asleep and I'll be heading to bed. btw there are some other tests that fail inexplicably on my machine. they have passed fine on nimbuild
22:05:58Araqyeah, it keeps aporia from compiling on macosx
22:06:33Araqyou're on mac, right?
22:06:39zahary1yep
22:06:52Araqyes it's very strange
22:07:06Araqon mac sometimes a yield statement is not eliminated
22:07:09zahary1the default GC now is v1 with the fixes, right?
22:07:37Araqyes but it leaks for the compiler due to wrong 'acyclic' annotations
22:07:59Araq--gc:markAndSweep should work fine now
22:08:08zahary1I suspect some kind of premature free was happening with my GC (and by extension with the same fixes applied to v1)
22:08:15*gradha_ quit (Ping timeout: 252 seconds)
22:08:49AraqI don't know
22:09:04Araqyour stack handling changes looked correct and yet triggered a crash too
22:09:49*gradha joined #nimrod
22:10:11zahary1anyway, good night for now
22:10:18Araqwait a sec
22:10:28Araqwhat's the error message for the rodfile reader?
22:11:14zahary1it complains that the decodeInt proc encountered an invalid character
22:11:29zahary1rodread.nim(1175) rodread
22:11:29zahary1rodread.nim(1144) viewFile
22:11:29zahary1rodread.nim(368) decodeSym
22:11:29zahary1rodutils.nim(103) decodeVInt
22:11:29zahary1system.nim(2448) hiddenRaiseAssert
22:11:29zahary1system.nim(2440) raiseAssert
22:11:30zahary1Error: unhandled exception: contains({'a'..'z', 'A'..'Z', '0'..'9', '-', '\x80'..'\xFF'}, s[i]) [EAssertionFailed]
22:11:30zahary1
22:11:43zahary1and that's somewhere inside the bool enum
22:12:02Araqare you it's no version problem?
22:12:42zahary1let me check one final time, but I deleted the rod files quite a lot of time
22:12:57Araqold rod files don't work with the viewer
22:13:21Araqhm but then it has some version checking
22:13:32zahary1yep, fails with a fresh rod file
22:13:49AraqI'm quite sure I tested it in debug
22:13:51zahary1works for you in debug rodreader?
22:14:30*gradha quit (Ping timeout: 264 seconds)
22:14:33Araqlet me check again
22:16:50Araqnow it says: Error: cannot open file (or maybe wrong version)
22:16:57*gradha joined #nimrod
22:17:12zahary1well, I bumped the version
22:17:12Araqbut it used to work ;-)
22:17:28Araqwell I have not applied your changes here
22:17:35Araqand it's a fresh rod file anyway
22:17:58zahary1now such an error is even more weird
22:20:24Araqit also shouldn't be 569KB
22:20:44Araqthough maybe my memory is failing me and system.rod always was this large
22:21:09zahary1mine is 545KB so I guess that's ok
22:21:34Araqnow where is my hex editor ...
22:22:10zahary1I'll look for mine under the pillow :) see you tomorrow
22:22:48Araqalright good night
22:31:32NimBotAraq/Nimrod 05f69db Araq [+0 ±1 -0]: bugfix: lambdalifting needs to deep copy parameters
22:31:32NimBotAraq/Nimrod 0f37cb5 Araq [+2 ±4 -0]: improvements for destructors
22:31:32NimBotAraq/Nimrod 0560be7 Araq [+0 ±3 -0]: Merge branch 'master' of github.com:Araq/Nimrod
22:33:10*zahary1 quit (Quit: Leaving.)
22:43:21Araqzahary: I was wrong, I already checked out your code and so the version was wrong; now I get the same error as you and rodread fails
22:57:00*Trixar_za is now known as Trix[a]r_za
23:04:57*Trix[a]r_za is now known as Trixar_za
23:05:49dom96yay more nimrod repos by gradha
23:06:12*dom96 lols at all the kpop
23:06:28gradhacome on, it's serious stuff!
23:06:39gradhalook at all those wikipedia pages, just wish nimrod had so much
23:07:12dom96huh, Seohyun is very young.
23:07:33gradhain kpop all girls start underage
23:07:44gradhayou see, they have to use their time, since being 25 is like being a grandma
23:08:13gradhaboys start also underage, but who cares about boys anyway
23:08:30dom96I cannot contain my laughter "But that would be really raw, like asking Jessica to eat a cucumber (she dislikes them!)." hahah
23:09:15dom96If only all software readmes were this awesome, everyone would be a software developer.
23:09:48gradhaI try to tell that myself every day
23:10:11Araqwho would want that? everybody a software dev? omg.
23:10:37gradhaindeed, we would not have kpop then, only dubstep or metal
23:13:34dom96omg there are so many of these kpop girls!
23:13:57gradhaand that's only one group
23:16:59*Mathnerd626 quit (Read error: Connection reset by peer)
23:18:28*gradha quit (Quit: bbl, have youtube videos to watch)
23:24:39*Mathnerd626 joined #nimrod
23:33:55*q66 quit (Remote host closed the connection)