<< 09-02-2014 >>

00:00:24filwitdom96: interesting
00:08:37filwithow to iterate by ref/var in a for statement?
00:10:05filwitfor ref x in someseq: ... somehow? or do i need to make an iterator which returns a var/ref type or something?
00:10:37filwitor do you just cast to a 'var T' inside the loop?
00:10:45Araqoh hell no
00:11:00filwityeah i thought that sounded sketchy
00:11:07Araqyou do it by system.mitems
00:11:16filwitokay
00:11:20Araqif that exists ... I don't remember
00:11:26Araqif not, write it
00:11:57filwitokay
00:12:06AraqI use an index fwiw, I prefer x[i] = ... over a = ...
00:12:33Araqin fact, I thought about requiring deref for 'var T'
00:13:10filwiti really don't think that's a good idea. i think iterating by ref is much cleaner code. the intent of the code is very clear
00:13:40filwitdoes this work, btw: for item, index in someseq.someIterator: ... ?
00:13:54DemosI like the way it works now. We really do not need the whole clusterfuck that is type qualifiers
00:14:12filwiti wasn't suggesting adding them
00:14:14Araqfor index, item in pairs(...), filwit
00:14:20filwitAraq: thanks
00:14:26Araqhowever I think we should get rid of it
00:14:38filwitin favor of what?
00:14:51Araqthis solution means you need a pairs iterator for every items you write
00:15:06dom96Me and Araq discussed this before.
00:15:08Araqthat's just absurd
00:15:35Araqinstead we should do:
00:15:51dom96and I forgot what we came up with
00:16:22*io2 quit (Ping timeout: 252 seconds)
00:16:40Araqtemplate foreach(x, y: expr, body) {.immediate.} =
00:16:49Araq var i {.inject.} = 0
00:16:58Araq for x in y:
00:17:00Araq body
00:17:04Araq inc i
00:17:33Araqit's ugly that it's no 'for' anymore but *shrug*
00:18:03filwitthis for performance?
00:18:19Araqanother solution was to have something like:
00:18:34filwityou mentioned not needing to always iterator over pairs, why is that a bad thing? performance?
00:18:50*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:19:00Araqfor index i, item in x: where 'index' is keyword-like in this context
00:20:11Araqfilwit: speed is not affected but 'pairs' is a more recent addition
00:20:18filwiti don't get the need for the keyword. doesn't the comma explain the purpose enough?
00:20:26Araqno, it doesn't
00:20:35filwitwhat is the ambiguity?
00:20:42Araqfor x, y in table # invokes the pairs iterator
00:20:55Araqfor x in seq # invokes the items iterator
00:21:03dom96If anything we should go for full explicitness: for i: int, item: var T in x:
00:21:20filwitAraq: that sounds perfect, that's how it works right now?
00:21:29Araqfilwit: yes
00:21:39filwitwhy change it then? that's a great system?
00:21:41EXetoCdom96: ok,but that doesn't have to be the index
00:21:49Araqbut this means you need to come up with lots of 'pairs' iterators
00:21:56Araqwhich are boilerplate
00:22:15Araqalso if you have items and mitems you then need pairs and mpairs ...
00:22:22filwitthis is why you need an "OOP" lib, to write that boilerplate for you..
00:22:33Demoshttps://gist.github.com/barcharcraz/4543b539411eebdeb841
00:22:36Demosis that a bug
00:23:59AraqDemos: zahary thinks so, I'm not sure
00:24:00dom96ahh, and we can't just define a generic pairs since generic iterators are not supported right?
00:24:16Araqwrong
00:24:20Araqgeneric iterators work
00:24:37filwitAraq: somewhere you could just write a macro 'loop' which transformed a iterator into two procs, items & pairs. then use it as a pragma
00:24:37Araqand yeah that sounds like an idea, dom96
00:24:42*Araq feels stupid
00:24:46dom96haha
00:24:58EXetoCI knew you didn't know your stuff
00:25:09filwit'loop's probably a bad name of course
00:26:58filwityeah nevermind, dom's solution is much better
00:30:18filwitmitems doesn't exist, btw
00:30:25filwithmmm..
00:33:57filwitfor i, s in e.services: s[i].update() # Error: for a 'var' type a variable needs to be passed
00:34:29NimBotAraq/Nimrod devel 6e3f194 Araq [+0 ±2 -0]: compiles on sparc again
00:35:22Araqfilwit: this is not how it works
00:36:37Araqfor i, s ....: s[i] # wtf?
00:36:40NimBotdom96/jester master ef675d4 Dominik Picheta [+0 ±1 -0]: Change default staticDir to use getCurrentDir()
01:08:50*ics joined #nimrod
01:25:14*pe7ed27 joined #nimrod
01:30:01*[Pete_27] quit (*.net *.split)
01:33:25Demosso if I want access to the typename of a typedesc in a macro what should I do?
01:34:55Araqwait for zahary to fix the typedesc issues
01:35:14Demoswonderful
01:35:25Araqor alternatively wait until he blames me for it
01:35:46Araqyou could pass the type name to the macro yourself, you know
01:36:10Demoswhat do you mean?
01:36:19Demosjust as an expr?
01:36:33Araqas a string
01:36:40Araqbut as an expr is worth a try too
01:37:15Demosright, so do T.name in a generic and then pass that to the macro
01:37:45Demosdoes nimrod have c++ style generic specialization?
01:38:02NimBotAraq/Nimrod devel d87579f Araq [+0 ±3 -0]: fixes #885
01:38:24AraqDemos: pretty much
01:40:26Araqdom96: please try again
01:40:40Araqbut I don't think that fixes it already
01:40:52Araqgood night
01:40:54DemosI have a global that I am generateing in a macro with a name like typeSceneNode and I need a proc that returns a SceneNode based on the type. Essentially just pasteing the type's name and "SceneNode" together to form an identifier. I was thinking I could generate a specialized generic proc along with the global that retrives it
01:59:09*brson quit (Quit: leaving)
01:59:42*brson joined #nimrod
02:03:06*askatasuna quit (Ping timeout: 245 seconds)
02:33:21*DAddYE quit (Remote host closed the connection)
02:33:49*DAddYE joined #nimrod
02:35:05Demoscan generics take compile time constant values as type params?
02:36:49Demosnever mind
02:37:59*DAddYE quit (Ping timeout: 245 seconds)
02:42:59*DAddYE joined #nimrod
02:43:15*DAddYE quit (Client Quit)
02:45:45dom96Araq: --cs:partial is default now?
02:49:29dom96Araq: Yeah, it still crashes.
02:53:14Demosstatic[T] generic args do not seem to work
02:57:00dom96good night
03:25:27EXetoCDemos: that's slightly different from the example. for a long time now, only types and range values have been allowed for type parameters
03:26:04Demosthe only difference is that I removed the Number constriant on T
03:26:16Demosbut still, that is super annoying
03:26:34EXetoChttps://bitbucket.org/BitPuffin/linagl/src/9f05f3b06186a4fbc41d347e3121befdf157e65d/src/linagl/matrix.nim?at=default
03:26:46Demosright, I saw that
03:26:47*xtagon joined #nimrod
03:26:57EXetoCok
03:27:15xtagonHey everyone
03:27:35EXetoChello there, human
03:27:37Demosbut just allowing any kind of constant values would be nice, or even just a small subset like integers and chars
03:27:40EXetoCor bot. who knows
03:28:24xtagonI'm human as far as I can tell. There is always the possibiltiy that I'm a bot programmed to think I'm human.
03:29:04EXetoCDemos: I'm pretty sure it's planned, but it was months ago that bitpuffin asked about it
03:30:01Demosfor a "classical" linear algebra library it is pretty critical, I am thinking of just trying to wrap eigen, but it would be hella messy and require cpp codegen
03:30:03EXetoCmoaaar metaprogramming :>
03:41:04Demoshm how do I even go about wrapping a library that needs this kind of stuff when I can not use constant template params? ... templates could work
03:45:07EXetoCjust not between brackets I think
03:45:14EXetoCI guess you can wrap it somehow
03:46:19Demosyeah. It is /really/ tricky since you /MUST/ use value typers for this sort of thing
03:48:55EXetoClinagl's approach isn't relevant?
03:49:17EXetoCyou could treat ranges as integers if you really wanted to
03:59:11Demoswell if I wanted linagl's approach I would just use linagl. Using ranges is far from ideal
04:09:27DemosI was all looking forward to how much c++ style metaprogramming improved when "member functions" are no longer tied to the object
04:13:47VarriountHi guys
04:14:02VarriountSorry I haven't been on all day, I've been feeling a bit sick
04:14:51*Varriount sneezes on Demos
04:21:07*DAddYE joined #nimrod
04:22:51*XAMPP joined #nimrod
04:40:10xtagonWhat's up Varriount?
04:40:52VarriountNot much. I"m likely gonna have to stay up all night and all day in order to get my sleep schedule back on track
04:41:14VarriountWhen you wake up at 8 in the afternoon, something is wrong.
04:41:54xtagonThat's no fun. Happened to me when I was sick a couple weeks ago.
04:42:04xtagonHard to sleep when you're vomiting all night
04:42:16Varriount>_<
04:42:29VarriountIn the meantime, I'm gonna work on a nimrod port of python's itertools.
04:43:18Varriount(Although, I have no idea how to implement the permutation or combinatorial generators)
04:43:24xtagonCool. I'm re-writing some Ruby scripts into Nimrod programs because I hate having to re-install their dependancies every time I change the system Ruby version
04:43:59DemosVarriount, you crashed skyrim and made my controller get stuck in vibrato mode... look what you have done!
04:44:24VarriountGood. I've never played skyrim. Now you can share my pain.
04:45:21DemosI wrote like 5 lines of code today... ran into compiler bug after compiler bug
04:46:14Varriount*shrug* what do you expect, when nimrod has 2-3 compiler devs, with no big backing from other companies.
04:46:34VarriountQuite frankly, I'm astonished at how much Araq has done.
04:46:58VarriountDemos: What kind of compiler bug?
04:51:04*DAddYE quit (Remote host closed the connection)
04:51:30*DAddYE joined #nimrod
04:53:51VarriountHuh. Today I learned that you can drag a folder or file onto the command prompt to get its path pasted in.
04:55:51*DAddYE quit (Ping timeout: 252 seconds)
04:55:58Demoswowah neat
04:56:20DemosVarriount, the now-solved newSeq[T] bug and the fact that static[T] type params do not work
04:57:52VarriountDemos: That newseq bug is still apparent
04:58:03VarriountOr rather, I think Araq mistakenly closed it.
04:59:25VarriountSince the commit that closed it has nothing to do with newSeq[], just thread analysis, and also the fact that the latest nimrod versions (built from latest devel about 5 minutes ago) still show the bug.
05:03:22*shodan45 quit (Remote host closed the connection)
05:03:41*shodan45 joined #nimrod
05:07:42VarriountHi shodan45
05:09:20Demosoh, damn
05:10:09*DAddYE joined #nimrod
05:22:04VarriountDemos: Am I correct?
05:29:34VarriountGr. parseutils isn't compiling for my itertools module
05:34:18Demosmaybe, I ended up working around it
05:34:47DemosI was having a problem making a proc that returned a seq[T] though
05:34:53Demosa generic proc that is
05:46:20VarriountDemos: This is odd. My itertools module has little unit tests, the way that the stdlib tends to have.
05:46:36VarriountAnd they don't work anymore, despite once working
05:47:36VarriountAnd they don't work anymore, despite once working
05:47:48VarriountWoops, sorry, wrong window
05:51:20VarriountDemos: Can you look at this and tell me if anything is wrong with it? -> https://gist.github.com/Varriount/8894927
06:00:11*xtagon quit (Quit: Leaving)
06:11:24*DAddYE quit (Remote host closed the connection)
06:11:51*DAddYE joined #nimrod
06:15:45*[1]Endy joined #nimrod
06:16:03*DAddYE quit (Ping timeout: 250 seconds)
06:56:34*DAddYE joined #nimrod
07:07:45*shodan45 quit (Quit: Konversation terminated!)
07:08:02Demoswhat error are you getting?
07:08:15Demoscause I think I was getting errors with generic iterators as well
07:09:43*brson_ joined #nimrod
07:10:55*brson quit (Ping timeout: 246 seconds)
07:26:50*vbtt joined #nimrod
07:27:08*awestroke joined #nimrod
07:31:59*vbtt quit (Quit: Bye)
08:01:16*foodoo joined #nimrod
08:23:11AraqVarriount: afaict I fixed the 'newSeq' bug
08:23:24Araqthe example still doesn't compile but that's because it makes no sense
08:23:53Araqtemp3.nim(32, 32) Error: type mismatch: got (TSet[seq[int]], TSet[int])
08:23:54Araqbut expected one of:
08:23:56Araqsystem.==(x: bool, y: bool): bool
08:23:57Araq...
09:01:51*aftersha_ joined #nimrod
09:03:58*delian66 quit (Quit: Terminated!)
09:08:39*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:23:41Araqdom96: for your gist, I get
09:23:48*renesac|away quit (Ping timeout: 252 seconds)
09:23:52Araq"undeclared identifier: p"
09:23:55Araq-.-
09:24:29*Araq can't fix compiler bugs with code that cannot reasonably compile
09:47:00*DAddYE quit (Remote host closed the connection)
09:47:59*Demos quit (Read error: Connection reset by peer)
10:16:22*aftersha_ quit (Quit: Computer has gone to sleep.)
10:17:33*aftersha_ joined #nimrod
10:18:32*[2]Endy joined #nimrod
10:22:09*[1]Endy quit (Ping timeout: 245 seconds)
10:26:18*brson_ quit (Quit: leaving)
10:42:30*[1]Endy joined #nimrod
10:44:53*[2]Endy quit (Ping timeout: 248 seconds)
10:45:00*aftersha_ quit (Quit: Computer has gone to sleep.)
10:47:21*[2]Endy joined #nimrod
10:48:07*DAddYE joined #nimrod
10:50:36*[1]Endy quit (Ping timeout: 245 seconds)
10:52:37*DAddYE quit (Ping timeout: 260 seconds)
11:17:57dom96Araq: gah: https://gist.github.com/dom96/61bb0b210ec7497565d5
11:38:31*DAddYE joined #nimrod
11:40:09*io2 joined #nimrod
11:40:27Araqdom96: for the new async/sockets stuff please use -d:useSSL instead of -d:SSL
11:40:43Araqthe 'use', 'no' prefixes are a convention now
11:41:04dom96Right ok. But I still think we should separate defined() and compilerDefined()
11:42:58*DAddYE quit (Ping timeout: 252 seconds)
11:52:53*zahary quit (Quit: Leaving.)
11:53:10*zahary joined #nimrod
11:55:17AraqI agree
11:55:29Araqit breaks code in very subtle ways though
11:55:48zaharyhi, I'm back home
11:55:53Araqunless we special case the list of currently existing defines
11:56:05Araqthen the compiler could issue a warning
11:56:08dom96zahary: hey
11:56:15Araqthat your code will ignore forever :P
11:56:18dom96zahary: Have you read our async discussion yesterday?
11:56:19Araqhi zahary wb
11:56:49Araqthe world depends on your bugfixes
11:56:55Araqare you happy? ;-)
11:57:11dom96Araq: I think getting rid of warnings might actually be one of the good things Go has done.
11:58:02Araqdom96: no, that doesn't work, you need them at least for transition periods
11:58:09zaharydom96: for the async stuff, there was a more detailed gist that was originally yours I think - you showed me some example transformations and I wrote some counter examples
11:59:44dom96Araq: Transition periods?
12:00:21Araqjust look at the deprecation of the 'nil' statement
12:00:43Araqaccording to you the compiler should error out already, breaking every single project out there
12:00:49dom96oh I see.
12:00:56dom96Yeah, true.
12:01:22dom96But people are lazy. I still haven't fixed the nil stuff in any of my projects.
12:01:28dom96If it was an error I would be forced to do so.
12:02:08Araqno, this doesn't work
12:02:14dom96zahary: I'm trying to find it now. Can you look at asyncio2 and see if i'm doing it right?
12:02:39dom96https://gist.github.com/dom96/0c73a80b0dba2453956a
12:02:43dom96That's it, isn't it?
12:02:51Araqwe don't even recompile stuff that often
12:02:55zaharyyeah, that's it
12:03:07Araqothers told us aporia doesn't compile with devel, dom96
12:03:12dom96Araq: true
12:03:46dom96zahary: Ahh. It looks like your example does it exactly the same way Araq suggested to me yesterday.
12:05:47dom96I wonder if maybe i should just provide one completion callback with no params. The user can always capture the future.
12:07:38Araqdom96: I need Future[T] for the new concurrency stuff too. I wonder if we should use different types or the same types
12:08:32Araqbut I don't think they can share the implementation ...
12:08:56dom96Why not?
12:09:01Araqwill use Delayed[T] then instead I guess
12:09:31dom96It would be nice to keep the types the same.
12:09:45dom96What will it be used for in your new concurrency stuff?
12:10:16Araqdom96: my stuff needs compiler support and needs to be safe for inter thread communication
12:11:49dom96It's still a value container though right?
12:12:08Araqright
12:12:09dom96Is it a promise to a threads return value?
12:12:17Araqright
12:12:55dom96How about you call it ThreadFuture and inherit from Future?
12:13:13Araqyour Future[string] can have a trivial implementation, mine requires voodoo
12:13:55Araqmeh what's the point in inheritng from your Future, they are incompatible
12:14:12dom96They will share the same interface, no?
12:14:17dom96i.e. callbacks.
12:14:21Araqno
12:14:34dom96How will yours work then?
12:16:49Araqproc read*[T](f: var Future[T]): T =
12:16:50Araq if f.isNil:
12:16:52Araq raise newException(EInvalidValue, "attempt to read from future twice")
12:16:53Araq let w = f
12:16:55Araq f = nil
12:16:56Araq await(w.resultReady)
12:16:58Araq result = w.copyResult(w.result)
12:16:59Araq signal(w.resultRead)
12:17:21dom96Why disallow multiple reading?
12:17:35Araq'await' and 'signal' operate on condition variables here
12:18:12Araqdom96: because it simplifies things
12:18:14dom96You should store the value in the future.
12:18:30dom96It will be an annoying gotcha.
12:18:30Araqno
12:18:37dom96Because my futures allow this.
12:18:46dom96And then people will get confused.
12:18:52Araqwell I will name it Delayed[T]
12:19:07Araqno confusing, it works differently and has a different name
12:19:46Araqthis is designed for max performance, dom96
12:19:48dom96Is there any way to tell when yours can be read without blocking?
12:20:38dom96Maybe I could wrap your Delayed in my own Future :P
12:20:46Araqgood question
12:21:07Araqlet me see if posix's condition vars support that
12:21:09dom96For those who can sacrifice some performance for consistency
12:22:28dom96but anyway, please fix the bug.
12:22:50dom96I have homework to get done unfortunately.
12:23:17Araqyeah, that can be easily supported
12:23:32Araqpthread_cond_timedwait()
12:30:51zaharydom96: I've added one more comment to the gist
12:31:31dom96zahary: This is my current prototype: https://gist.github.com/dom96/61bb0b210ec7497565d5#file-gistfile1-nim-L28
12:39:12*DAddYE joined #nimrod
12:39:18zaharydo you do the equivalent of my wrapYield on the second yielding from the iterator?
12:42:26dom96yeah, that happens in cbVoid
12:43:24*DAddYE quit (Ping timeout: 245 seconds)
13:01:15Araqbbl
13:18:27foodoobtw: what does "bbl" stand for? be back later?
13:18:31*[2]Endy quit (Ping timeout: 245 seconds)
13:18:40dom96ya
13:19:46*darkf quit (Quit: Leaving)
13:23:53*renesac joined #nimrod
13:39:56*DAddYE joined #nimrod
13:44:07*DAddYE quit (Ping timeout: 250 seconds)
13:49:25*aftersha_ joined #nimrod
14:01:58*io2 quit ()
14:03:37*foodoo quit (Ping timeout: 250 seconds)
14:19:27*aftersha_ quit (Quit: Computer has gone to sleep.)
14:30:29*filwit quit (Ping timeout: 248 seconds)
14:38:56*awestroke quit (Remote host closed the connection)
14:39:41*ddl_smurf quit (Quit: ddl_smurf)
14:40:41*DAddYE joined #nimrod
14:44:53*DAddYE quit (Ping timeout: 248 seconds)
15:11:27EXetoCAraq: why is ObjectID represented by Toid? I suppose it was a matter of simplicity
15:11:57EXetoCand there's currently no cross-platform way to get the hostname, right? and then there's the process ID
15:12:09EXetoCbut it doesn't matter. I'll keep it simple for now
15:14:00Araqtester/testament/backend.nim shows how to get the hostname
15:15:16EXetoCI should've examined the grep output more carefully
15:19:10EXetoC'when' as an expression. neat
15:19:51*micklat joined #nimrod
15:41:27*DAddYE joined #nimrod
15:44:06EXetoCok JSON can't be used. all BSON types needs to be represented
15:45:53*DAddYE quit (Ping timeout: 250 seconds)
16:08:05Araqmicklat: no time for a proper forum answer but you can do ~foo.bar(baz) where ~ is a macro that then rewrites it to what you need
16:08:24AraqI picked ~ cause it looks like a snake
16:09:28EXetoCclever
16:20:39micklatthanks for the tip. I still haven't looked into the delegates that Zahary suggested.
16:23:31*BitPuffin joined #nimrod
16:23:44BitPuffindom96: I will be steraming soon so finish your homework
16:23:48BitPuffindom96: or at least me ready to rt
16:31:04Araqthe delegates will get a different syntax
16:31:33Araqso ... I now have a desktop that *scrolls* on win7
16:31:45Araqany idea how to go back to the normal resolution?
16:32:00Araqand no, I didn't change the resolution
16:32:13Araqbut something else by chance
16:34:24dom96BitPuffin: I am ready
16:34:36dom96well, i have one more homework exercise to do
16:34:43dom96but i'm eating right now anyway
16:35:00dom96Araq: ETA on bug fix?
16:36:41Araq~1 hour
16:37:27EXetoCdom96: dude, you need to get one of those treadmill desks
16:38:02dom96EXetoC: lol why?
16:42:12*DAddYE joined #nimrod
16:44:00*DAddYE_ joined #nimrod
16:44:00*DAddYE quit (Read error: Connection reset by peer)
16:45:26BitPuffindom96: okay sweet then it will be nice
16:48:26*DAddYE_ quit (Ping timeout: 246 seconds)
16:52:43dom96BitPuffin: So what are you going to be working on again?
16:58:07*ics joined #nimrod
16:59:19EXetoCdom96: efficiency
17:01:09EXetoCin terms of KLOC's per minute
17:08:58dom96Doesn't sound very practical
17:23:01*[1]Endy joined #nimrod
17:30:57micklatdelegators don't seem to support calls of the form a.b.c(x,y,z) where b is not recognized as a member of a, or do they? what happens when the member accesses are nested?
17:42:39*[1]Endy quit (Ping timeout: 260 seconds)
17:44:05*aftersha_ joined #nimrod
17:44:47*DAddYE joined #nimrod
17:46:25*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:49:21*DAddYE quit (Ping timeout: 260 seconds)
18:01:32*filwit joined #nimrod
18:11:48filwithttp://i.imgur.com/jVqCc95.gif
18:12:21Araqhoney badger?
18:12:25filwitfound on reddit labeled "Honey badgers don't give a shit"
18:12:30filwitlol
18:12:39filwitthought it was relevant
18:14:19*foodoo joined #nimrod
18:15:49*aftersha_ quit (Quit: Computer has gone to sleep.)
18:27:33*XAMPP quit (Quit: Drink all the Booze; Hack all the Things; Kill all the Humans;)
18:31:56Araqzahary: this scope based lambda lifting doesn't work
18:32:46Araqit's way too complex to figure out the "proper" scope where the closure should be generated
18:33:12AraqI think we should really allocate on function entry and be done with it
18:33:27Araqthis also has the benefit of matching JS's semantics
18:33:56Araqand is more efficient
18:34:12OrionPKaraq im getting an error on devel (but not main) compiling my templates.nim module
18:34:14OrionPKidentifier expected, but found '(open|open|open)'
18:34:41OrionPKwhen I call value.parse_to_close(index, open='{', close='}')
18:35:16OrionPKsignature: parse_to_close(value: string, index: int, open,close: char)
18:35:58AraqOrionPK: is parse_to_close a template?
18:36:08OrionPKno, it's a proc
18:39:13AraqOrionPK: make a bug report, but it's trivial to fix
18:41:18OrionPKk
18:45:30*DAddYE joined #nimrod
18:47:11OrionPKaraq it is being called from w/in a template
18:47:26AraqOrionPK: I know
18:47:40OrionPKok
18:48:14dom96BitPuffin: well? You streaming or what?
18:49:26dom96Nope, he's playing Dota...
18:50:03*DAddYE quit (Ping timeout: 250 seconds)
18:54:09BitPuffinlol
18:54:11BitPuffinnoob dom96
18:55:08EXetoCBitPuffin: your game should be at v1.2 now according to my estimates :>
18:55:45BitPuffinEXetoC: :P
18:57:48AraqBitPuffin: I want a new realtime strategy game, build one
18:57:59dom96BitPuffin: who u calling newb u newb
19:01:57BitPuffinAraq: buy one
19:02:00BitPuffindom96: you!
19:02:06BitPuffinOkay I'm gonna poop and then stream
19:06:30OrionPKstreamed poop?
19:06:32OrionPKworld first?
19:07:01dom96Yep. It's for the Olympics.
19:07:09EXetoCthat's where the tubes come in
19:07:28EXetoCTed Stevens was on to something after all
19:09:14OrionPKi havent been able to watch much lympics this year
19:11:12*comex_ is now known as comex
19:11:25dom96I haven't watched any of it yet.
19:11:45dom96The only reason I am even aware it's happening is because of reddit.
19:12:06OrionPKah
19:12:10OrionPKim watching ski jumpin now
19:18:33*Mat3 joined #nimrod
19:18:36Mat3hi all
19:19:57*foodoo quit (Ping timeout: 250 seconds)
19:20:40BitPuffindom96: it's live
19:20:44BitPuffincan you come check if shit is working
19:20:56dom96Yep. Seems to work.
19:21:11dom96The image size is a bit small though.
19:21:48micklatAraq: if I override `~`, won't it break the other uses of this character?
19:22:15Mat3Araq: Read the Dr. Dobbs article, nice overview
19:22:26Araqoh hi Mat3
19:22:36micklatI'd have to do it as an immediate macro, so I won't have type info telling me that the first element in the path is a python object
19:22:37BitPuffindom96: I know
19:22:44BitPuffindom96: I'm trying to make sure music and shit works
19:22:47dom96BitPuffin: that's better.
19:23:09BitPuffindom96: I have set up sound wrong
19:23:24dom96The delay is quite large lol
19:23:38Araqmicklat: ~ isn't used in system.nim and you can always do: import foo except `~`
19:24:22BitPuffindom96: yeah
19:24:25BitPuffindom96: tell me if you hear music
19:24:33dom96BitPuffin: will do
19:25:02dom96BitPuffin: I can hear your mic if that helps
19:25:06micklatI see in the manual that ~ is used in patterns, so a module author will have to avoid mixing the two uses in the same module, right?
19:26:32dom96BitPuffin: yeah, you fixed it.
19:27:12BitPuffindom96: alright it seems to be working
19:27:15BitPuffinlet me just tweet then
19:27:23Araqmicklat: ~ for patterns is special cased, it won't cause a conflict, I think
19:27:24dom96You already tweeted like twice lol
19:27:41micklatI think I'll try
19:28:09Araqmicklat: but surely this is only a temporary solution until overloading of '.' works satisfactory
19:28:17BitPuffinif you guys wanna watch http://www.twitch.tv/bitpuffin
19:28:44micklatAraq: I hope so. Any idea when you might get to that?
19:29:06dom96BitPuffin: That music is very relaxing.
19:29:20BitPuffindom96: hell yeah
19:29:25BitPuffindom96: can you hear me well over it?
19:29:34EXetoCalso, got a rough estimate for user-defined copy construction?
19:29:46dom96BitPuffin: yeah
19:30:19Araqneither '.' nor overloading of '=' are for 0.9.4 and '.' isn't really required for version 1 ... sorry
19:30:26filwithow to get the module name from insdie a macro?
19:30:40dom96BitPuffin: hrm, the video seems to freeze when you're using the terminal
19:30:42EXetoCok
19:30:47Araqfilwit: I don't think you can get this information
19:30:50dom96BitPuffin: something weird is happening.
19:30:59BitPuffindom96: what?
19:31:00filwitAraq: :-\ k
19:31:17filwitAraq: the filename?
19:31:31dom96BitPuffin: yeah, it's weird.
19:31:37dom96BitPuffin: let me refresh
19:31:41Araqthere is macros.lineinfo iirc
19:32:04*ics joined #nimrod
19:32:06filwitah, right, that was it
19:32:12filwitthanks
19:32:54dom96BitPuffin: seems better now.
19:33:02BitPuffindom96: cool
19:33:21dom96BitPuffin: Why are your line numbers the other way around lol
19:33:33Araqfilwit: btw should we rollback to the old vm?
19:34:41dom96BitPuffin: argh, same problem again :(
19:35:17dom96It's as if I am getting 1 frame per 20 seconds
19:35:31*DAddYE joined #nimrod
19:36:18*dom96 tries it on his iPad
19:37:22BitPuffindom96: weird
19:37:30dom96BitPuffin: I think you should try lowering the quality
19:37:38BitPuffindom96: don't have any drops :s according to cocoasplit
19:37:38BitPuffindom96: I have tried that once
19:37:43BitPuffinbelieve I still had the same prob
19:37:44filwitAraq: idk, I never looked at the old vm, hard to compare
19:37:50BitPuffinor I'm not even sure if the problem is with me or not
19:38:01dom96BitPuffin: well it's unwatchable for me :(
19:38:08filwitAraq: i would rather focus on going forward with one system that makes the most sense on paper
19:38:31filwitAraq: if you think the new VM design is better, let's just fix the bugs in it
19:38:46BitPuffindom96: hrm :/
19:39:05dom96and there is no way for me to lower the quality
19:39:07Araqfilwit: but it is not better :-/
19:39:22filwitAraq: what is different about it?
19:40:08*DAddYE quit (Ping timeout: 265 seconds)
19:40:14dom96BitPuffin: Like when you're transitioning I get a single frame sometimes between the transition, and then it updates after 5 seconds
19:40:30Araqit's faster by a factor 20 but it's harder to maintain and introduces new bugs, filwit
19:40:44Araqand the bugs it fixes could also be easily fixed in the old vm
19:41:19BitPuffindom96: could be a bug when switching desktop I guess
19:41:25BitPuffinbut other than that it should be fine?
19:41:39dom96BitPuffin: but it's not just during that.
19:41:52BitPuffindom96: what do you mean with transitioning then?
19:41:52Mat3Araq: What optimizations have you done in the new VM ?
19:41:54filwitAraq: everything seems pretty straight forward with this design as far as I can tell. It maps the Runtime AST pretty well. Speed sounds nice. The only thing I'm not fully understanding is how 'TDest' variables are being used. I though they would be stack indices, but it doesn't look like it.
19:41:55dom96and see the value under 'pending out'
19:42:12dom96BitPuffin: I'm just giving an example of where I am sure that it freezes.
19:42:40BitPuffindom96: hmm
19:42:47BitPuffinwell I'll try lowering the quality then
19:43:11dom96ok
19:43:16AraqMat3: no optimizations, just a 3 operand bytecode format
19:43:33Araqfilwit: they are stack indices
19:43:40EXetoC1080p is good enough. lower it to that
19:43:48filwitAraq: I'm not completely apposed to reverting back if there is just too much to handle, though I would prefer some more time to tinker with the new one. If it really does get 20x speed improvement, that's a nice thing.
19:43:53BitPuffindom96: what about now
19:44:09BitPuffindom96: is the text readable now?
19:44:12Araqfilwit: ok then
19:44:24filwitAraq: that's what I thought originally, but why do they go into negative all the time? header stuff?
19:44:27EXetoCor maybe you don't even have 2160p/4320p yet. if so, get with the times
19:44:46Araqfilwit: -1 means 'unused' that's all
19:45:08filwitahh.. that, okay
19:45:32dom96BitPuffin: No :\
19:45:37BitPuffindom96: hrm :'/
19:45:46BitPuffindom96: shitty wifi xD
19:45:49filwitmarking as unused is how you free up stack memory?
19:46:08Araqno
19:46:19dom96BitPuffin: I can see "Pending Out" accumulating. I'm guessing you don't want that to happen.
19:46:36*[1]Endy joined #nimrod
19:46:49BitPuffindom96: Yeah I believe it's fine if it doesn't go too high
19:46:54filwitAraq: i'm trying to understand why you said adding to a Node was returning nil and causing the if-statement to become nil
19:46:55BitPuffinwhich it kind of was when I had higher quality
19:47:58dom96BitPuffin: Perhaps you should just record the video and upload it to youtube later?
19:48:02Araqfilwit: the codegen translates x = y + z differently from x+y
19:48:12BitPuffindom96: nah
19:48:18BitPuffindom96: I have to try one day with ethernet
19:48:25dom96BitPuffin: ok
19:48:25Araqx+y means an unkown destination, so it allocates a temporary to store the result in
19:48:30BitPuffindom96: could just be that the upload is not as good as in the old house
19:48:39BitPuffinwhere I had 10mb up
19:48:44Araqbut for x = y + z we know the target slot
19:48:52Mat3Araq: I guess your implemented ISA is a canonical RISC one (like the Lua VM)
19:48:53Araqand so no temporary is necessary
19:48:58dom96BitPuffin: damn, that's pretty good.
19:49:14BitPuffindom96: here it is like
19:49:16BitPuffin1 perhaps
19:49:19BitPuffindom96: wanna play dota?
19:49:19AraqMat3: indeed, I copied Lua's design
19:49:31BitPuffindom96: :P
19:49:37dom96BitPuffin: nah
19:49:42Araqthe 3 operand code that's produced is impressively efficient
19:49:45BitPuffindom96: noob
19:49:51Araqoh I lied, Mat3
19:49:51dom96I'm waiting for Araq to fix a bug for me.
19:50:05AraqI perform basic jump optimizations
19:50:07BitPuffindom96: perfect, one game then
19:50:17filwitAraq: i noticed the regs[ra/rb/rc] used everywhere
19:50:32*micklat quit (Remote host closed the connection)
19:50:32dom96BitPuffin: I'd rather play HearthStone :P
19:50:43BitPuffindom96: no!
19:51:04*BitPuffin quit (Quit: WeeChat 0.4.2)
19:52:35filwitAraq: thanks for the explanation, that helps a bit, though i'm still not seeing how the 'dest' var at vmgen:genIf:305 is incorrect (above 0) due to this.
19:52:42*BitPuffin joined #nimrod
19:53:02BitPuffindom96: you and your FartStone
19:53:14filwitAraq: i have a couple more things to try
19:55:41dom96BitPuffin: ooh, also. New Top Gear.
19:57:22BitPuffindom96: noob
20:05:55*[1]Endy quit (Ping timeout: 260 seconds)
20:22:54*XAMPP joined #nimrod
20:31:14*carum joined #nimrod
20:33:31*[1]Endy joined #nimrod
20:36:18*carum quit (Remote host closed the connection)
20:36:24*DAddYE joined #nimrod
20:40:59*DAddYE quit (Ping timeout: 250 seconds)
20:48:08NimBotAraq/Nimrod devel 14f4a23 Dominik Picheta [+2 ±0 -0]: Epoll wrapper + selectors module.
20:48:08NimBotAraq/Nimrod devel 38fb681 Dominik Picheta [+0 ±2 -0]: Epoll now works.
20:48:08NimBotAraq/Nimrod devel dc99441 Dominik Picheta [+540 ±233 -539]: Merge branch 'devel' into newasync
20:48:08NimBotAraq/Nimrod devel 0715001 Dominik Picheta [+3 ±1 -0]: Added new sockets modules: asyncio2, net, and sockets2.
20:48:08NimBot3 more commits.
20:48:27Araquh oh ...
20:48:57Araqdamn, I merged newasync into devel ...
20:49:01Araqdom96: is that a problem?
20:49:18dom96...
20:49:35Araqstupid "git diff" didn't tell me!
20:49:53dom96Be careful.
20:50:03dom96You're lucky though because it shouldn't be a problem.
20:50:28dom96As the other modules are still there.
20:50:48Araqok good
20:51:06AraqI'll leave them in then
20:58:04*dmac joined #nimrod
20:59:20*aftersha_ joined #nimrod
21:04:03*ddl_smurf joined #nimrod
21:04:05*[1]Endy quit (Ping timeout: 248 seconds)
21:15:56*micklat joined #nimrod
21:18:45micklatAraq: yay your snake method works!
21:24:22Mat3ciao
21:26:46Araqlol of course it does
21:27:16*Mat3 quit (Quit: Verlassend)
21:28:45reactormonkAraq, GSoC?
21:30:33Araqreactormonk: what do I need to do for that?
21:32:42reactormonkAraq, http://www.google-melange.com/gsoc/homepage/google/gsoc2014 and organize http://pastebin.com/0ZMtJFdB
21:33:00reactormonkI think dom96 is interested in helping
21:33:10micklatI still can't build python lists, though, I keep running into https://github.com/Araq/Nimrod/issues/888
21:33:18micklatwell, enough for one day I guess
21:34:25reactormonkmicklat, could you reduce the problem?
21:34:40micklatI can try, sure
21:35:16reactormonkmicklat, py2.nim(16, 7) Error: cannot open 'python'
21:35:33micklatyou need to babel install python first
21:36:03EXetoCAraq: were the changes staged? if so, then you need to specify --cached
21:36:53dom96Once you do 'git merge', git diff won't help you.
21:37:09*DAddYE joined #nimrod
21:37:15Araqbbl
21:37:47EXetoCthat was the problem?
21:39:44reactormonkmicklat, you are aware that converters are auto-applied?
21:39:54reactormonkso the compiler won't know if you want converter to_list*(vals: openarray[PPyRef]): PPyRef =
21:39:56micklatyes,
21:39:56reactormonkor
21:40:01reactormonkconverter to_tuple*(vals: openarray[PPyRef]): PPyRef =
21:40:25micklatdidn't see that
21:40:31micklatthanks
21:40:49reactormonkand there will be conflicts between openarray and converters
21:41:14reactormonkto_py converters are fine, but please make everything else not a converter.
21:41:26*DAddYE quit (Ping timeout: 245 seconds)
21:42:25micklatwhat's wrong with to_PPyRef?
21:42:45micklatit's really handy
21:42:57reactormonkthat's good.
21:43:18reactormonkotherwise, keep it to to_py and from_py and don't use openarrays in converters... that will confuse the compiler.
21:44:34micklatok, I've made to_tuple and to_list non-converters
21:44:38micklatdoesn't fix the problem though
21:45:21reactormonkhm.
21:45:39reactormonkdid you make anything that uses openarrays procs?
21:47:32micklatthere's still one to_py converter: converter to_py*[T](vals: openarray[T]): PPyRef =
21:47:40reactormonkhuh
21:47:45micklatso I'll try that
21:47:58reactormonkdelete it
21:49:03*aftersha_ quit (Quit: Computer has gone to sleep.)
21:49:38micklatstill the same problem
21:50:08reactormonkhmmm
21:50:33micklatI'll try to isolate it now
22:04:21micklatreactormonk: I'm mostly through. Notice the last 3 lines here: https://gist.github.com/micklat/8906673
22:05:08micklatthe problem occurs when the converter is supposed to kick into action
22:06:31reactormonkmicklat, huh. Bug Araq.
22:06:49micklatthanks though
22:08:41reactormonkmicklat, I think the convention is `initList`
22:08:56micklatinstead of what?
22:09:00micklatnew_list?
22:09:18reactormonkyup
22:09:22reactormonkjust make it init_list
22:09:47micklatok
22:11:57micklatwell, thanks for all the help
22:12:06micklatmy wife really wants me to go to bed now
22:12:11micklatnight
22:12:11reactormonkmicklat, np, check by again. And add your debugging to the issue
22:12:25micklatsure
22:12:30*micklat quit (Remote host closed the connection)
22:26:44*DAddYE joined #nimrod
22:33:11*zahary quit (Ping timeout: 272 seconds)
22:35:49reactormonkhow can I tell the compiler to spew out the command it uses for gcc?
22:38:49reactormonksomehow --listCmd doesn't do it
22:38:57filwit--paralleBuild:true or something like that
22:39:14filwit--parallelBuild:on maybe?
22:39:27dom96it should do that by default.
22:39:30reactormonk--parallelBuild:1 for error messages
22:39:40dom96remove your nimcache and bin
22:39:40filwit^ that's it
22:39:50reactormonkhttp://pastebin.com/ms0suhe2
22:40:15reactormonknope, doesn't help
22:43:36dom96whoa what
22:43:37dom96await.nim(88, 15) Error: ambiguous call; both sockets2.$(p: TPort): string and macros.$(s: PNimrodSymbol): string match for: (Error Type)
22:48:20dom96Araq: hrm, the compiler doesn't like when I try capturing a 'Sym'.
22:58:31Araqdom96: what do you mean?
22:59:22dom96Araq: Whenever I use a macro to generate variable assignments using genSym and then I generate code which also captures those symbols in a closure the compiler complains
22:59:34dom96If I change the genSym usage to newNimIdent it works again
22:59:44dom96*newIdentNode
23:02:41Araqare you sure it's the capturing? and not some other bug so that the sym doesn't get a proper type assigned?
23:03:06dom96Dunno.
23:03:29dom96I'm fairly sure my code generation is correct since it works with idents.
23:03:42dom96if that's what you're asking
23:04:01dom96I get an illegal capture error if that helps.
23:04:40filwitrecently discovered debug() is really useful to dumping to temp files and inspecting/comparing the node tree inside vmgen
23:05:02filwitfrom* inside vmgen
23:06:26dom96Araq: Is there a way to get rid of the implicit result var?
23:06:29*Demos joined #nimrod
23:07:08Araqdom96: no. why?
23:07:34dom96Araq: Because the user's proc body will be wrapped in an iterator who's return type will be different.
23:07:51dom96I guess I can just redefine result to whatever I wish?
23:08:14Araqthe macro should check 'result' is not used, I guess
23:08:32Araqbut please
23:08:46Araqmake 'await' work and focus on the other missing parts
23:08:58Araqthe 'async' pragma is only a syntax game
23:09:11Araqand I'm not sure nim's macros are up for that
23:09:29dom96The async pragma is the most important
23:09:37Araqwhy?
23:10:00dom96because it takes care of a lot more boilerplate than await
23:10:27Araqok ...
23:11:17dom96well hrm
23:11:38dom96I guess that's not quite true
23:11:44dom96But in any case, I've already started it
23:11:46dom96and it's almost finished
23:11:50dom96I may as well get it done
23:12:02Araqok but I won't fix any bugs
23:12:12Araqtoday
23:12:18dom96lol
23:12:20reactormonkdom96, do you want to pull this GSoC off? I can help, but I'm not sure I can go full on it, because I need to finish my masters thesis this summer.
23:12:35dom96Araq: In my timezone or yours? :P
23:12:44reactormonkAraq, btw: https://github.com/Araq/Nimrod/pull/896
23:12:47Araqmine :P
23:12:59dom96reactormonk: There is far too much work associated with getting it done I think.
23:13:26reactormonkdom96, I assume it's about as much work as coding it yourself
23:13:39dom96We need all sorts of tax forms, ideas, mentors, plans for what happens when mentors are unavailable and blah blah
23:13:43Araqreactormonk: kudos
23:13:43reactormonkdom96, except you get a reduction on the bus-problem and some publicity
23:13:57reactormonkAraq, does the fix hold?
23:14:07Araqdunno lol
23:14:21reactormonkwhat does d.k == locNone check for?
23:14:22dom96Next summer I will force Araq to do it. Since I will be at uni then :P
23:15:11reactormonkAraq, if that frees you up some time for the GSoC, I can come back with my half bitcoin.
23:15:26Araqwow
23:15:35Araqhow much is that in euro now?
23:15:38*musicalchair quit (Ping timeout: 265 seconds)
23:16:01reactormonkit's about again as much as you get for the GSoC
23:16:12EXetoCdom96: surely you'll be writing Nimrod code for monies by then. have some faith
23:16:24reactormonkhmm, it kinda dropped to 660 per BTC :-/
23:16:28reactormonkso not as much.
23:16:31reactormonk660$.
23:16:38dom96EXetoC: Perhaps.
23:16:44EXetoCreactormonk: can I have one of those
23:16:57NimBotAraq/Nimrod devel 829a76d Araq [+0 ±1 -0]: nofoward doesn't exist yet; fixes #890
23:17:03dom96reactormonk: Weren't you going to give Araq 1BTC at one point?
23:17:09dom96What was that for again?
23:17:55reactormonkno idea
23:18:49*Discoloda quit (Ping timeout: 245 seconds)
23:19:09Araqgah ... must stop fixing bugs ...
23:19:15*Araq is a machine
23:19:18reactormonkAraq, if you think the PR holds, pull it.
23:21:47NimBotAraq/Nimrod devel 17ea0d1 Simon Hafner [+1 ±0 -1]: moved the tests for TSet to the correct place
23:21:47NimBotAraq/Nimrod devel fe21f02 Simon Hafner [+0 ±1 -0]: fixes #887
23:21:47NimBotAraq/Nimrod devel e6cdccc Andreas Rumpf [+1 ±1 -1]: Merge pull request #896 from reactormonk/set_fix... 2 more lines
23:22:50NimBotAraq/Nimrod devel a9d3551 Simon Hafner [+0 ±2 -0]: removed explicit return in the documentation
23:22:50NimBotAraq/Nimrod devel 21b0eba Simon Hafner [+0 ±3 -0]: tracked down a few more returns
23:22:50NimBotAraq/Nimrod devel a5d8714 Andreas Rumpf [+0 ±3 -0]: Merge pull request #867 from reactormonk/no_explicit_return... 2 more lines
23:23:15Araqreactormonk: kudos
23:26:41*Discoloda joined #nimrod
23:28:06reactormonkAraq, that one was easier
23:28:56*brson joined #nimrod
23:28:57*musicalchair joined #nimrod
23:33:22reactormonkAraq, gotta say an occasional echo statement makes debugging easier ;-)
23:33:46*DAddYE quit (Remote host closed the connection)
23:34:01Araqreactormonk: we also have 'debug' in the compiler
23:34:12reactormonkAraq, which does what?
23:34:35Araqcan print a PSym, PNode or PType
23:36:17reactormonkwhy not define $ for those?
23:37:50Araqpredates $
23:38:05Demoswhere is the code/how does it print PNodes?
23:38:13Demos(does it print the whole tree)
23:38:21Araq(yes)
23:38:36AraqDemos: echo renderTree(n) is often more useful though
23:38:54Araqas that doesn't overwhelm you with irrelevant details
23:39:26Demospresumably putting this in a when not defined(booting) block is a good idea
23:40:24Araqwhy?
23:41:17Demoswell if I am debugging something in the compiler I would not want the compiler to output a metric shitton of stuff while compileing itself
23:41:58Araqbah, just use 'koch temp c mybug.nim' to debug the compiler
23:42:16Araqbootstrap when the bug is fixed later
23:42:17reactormonkAraq, koch temp? never heard of.
23:42:26reactormonkI just booted the compiler ^^
23:42:29Demosah, yeah. that command is not documented
23:42:38Araqwell it is new
23:42:58Araqzahary had a script for it like forever
23:43:17Araqand I was doing the slow route too until I switched back to win
23:43:33Araqhere the linking times are killing me, so I needed something faster
23:51:16Araqnote to myself: aks zahary what the fuck the semantics of typedesc and typedesc[T] really are ...
23:52:28NimBotAraq/Nimrod devel c4091e9 Araq [+0 ±1 -0]: fixes #889
23:52:28NimBotAraq/Nimrod devel bb74d6a Araq [+1 ±4 -1]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
23:52:42Araqfilwit: I hope I fixed the 'unused' bug for good
23:53:00filwiti'll pull the changes and test
23:56:20DemosOK temp is supah nice
23:56:28reactormonkDemos, can you document it?
23:56:58DemosI was just doing that and I saw the documentation, it is the last line in koch's help output and there are no []s around options
23:57:16reactormonkah cool
23:57:18reactormonkdidn't see that
23:57:31Demosheh same
23:58:16filwitAraq: okay, what you did with clearDest() is along the same lines as what I was thinking, though I didn't know about freeTemp()
23:58:57filwitAraq: it doesn't work though.. now it simply runs into the vm:425 runtime assert at deref
23:59:15Araqfilwit: that is some other bug though
23:59:19filwitAraq: though I fixed this before, i was thinking it had something to do with the code-gen
23:59:43Araqno this is an unrelated bug which I might fix tomorrow
23:59:56AraqI know how to fix it :P