<< 20-01-2014 >>

00:00:26Araqproc foo(x: cstring) {.importc: "FooA".} # generated by macro
00:00:26Araqproc foo(x: WideCstring) {.importc: "FooW".} # generated by macro
00:00:53Araqproc `$?`(x: string): WideCString | cstring # you get the idea
00:01:07Araqfoo($?"hi") # depends on setting
00:01:22Araqfoo(newWideCString"hi") # call W version
00:01:35Araqfoo(cstring"hi") # call A version
00:01:45*dmac joined #nimrod
00:02:15Araqit's the best solution I can come up with and eventually you will agree :P
00:03:13VarriountAraq: Yeah, I see. I just thought that it might be better to just provide a version of the proc that calls '$?' for you. :/
00:05:24VarriountAlso, I already have the entire macro made.
00:05:45Araqfine then have 3
00:12:58VarriountSorry if I made you angry. I'll use your solution since, looking at it, it allows one to intermingle string types in a single procedure.
00:16:00Araqno, you didn't make me angry
00:16:15Araqit's fine to keep what already works
00:16:36*foxcub quit (Quit: foxcub)
00:33:22VarriountAnyone know if the tester runs the standard library modules? I know that at least some of them have unit tests for their exported api's
00:36:00Araqthe tester should now do that, have a look
00:36:08Araqthe old tester doesn't
00:37:09VarriountOh goodie! *hugs testament.nim*
00:43:51*odc quit (Ping timeout: 252 seconds)
01:17:28*foxcub joined #nimrod
01:18:01foxcubSuppose I have proc f[T](x: T)
01:18:08foxcubThen I define proc f(x: int)
01:18:24foxcubAnd now I'd like to call f[T] from f. Is there a way to do that?
01:19:01*jcrubino quit (Ping timeout: 248 seconds)
01:24:08Varriountfoxcub: Explicit generic instantiation?
01:24:21foxcubYes.
01:25:47Varriountfoxcub: That was my guess. Use explicit generic type parameters. "f[T](varOfTypeT)"
01:26:05foxcubvarOfType is still int.
01:26:09foxcubThat's the sort of the catch.
01:26:19foxcubI want to do some preprocessing on x, but then I want to call the generic function.
01:26:36Varriountfoxcub: That's why you put the [T]
01:26:42foxcubOr more accurately I want to overload it, but then still call it for the heavy lifting.
01:26:47foxcubThat doesn't seem to work.
01:27:05foxcubOh, my bad.
01:27:09foxcubIt actually does.
01:27:10foxcubMagic.
01:27:20foxcubExcept.
01:27:27foxcubHm, let me check something.
01:27:39LordAndrewShould I specify the type for a variable I don't immediately set?
01:28:05VarriountLordAndrew: I believe you *have* to specify a type.
01:28:23VarriountThat is, you have to if you plan to set it to something later.
01:32:40foxcubVarriount: well, I'm getting a segfault during compilation on the more complicated version of my question.
01:32:47foxcubI guess it's time to try to boil it down.
01:49:44Varriountfoxcub: Have you looked at methods?
01:50:04foxcubI saw them, but dismissed them as some analog of virtual functions.
01:50:11foxcubAre they something else?
01:51:00VarriountYes, they are virtual functions, but they provide a mechanism for run-time overriding of procedure overloading, iirc. Maybe they can be of some use?
01:52:16foxcubIn my case, all these decisions ought to be made at compile time.
01:52:24foxcubThe problem is not with having different types.
01:52:47foxcubThe problem with calling something more general from something more specific. (As in both generic procedures match, but one is a better match.)
01:52:56foxcubI think there is a bug in compiler with a symbol lookup.
01:53:14foxcubI get segfault during compilation where there shouldn't be one. I just need to find a decent workaround.
01:53:26VarriountMaybe you can change the symbols to have different identifiers, and unify them with a template somehow?
01:53:51VarriountOr use them as qualified identifiers?
01:54:30foxcubThe trouble, roughly, seems to be that if a name is defined in module B (that imports module A and overloads the name from there), you can't look it up in A without a segfault.
01:54:32foxcubSomething like that.
01:55:17Varriountfoxcub: Not even by using an explicit name, eg, moduleA.foo?
01:55:24foxcubNope
01:55:28foxcubThat gives a segfault.
01:55:36foxcubIt might be subtler than that.
01:55:41foxcubI'm not quite done "boiling."
01:55:41Varriountfoxcub: There is one other way I can think of.
01:55:49foxcubShoot.
01:55:55VarriountUse an include statemet
01:55:59Varriount*statement
01:56:18VarriountIt's the equivalent of a C include directive
01:57:02foxcubWell, the module I'm trying to use is tables, provided with nimrod. Something tells me I shouldn't be just including it.
01:58:57Varriountfoxcub: What OS are you running?
01:59:18foxcubMac. My example with modules A and B is too simple. It works there.
01:59:26foxcubI need to figure out how exactly it breaks.
02:00:08Varriountfoxcub: If you want, you could recompile the compiler with debug information. Then, when is segfaults, you should be able to get some internal information back
02:00:26VarriountIt might not be very useful to you, but I'm interested in seeing what's breaking.
02:00:57Varriount'koch boot --debuginfo --linedir:on'
02:02:24Varriountfoxcub: You could also try using procedures with typedef parameters, instead of generic parameters.
02:02:35foxcubExplain the last bit.
02:02:44foxcubI might try adding debugging information to the compiler, but not tonight.
02:03:08VarriountGeneric Proc -> proc foo[T](x: T): T = ...
02:03:38VarriountProc with typedef params -> proc foo(T: typedef, x:T): T = ...
02:04:08*xenagi joined #nimrod
02:04:45VarriountThe downside to using typedef params is that you can't explicitly instanciate the procedure at one point in the code, and use at another point (like for closures)
02:04:48VarriountHi xenagi
02:05:34foxcubI see.
02:05:55foxcubYeah, this seems more complicated than what I need.
02:06:07foxcubBut thanks for the pointers.
02:06:18xenagihi
02:08:11Varriountfoxcub: I should thank you, you're giving the nimrod compiler's generic handling code a real stress test.
02:08:24foxcub;-)
02:20:30foxcubVarriount: Here's the simplest example that segfaults the compiler for me: https://gist.github.com/mrzv/8513889
02:23:24Varriountfoxcub: In case you're interested, here's the compiler stack trace -> https://gist.github.com/Varriount/8513914
02:24:39foxcubYeah, I'm guessing one of the developers will enjoy it more than me. :-)
02:25:24Varriountfoxcub: Essentially, if you look at the bottom, you can tell that it's the procedure overload calculation code that's acting up.
02:26:14foxcubVarriount: I guess that concurs with the logic.
02:29:51VarriountThe hardest part about trying to fix a bug in the compiler is that it's really hard to get a good picture of what's going on. :/
02:32:43foxcubWell, with a small example, it should be doable.
02:33:19Varriountfoxcub: By the way, did you know that, in addition to an integrated debugger and profiler (which don't work on the compiler code), nimrod also supports gdb?
02:33:51VarriountI mention this because it's one of the only sane ways to debug the compiler.
02:33:57foxcubI did not, but given that it generates C code, that's to be expected, no?
02:34:28foxcubYeah, I haven't got to serious debugging yet. (And I hope I don't have to.)
02:34:41Varriountfoxcub: I rarely do (the compiler is an exception)
02:34:46foxcubHm, perhaps, I file a bug with the above gist.
02:34:54Varriountfoxcub: Can't hurt
02:35:18Varriountfoxcub: Unfortunately, I don't know how quickly it will be fixed. Again, the dev team is quite small.
02:35:41foxcubFor now, I just need a good workaround. But it will be good to have it on the stack anyway.
02:35:55VarriountI'll see if it's something within my abilities to fix. Hopefully it is.
02:36:22VarriountWorking with the compiler internals is akin to stepping into a room full of spinning gears and machinery.
02:38:08foxcubVarriount: thanks, and good luck.
02:38:18foxcubTime for me to go. Have a good night.
02:38:23VarriountYou too.
02:38:32foxcubOh, BTW, I've filed the bug.
02:38:46foxcubhttps://github.com/Araq/Nimrod/issues/827
02:38:59foxcubFor reference, in case you fix it.
02:39:01foxcubGood night.
02:40:02*foxcub quit (Quit: foxcub)
02:50:38*dmac quit (Ping timeout: 252 seconds)
03:01:11wat_hey guys I looked at the ide for nimrod, but it looked like I would have had to figure out how to compile it instead of an installer being available, is that the case?
03:01:54Varriountwat_: No, there's a pre-packaged (at least, for windows) I don't know about linux
03:02:11wat_oh nice, I will look again
03:02:47Varriountwat_: There's also support for some other editors, such as sublime text and emacs.
03:02:51Varriount*vim
03:03:40wat_yeah I tried to get gvim highlighting working but it's been a few years
03:05:55wat_the git site makes it look like I need to install a bunch of modules like gtk separately. Is there a straight installer that will work without dependencies?
03:07:01Varriountwat_: One moment, lemme find it. It's on the forums somewhere.
03:07:16wat_thanks!
03:07:26xtagonwat_, I just installed the vim support files. Only thing I had to do was make sure vim was compiled with --enable-pythoninterp
03:08:35wat_I installed from an installer, so I don't know how it was compiled. I just copied the .vim file into the syntax directory, although that didn't work
03:08:46wat_I didn't put a lot into it
03:10:19Varriountwat_: http://forum.nimrod-lang.org/t/131/2
03:10:48VarriountLook for Araq's post with the download links
03:10:56VarriountHopefully they're still active
03:11:37xtagonwat_, the best way to do it is with pathogen. Instructions are here https://github.com/zah/nimrod.vim
03:12:03xtagonwat_, the reason dropping it into the syntax folder didn't work is because it uses more than just syntax files
03:12:16*EXetoC quit (Quit: WeeChat 0.4.2)
03:12:25VarriountGah. I hate the fact that I can't understand what the compiler does, except in vque terms.
03:12:37VarriountMakes me feel useless. :(
03:12:40wat_cool thanks for your help
03:12:58Varriount*compiler code does
03:17:59Varriountxtagon: How's your working coming along?
03:18:34xtagonVarriount, been doing other things. I'm just tinkering with nimrod in spare moments
03:18:45VarriountI understand.
03:19:34xtagonQuestion: if I import a module and only use one or two procs (or types, or whatever) will the compiled executable ignore everything else in the module that I don't need?
03:19:50Varriountxtagon: Yep.
03:19:56xtagonAwesome
03:20:13VarriountNimrod has automatic dead code elimination (except for methods)
03:21:38xtagonThat's the terminology I was looking for
03:23:09xtagonOkay, so I wrote a type for holding version numbers in a tuple[major, minor, patch: int, special: string] -- I want to take it a step further and only allow natural numbers, and validate the string for allowed characters.
03:23:27xtagonI tried changing int to natural, but then I don't know how to instantiate it with int literals
03:23:38Varriountxtagon: Like you normally would
03:23:41VarriountI think
03:24:16xtagonIf I change int to natural, I get Error: type mismatch: got (tuple[int, int, int, string]) but expected 'SemVer'
03:24:32xtagonSemVer is the type name
03:24:44Varriountxtagon: May I see your code?
03:24:48xtagonYes, one sec
03:25:53xtagonVarriount, https://gist.github.com/xtagon/167f358d8c0abc20d07f
03:27:08xtagonIf you change natural to int, it will compile.
03:33:07Varriountxtagon: Odd.
03:38:39Varriountxtagon: I think it has something to do with the fact that 'natural' is a range type, while int isn't.
03:39:00VarriountAraq has complained about range types before.
03:39:40Varriountxtagon: It might also be that tuple conversion is strict.
03:40:00VarriountIf you wrap each number in natural(), then it works.
03:40:46xtagonWhat I want is for it to validate the numbers so they are not negative, and validate the string so it only contains certain characters. Maybe a tuple isn't what I want?
03:41:16*Xuehas joined #nimrod
03:43:01VarriountHello Xuehas
03:43:11XuehasHello what's happening
03:44:23VarriountNot much. I'm trying to find out why Araq and zahary1 can debug the compiler, and I can't, while also helping xtagon with intereseting stuff.
03:44:48XuehasThe compiler? What compilrr
03:45:10VarriountThe nimrod compiler.
03:46:32XuehasI thought there were more than one Nimrod compiler
03:46:43Xuehasyou mean the one which is officially supported?
03:47:06VarriountEh.. there's only one. It has multiple backends..?
03:47:57XuehasMkay
03:48:23Varriountxtagon: Could you file a bug report?
03:48:57VarriountThis may or may not be by design, I don't know
03:49:50*skappa joined #nimrod
03:50:13*Demos joined #nimrod
03:51:48VarriountHi Demos
03:51:53DemosHi!
03:52:09VarriountDemos: You got my memo?
03:52:12Demosyeah
03:52:22DemosI have not tried it yet, I was doing a game jam
03:52:42VarriountAccording to zahary1, it's only a workaround, since it pretty much clears the entire state of the compiler.
03:52:48DemosI actually managed to hit 4+min builds on a project we made in 48 hours
03:53:02VarriountWhat was it written in?
03:53:02DemosVarriount, so hardly better than spawning a new process each time
03:53:16VarriountDemos: But better nonetheless.
03:53:17DemosC++ with cinder(http://libcinder.org/)
03:53:32Demoscinder includes pretty much ALL of boost in each header
03:53:46Demosand we were compileing with VS 2012 which is not a very fast compiler
03:53:56Demoswe tried clang on a mac but there were bugs in cinder for mac
03:54:07xtagonVarriount, https://github.com/Araq/Nimrod/issues/828
03:54:22Varriountxtagon: Thanks. Sorry for the disapointment.
03:54:28xtagonVarriount, no problem :)
03:54:53xtagonDemos, compiling ALL of boost takes forever...
03:54:56Demosseriously, CoD is selling kill streaks
03:55:03Demosxtagon, well it was just includeing all the headers
03:55:09xtagonAh
03:55:12Demosthe binary distribution included the libraries
03:55:43VarriountI used boost(along with a ram disk) to benchmark file deletion implementions in nimrod.
03:55:52Demoshehe
03:56:02Demosboost is so useless... I mean honestly
03:56:21Demoslike filesystem and datetime are OK but depend on a huge amount of stuff
03:56:24VarriountActually, I could only use part of boost, since it was too big to fit entirely into memory.
03:56:40LordAndrewHrg. I am terrible at coming up with stuff to make. :| I want to learn more Nimrod but I dunno what to make.
03:56:49Demosbindings
03:56:52Demosall the bindings
03:57:03VarriountLordAndrew: Or improve a standard library module
03:57:25Demosxmltree could use a way to change the document type and encodeing
03:57:25LordAndrewI don't think I'm a skilled enough programmer to be making those sort of changes. :P
03:57:28VarriountFind gaps. Are there procedures which take chars, that should also be able to take strings?
03:57:54VarriountLordAndrew: Many parts of the stdlib are quite simple.
03:58:15xtagonLordAndrew, what would be cool is a Nimrod version of Rack (for Ruby) or WSGI (for Python)
03:58:36xtagonLordAndrew, basically a layer in between web applications and web servers so that you can use any server to serve any app
03:59:16xtagonI feel like Nimrod would be absolutely fantastic for web development, if it had more than some sinatra clones :)
03:59:27VarriountLordAndrew: Or you could do what I do, and look at python's stdlib, and find what nimrod lacks.
03:59:51VarriountFor example, itertools.
04:00:34Demosspeaking of iterators, nimrod needs a way to write an algorithem that is generic over any datastructure and in particular any subrange of any data structure
04:00:51Demoslike we can use first class iterators but if they don't get inlined you are screwed
04:01:10VarriountDemos: explain.
04:02:08Varriountxtagon: The thing limiting nimrod right now, in terms of server/web development, is the lack of a solid asyncio lib (the current asyncio.nim doesn't count)
04:02:47Demoslike if I have a sorting function I could have it take a parameter that is the container and call items, but then you need to sort the WHOLE container. And if you have an algorithm that needs to think about positions in the data structure you need to use indices, which are not ideal
04:03:22*xilo joined #nimrod
04:03:29VarriountHello xilo
04:03:30xtagonVarriount, I don't have much experience with async IO, or I would love to help with that
04:04:49Varriountxtagon: dom96 is currently working on something -> https://github.com/Araq/Nimrod/blob/newasync/lib/pure/selectors.nim
04:05:07Varriount"Currently" being a quite broad amount of time.
04:05:51wat_so a constructor has to initialize all variables of an object, and a new functions like newMyObject could initialize a reference, but is there a convention to do contructors for an object that will end up on the stack?
04:07:36Varriountwat_: https://github.com/Araq/Nimrod/blob/devel/doc/apis.txt
04:08:28wat_perfect thanks
04:08:45VarriountOn a side note, is today some sort of day for nicknames starting with 'x'?
04:09:30wat_the first two tutorials I found to be really good. To get people started quick, lots of short tutorials and an easy installing ide environment are pretty big deals
04:10:09Varriountwat_: Feel free to write more tutorials.
04:10:52wat_true true, if I get to the point where I know more than the very basics that might be a good idea to contribute
04:11:03LordAndrewHmm. I was fiddling with a dice rolling thing but the random function's weird. I'm used to random() accepting a low and high argument and returning something between those (or low or high).
04:11:26Demoswat_, usually people write something like proc initMyObject(): MyObject = ... or initMyObject(var o: MyOvbject) = ...
04:11:31LordAndrewbut i don't know how the heck you randomly generate numbers at all. or else I'd right my own.
04:11:40wat_has anyone taken a look at clay? nimrod seems similar in some ways
04:11:49VarriountLordAndrew: Funny you should mention that.
04:12:17wat_so init for object creation on stack, new for heap objects?
04:12:37Varriountwat_: We don't typically discern between the two.
04:12:52Varriountnew for references, init for objects
04:13:06VarriountLordAndrew: A small but useful addition to winlean.nim would be Window's random number generator.
04:13:19wat_random numbers and psuedo random numbers are not easy to make without patterns showing up and perform well, but boost's mersenne twister does a good job
04:13:21Demoswat_ or just a function that takes a var
04:13:23Demosfor both
04:13:45wat_so the difference becomes overloading returning a variable or returning a reference?
04:13:58DemosI think we should copy c++11's <random> stuff with some nimrod snytax niceness
04:14:04*skappa quit (Remote host closed the connection)
04:14:04*dankern quit (Remote host closed the connection)
04:14:14Demoswat_ you are not really overloading anything
04:15:27VarriountJust whether it returns a reference (ref) or an object
04:16:24VarriountLordAndrew: http://msdn.microsoft.com/en-us/library/aa379942(v=vs.85).aspx
04:16:50VarriountThe service provider can be retrieved by a simple api call
04:17:15*jdp_ joined #nimrod
04:18:00LordAndrewrandom() apparently calls C's rand() function internally?
04:18:07VarriountLordAndrew: Yes.
04:19:25VarriountThe branches on github also have a mersenne twister implementation, but I don't think either is cryptographically secure.
04:20:21VarriountHi jdp_
04:20:24Demosyeah, but the mt is much more random than rand()
04:20:37*jdp_ quit (Client Quit)
04:20:45VarriountBye jdp_
04:21:17VarriountDemos: But not random enough! http://xkcd.com/1210/
04:22:40Demostehehe
04:28:39wat_mersenne twister in my high dimensional monte carlo sampling tests were impressively random. C rand() had obvious patterns
04:30:40*dmac` joined #nimrod
04:33:09Demosmts are almost totally random afaik
04:33:21Demoswith the proper seed values ofc
04:33:44Varriountmts?
04:33:55Demosmersenne twisters
04:33:56Demossorry
04:44:50VarriountDemos: Do you know of any bugs regarding iterators and break statements?
04:45:23Demosno, do they exist?
04:45:56VarriountDemos: I'm implementing a new split() proc for string, which takes a string as a seperator
04:46:12VarriountThe proc is an iterator
04:46:14DemosI am sure I saw that around somewhere
04:46:16Demosoh
04:46:27Demosthere is totally a split proc that takes a string
04:46:32Demosstrutils or os I think
04:46:37Demosprobably strutils
04:46:40VarriountDemos: Nope. not in strutils
04:46:49VarriountAnd why would it be in os?
04:47:11Demosno idea
04:47:14Demosthere is a join function
04:47:17VarriountDemos: There's one in re.nim, but that depends on pcre.dll
04:47:19Demosthat takes a string seperator
04:47:45Varriountin my test, I have a limit variable that limits how many times the iterator can run. If I use it, I get a compiler error about break statements
04:48:38Demosno idea. the compiler transforms the iterator into a while statement, is the error still around if you do the transformation yourself?
04:49:38VarriountLemme check. Here's the two pieces of code: https://gist.github.com/Varriount/8514991
04:50:43DemosI am not going to actually run any code right now. I have been coding nonstop for the past 48h sans sleep
04:50:55Demoswell I got sleep, I was not coding while I was sleeping
04:51:00Demosthat I know of.
04:51:20VarriountI understand. I get "internal error: no loop to break"
04:51:30VarriountDemos: Sleep-Coding?
05:02:05*Xuehas quit (Ping timeout: 252 seconds)
05:02:43*LordAndrew quit (Quit: Page closed)
05:02:52*xilo quit (Read error: Connection reset by peer)
05:41:47Varriountzahary1: I think I just found an excellent use for typeclasses
05:57:22renesac"Error: type mismatch: got (seq[typedesc[int]]) but expected 'seq[int]'"
05:57:28renesacthe line pointed: "result = newseq[int](max)"
05:58:40renesacI don't know what I'm doing wrong here, but maybe I'm just too sleepy
05:59:29*renesac is now known as renesac|Away
06:01:41*xenagi quit (Quit: Leaving)
06:12:57xtagonCan you write Nimrod wrappers for C++ libraries, or only C?
06:18:42*brson joined #nimrod
06:22:55Demosboth, C is "cleaner"
06:23:23Demosc2nim can use emit to do a dirty wrapper than make nimrod functions that call into it
06:23:29*dmac` quit (Ping timeout: 252 seconds)
06:23:33Demosnot sure how well it works though
06:38:46*wat_ quit (Quit: Page closed)
06:49:04*xtagon quit (Quit: Leaving)
07:24:59*Demos quit (Read error: Connection reset by peer)
07:32:15*Demos joined #nimrod
07:34:34*isenmann joined #nimrod
07:39:19Demoswhat do I do if I want to put the quasi-quote operator in a """""" literal?
07:54:43Demoshttps://gist.github.com/barcharcraz/8516498 is segfaulting the compiler
07:56:52*brson quit (Quit: leaving)
08:06:25*odc joined #nimrod
08:06:53*Demos quit (Ping timeout: 252 seconds)
08:08:27*Araq_ joined #nimrod
09:33:04*CarpNet joined #nimrod
09:53:37*radsoc joined #nimrod
10:04:04*faassen joined #nimrod
10:07:37*faassen left #nimrod (#nimrod)
10:23:52*faassen joined #nimrod
10:48:26*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
12:00:59*ddl_smurf quit (Quit: ddl_smurf)
12:19:35*EXetoC joined #nimrod
13:07:27*[1]Endy joined #nimrod
13:23:52*Kooda joined #nimrod
13:32:51NimBotAraq/Nimrod devel 27b6967 Zahary Karadjov [+0 ±1 -0]: fix the segfault in #827
13:33:27*darkf quit (Quit: Leaving)
13:40:08*Trixar_za quit (Ping timeout: 245 seconds)
13:42:48*Trixar_za joined #nimrod
14:24:10*[2]Endy joined #nimrod
14:27:57*[1]Endy quit (Ping timeout: 272 seconds)
14:55:04*BitPuffin joined #nimrod
15:55:06OrionPKok, someone tell me why i'm dumb
15:55:06OrionPKhttps://gist.github.com/onionhammer/8522655
16:11:57OrionPKno takers?
16:12:21dom96Works for me?
16:18:31OrionPKreally
16:18:34OrionPKwhat OS?
16:18:39dom96Windows
16:18:41OrionPKwhats your output?
16:18:50dom96"12: hello world!"
16:19:59OrionPKI added a comment w/ the desired output
16:20:03OrionPKhttps://gist.github.com/onionhammer/8522655
16:22:22discolodai get your desired output
16:24:25OrionPKOS?
16:24:32KoodaSame here.
16:24:33dom96hrm, interesting.
16:24:40OrionPKI get a bunch of garbage :\
16:25:12OrionPKupdated w/ my output
16:25:17dom96OrionPK: Same, Aporia didn't print the garbage though so I didn't notice.
16:25:29OrionPKyeah
16:25:30Kooda:o
16:26:17discolodaLinux
16:26:20OrionPKwell, i'm sure araq will know what's up and i probably did something wrong :)
16:26:21dom96The problem is the calling convention
16:26:30dom96add 'cdecl' to putBack
16:26:35dom96and then it works
16:26:36OrionPKmmk
16:26:49OrionPKahh!
16:26:54OrionPKthat's perfect, thanks dom
16:26:59dom96np :)
16:27:02KoodaWhat is cdecl exactly?
16:27:12OrionPKexportc isn't good enough :P
16:27:22discolodaa function call convension
16:27:31dom96"The cdecl convention means that a procedure shall use the same convention as the C compiler."
16:28:17OrionPKgood grief
16:28:21*BitPuffin quit (Ping timeout: 248 seconds)
16:28:24OrionPKglad that's resolved ;D
16:29:05OrionPKI'm writing a high level http server wrapper w/ libuv
16:29:25dom96cool
16:30:08OrionPKit'll have to do until your asyncio stuff is done :P
16:32:39dom96If only Windows would cooperate...
16:33:43OrionPKlibuv has IOCP support for windows
16:47:58*BitPuffin joined #nimrod
16:50:44BitPuffinAraq: has any of the new concurrency stuff been implemented yet?
16:50:51BitPuffinI'm gonna code like crazy tonight and it would be nice if I could write things the correct way
16:50:57BitPuffineven if it doesn't do everything yet
16:51:07BitPuffinlike saying the shared stuff or whatever it was again
16:51:30dom96BitPuffin: Dude, you wanna play Dota?
16:51:45BitPuffindom96: no
16:51:49BitPuffindom96: well I do
16:51:54BitPuffindom96: but you know, work :D
16:52:03dom96hehe, i'm kidding anyway.
16:52:13BitPuffindon't joke about dota 2.
16:52:23dom96TF2 is where it's at
16:53:25BitPuffinnop
16:53:30BitPuffinanyway brb
16:58:11*BitPuffin quit (Ping timeout: 252 seconds)
17:01:08*ringil joined #nimrod
17:04:40*Demos joined #nimrod
17:08:21*snippy quit (Ping timeout: 248 seconds)
17:09:57*ringil quit (Ping timeout: 248 seconds)
17:24:30*brson joined #nimrod
18:13:51*CarpNet quit (Quit: Leaving)
18:14:24*BitPuffin joined #nimrod
18:17:06Araqping zahary1
18:17:27BitPuffinback
18:17:35BitPuffinAraq: what's the answer to my question :D
18:17:57AraqBitPuffin: nothing has been implemented yet, I have a working prototype for 'spawn' though
18:18:08BitPuffinAraq: ah, so keywords haven't been added yet?
18:18:26Araq"shared" has been a keyword since 0.9.2 iirc
18:18:30BitPuffinah
18:18:33BitPuffinwell what about lock:
18:19:09Araqlock is only a macro anyway
18:20:22BitPuffinis it implemented?
18:20:27*DAddYE joined #nimrod
18:22:13Araqno
18:22:19Araqhi DAddYE
18:22:33BitPuffintoo bad
18:22:38BitPuffingonna use old concurrency or something then
18:22:43BitPuffinwhich is fine
18:22:48BitPuffinI might migrate later on
18:23:56DemosHey Araq, I noticed you mentioned on reddit that dependent types were in the works for Nimrod... is this true? since when? is this just a "that would be neat sometime thing" or do we know it is possible and feasable to implement them?
18:24:04dom96BitPuffin: template lock(lock: expr, body: stmt): stmt = Acquire(lock); body; Release(lock)
18:24:19dom96well, probably a good idea not to name the param 'lock' also heh
18:24:58dom96BitPuffin: Anyway, use that and then you can migrate easily to the new locks.
18:25:41AraqDemos: we have the basics for the technology, an inference engine, but proper dependent typing won't come before 2.0
18:26:37Demosyeah, that is what I figured. dependent types in a "useful" langauge seems to be something of a research problem :D
18:27:53Araqdunno, at least proving array bounds at compile time is entirely feasible and might even come soon after 1.0 is out
18:28:27BitPuffindom96: I think we should have something like that in place so that people can use it until it's officially implemented. And put like a big warning that "this is all it does blabla, stay tuned for more safety blabla"
18:29:17dom96BitPuffin: I think we should make it a requirement for anyone suggesting trivial things like this to implement said things and create a PR :P
18:29:25BitPuffindom96: shh
18:29:27BitPuffinI'm busy
18:32:35*OrionPK quit (Remote host closed the connection)
18:33:13*OrionPK joined #nimrod
18:37:39dom96BitPuffin: Playing dota? :P
18:37:43AraqBitPuffin: my blog post also implicitly describes how the current concurrency model works :P
18:39:46*brson quit (Quit: leaving)
18:40:05BitPuffinAraq: :)
18:40:08BitPuffindom96: no xD
18:40:12BitPuffindom96: I'm at a hackathon thingy
18:40:19BitPuffinsocializing
18:40:21dom96BitPuffin: ooh
18:40:21BitPuffin...on irc? :)
18:40:23*brson joined #nimrod
18:40:30dom96BitPuffin: Sounds like fun.
18:40:33BitPuffinyaman
18:40:39BitPuffinEXetoC: THE GLFW BINDING IS BROKEN
18:40:44BitPuffinEXetoC: RAAAAAHHH!!
18:40:51dom96BitPuffin: So you're being a nice nimrod programmer and coding in nimrod at the hackathon:?
18:41:06BitPuffindom96: hell yeah
18:41:06EXetoCBitPuffin: I'll test it. Haven't used it in some time
18:41:12BitPuffinEXetoC: no it's just that
18:41:14dom96BitPuffin: good boy
18:41:18BitPuffinit should be libglfw.dylib on mac
18:41:21dom96BitPuffin: I am proud :')
18:41:21BitPuffinnot glfw.dylib
18:41:23BitPuffinfix that nao
18:41:27BitPuffindom96: :'D
18:42:22AraqI think it should be liblibglfw.dyliblib so people know it's a lib
18:42:51Araqand not a porn video
18:43:01EXetoCc(:)-<
18:43:04BitPuffinxD
18:43:18dom96haha
18:43:25BitPuffinAraq: you a funny guy sometimes
18:43:27BitPuffinAraq: good dragon
18:43:35BitPuffinEXetoC: ARE YOU FIXING IT OR WHAT
18:44:11dom96I think Araq needs a Nimrod T-shirt with "BDFL a.k.a "The Dragon"" written under the Nimrod logo.
18:44:25EXetoCBitPuffin: maybe
18:44:44EXetoCBitPuffin: NOW!
18:46:21EXetoCI get a segfault when compiling any of the examples
18:47:26Demoswhich examples?
18:47:30Demosglfw ones?
18:47:52EXetoCyes. will build nimrod without -d:release and try again
18:49:45EXetoCo "Error: unhandled exception: not (TOpcode(uint32(c.code[start]) and 0x000000FF'u32) == opcEof) [EAssertionFailed]"
18:50:04EXetoCvm.nim stuffs
18:50:17Araquh oh s o its my fault
18:54:12EXetoCBitPuffin: is it usable now? using the devel branch?
18:55:26*BitPuffin quit (Ping timeout: 264 seconds)
18:55:34*io2 joined #nimrod
18:56:51EXetoCit's glfw.nim. I'll report it soon
19:01:56*brson quit (Ping timeout: 252 seconds)
19:05:32*brson joined #nimrod
19:06:21*Mat3 joined #nimrod
19:06:27Mat3G'Day
19:07:05dom96hi Mat3
19:08:10NimBotAraq/Nimrod devel a4e9a50 Araq [+2 ±2 -1]: command syntax is allowed in expressions
19:08:10NimBotAraq/Nimrod devel ac7f6e3 Araq [+0 ±3 -0]: updated grammar.txt
19:08:10NimBotAraq/Nimrod devel 80bfb62 Araq [+4 ±4 -3]: parser support anon iterators
19:08:10NimBotAraq/Nimrod devel 0da5eb4 Araq [+0 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
19:09:00Mat3hi dom96
19:09:17dom96Araq: btw should 'echo(let x = 5; x)' work?
19:09:25Mat3hi Araq
19:09:56*shodan45 joined #nimrod
19:10:04Mat3hi shodan45
19:10:55Araqdom96: nope, but echo((let x = 5; x)) should
19:11:22Araqshodan45: you're number 60! wooohooo
19:11:38dom96Araq: interesting.
19:11:54dom96Araq: Why is that required?
19:12:16EXetoCI tried something like that but must've used the wrong syntax. it works now
19:12:18shodan45Araq: \o/
19:12:31EXetoCnow I can limit the scope some more; without additional templates anyway
19:13:02shodan45Araq: your german accent is fun :)
19:13:41EXetoCor blocks
19:14:51Araqdom96: echo ( <-- ( part of the call, (;) <-- syntactic construct
19:15:25Araqshodan45: er ... thank you
19:16:16shodan45Araq: I haven't had time to play with nimrod lately, so commenting on your accent is all I can do ;)
19:16:57Araqjust idle in here please I like your nick
19:17:05shodan45Araq: :D
19:17:25*BitPuffin joined #nimrod
19:17:53*shodan45 <3 system shock
19:18:42shodan45I tried to like bioshock, but.... ehh, I dunno, maybe it's not "deep" enough?
19:18:58shodan45I haven't tried bioshock infinite yet, though
19:19:02BitPuffinAraq: http://www.youtube.com/watch?v=lbOtyWTRZ_g
19:19:16Mat3hi bitPuffin
19:19:21BitPuffinheyo Mat3
19:19:31EXetoCdom96: haven't gotten any file descriptor errors yet? it's when polling with asyncio I think
19:19:43dom96EXetoC: nope
19:21:37shodan45I found llvmpy the other day.... might be fun to write a nimrod compiler in python
19:21:48EXetoCwhat do I need to do to add keep-alive support to httpclient? just re-use the socket?
19:22:20Araqshodan45: bioshock 1 is good, 2 is playable and bioshock infinite is ... meh
19:22:28EXetoCand maybe bother to check if http 1.0 is used
19:22:49dom96EXetoC: Possibly async support for httpclient.
19:22:51Araqshodan45: it's more fun to program a compiler in nimrod ;-)
19:23:10dom96EXetoC: The API needs some adjustments: an HttpClient object which stores the state of the connection.
19:23:22EXetoCyes
19:24:42BitPuffinEXetoC: so many bindings that need to be updated xD
19:24:57EXetoCok
19:25:58shodan45Araq: maybe, but saying "I wrote a compiler for Nimrod... in Python" sounds crazier
19:27:36shodan45llvmpy makes writing a compiler look fairly easy
19:28:03shodan45of course, llvm takes care of the hard parts :)
19:29:43EXetoCBitPuffin: does it run now?
19:29:56EXetoCI get a segfault on devel
19:32:55*BitPuffin quit (Ping timeout: 260 seconds)
19:34:31VarriountAraq: Are we allowed to use type classes when adding to the stdlib yet?
19:34:40Mat3shodan45: LLVM is not so easy because of its SSA oriented IL, its only looks so at first sight
19:34:51AraqVarriount: depends on what you mean by "type classes"
19:36:40*Mat3 is now known as Mat3-coding
19:36:54VarriountAraq: This -> https://gist.github.com/Varriount/8527495
19:37:18*PortableEXetoC joined #nimrod
19:37:36VarriountI noticed last night that you can't use strutils.split with a sequence (yes, I know it's not as efficient as using a set)
19:38:14dom96What does that type class actually check?
19:39:48Varriountdom96: If the type has a contains proc that accepts a char, and returns bool
19:40:07Araqc.contains(char) is char # typo?
19:40:10VarriountYeah
19:40:15VarriountI updated the gist
19:40:26dom96ahh, that makes more sense :P
19:40:50zahary1that probably should be called CharSet
19:40:53*zahary1 is now known as zahary
19:41:02AraqVarriount: what's the point? people can't learn nimrod's set?
19:41:22VarriountAraq: Is there any builtin to transform a seq to a set?
19:41:52Araqit's rather trivial to do this transformation but no
19:42:03Araqwhat's the use case?
19:42:17AraqI simply start with a set in the first place
19:42:51Araqalso strings support contains
19:43:03Araqand then split(s: string, sep: string) is ambiguous
19:43:23dom96ooh 61. New record.
19:43:45Araqwhen sep == ";;" I expect ;; to be the separator and not that it's transformed into {';'}
19:44:14VarriountAraq: Ah, I see.
19:45:10Araqdom96: EXetoC is listed twice, so it doesn't count
19:45:21dom96Araq: shhhh. It does.
19:45:31*nsfokina quit (Remote host closed the connection)
19:45:35VarriountWell, on a side note, split(s, sep: char) and split(s, sep:set[char]) display disparate behavior
19:47:02PortableEXetoCYeah it does
19:47:03zaharyVarriount: the mimic types features I plan to introduce offers a more lightweight alternative to explicit type classes and it will be able to settle such disputes.
19:47:20VarriountYay!
19:47:48Araqzahary: yeah, I'm excited to see this feature too :-)
19:47:53zaharythere is always tension when one wants to make a library more generic. people rightfully complain that this erodes the quality of the error messages and so on.
19:49:15Araqmimic types and my planned "append" pragma will make Nimrod the king of strings :-)
19:49:36VarriountAraq: Sounds like a good motto
19:50:04Varriount"Nimrod - The king of strings"
19:50:24Araq"Nimrod - tanga party on!"
19:50:47VarriountHeh. There's a huge discussion on python-idea mailing list about tail-call-optimization . Of course, I don't doubt that, in the end, the idea will be shot down for being too "radical"
19:50:50*xtagon joined #nimrod
19:50:56dom9662!
19:51:06Araqxtagon: new record!
19:51:21*Varriount hands xtagon a cookie
19:51:25xtagonRecord?
19:52:02Araqxtagon: yes and it's your fault
19:52:16xtagonOh no, what did I do now...
19:53:28Araqdom96: "User record: 62" is so poor ... lol
19:53:58dom96Araq: Have a better idea? It's the best way to remember.
19:54:30Araqyeah, too bad local files haven't been invented yet
19:54:57xtagonMan, that's a great idea. Local files. It would be a game changer
19:55:06VarriountAraq: https://gist.github.com/Varriount/8527795
19:55:16VarriountIs this intended behavior?
19:55:57Araqyes
19:56:10Araqmost common for sets is that you pass whitespace
19:56:13*valentinv joined #nimrod
19:56:26Araqmost common for char is that you pass ';' aka CSV data
19:56:28*PortableEXetoC2 joined #nimrod
19:56:35Araqhi valentinv welcome
19:56:40dom96PortableEXetoC2: Now that's cheating :P
19:56:56Varriountdom96: 63
19:57:14PortableEXetoC2Nice
19:57:15Araqdom96: 62 is correct now
19:57:23dom96Araq: 63
19:57:25PortableEXetoC2Damn connection
19:57:29*PortableEXetoC quit (Read error: Connection reset by peer)
19:57:40*PortableEXetoC2 quit (Client Quit)
19:58:22dom96There.
19:59:40Varriountdom96: Over in #nimbuild, we have some interesting joinings. Look at the addresses
19:59:52dom96Varriount: Yeah, that happened before.
20:00:15VarriountAny idea as to the reason?
20:00:15dom96valentinv is perhaps related?
20:00:27dom96Amrykid once said that they are spam bots.
20:00:39dom96But they don't seem to be spamming much.
20:00:43dom96It's probably the NSA.
20:01:13Amrykid##botmonitoring
20:01:29Amrykidand also #freenode
20:01:46Amrykidstay informed. stay safe. *hides*
20:02:40dom96Amrykid: cheers
20:02:54Amrykid^
20:05:21xtagonI just realized Nimrod would be perfect for code that needs to be heavily obfuscated when compiled
20:05:49xtagonJust write a bunch of arbitrary macros that perform the intended effect, but more complicated
20:06:00xtagonAnd then disable as many optimizations as you can
20:06:07Varriount:p
20:06:43xtagonSince macros can be evaluated at compile time, you could even make it so that each new build is obfuscated differently
20:06:48xtagonReverse engineering would be a PITA
20:08:27*psquid quit (Ping timeout: 252 seconds)
20:08:58*psquid joined #nimrod
20:08:59*psquid quit (Changing host)
20:08:59*psquid joined #nimrod
20:09:26VarriountHi psquid
20:11:20psquidahoy hoy
20:15:55*uliashke quit (Ping timeout: 272 seconds)
20:20:39*tdc joined #nimrod
20:21:26Mat3-codingxtagon: You know the C obfuscated source-code contest (unbeatable) ?
20:22:07xtagonMat3-coding, yeah I've heard of it
20:24:19xtagonMat3-coding, the difference is if you do all the obfuscating with macros, your source code can look normal and your binary can be obfuscated
20:25:38Mat3-codingI think you can get to the same result with ordinary C macros (plus some GCC related extensions probably)
20:26:27*io2 quit (Ping timeout: 252 seconds)
20:29:28Mat3-coding'#define begin {' + '#define end }' + '#define proc(x) void ##x' -> Welcome to the Algol 68 world :-> *lol*
20:29:45Mat3-coding(the last one is preprocessor dependent)
20:32:14xtagonYes that's true
20:33:10xtagonI wonder if anyone's made any quines with Nimrod
20:34:36*Mat3-coding is now known as Mat3
20:35:55*brson quit (Ping timeout: 272 seconds)
20:49:00Araqargh
20:49:51*[2]Endy quit (Ping timeout: 260 seconds)
20:49:54Araqthere is a data structure called adaptive packed memory array ... but I can't find any real world implementation ...
20:50:25VarriountJust research papers?
20:50:33Mat3Araq: I've found the reason for these obscure memory leak. In some sircumstances GCC compiled corrupt code in existence of unitialized, not accessed structure variables
20:51:07Mat3(version 4.8.1)
20:52:15AraqVarriount: yes
20:52:20AraqMat3: interesting
20:53:19*io2 joined #nimrod
20:53:37Mat3by the way: What means adaptive in these context ?
20:54:03*oleglyabin quit (Ping timeout: 260 seconds)
20:54:34Mat3I think of packed integer arrays for SIMD processing
20:55:37Mat3hi io2
20:55:56io2howdy Mat3
20:56:01io2:)
21:00:18*foxcub joined #nimrod
21:00:44AraqMat3: A packed memory array (hereinafter called PMA) is a an array of records stored in order, with some gaps to allow for efficient updates.
21:01:55Mat3strange
21:05:00Araqit's exactly the data structure that I want to try
21:05:15VarriountSo.. an array with gaps?
21:05:20Araqand should be easy to implement but I want to copy&paste
21:06:25*ddl_smurf joined #nimrod
21:08:35xtagonIs unittest broken on devel? When I run a basic check 1 == 1 suite, I get Error: internal error: (filename: compiler/vmgen.nim, line: 197)
21:09:49Mat3you should use a random generator for precalculating gap sizes
21:09:57Mat3get some sleep, ciao
21:10:03xtagonBye Mat3
21:10:27*Mat3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:10:28Varriountxtagon: Make sure to recompile koch and the tester executables, as well as nimrod
21:10:56xtagonVarriount, how do I do that? I don't know what koch is
21:11:26Varriountxtagon: koch is the configuration and bootstrapping executable that comes with nimrod
21:11:44Varriountit should be in the root nimrod directory
21:11:48xtagonOkay
21:12:09Varriount'nimrod c --run koch boot --linedir:on --debuginfo'
21:12:19Varriount'nimrod c --run koch.nim boot --linedir:on --debuginfo'
21:13:11VarriountThat'll recompile koch, and then tell it to recompile the nimrod compiler in debug mode (slightly slower, but you get stack traces when the compiler segfaults.)
21:13:16Araqnah, nobody needs linedir or debuginfo :P
21:13:31Araqdebuggin the compiler is not that hard :P
21:13:50VarriountAraq: Says you. I can't even manage to fix the simple bugs. :/
21:15:01Araqthey are not simple, Varriount so don't worry
21:17:09xtagonOkay, I recompiled everything. Now what is the way to run a test suite? nimrod c -r mytest.nim gives me that error
21:17:24xtagonDo I need to run it with koch?
21:18:22*tdc quit (Quit: Leaving)
21:18:44Varriountxtagon: to run the nimrod test suite, use 'koch tests' followed by './tests/testament/tester.exe html' (omit the exe if on linux)
21:20:00Araqxtagon: unittest works for me, but I didn't try check 1 == 1 ;-)
21:20:34xtagonAraq, I was just trying to get the minimal code necessary to run as a test
21:20:57xtagonThe nimrod test suite is running :)
21:21:52Varriountxtagon: The suite will take a while to finish. It has quite a lot of tests
21:21:59xtagonThat is fine
21:22:29xtagonSo in my own projects, should I run the tests with 'koch tests'?
21:22:51discolodahow do i return a new iterator from a proc? i get "expression expected, but found 'keyword iterator'"
21:23:18Varriountxtagon: No. You should probably just run a main executable under debug mode.
21:24:11Araqdiscoloda: I'm implementing this feature right now ...
21:24:22discolodaah, cool
21:26:07VarriountAraq: I don't suppose the feature also comes with fixed closure iterators?
21:26:19Varriount*wishfulthinking*
21:27:53AraqVarriount: it comes with fixed closure iterators, that's the whole point
21:27:59Varriount:D
21:28:04Araqanon iterators are just some syntactic sugar
21:28:11*Varriount jumps for joy
21:28:55Araqxtagon: check out tests/templates/utemplates for how to use unittest.nim
21:29:34xtagonAraq, awesome thanks
21:30:13discolodait will help with my port of quake 2, doing it iteratively instead of one shot with c2nim. of course still using c2nim. its just not ready for a one shot translation of this scale
21:31:03Araqdiscoloda: how do first class iterators help with that?
21:31:50xtagonI ran the suite, and I ran ./tests/testament/tester html, now where is the generated HTML I should view?
21:32:06Varriountxtagon: In the root directory
21:32:22Araqrun ./tests/testament/tester --print html
21:33:28xtagonSure enough, tunit.nim examples C compile internal error: (filename: compiler/vmgen.nim, line: 197) reNimrodcCrash
21:33:36xtagonThats in testresults.html
21:33:57discolodathere a few "iterators", like find files, find entities within a range etc.. im keeping the original functions for now but still want to port them to nimrod. having state in a closure iterator will do it
21:36:59Araqxtagon: oh well ... I'm still fighting with the test suite
21:45:14*io2 quit (Ping timeout: 264 seconds)
21:49:30renesac|Away"Error: type mismatch: got (int, uint8)
21:49:31renesac|Awaybut expected one of:
21:49:31renesac|Awaysystem.+=(x: var T, y: T)
21:49:31renesac|Awaysystem.+=(x: var T, y: T)"
21:49:37*renesac|Away is now known as renesac
21:49:56renesacI really can't add those two types (I imported unsigned by the way)
21:50:02renesac?
21:50:55renesacI know I can append .int, but it shouldn't be necessary here
21:51:11Araq*shrug*
21:51:35AraqI am tired of fixing my language to accomodate for your integer type zoos
21:51:41Varriountrenesac: How should they be added?
21:52:26VarriountShould it be a raw add, merely treating the uint as an int without data conversion?
21:52:45renesac"widening type conversion are implicit"
21:53:01renesacjust upcast it implicitly to int
21:53:02*foxcub quit (Quit: foxcub)
21:53:32*kidrefkir quit (K-Lined)
21:53:33VarriountAlso, int is an ordinal, uint is not, iirc
21:53:44Araquint8 is though, Varriount
21:53:55Araqand for the record renesac is right and it's a bug
21:54:08VarriountOh. *shrug* sorry.
21:54:21*odc quit (Ping timeout: 252 seconds)
21:55:04*valentinv quit (K-Lined)
21:56:07*radsoc quit (Ping timeout: 260 seconds)
21:59:45*io2 joined #nimrod
22:02:40*brson joined #nimrod
22:05:32*brson quit (Client Quit)
22:10:38Araqxtagon: examples/tunit.nim compiles for me ...
22:11:07Araqthere seems to be a bug with 'raise' in the new vm but apart from that it works
22:12:28xtagontestresults.html shows a few other modules with the same error (same line number)
22:13:24Araqcheck: 1 == 1 also works
22:13:57Araqmy bet is your compiler ain't up to date
22:14:06AraqI fixed unittests recently
22:14:13xtagontunit.nim, tunittests.nim, tdumpast.nim, ttypedesc1, tobject.nim, thashes.nim, tmath.nim all have this error
22:14:18*rndbit quit (Ping timeout: 245 seconds)
22:14:53renesacI'm also having this error: https://gist.github.com/ReneSac/8c2a4f992baede3e03ca
22:15:09renesacI'm trying to use 'seq' as a type class in the second proc
22:15:59*rndbit joined #nimrod
22:16:25zaharyrenesac: is this the devel branch?
22:16:27EXetoCyou don't want it to be generic?
22:16:41EXetoCoh it's supposed to be possible?
22:16:50EXetoCimplicit generic param?
22:16:54renesacIt is the binary I downloaded yesterday from the nimbuild
22:16:55zaharyyes
22:17:16renesacNimrod Compiler Version 0.9.3 (2014-01-13) [Linux: i386]
22:18:36zaharyI fixed a similar problem in the devel branch recently and your code works for me
22:18:53zaharyprobably the binary on nimbuild is derived from the master branch
22:18:54renesacoh, ok
22:19:19renesacfast moving language
22:19:22renesac^^"
22:21:40EXetoCzahary: me?
22:22:16zaharywhat about you :)
22:23:03EXetoCI don't know who you answered
22:23:25zaharythe "yes" was about your "implicit generic param?" question
22:23:36EXetoCok
22:24:18renesachttp://build.nimrod-lang.org/docs/manual.html#type-classes_toc <-- it is described there
22:24:31Araqfyi, I found this: https://github.com/reddragon/packed-memory-array/blob/master/impl2.cpp
22:25:16renesacI wonder why there isn't a "number" type class
22:25:26EXetoCsee system.nim
22:25:48EXetoCor the documentation for it. there are a couple of type classes there
22:26:01EXetoCzahary: I thought we were getting something like set[T] where T is first declared here
22:26:08EXetoCbut I guess additional shortcuts don't hurt
22:26:48xtagonAraq, I pulled the latest devel and recompiled again. Still getting the crashes in the test results
22:26:57*foxcub joined #nimrod
22:26:59renesacoh, TNumber, ok
22:27:40Araqxtagon: your new executable is not in path or something
22:27:48renesacthe type classes table will be huge...
22:28:30Araqrenesac: what makes you think so?
22:28:53renesacthe start of the system.nim
22:29:11xtagonAraq, derp, that's probably it.
22:29:35EXetoCrenesac: what about it?
22:30:14renesacat least 5 type classes that should be added to the table, and I'm not sure about other modules
22:31:25Araqzahary: I'm quite sure the array of function pointers will be faster than the 'case' if you duplicate the dispatching logic table[typ.kind](a, b)
22:32:06Araqbut surely it's a micro optimization and quite some work of refactoring
22:33:14zaharyare we talking about methods?
22:33:37Araqno, C-style array of function pointers
22:33:56zaharybut what is the context? why are bringing that up?
22:34:08Araqsigmatch.nim needs to get faster
22:34:27Araqor rather: If you touch every line in sigmatch anyway, you might as well optimize it
22:34:34zaharyah, I see
22:37:49xtagonAraq, good news, I no longer get the vmgen error. Now I just get nil deprecation errors :)
22:38:15Araqxtagon: the definition of progress ;-)
22:39:06Araqoh btw I added tests/parser/tcommand_as_expr.nim
22:39:17xtagonAlmost ever module crashes with: 'nil' statement is deprecated; use an empty 'discard' statement instead [NilStmt]
22:39:39Araqxtagon: the tester is stupid and takes a warning for a crash
22:40:50Araqzahary: let x = foo 7.foo, foo(1, foo 8) now parses :-)
22:41:08Araqlet x = foo 7.foo, foo(1, foo 8 )
22:41:13xtagonAraq, well, I can run unit tests now! :D
22:42:49Araqthere 2 more things I want to do with parser/grammar
22:43:10Araq1) change the comment handling
22:43:25Araq2) operator precedence based on spaces
22:43:36EXetoC<3
22:43:49zaharynice, does it go all the way to coffeescript? foo bar baz()?
22:44:15Araqyeah
22:44:41AraqI wanted to disallow that first but then I thought, "meh it's still easy enough"
22:45:03zaharyyeah, it becomes idiomatic after some use
22:45:38EXetoCextended command syntax?
22:46:14Araqfor (1) I plan to make the lexer really ignore # comments so they can be everywhere and only ## comments are part of the grammar
22:46:52Araqand get rid of the comment field in the AST, instead where ## comments are valid, an empty node is provided, if necessary
22:47:02Araq... = enum
22:47:11Araq a ## comment here
22:47:29Araqbecomes nkEnumField(a, nkComment"comment here")
22:47:44Araqbut this changes the AST and so might break some macros
22:48:03Araqalso empty statements like
22:48:12Araq# only a comment, no nil, no discard
22:48:30Araqare not valid anymore then, since the lexer doesn't pass it to the parser
22:48:33discolodafor "let x = foo 7.foo, foo(1, foo 8)" is x the value of "foo(1, foo 8)" (, seperates expressions, takes the last)?
22:48:56zaharyI don't have strong opinions about comments - I only guess that they are not very newbie friendly
22:49:14reactormonkAraq, for blub blub\n# this loop initiates doomsday\nsome code <- doesn't work anymore?
22:49:35Araqreactormonk: that continues to work
22:50:23OrionPKVarriount goto symbol support
22:50:27OrionPKplz
22:51:35Araqzahary: well we have to accept reality, "nimrod pretty" carefully doesn't do any reformating of your code, so the "comments are part of the ast for easier reformating" design doesn't work
22:51:59Araqand so comments can be done more traditionally
22:53:04Araqdiscoloda: x is the value of the whole expression
22:58:34*zahary quit (Quit: Leaving.)
23:02:07*io2 quit (Ping timeout: 272 seconds)
23:03:51dom96Araq: oh dear, that may break quite a bit of code.
23:05:22Varriountdom96: Howso?
23:05:32reactormonkAraq, good
23:05:43dom96Because I like using a comment instead of 'nil' :P
23:06:02Varriount>:|
23:06:45Araqdom96: well we'll have a deprecation path, as usual
23:07:08Araqand as usual your code will continue to not give a fuck about deprecation warnings ... :P
23:07:21dom96Great :P
23:07:47Araqbut hey the compiler itself uses a deprecated module
23:07:51*BitPuffin joined #nimrod
23:07:51OrionPKlol
23:08:02OrionPKis there a 'break on deprecated' option?
23:08:11OrionPKor break on warnings
23:08:12OrionPKmore generally
23:08:16Araqnope
23:08:25Araqwhat's the point?
23:08:44xtagonAraq, one of the things I like about # being part of the AST is that theoretically you could write tools to modify a part of the source file and leave the rest intact (e.g. change a constant in a config file)
23:08:45OrionPKto get you to pay attention
23:09:23Araqxtagon: there are better ways to do this and they are not any harder either
23:09:43xtagonAraq, what's the ideal way to do it?
23:10:04EXetoCI think I've only been bothered about the inability to uncomment certain things
23:10:12Araqtrack line,col information like we do and update in the original file, xtagon
23:10:27Araqso that whitespace etc. is kept
23:10:43xtagonAh, so you can get line/col info from any AST object?
23:10:46AraqEXetoC: yeah but we all have
23:10:52Araqxtagon: that is correct
23:10:56xtagonNeat
23:12:21AraqOrionPK: every warning that nimrod produces deserves your attention
23:14:24Araqer ... does anybody remember how I named the "spaces determine precedence" feature?
23:14:40AraqI had a marketing compatible name for it
23:14:58Araq{.saneSpaces: on.} ?
23:16:27*faassen left #nimrod (#nimrod)
23:18:08VarriountAraq: Found the logs
23:18:17VarriountAraq: http://build.nimrod-lang.org/irclogs/18-12-2013.html
23:18:46Varriountctrl+f "spaces"
23:21:31AraqVarriount: thanks
23:21:35AraqstrongSpaces is it
23:21:58VarriountAww. Not saggySpaces? :3 (just joking)
23:22:51xtagonHow can spaces determine precedence? Sounds interesting
23:23:02Varriountxtagon: Operator precedence
23:23:27xtagonVarriount, right, but what do spaces have to do with it?
23:23:48Araqxtagon: x+1 * 4 == (x+1) * 4 when strongSpaces:on
23:24:13xtagonAraq, ohhh, that's cool.
23:24:20Araqit'll be experimental but I'll always turn it on for my code because I know it works :P
23:26:19Demosdoes x + 1 * 4 also equal (x+1)*4?
23:26:39Araqyes
23:26:59Araqbut x + 1 * 4 stays x + (1 * 4)
23:27:30Demosright, what about operators with higher precidence and user defined operators, like $i + 2
23:27:48Araqwell user defined operators are the point of this feature
23:28:24Araqyou can't define a good precedence table for these and you don't want to go Haskell's route because that makes the grammar context sensitive
23:28:57Varriount^ Or rather, even more context sensitive
23:29:23AraqVarriount: depends on your defintion, but have a look at compiler/parser.nim
23:29:36Araqit doesn't use any kind of symbol table
23:31:54OrionPKriight araq
23:32:00OrionPKlike when I use block name:
23:32:05OrionPKand "name" is unused
23:33:07Araqso? thats not done in the parser
23:33:43Araqgood night
23:44:13*darkf joined #nimrod
23:46:03VarriountHi darkf
23:47:55darkfhello