<< 16-05-2014 >>

00:27:17VarriountAraq: Aiming to build a theorum prover for nimrod? :3
00:32:36*bjz joined #nimrod
00:37:45*q66 quit (Quit: Leaving)
00:38:41*bjz quit (Ping timeout: 240 seconds)
01:09:29flaviunimrepl.nim doesn't seem to work, is it worth salvaging? IMO no, because it isn't even a real REPL, just temporary workbook.
01:09:47flaviudom96: ^
01:14:44fowlyes its worth slavaging
01:15:00fowlits the first gtk app written in nimrod
01:15:04fowlill take a look at it
01:21:35*boydgreenfield joined #nimrod
01:30:04fowldunno why but im getting this error Error: unhandled exception: No such file or directory [EOS]
02:05:32*Varriount_ joined #nimrod
02:06:59*Varriount quit (Ping timeout: 258 seconds)
02:34:29*flaviu quit (Remote host closed the connection)
02:36:26*bjz joined #nimrod
02:41:09*bjz quit (Ping timeout: 252 seconds)
02:48:34*askatasuna joined #nimrod
02:53:36*brson joined #nimrod
03:06:54*brson quit (Ping timeout: 240 seconds)
03:08:52*brson joined #nimrod
03:19:22*def-_ joined #nimrod
03:19:41*fowl quit (Remote host closed the connection)
03:20:42*hoverbear joined #nimrod
03:22:29*def- quit (Ping timeout: 252 seconds)
03:23:55*fowl joined #nimrod
03:56:22*bjz joined #nimrod
03:58:27*hugg joined #nimrod
03:58:34*hugg left #nimrod ("part/y")
03:59:17*bjz quit (Read error: Connection reset by peer)
03:59:37*bjz joined #nimrod
04:02:54*icebattle quit (Ping timeout: 240 seconds)
04:03:01*icebattle joined #nimrod
04:06:38*askatasuna quit (Ping timeout: 245 seconds)
04:17:14*xenagi quit (Quit: Leaving)
04:20:29*Jesin joined #nimrod
04:45:40*boydgreenfield quit (Quit: boydgreenfield)
05:01:42*brson quit (Quit: leaving)
05:04:35*nande quit (Remote host closed the connection)
05:58:43*dymk quit (Ping timeout: 240 seconds)
05:59:00*Varriount_ is now known as Varriount
06:02:41*dymk joined #nimrod
06:25:10*hoverbear quit ()
07:34:14*BitPuffin quit (Ping timeout: 240 seconds)
07:38:47*Jesin quit (Ping timeout: 276 seconds)
07:39:51*lyro joined #nimrod
07:51:41VarriountHm... "powerful hips for a devastating pelvic thrust attack"
07:53:14*Jesin joined #nimrod
07:53:38VarriountHi lyro, dymk, Jesin
07:54:26Varriountlyro, dymk: You guys have any questions about Nimrod? Right now most of the other devs are asleep/just waking up
07:54:43dymkNah not right now
07:54:55dymkIn fact I've gotta get to sleep soon :P early morning classes
07:55:12lyronope, thx ;)
08:28:13AraqVarriount: I already have, but a shitty one :-) compiler/guards.nim
09:03:22*kunev joined #nimrod
09:08:20*BitPuffin joined #nimrod
09:28:32*kunev quit (Remote host closed the connection)
09:32:15*kunev joined #nimrod
09:38:43*BitPuffin quit (Ping timeout: 245 seconds)
09:56:17*wan quit (Quit: WeeChat 1.0-dev)
10:00:47*lyro quit (Ping timeout: 258 seconds)
10:19:03*BitPuffin joined #nimrod
11:28:50*askatasuna joined #nimrod
11:39:08*askatasuna quit (Ping timeout: 252 seconds)
11:54:09*lyro joined #nimrod
12:34:08*lyro quit (Ping timeout: 252 seconds)
12:35:07*def-_ quit (Quit: leaving)
12:55:03*darkf quit (Quit: Leaving)
12:59:48*askatasuna joined #nimrod
13:45:54*OrionPK quit (*.net *.split)
13:45:57*Raynes quit (*.net *.split)
13:45:57*reloc0 quit (*.net *.split)
13:45:58*phI||Ip quit (*.net *.split)
13:45:58*Trixar_za quit (*.net *.split)
13:45:59*comex quit (*.net *.split)
13:45:59*oddmunds quit (*.net *.split)
13:46:11*reloc0 joined #nimrod
13:46:13*comex joined #nimrod
13:46:17*Raynes joined #nimrod
13:46:23*phI||Ip joined #nimrod
13:46:28*Trixar_za joined #nimrod
13:46:40*oddmunds joined #nimrod
14:10:00*BitPuffin quit (Quit: WeeChat 0.4.3)
14:12:30*DAddYE joined #nimrod
14:12:32*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
14:17:52*BitPuffin joined #nimrod
14:42:04*DAddYE quit (Remote host closed the connection)
14:42:32*DAddYE joined #nimrod
14:47:02*DAddYE quit (Ping timeout: 255 seconds)
15:07:18*springbok joined #nimrod
15:16:37*Demos_ joined #nimrod
15:17:29*BitPuffin quit (Ping timeout: 252 seconds)
15:35:17Skrylarwelp
15:35:23Skrylari made another internal error getTypeDescAux
15:35:31Skrylartime to update
15:43:11*DAddYE joined #nimrod
15:46:10*kunev quit (Ping timeout: 258 seconds)
15:47:14*DAddYE quit (Ping timeout: 240 seconds)
15:47:58*kunev joined #nimrod
15:50:25*kunev quit (Client Quit)
16:01:46*hoverbear joined #nimrod
16:04:17*untitaker quit (Ping timeout: 240 seconds)
16:10:46*untitaker joined #nimrod
16:13:44skrollis there a way to define a variable that can be used only at compile time outside of a macro?
16:15:24*Jesin quit (Quit: Leaving)
16:24:36Araqskroll: var foo {.compileTime.}: T ?
16:24:47skrolloh, does that work?
16:24:54skrolli thought i tried that
16:25:11Araqwell you can perhaps also use it at runtime
16:25:21Araqnot sure if we check against that properly
16:25:36skrollno that worked
16:25:40skrolli could have sworn i tried that
16:29:55skrollsort of
16:40:49skrollyou can't actually use it in a macro, unless i'm mistaken
16:42:50*OrionPK joined #nimrod
16:50:58Demos_WOOOHHOOO I found the issue with the new OpenGL wrapper
16:51:39Demos_ugh and github continues to destroy my web browser
16:54:42EXetoCyeah?
16:59:21Demos_it was a language bug
16:59:33Demos_#1203
17:11:03Demos_wierd bug, it was pretty easy to track down though
17:14:32EXetoCit's directly related?
17:30:58Demos_well look that the issue. It surfaced because you changed the type that glVertexAttribPointer accepts from ptr void to pointer
17:31:05Demos_I think the change was correct
17:36:43EXetoCI never noticed that. I don't know if "ptr void" is supposed to work
17:37:10Demos_yeah I have no idea, it only fails in certain situations
17:37:13EXetoCwell, I guess it did work then
17:37:20Demos_like cast[ptr void](sizeof(int)) works
17:37:37Demos_but cast[ptr void](sizeof(some-object)) does NOT
17:37:46Demos_wierd shit
17:39:22Demos_EXetoC: does the new OpenGL error handleing use glDebugMessageCallback?
17:40:44Demos_actually it could not since that is GL 4.3 core
17:40:58Demos_but it can use glDebugMessageCallbackARB and check for the extension
17:41:22*hoverbear quit ()
17:41:47*hoverbear joined #nimrod
17:41:57fowlwhat? ptr[void]? is this c?
17:44:54Demos_pretty much yeah
17:45:08Demos_but for some reason ptr void is a valid type in nimrod
17:45:23Demos_it should be the same as pointer, but it is not quite
17:45:52fowlwell ptr * should be compatible with pointer
17:45:53Demos_speaking of which who thinks c2nim should check each keyworkd and replace it wtih `keyword` if it happens to be reserved?
17:46:09fowlDemos_, yes, it would be nice if it did that
17:46:19Demos_fowl: really? I thought we did not do that autocasting stuff, the more you know
17:47:57fowlDemos_, there is still a notion of compatibility, subtypes, etc
17:48:12Demos_yeah I guess so
17:49:56EXetoCDemos_: the documentation isn't very clear but I assume it covers the same errors in addition to the other stuff
17:50:02EXetoCI might look into it some time
17:50:25EXetoC"Using glGetError is both cumbersome and time consuming" is not :p
17:54:26Demos_EXetoC: your macros are nice, but glGetError can flush buffers are really screw up performence and timing
17:55:03Demos_but on HW that does not have gl 4.3 or the debug extension it is all you have
17:58:15EXetoCnot that it matters very often when debugging
18:17:10Demos_std::sort(begin(s), end(s), [](int a, int b) { return b < a; }); vs sort(s) do (a,b) -> auto: a < b, nimrod is so nice
18:28:14*shodan45 joined #nimrod
18:28:44fowlyou mean sort(s, (a,b) => a < b) :D
18:34:02Demos_I like mine better actually
18:34:16Demos_oh does the => syntax infer the return type?
18:34:46fowlyea
18:35:03fowlthats doms lambda macro ('future' module)
18:35:36fowlDemos_, it cant infer void though, you can explicitely say the return type with (a,b) -> void => echo(a, ": ", b)
18:36:03Demos_still quite nice
18:36:31fowltheres also a -> macro for proc types
18:37:00fowl(int) -> string for proc(a:int): string
18:55:11Demos_well I like the do notation for this use case
18:55:16Demos_but that is good to know
18:57:12*nequitans joined #nimrod
19:07:56*hoverbear quit ()
19:10:22EXetoCit's not nice when you have to specify a multi-element tuple type, but that's a temporary limitation
19:14:48*Matthias247 joined #nimrod
19:21:47*xtagon joined #nimrod
19:42:11*lyro joined #nimrod
19:42:25fowlEXetoC, ((int,string))->void doesnt work?
19:43:33dom96it won't
19:43:46dom96(tuple[x: int, y: string]) -> void
19:51:07fowldom96, shouldnt be hard to add, want me to do it?
19:51:23dom96sure
19:55:23EXetoCyou shouldn't need a type annotation, but that's a slight improvement.
19:55:52fowlhow are you going to not need the type when you're defining a type
19:55:56EXetoCbut (int, string) is tuple[typedesc[int], typedesc[string]]. can it be disambiguated?
19:56:23fowlEXetoC, see the `->` macro in future.nim
19:59:04EXetoCI was referring to anonymous procs. I've been using => for that
20:04:21fowlEXetoC, what are you tlaking about? you want to do (tup: (int,string)) => ... ?
20:13:17EXetoCthat'd be a type annotation still, just that it's a little shorter. the types can sometimes be inferred, but not always
20:18:05*q66 joined #nimrod
20:18:05*q66 quit (Changing host)
20:18:05*q66 joined #nimrod
20:19:12fowlEXetoC, i'm trying to figure out what you meant by <EXetoC> it's not nice when you have to specify a multi-element tuple type, but that's a temporary limitation
20:19:16fowlbut perhaps i care too much
20:23:24renesachttp://en.wikipedia.org/wiki/Kahan_summation_algorithm <-- should nimrod use this algorithm for sum/median by default?
20:28:53*gXen joined #nimrod
20:29:31*lyro quit (Remote host closed the connection)
20:33:02*gXen left #nimrod (#nimrod)
20:36:48*gXen joined #nimrod
20:40:17EXetoCfowl: there's nothing special about tuples, just that they often are long, but aliases help
20:41:03EXetoCbut that'd be a compact way of specifying a tuple with unnamed fields
20:41:41EXetoCI was not being very clear indeed
20:47:08fowlwell from inside a macro we can even interpret (x: int, y: foo) as tuple[x:int,y:foo]
20:52:04*Varriount|Mobile joined #nimrod
20:52:49*nande joined #nimrod
20:57:48*flaviu joined #nimrod
20:58:13Araqhi flaviu
20:58:22flaviuHi
20:58:47Araqgetting rid of the LLVM stuff is fine I guess but I'm not sure we will end up using the C api
20:59:19flaviuOk, but I don't like the idea of mixing in the llvmgen with the cgen
20:59:46Araqyeah, learn the nimrod way
21:00:15Araqthe best way to reuse code is to reuse it
21:00:39Araqthe logic we want to reuse here is not trivial
21:01:09Varriount|MobileRelates
21:01:18Araqand 1 single huge interface to reuse it doesn't really work either
21:01:45Varriount|MobileGah. Templates are an easy way to reuse code
21:01:51flaviuCan't it be pulled out into its own pass, such that [cpreprocessing] <- [llvmgen, cgen]
21:02:10Araqthat works but it's lots of work
21:02:53Araqnew features do just that, it's now done with AST->AST transformations
21:05:02Araqmixing had the benefit that it's rather simple to keep both 2 backends in sync feature-wise
21:08:09AraqVarriount|Mobile: templates might work too, not sure though
21:08:54Araqwell surely they "work" but I don't know if it improves things
21:09:34*hoverbear joined #nimrod
21:13:59*hoverbear quit (Ping timeout: 252 seconds)
21:15:17flaviuCan someone merge https://github.com/Araq/Nimrod/pull/1125 ? reactormonk wants whitespace changes removed, but it looks like iamrekcah hasn't noticed that.
21:15:53Araqnot really, my connection is too bad
21:16:02Araqcan do it on sunday
21:16:18Araqwhat does it do?
21:16:19*hoverbear joined #nimrod
21:16:42flaviuIt prefixes `_` to every C identifier
21:17:10fowldoes it break exportc?
21:17:39flaviuI don't think so, it changes `mangle()`, which probably isn't run with exportc
21:17:59fowlseems like a silly way to support using `1/2` as an identifier
21:18:15fowlmaybe it should just prepend _ when the first letter is a number
21:18:46Araqoh god no
21:18:48Araqdon't merge it
21:19:28flaviuAraq: Do you like dom's suggestion of prefixing `ID` when its a number better?
21:20:00AraqI like my suggestion better that `1/2` shouldn't be a valid identifier
21:20:59Araqbut yes, dom96's suggestion is better too
21:21:10Araqeverything is better than blindly prefixing things with _
21:21:35Araqthat immediately makes debugging with GDB annoying
21:22:08Araqwe spend some effort to ensure many identifiers are not manged at all for debugging convenience
21:23:01flaviuAraq: I didn't think of debuggers, so just a pull request adding `ID` to identifiers with leading digits?
21:23:13Araqok
21:24:36Demos_is there a standard way to get debugger's to recognise this sort of thing?
21:25:12Araqyou can patch the dwarf debug info, Demos_
21:25:26Demos_that sounds like fun :|
21:25:52Araqiirc it looked quite hard
21:26:02Araqthe information is cleverly encoded to safe space
21:26:14Demos_and besides, it would only support GDB, not stuff that uses PDB debug info
21:26:56*BitPuffin joined #nimrod
21:28:36dom96Being able to use `1/2` as an identifier is cool though :P
21:29:56Araqnot as cool as using 'c', 'a', 'b', 's' everywhere
21:30:03flaviudom96: Back in jvm-land, where optimization is unpredictable, I used it for hoisting loop variables
21:31:14dom96What's interesting is that `aa bb` is the same ident as `aabb`, i.e. whitespace is ignored heh.
21:31:50Araqthat's a feature
21:32:10fowldom96, so you can craft idents from inside a template: type `T arg` = object
21:32:28dom96fowl: ahh of course.
21:33:35*DAddYE joined #nimrod
21:33:40dom96I wonder: can we invoke a compile-time proc inside the ` `?
21:34:02fowlnever tried it
21:34:26dom96if we can't, then it would be nice if we could
21:35:39fowlAraq, did you notice gobo 015 is released? :)
21:36:23Araqit's been released for some time, I think
21:36:46fowlyes about a week
21:36:51Araqbut nowadays I refuse to use software that uses fucking archaic octals for its versioning
21:37:23fowllol
21:39:03Araqlast time I checked gobo wouldn't even boot
21:39:26Araqthinking about it, it's the way to go, saves you lots of trouble in the long run
21:45:04fowlif the last time you checked wasnt 015, how is that relevant
21:45:25EXetoCdom96: when where what
21:53:10*gXen quit ()
21:59:52dom96EXetoC: hrm?
22:08:11milosnhow do you get current file name in nimrod?
22:08:24milosneving btw
22:08:28milosn*evening
22:08:29milosn:)
22:09:04Araqos.getAppFilename
22:10:55milosnAraq: thanks, found it in os docs :)
22:11:18milosnhmmm it gives executable name, which would be the entry file of the app
22:11:26milosnnot sure its useful for what i need it
22:11:37flaviuAraq: You're right, unmagicing base operators is definitely overkill. However, I do think that any abstraction higher than seq shouldn't be magic.
22:18:33Araqflaviu: the real problem is that most developers are overly concerned with aesthetics
22:20:12Araqaesthetics don't help with implementing features
22:20:26Araqthey don't help with producing optimized code
22:20:43Araqthey don't help with bug fixing and hardly with bug prevention
22:21:40fowlwhat do you recommend turning paramStr(0) from its full path (/tmp/blah) to blah ?
22:21:57*Jesin joined #nimrod
22:24:36Araqso while I agree with "any abstraction higher than seq shouldn't be magic", that must not be a dogma
22:24:37flaviuAraq: This isn't really about aesthetics. I just don't like how the implementation of non-primitives is still not out in the open where it can be easily seen and modified. Particularly strings, even java puts those in the stdlib instead of the language.
22:25:21Araqof course it is about aesthetics
22:25:40Araqyou can look at the generated C code to see how it's implemented
22:25:47Araqugly, but workable
22:25:52Araqso yes, it is about aesthetics
22:27:49Araqand how can you give "foo" the type string without magic anyway
22:28:00Araqstrings are magic in Java too
22:28:05fowlis there a module to parse cli options like most unix apps (-xy --foo opt instead of --foo:opt)
22:28:22flaviuAraq: The syntax for string is magic, but the class itself isn't
22:28:40Araqfowl: not sure, I guess parseopt2 doesn't do that either
22:29:18Araq'+' works for stings ...
22:30:03fowlAraq, nimrod style cli opts arent compatible
22:30:35Araq'switch' now works for strings in Java iirc, flaviu
22:30:54flaviuI know about `+`. Purely syntactic sugar, the JVM has no idea about it. It gets converted into `str.append()`
22:31:56Araqwell you can be sure the JVM knows about str.append and optimizes it
22:32:09Araqalso "foo" + "bar" is subject to constant folding
22:32:46Araqand what about .intern'ed strings?
22:33:20Araq"foo" == "foo" is allowed to return true
22:33:51Araqetc etc. it makes no sense to say "The syntax for string is magic, but the class itself isn't"
22:34:26Araqit is full of magic!
22:35:22*dymk quit (*.net *.split)
22:35:26*dLog quit (*.net *.split)
22:35:27*njoejoe quit (*.net *.split)
22:35:27*Amrykid quit (*.net *.split)
22:35:27*mal`` quit (*.net *.split)
22:35:43*shodan45 quit (*.net *.split)
22:35:45*oxful__ quit (*.net *.split)
22:35:48*betawaffle quit (*.net *.split)
22:35:49*jez0990 quit (*.net *.split)
22:36:01*dymk joined #nimrod
22:36:01*dLog joined #nimrod
22:36:01*njoejoe joined #nimrod
22:36:01*Amrykid joined #nimrod
22:36:01*mal`` joined #nimrod
22:36:10*shodan45 joined #nimrod
22:36:10*oxful__ joined #nimrod
22:36:10*jez0990 joined #nimrod
22:36:10*betawaffle joined #nimrod
22:37:25EXetoCdom96: is anything between `` actually evaluated? what would it do?
22:38:18dom96yeah. See fowl's example
22:39:23*shodan45 quit (Remote host closed the connection)
22:39:42*shodan45 joined #nimrod
22:39:54flaviuAraq: It seems that `intern()` and the bytecode constant tables are magic. I'm 99% sure that the JVM doesn't optimize strings specially though.
22:40:12flaviuits just an `char[]`
22:42:34Araqit's a wrapper around 'char[]' but that doesn't mean that it's not optimized in other ways
22:42:50Araqand the JVM is only the reference implementation anyway
22:45:47flaviuI'll come back to it when I have a patch
22:48:27Araqa patch to make string = seq[char]?
22:48:57Araqand how do you then make 'len' work with the hidden trailing \0 that is *very* important with C interop?
22:49:04flaviuNo, to make string a typeclass.
22:49:41Demos_flaviu: are you doing a JVM backend?
22:49:52*tinAndi joined #nimrod
22:50:17flaviuDemos_: No, I've had enough trouble with the JVM for a while
22:50:39Araqyeah, lets make every proc implicitly generic in the stdlib because some fool might decide it's more "efficient" to use ropes everywhere
22:51:34Araqof course he will overlook something and then you have 2 or more versions of everything, thrashing instruction caches, but hey it's "more efficient"
22:51:41*BitPuffin quit (Ping timeout: 255 seconds)
22:52:45AraqI'd rather make you work on real pressing things, flaviu
22:53:36Araqwe have way too few resources to care about aesthetics
22:58:57*nequitans quit (Ping timeout: 258 seconds)
23:11:01*darkf joined #nimrod
23:11:20dom96I think that libraries are becoming increasingly important.
23:11:28dom96We definitely need a lot more of them.
23:12:12dom96And they are a lot easier to work on than compiler bugs.
23:13:23Araqdom96: compiler bugs are more important
23:14:21dom96Yes, but a good package ecosystem is becoming increasingly more important.
23:16:23flaviudom96: There is a package for everything, but barely any packages are at an ideal level pf polish
23:16:46dom96flaviu: There certainly isn't a package for everything.
23:17:22Araqno it does not become "increasingly more important" because that's simply impossible
23:17:34*askatasuna quit (Ping timeout: 240 seconds)
23:17:34Araqit already is as important as it ever can be
23:20:18flaviuShould testament pick up my test as soon as its added, or do I need to do something else?
23:20:55dom96yeah, alright. My point is that if someone doesn't feel like hacking on the compiler that they should be working on libraries.
23:22:01Araqflaviu: it picks them up if the test starts with a 't'
23:22:29Araqthere are tests with need special treatment
23:22:48flaviuOk, thanks
23:23:18*Varriount|Mobile quit (Ping timeout: 265 seconds)
23:24:09*hoverbear quit ()
23:30:48*tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0.1/20140506152807])
23:34:04flaviuhuh, my test only compiles with nimrod_temp, even though I told koch to reinstall nimrod
23:43:13flaviuOk, https://github.com/Araq/Nimrod/pull/1204
23:45:47Araqflaviu: I'd like to tell you what to do. interested?
23:45:52flaviuSure
23:46:19Araqthere is an embarrassing bug that keeps foo.bar from working properly in generics
23:47:20Araqthe fix is to change the handling of 'nkDotExpr' in semgnrc.nim
23:47:38Araqno idea how that could escape us for so long
23:47:45flaviuIs there a testcase?
23:48:10Araqthere is at least 1 bug report about it
23:50:05Araqoh and as a special gift you're allowed to rename semgnrc.nim to something with more vowels :D
23:50:57flaviuhaha :P
23:51:32*nequitans joined #nimrod
23:53:00EXetoCadd an e
23:53:48Araqit's bug #1011
23:53:59*DAddYE quit (Remote host closed the connection)
23:54:25*DAddYE joined #nimrod
23:55:35flaviuOk, thanks
23:55:57Araqwell that one is rather hard to fix
23:56:11Araqand I have no idea what it will break ;-)
23:56:36Araqmuch easier is bug #665
23:57:09Araqthat simply requires a call to lowerings.lowerTupleUnpacking in the C codegen
23:58:38*DAddYE quit (Ping timeout: 240 seconds)