<< 08-03-2014 >>

00:10:24flaviuVarriount: Objectively no, but the difference can be felt, and I would say that there should be a prominent button added linking to the build docs.
00:31:14*darkf joined #nimrod
00:37:21Varriountflaviu: Are you looking at the wrapper documentation?
00:37:33Skrylarhrm. siphash can't be used as a stream hash
00:37:39Skrylarit requires the input length ahead of time
00:38:11VarriountMost of those don't have documentation because they are A: Generated by c2nim, and B: Are bare interfaces over whatever API they wrap.
00:38:12*fowl quit (Changing host)
00:38:12*fowl joined #nimrod
00:40:56flaviuYou're right, but I wonder if it might be possible to generate documentation too.
00:41:09*carum_ quit (Remote host closed the connection)
00:44:47*io2 quit ()
00:46:00*milleral joined #nimrod
00:48:23*Demos quit (Remote host closed the connection)
00:57:21Skrylarflaviu: you could but it would be more work
00:57:34Skrylarat that point you'd basically have to extend c2nim to read doxygen output
00:57:56Skrylaradmittedly some people do it; you can ask doxygen to output XML and there are more than a few projects now that use the xml output for scraping metadata
00:59:04*askatasuna joined #nimrod
01:07:27SkrylarAraq, renesac: okay, the siphash port is cleaned up
01:08:19*milleral left #nimrod ("WeeChat 0.3.7")
01:09:11*zahary joined #nimrod
01:09:28*Ifelseif joined #nimrod
01:11:39*carum joined #nimrod
01:17:59*carum quit (Ping timeout: 240 seconds)
01:21:52*Ifelseif quit (Quit: Leaving)
01:25:02*DAddYE quit (Remote host closed the connection)
01:26:10*DAddYE joined #nimrod
01:26:23*DAddYE quit (Remote host closed the connection)
01:26:55*DAddYE joined #nimrod
01:28:00*brson joined #nimrod
01:31:29*DAddYE quit (Ping timeout: 265 seconds)
01:34:15*Demos joined #nimrod
01:39:18*askatasuna quit (Read error: Connection reset by peer)
01:39:54*runvnc joined #nimrod
01:40:21runvncHello guys
01:40:38runvncif you look at https://gist.github.com/ithkuil/9423819#file-gistfile1-nim I am trying to figure out why my sigsegv is not being caught
01:41:06runvncthe process is exiting even though I have a try/except: around the line of code in main that is causing the sigsegv
01:41:15runvncthe exception is in another module. could that be why?
01:41:20Demossigsegvs are not exceptions
01:41:25runvnclol
01:41:27runvncok
01:41:34Demosif there is a segfault shit has hit the fan and the process will terminate
01:41:56DemosI /think/ you can handle it as a POSIX signal but that is not a very good idea
01:42:15Demoswhat line is producing the segfault
01:42:24runvnchm well I think it is quite possible that I could make a mistake that would be a rather occasional problem causing a sigsegv
01:42:31runvncin other words, this is a basic flaw in the module
01:42:34runvncthat I must correct
01:42:36runvncbut
01:42:39*askatasuna joined #nimrod
01:42:54runvncI know that I can easily make a similar mistake that will only occur on a more occasional code path
01:43:03runvncI would like the option for the program to not crash in that case
01:43:22runvncso the way to do that would be some kind of signal handler?
01:43:28Demoswhat library is that function from?
01:43:41runvncis my own module, I know how to correct the segfault by checking for nil
01:44:04Demosand no, not really. a segfault happens when you access memory that you never actually allocated, it is not just accessing a nil pointer
01:44:10Demosthen do so
01:45:30runvncactually I needed to initialize this redis thing
01:45:34runvncnot check for nil
01:46:30runvncbut it still seems easy to have an occasional code path that causes this issue, and I am not sure why it is necessary for the program to always crash in those cases
01:47:55Demosbecause it means that your state is corrupted, so at best you would get strange behavior further along the line, at worst you would get a security issue
01:48:57Demosif you are using memory and not telling the kernel about it than there is no way anything could work
01:49:37flaviuDo generic immediate templates exist?
01:50:03runvncI would just prefer that the program would continue at the top of the while loop rather than crashing. of course I don't want that code path to continue with random uninitialized data
01:50:13Demosnow you can turn derefs of nil pointers into an exception but it is pointless AND means you have to insert a null check around each deref
01:50:40Demosbut what if the segfault was from writing to the memory containing the top of the while loop?
01:51:04runvncthat isn't inside of my try catch
01:51:27Demosright, but the segfault could be from you trying to write to ANYWHERE
01:51:36runvncI just wish that somehow I could get an exception instead of segfault, but I can't, so that's that, and I will just have to be a little more careful and use a monitoring program to restart my process
01:51:52Demosnot really, what you should do is not segfault
01:52:05runvncas I said, I will just have to be more careful
01:52:08Demosright
01:52:11runvncnever segfaulting is a goal
01:52:14runvncbut for production
01:52:20Demosyou should not segfault
01:52:27runvncI must have a monitor for an occasional code path or situation that I did not think of
01:52:47DemosOK say we turned derefs of a null ptr into an exception, there is literally nothing useful you can do with that exception aside from crashing
01:53:15runvncthere could be a code path where that data was not initialized only in a special case
01:53:29runvncwhereas normal cases code continue
01:53:58Demoswell then if that code path happens (and it is a null deref) than you get a stack trace and can eaisly fix the bug
01:57:18runvncright but meanwhile I dropped 25 connections associated with child processes that had customers commands running on them
01:57:43runvncI don't want to argue you with, and I'm not trying to say that it's nimrod's fault if I forget something basic like initializing data
01:58:09runvncI just know that Nimrod seems to have advantages over most other environments, except in this case it does not have an advantage that other programming systems have
01:58:48runvncwhich is that option to continue without completely exiting if there is an occasional code path with an unknown exception involving unintialized data
02:00:37runvncwell, not an exception, an unknown error I meant to say
02:06:25Skrylarthat reminds me that there is something i would like to fiddle with at some point; putting a constraint solver on the VM
02:10:00runvncmaybe I could make a pragma that would wrap all of my if blah.len or whatever and add on a check for nil
02:10:00*zahary quit (Quit: Leaving.)
02:13:22runvncmaybe I can just use one of these templates http://forum.nimrod-lang.org/t/385
02:16:33EXetoCit should be prevented obviously, and I think the language will be improved in this regard
02:16:45*q66 quit (Quit: Leaving)
02:16:52EXetoCthere's "not nil" which might still be buggy/incomplete http://build.nimrod-lang.org/docs/manual.html#not-nil-annotation
02:17:24runvncthanks
02:18:00EXetoCand then you have sequences/strings that must be initialized explicitly, but it seems pretty certain that that will change soon
02:18:06EXetoCdid you at least get a stack trace?
02:18:50runvncyup got a stack trace
02:19:15runvncI am just lazy and used to node.js and coffeescript with ? and being very dummy-friendly
02:27:23*DAddYE joined #nimrod
02:31:23VarriountMeep
02:31:33EXetoCit's a nice shortcut
02:31:34*DAddYE quit (Ping timeout: 244 seconds)
02:35:37*Varriount quit (Ping timeout: 240 seconds)
02:39:42runvncvarriont: I am trying to use these suggestions http://forum.nimrod-lang.org/t/385 but the thing I am checking is a seq[string] and so it wont compile because that is written for a Node
02:40:01runvncis there a way to change one of those templates so it will also work with a seq[string]
02:40:26runvncmy expression is if results?.len >0
02:41:49Demosjust initialize the seq
02:42:19Demosso instead of var foo: TSomeThingWithASeq you would say var foo = initSomethingWithASeq()
02:42:39EXetoCrunvnc: he quit. use nick completion :-)
02:43:40runvncdemos its coming out of my module. so I can fix my module to return an empty sequence I guess
02:43:59runvncI am just looking for an easy way to make these things safe without adding a lot of manual checks
02:44:18runvnchttp://forum.nimrod-lang.org/t/385 this is perfect just doesn't work with sequences
02:44:25runvncanyway I should do work instead of bothering you guys
02:44:45Demosyou have it never be nill no matter what. unless it is actually optional in which case you usually want to do something interesting when it /is/ null
02:50:43*Varriount joined #nimrod
02:51:00Varriountrunvnc: The thing is, nimrod doesn't run in a virtual machine like javascript, java, or python - it runs natively
02:51:37EXetoCwell, there's that last example, which might not be feasible in conjunction with operators. either way, it doesn't seem to be handled very well by the compiler atm
02:51:59VarriountWhich means that in most cases, when it accesses invalid memory, the OS stops the process and calls the signal handlers.
02:52:38Varriount(Although there are ways to recover from such cases, they tend to be tricky and very platform specific)
02:52:46Skrylarwhats the conversation about? nillable types?
02:54:27EXetoCit seems to be more about shortcuts now
02:57:13runvnchttp://forum.nimrod-lang.org/t/385/1#2134
02:58:53Varriountrunvnc: I'm glad you found my forum post useful though.
02:59:10runvncyeah thanks
03:00:07EXetoC`@.` gives me an ICE with a familiar error message
03:00:13VarriountI looked at how C# programmers were oooh-ing and ahh-ing over the new safe access operator, and thought that there must be a way to do that for nimrod.
03:00:33VarriountAlthough, it won't work for ints, floats, or other base types.
03:01:29runvncin c# they get an exception though right
03:01:48runvncwhich they can have a wrapper for if they dont want their program to crash
03:02:21runvncI mean without safe access
03:02:46Demosyes, but null pointer exceptions are /really/ dumb
03:03:14Demos*null pointer exceptions generated by a language runtime
03:03:19EXetoCI don't know why someone implemented it for D
03:03:45EXetoCsomeone must've had some use for it, but some did complain about it not making much sense
03:03:48DemosI think if you deref a null pointer in C while on windows with SEH on you will get an exception
03:04:36Demosin fact there are a lot of exceptions that should just never be caught to do anything but log and exit
03:05:34runvncin my case the redis pop returned nil and if there was an exception in that while loop it could continue. wouldnt be something you would like, but would work prefectly
03:05:39runvncperfectly
03:05:52Demoshttp://blogs.msdn.com/b/ericlippert/archive/2008/09/10/vexing-exceptions.aspx
03:06:07Demosthat post just about sums up what I think about exceptions
03:06:37Demosalso I think that if you disable exceptions (that is throw or raise is replaced with abort()) your program should still more or less work
03:07:01EXetoCrunvnc: yes, if you'd handle it explicitly right there and then, in which you might as well just prevent it with some additional conditional statements
03:08:26*askatasuna quit (Ping timeout: 252 seconds)
03:08:27runvncdemos I have gone to some lengths to ensure that I can recover from restarts by using processing queues and multiple processes etc, however there are going to be cases where a core processes needs some state concerning multiple customers in memory in which case I would prefer that process did crash on the basis of a rare error I did not think of
03:08:48runvncdid not crash rather
03:09:12runvncanyway I am going to take a shower
03:09:30Demosthe thing is that you have a choice between crashing and working with possibly incorrect data
03:10:07Varriountrunvnc: The error has to do with operator precedence I think
03:10:08EXetoCexplosion of random failures (tm)
03:10:25runvncthose aren't the only two choices though, in many cases if I had some sort of exception, I could simply jump back to the top of my while loop and continue without any issue
03:10:30*askatasuna joined #nimrod
03:10:47runvncok thanks for the clue varriount
03:11:21Varriountrunvnc: In any case, I don't think it will work with an if expression, because you can't do "nil > 0"
03:11:43*nande joined #nimrod
03:12:02VarriountThat kind of operator is really more useful when doing attribute/member access. Sorry.
03:15:26Varriountrunvnc: I'm gonna check what happens when I use Araq's new strongSpaces option on it.
03:16:49VarriountThis is interesting. Apparently nimrod has a "braces" template filter.. I wonder what it does...
03:18:06EXetoCVarriount: braces? term-rewriting?
03:18:33Demosterm rewriting macros sound like a good way to crash the compiler
03:20:04flaviuIs there any way to get a typeDesc of a type parameter?
03:20:11EXetoCat least some basic tests pass
03:20:24VarriountDemos: These are filters, not term rewriting macros.
03:20:35EXetoCflaviu: isn't it already a typedesc?
03:20:48EXetoCVarriount: where?
03:21:03EXetoCoh
03:21:09EXetoCthe alternate syntax thing?
03:21:19flaviuI'm not sure, but my template requires a typeDesc to compile
03:21:25Demosflaviu, the semantics of typedesc are a little strange, and not written down anywhere
03:21:46VarriountEXetoC: https://github.com/Araq/Nimrod/commit/3ff9869e3d4fcca7802a673b09cb67797c62e2df#diff-b6862e8f17fa4c133ee3a5f3a2ba7cbbR23
03:21:49Demosbut type(T) /may/ do it
03:21:55Demosor actually just use typedesc[T]
03:21:57EXetoCflaviu: I don't know if your question makes sense then. perhaps you want tmpl(variable.type)
03:23:22VarriountMaybe filwit should implement his proposed syntax as a parser.
03:23:22EXetoCVarriount: right. I've expressed my reluctance towards that before. the last two anyway
03:24:07VarriountEXetoC: *shrug*
03:25:55Varriountrunvnc: Your example works if I enable strongSpaces (although, if you add the () then if fails again. Probably something to discuss with Araq.
03:26:45Varriount"Works" being that the program is tripped up by the type mismatch for "nil > 0", rather than a syntax/template error.
03:27:22EXetoCI like Lua's "local x = y or z" feature
03:27:46VarriountEXetoC: What is that?
03:29:54flaviuLet me see if I can get a SSCCE for my template type parameter issue
03:29:59EXetoCVarriount: it assigns x the value of y if y != nil, or z otherwise
03:30:11EXetoCbut that doesn't help in this case I think
03:30:17Varriountflaviu: SSCCE?
03:31:12flaviuA short example, "Short, Self Contained, Correct (Compilable), Example"
03:33:55EXetoCtest case? :>
03:34:09flaviuThanks, that sounds much better
03:34:53*brson quit (Quit: leaving)
03:35:21*brson joined #nimrod
03:37:35*askatasuna quit (Ping timeout: 252 seconds)
03:38:47*askatasuna joined #nimrod
03:40:49flaviuOk, https://gist.github.com/flaviut/76225c559b0c80210df2
03:41:11flaviuThe top were there is a type parameter fails, but the bottom works
03:41:44flaviuMaybe I'm misunderstanding type inference, but I'd expect the top to work
03:41:55Varriountflaviu: I think that might be a problem with the VM/Generic handling
03:42:50flaviuShould I make a bug report?
03:42:51Varriountflaviu: It also might be because 'T' could be *anything*
03:43:09VarriountIncluding the meta types expr, statement, typedesc, etc
03:43:52Varriountflaviu: You might as well, at least people will then know about it.
03:44:28EXetoC[T...] for templates never worked for me, so I just assumed that it doesn't work
03:47:46flaviuEXetoC: Shouldn't that be reported? IMO, it should be documented if it isn't supposed to work
03:52:56runvnc --nilChecks:on ??
03:53:58Varriountrunvnc: That's not a compiler option... is it?
03:54:19runvncI dunno this guy said it is http://forum.nimrod-lang.org/t/165/2
03:54:35runvncit is listed here http://nimrod-lang.org/manual.html#compilation-option-pragmas
03:55:41Varriountrunvnc: Also note "Note: This document is a draft! Several of Nimrod's features need more precise wording. This manual will evolve into a proper specification some day."
03:56:36VarriountBut... looking at the compiler code, there does appear to be something about nil checks
03:56:54runvnclol
03:57:15runvncwell it says invalid compiler option
03:58:02VarriountI think it's a pragma..
03:58:36runvncoh maybe that means the thing exetoc mentioned like not nil
03:58:59runvncalthough why would you need to generate code for that since it was doing it at runtime
03:59:55VarriountTheres also "objCheck"
04:00:22EXetoCrunvnc: that runtime code needs to be generated then
04:00:28*flaviu quit (Remote host closed the connection)
04:01:00runvnclet me try objcheck
04:01:32Demosnot nil is intended to be a compile time thing (I hope)
04:02:28VarriountYeah. Sorta
04:02:57VarriountI'm looking through pieces of code. A lot of the occurences of "nilcheck" occur in the C generation files.
04:03:21Demosif it is a runtime check than I would much rather it omit the check and I just get a segfault
04:03:23VarriountMaybe Nimrod once had a feature to turn off isNil() and friends?
04:03:46VarriountDemos: It's equivalent to checking if a pointer is null
04:04:30Demosthat is not what I want from it, I want a compile time garentee that is it not nil
04:04:36EXetoCI don't know how you'd do that
04:04:48Demosactually you could just use a var
04:05:01Demoscome to thing of it :D
04:05:08EXetoC(varriount)
04:05:21EXetoCDemos: so "not nil"
04:05:25Demosalthough var has a really annoying tendency to go away really fast since we don't have var vars
04:05:29Demosnope
04:05:57VarriountDemos: Stop being paranoid about performance, or I will feed you to #python
04:06:08runvncvarriount so the objChecks and nilChecks don't have code tied to them now?
04:06:28Varriountrunvnc: They do.. but it looks incomplete. I'm skimming through things right now.
04:06:33runvncobjChecks is accepted as a parameter to nimrod but doesn't check for nil when I access this thing
04:06:58Demoswe are a systems programming language, and you are right not nil should be a runtime check, but I am not sure when you would use not nil over a var param
04:07:45VarriountWhat does objChecks do then...?
04:08:14runvncyou have every other feature I want to use it as an applications programming language, whatever the distinction is, I believe that nilChecks could even be considered valid in a systems context
04:08:25runvncbut certainly is valid in the context of a modern application programming system
04:08:45runvncI could try objChecks with a different type of reference or something
04:09:25runvncprobably checks objects, I am using a seq[string]
04:09:37DemosI am all for a compiler option that turns on null checks
04:09:47runvncthere is not nil already
04:09:52runvnc'not nil
04:09:54runvnc'
04:10:11DemosI think I was wrong in objecting to a null check on not nil params
04:10:22Demosbut I still would rather use a var param
04:11:11Varriountrunvnc: It looks as if the 'nilChecks' option isn't hooked up to the command line parsing code.
04:11:30runvncmaybe he's not done
04:11:35runvncor morally against it like demos
04:11:59runvncthanks for looking into that for me
04:13:28Varriountrunvnc: No problem. I'm actually looking to see if I can enable to the code.
04:14:05Varriountif optNilCheck in p.options:
04:14:05Varriount linefmt(p, cpsStmts, "#chckNil((void*)$1);$n", addrLoc(loc))
04:14:23EXetoCmight as well just test the actual pragma first
04:15:18EXetoCDemos: I don't think it has the same guarantees
04:15:47*carum joined #nimrod
04:16:51DemosEXetoC, a var param should never be nil
04:20:35*carum quit (Ping timeout: 244 seconds)
04:21:04runvncwhy did kt write this http://forum.nimrod-lang.org/t/165/2 was that enabled when he wrote it
04:23:31VarriountLets see..
04:24:58*Varriount turns his time machine on
04:25:35Varriountrunvnc: How many months ago was that post?
04:27:49runvncright. many
04:28:10Varriount:P
04:28:30runvnccan I put that linefmt somewhere in the nimrod compiler code then and get that
04:28:31Varriountrunvnc: I've checked out a copy of the code at the time that post was made.
04:28:57runvncawesome
04:28:59Varriountrunvnc: It's already in the compiler code. And I wouldn't advise it.
04:29:46runvncwell I mean I appreciate your looking into this, I hope you are doing it for sake of experimentation and not just on account of me complaining so much
04:29:53runvncI have to go get dinner
04:31:48Varriountrunvnc: Experimentation.
04:32:11Varriount<3 'koch temp'
04:33:51*Demos_ joined #nimrod
04:33:58*askatasuna quit (Ping timeout: 240 seconds)
04:39:22VarriountHi again Demos
04:47:03Demos_hi, I think I am logged on from both my computers
04:47:06Demos_fowl: ping
04:47:37Demos_yup that ping kicked my netflix out of fullscreen mode
04:48:29*brson quit (Ping timeout: 240 seconds)
04:54:09*askatasuna joined #nimrod
04:56:50*askatasuna quit (Client Quit)
04:58:30*[1]Endy joined #nimrod
05:15:59SkrylarMeh. I wish we could fire people who make FPS games so they go make better games in things.
05:19:08*xenagi joined #nimrod
05:22:06DemosI like FPS games
05:22:58SkrylarI tend to just ignore them almost completely; or really anything multiplayer anymore.
05:23:31Demospayday 2 is fun
05:23:45SkrylarDealing with pubbies sucks ass and I tried joining some groups, they weren't much better.
05:23:48Demosme and my friends have been playing lots of phantasy star online 2 recently as well...
05:23:59SkrylarWay more concern for making forum posts on brag sites than actually doing anything
05:24:12Skrylarbleh.. MMOs
05:24:19DemosI also sometimes play ArmA with United Operations, they are a public group that is happy to play with anyone who actually wants to work as a team
05:24:44SkrylarI remember someone I used to know was plugging Arma groups pretty heavily
05:24:57SkrylarI poked him about it and it was just "oh well go fill out these forms" and it was like "yeah.. no."
05:25:19DemosUO is pretty much like "register on our forums, connect to TS, play"
05:25:30SkrylarIts been my experience the communities you get personally invited to because someone played near you tend to be the ones you have fun in, and the ones that you have to fill application forms for tend to care more about pomp
05:25:33Skrylarbut thats just my experience
05:26:09DemosUO is very good, as long as you are willing to try and work as a team and learn from your mistakes
05:26:21Skrylari do that, but thats never been my problem
05:26:34Demosthey have a training event tomorrow night (EST), maybe you could give them a shot
05:26:52SkrylarI just physiologically don't have the reflexes to play FPS games effectively, which means I get jammed as the medic or guy who stands around repairing shit
05:27:04Demosdude, this is ArmA
05:27:06reactormonkSkrylar, perfect.
05:27:38Demoswe are talking about a game that has realistic simulation of radios, with distortion, terrain blockage and everything
05:27:45Skrylari should reinstall DE3 later, that was a fun experience
05:27:55DemosDE3?
05:27:59Skrylardeus ex
05:28:09Skrylarthe original and human revolution were fun
05:31:11SkrylarKinda sad that the TA-style RTS games aren't more popular than they are; they don't rely as heavily on raw reflex as most of the RTS genre has decided it needs to
05:33:26Demoswell PA is a thing, I dont really like it that much though
05:34:09SkrylarI bought that but... ergh.
05:34:23SkrylarThe GUI is terrible
05:34:57Demosit is just a big transparent webpage
05:35:11SkrylarI feel like RTS keeps thinking about how to make things a bigger pain, because there are a lot of them deciding they need to be DOTA clones but they don't improve the actual means of command
05:35:49Skrylarand there isn't a pressure to improve anything in the games industry; people just say "oh its competitive" when you criticize bad design
05:36:32renesacSkrylar, cool to see siphash working
05:36:50Skrylarrenesac: yerp, i need to make a github for that later
05:36:58renesacdid you benchmark against the C version?
05:37:05Skrylarno
05:37:08Skrylardo we have a benchmarking unit
05:37:18EXetoCRTS dota clone? sounds about right
05:37:20renesac?
05:37:28renesacI'm making a benchmark module
05:37:33Skrylari ported over the test vectors to make sure the siphash works correctly, but there isn't a benchmark
05:37:34renesacbut still very incomplet
05:37:55renesachttps://github.com/ReneSac/Benchmark
05:38:07renesacand no calling of external processes either
05:38:16SkrylarEXetoC: yeah there's been a few try that; Tryst with the 'two unit modes' and Company of Heroes 2 decided to go further in to the MOBA control style of micro-over-macro
05:38:36renesacthough you can call it yourself of course
05:38:48SkrylarNobody is interested in improving macro, which is kind of funny because you would expect PA to be a macro-oriented game yet it still controls like a crappy starcraft
05:38:59renesacand bench around that
05:39:14renesacI still haven't finished the 'timeit' lookalike template either...
05:41:33Demosyeah, there are grand strat games but they are a little ... too macro
05:41:59SkrylarThose are still micro games :/
05:42:13DemosI guess macro is harder to do than micro
05:42:23SkrylarThe funny thing is when you see someone say they don't want micromanagement, and someone says Civ, but Civ is entirely micromanagement
05:42:42Skrylarspreadsheet optimizing cities across the map every turn, etc
05:43:36SkrylarI think Hearts of Iron 3 tried to lessen that by having it so once units were put in a division they would run with some degree of autonomy within that regiment
05:44:43Skrylarjust becomes funny when you end up looking at the concept of spending 20 hours memorizing math so you can play a game and enjoy it or you could do something productive . . . lol
05:47:06NimBotnimrod-code/nimbuild master a4aa4fa Andreas Rumpf [+0 ±1 -0]: make it compile with devel
05:47:06NimBotnimrod-code/nimbuild master cdb3b7a Andreas Rumpf [+0 ±1 -0]: Merge branch 'master' of https://github.com/nimrod-code/nimbuild
05:56:24Demos_so I am seeing {.push: cdecl, dynlib: name.}, it is not compileing. Does the {.push.} pgrama even work for stuff that is not compiler options?
05:59:16Araqget rid of the ':' after the 'push'
05:59:49Demos_but it does what I expect?
06:00:06Araqpush only affects proc declarations
06:00:14Demos_OK that is fine with me
06:00:19Araqso a proc type won't get the 'cdecl'
06:00:25Araqwatch out
06:01:25Araqbut yes, it does work, we have wrappers that use it
06:01:48*r0b1 quit (Quit: brb)
06:05:16fowlDemos, png
06:05:28EXetoCgif
06:05:41fowlDemos_, you have to push callconv: cdecl
06:06:12Araqreally? I don't think so
06:06:29Araqbut push cdecl is limited in the way I wrote
06:07:30fowlyes
06:08:29Araqaporia.nim(699, 12) Error: undeclared identifier: 'set_upper'
06:08:42Araqbabel update gtk2
06:08:44AraqDownloading package list from gtk2
06:08:45AraqError: unhandled exception: Der angeforderte Name ist g├╝ltig, es wurden jedoch keine Daten des angeforderten Typs gefunden.
06:08:47Araq-.-
06:09:13Demos_anyway, fowl I just fixed your assimp wrapper
06:09:16Demos_and submitted a pr
06:09:42Skrylarlol ass imp
06:09:49*brson joined #nimrod
06:09:59Skrylarthat library name amuses me every time i see it
06:10:08Demos_also, your wrappers have no license
06:11:10fowlcan you move it to a new repo
06:11:18Araqbabel list
06:11:19AraqError: unhandled exception:.babel\packages.json(1, 0) Error: { expected [EJsonParsingError]
06:11:26Demos_fowl: the assimp wrapper?
06:11:31fowlyea
06:11:35Araqhmm babel doesn't like me anymore
06:11:45Demos_I was going to but I wanted your permission first.
06:13:23Araqhmm my packages.json is empty ...
06:13:49fowlDemos_, goo for it
06:14:45Demos_OK, mind if I stick a BSD license on it?
06:15:09AraqDemos_: default here is MIT, just sayin
06:15:21Demos_allright I can do MIT
06:15:35EXetoCAraq: have you done "babel update"? it's not done automatically IIRC
06:15:46Demos_for wrappers I usually use the same lecense as the library I am wrapping
06:15:52AraqEXetoC: I just did
06:16:01AraqDemos_: that makes perfect sense too
06:16:04EXetoC:E
06:16:11fowlDemos_, bsd is cool
06:16:27Araqhow do I update gtk2 via babel?
06:16:33Demos_that was mostally for when I wrapped libalpm which was GPLv3
06:16:38*xenagi quit (Remote host closed the connection)
06:16:38Araq"babel update" is only for the packages list
06:16:47fowlbabel install gtk2
06:17:32Araqgtk2 already exists. Overwrite? [y/N]
06:18:14Araqbut ok, this works
06:18:59Araqit's also as annoying as the other package managers I'm used to, so we're doing a good job :-(
06:20:24AraqI need to talk with dom96 about babel's command line interface, babel update should update all the packages that I have installed
06:20:26fowli will be confused the day you find some software that you like
06:20:27EXetoCuse --accept/--reject to handle that automatically
06:21:08EXetoCyeah there are many conveniences that are yet to be added
06:21:53Araqwhich reminds me ... I wanted to implement some kind of natural language processing for command line interfaces
06:21:55Demos_I have been meaning to try and see how one would add nimrod libraries to the aur
06:22:23Demos_Araq: that would be neat if integrated into zsh like completion functionality
06:23:49VarriountOhi Araq
06:24:30VarriountAraq: What does the 'bracket' standard template filter do?
06:24:35Varriount*brackets
06:26:04runvncNatural language processing for command line interfaces.. seriously? Sounds awesome but not sure if serious heh
06:29:18runvnchttp://en.wikipedia.org/wiki/Attempto_Controlled_English
06:30:08Skrylarif you use pigeon english then yeah you can parse it, but thats not what people want
06:30:30Skrylarif you claim to support english but its actually a specific subvariant it just confuses people because its too close to what they would have otherwise written
06:30:43VarriountI know of a python module called pyopt that turns a command line description into a parser.
06:30:46runvncthat ace thing looks pretty powerful. pretty big download and set of related tools though
06:31:10Skrylarthe Inform project has a page on how their NLP system works which is interesting, but eh
06:31:26EXetoCVarriount: docopt?
06:31:37VarriountEXetoC: Er yes, that.
06:31:37EXetoCok I found another pyopt
06:31:46SkrylarInform is a weird creature; its like a simplified NLP parser with some prolog-like logic trees under it
06:32:33VarriountEXetoC: A couple of weeks ago I was looking for docopt, found pyopt, then found docopt, and then got the two confused just now.
06:33:41VarriountAraq: Your strongspaces feature came in handy today. runvnc and I were looking at a safe access operator template, and strongspaces fixed things.
06:37:39Demos_hm it looks like packages.json may have a trailing ',' when it should not have
06:37:43Demos_does not seem to be a problem though
06:42:11*[1]Endy quit (Ping timeout: 264 seconds)
06:43:18Demos_OK assimp is its own repo and I added it to my fork of packages and submitted a pr for the main repo
06:43:40runvncmaybe TextBlog could be converted to c with cython or something
06:45:45VarriountDemos: Does that package import textures as well as models?
06:46:01Demos_no. assimp may but my wrapper does not
06:46:08VarriountAw..
06:46:18Demos_there is a wrapper for libpng in babel though!
06:47:10Demos_actually it looks like it does
06:47:11Demos_sorta
06:47:21VarriountDemos: I'm thinking about porting parts of the libGDX api as I go through the various opengl tutorials. Some of that includes texture loading from images.
06:48:28Demos_I have been thinking of using freeimage
06:48:42Demos_another option is to write a TGA loader, targa is a very simple format
06:49:15Demos_you can essentially just copy the spec
06:50:40Demos_OK assimp only imports textures if they are stored as part of the file format that it is importing
06:51:03Varriount:<
06:51:27Demos_anoyne have thoughts on a good multi-format image loading library, I hear freeimage is decent
06:52:11VarriountDemos: What about SOIL?
06:53:56Demos_freeimage sounds more "industrial strength" SOIL is probably going to be eaiser to wrap though
06:55:29VarriountAt least, for opengl purposes.
06:55:51VarriountHm. But will it work on android?
06:56:32EXetoCI tried to wrap freeimage, but the source code is just awful
06:59:21fowlVarriount, use devil for importing textures
06:59:40Varriountfowl: Isn't that GPL though?
06:59:57fowldoes that mean you cant use it?
07:00:15EXetoCLGPL
07:00:27VarriountWell, what if I want to sell an amazing popular 2d platformer someday? :3
07:00:50Demos_I thought DevIl was unmaintained these days
07:00:58Demos_and freeimage headers look decent to me
07:02:22VarriountI prefereably need something that doesn't use any deprecated opengl features (Below 3.0)
07:03:33Demos_image loading should not use /any/ openGL features
07:04:59AraqVarriount: can you please make gist about the non-strongSpaces issue?
07:05:18Demos_anyway I am going to go to sleep. Maybe I will wrap freeimage tomorrow
07:06:03SkrylarDemos_: not exactly. devIL and SOIL are meant for loading images directly to GL
07:06:19Skrylarthe whole point of those two libs is that you just ask it to put the file in a gltexture
07:06:29fowlDemos_, theres a fork of devil but i dont see it on AUR, so it might not actually exist
07:06:31VarriountAraq: Erm, You could just check the latest forum post -> http://forum.nimrod-lang.org/t/385
07:07:09VarriountYou would think image loading libraries would be more plentiful
07:07:11AraqVarriount: ah I see
07:07:38VarriountAraq: Although, it doesn't work if you add the () to len - could you explain why?
07:08:23Araqbecause it's about '?' vs' >' ?
07:09:05Araq? has lower precedence than > in the table in the manual
07:09:30fowlVarriount, everybody uses devil
07:10:32VarriountAraq: Yeah, but what about the function call?
07:10:52Demosfowl, looks like there is something called "ResIL" that is being maintained
07:11:21fowlDemos, yea but its not on AUR so my motivation for wrapping it is very flaccid
07:11:50Demosoh god devil has an openGL interface, why the hell would you do that
07:11:57Demosor rather opengl style
07:12:29*Demos_ quit (Ping timeout: 240 seconds)
07:13:24AraqVarriount: wtf what happened with --nilChecks ?
07:13:34Araqyou said you found the offending commit?
07:13:46VarriountNo, I didn't.
07:13:52runvncMaybe I didn't know how to test it
07:14:02runvncseemed to say wasn't a valid flag though
07:14:06runvncon my compiler
07:14:11VarriountAnd on mine.
07:15:10Demosbiect that mofo
07:15:13Demos*bisect
07:15:18DemosI really need to sleep
07:15:21*Demos quit (Quit: Leaving)
07:15:25fowlmeh
07:15:33fowldont you want to call it assimp instead of nim-assimp??
07:15:38fowloh he left
07:15:54Araqrunvnc: nope, it fails for me too
07:16:09Araqand even stranger, it's not documented either
07:16:50runvncI don't know if that applies to my thing exactly, but if that flag could result in fewer segfaults or whatever when I screw up or the possibility of getting an exception instead, would be nice for me in some cases
07:17:36Varriountrunvnc: nilValueException? :3
07:17:51runvncheh I dunno
07:18:07*carum joined #nimrod
07:18:11runvncwhatever the flag is supposed to do
07:19:28Araqit turns on nil checks in some places
07:19:45Araqbut very rarely so it won't help you
07:20:03Araqmaybe that's why the former araq removed it
07:20:36fowlwe have a new araq?
07:21:11Araqyes. An araq with even less sleep
07:21:23runvncoh so it just turned out that there were a lot of places to nil check and to have that flag would be confusing/broken unless they were all implemented
07:21:57runvncmaybe not feasible to actually implement
07:22:06EXetoCfowl: I don't like the idea of using the exact same name as the original
07:22:31fowlrunvnc, nil checking should be left to the user
07:22:50fowlsegfaults arent that bad when you get backtraces
07:23:09*carum quit (Ping timeout: 252 seconds)
07:23:14Araqrunvnc: it's pretty easy to implement in the compiler, but since it was incomplete I removed it, fearing the bug reports
07:23:15fowlEXetoC, why not? its an interface to that library
07:23:17SkrylarI like the idea of nillable/non-nillable types :\
07:23:38AraqSkrylar: we got these but it's a big update on the stdlib
07:23:53Skrylari was disagreeing with fowl mostly, Araq
07:24:01Araqand you're talking about compile-time checks
07:24:12Araq--nilChecks were runtime checks
07:24:16runvncI have to give my honest opinion, being someone who has avoided c for many years (since I was in high-school/college) and having gotten used to being able to keep my server running even if I make a mistake that appears on an occassional code path
07:24:45runvncalmost everything about Nimrod from an application programmer standpoint seems wonderful, but the segfaulting is unfriendly and unnecessary
07:25:00Varriountrunvnc: What have you been using prior to nimrod? (Please don't say PHP)
07:25:09Skrylarnode.js i thought
07:25:10runvncso maybe I will be the only one but I would certainly appreciate this nilcheck thing
07:25:22Skrylari think the last time i segfaulted was when i didn't initialize a sequence
07:25:40AraqSkrylar: that will be fixed in a different way
07:25:48Skrylarwhich i will admit is un-awesome, but there's not a whole lot that the compiler could have done to help with it
07:25:50runvncI most recently programmed in Node.js, with ToffeeScript, previously CoffeeScript, previously JavaScript, previously C#/.NET, previously PHP, previously C++
07:25:52fowldoesnt runtime nil checking require a check every time a pointer is dereferenced?
07:26:09runvncyes I am getting a segfault on an seq of strings that wasn't inited
07:26:11Skrylarwell what they do in rust is use maybe's
07:26:22Araqlen for a nil seq will return 0 and 'add' will work with nil
07:26:28Skrylarif something is allowed to be null you have to case x of some(y) => foo, none()
07:26:33fowlmy maybe() works for that
07:26:45runvncok well great so the particular problem I actually had will go away if you make it work that way with seq
07:27:02AraqSkrylar: imho that's way too annoying so nimrod does it differently
07:27:02runvncawesome
07:27:08fowlwhen compiles(val.isNil): result = (val.isNil, val)
07:27:11VarriountAdd will work for nil...?
07:27:26SkrylarAraq: doesn't the current nil-tracker require if x != nil etc
07:27:27fowlnot val.isnil *
07:27:40AraqSkrylar: yes but it's slightly smarter
07:28:01SkrylarAraq: i still think it would be neat to mangle the VM so it can run like klee does
07:28:21Araqplease elaborate
07:28:47SkrylarKlee is a symbolic runtime for LLVM; you give it a harness, mark symbolic parameters, and it steps through the function call with an STP solver to break it
07:29:02Skrylare.g. it noses around for "if x > y" and then tries to find edge cases that weren't checked
07:29:29Skrylarall though klee does a full-depth check which makes it unsuitable for large projects; i think it would be nicer if it could be confined to one specific function and mock sub-calls
07:29:54Skrylarbut basically, it uses a constraint solver and tries to find parameters that break your function
07:30:11Skrylarthen produces those values so you can write a unit test on it
07:30:46Araqthat's cool but we won't get it anytime soon
07:31:07Araqunless you use Klee on the produced C code ;-)
07:31:33Skrylari don't tend to use klee; its neat but it wants to scan the whole program which is kind of silly
07:31:57Araqdunno, whole program compilation is the future
07:32:13Araqand is what nimrod does, but we need to change that
07:32:22Skrylarits not a whole program compilation issue
07:32:29Skrylarits an issue that you can't confine it to test a specific module
07:32:39Skrylarit tries to do branch checking on the whole program from the start
07:33:01Skrylaryou can't tell it "I have 100% test coverage on that module, please don't make 500 sub-branches to test it again"
07:33:11VarriountAraq: Could you explain the reasoning behind changing the behavior of uninitialized sequences?
07:34:09AraqVarriount: lazy initialization of seqs and strings can be very important for performance and the 'nil' checks in len and 'add' are *cheap*, len should be able to use a conditional move
07:34:40VarriountAraq: What will adding to a uninitialized sequence do?
07:34:55Araqtreat nil as @[]
07:35:08VarriountSo.. it will initialized the sequence?
07:35:13fowlwhat about nilseq[0]
07:35:13Araqyes
07:35:33VarriountAraq: Oh good. I thought maybe you planned to just have add() be a no-op
07:36:01AraqVarriount: you should know me better by now :P
07:36:17VarriountTrue. You're not a PHP programmer.
07:36:34fowllol
07:36:54fowli think @ mightfail() should be supported
07:37:03AraqThere is nothing worse than a program that doesn't crash but instead produces wrong results.
07:38:00VarriountAraq: Behold, sheer insanity - https://eval.in/111886
07:38:52SkrylarVarriount: seems legit
07:38:59SkrylarQNKCDZO is obviously the NSA key
07:39:12AraqSkrylar: lol
07:39:34Araqfowl: what's @mightfail() ?
07:39:44fowlAraq, it swallows errors
07:40:07VarriountAlso, evidence that prolonged exposure to PHP does terrible, terrible things to the human brain -> http://forums.devshed.com/php-development-5/php-fractal-bad-design-hardly-929746.html
07:43:19EXetoCAraq: yeah, what about nilseq[0]?
07:44:08fowlor seq.items
07:47:04EXetoCimplicit initialization was discussed before
07:47:45Araqnilseq[0] continues to crash
07:48:04Araqwhat about it? its length is 0
07:48:19Araqok, might also raise an EInvalidIndex exception
07:48:55Araqbut these are second class exceptions btw as they are gonne in release mode and the spec doesn't require them to be raised
07:49:12Araqthe spec allows a fatal error instead too
07:49:25Araqer ... well I need to write that part of the spec
07:50:52VarriountGoodnight guys. May all your syntactic ambiguities be resolved.
07:53:49EXetoCok well if length works like that
07:53:51Skrylarugh. i forgot there was another problem with his PHP code potentially
07:54:06Skrylarthere's a thing where you never use a comparer that exits early in security code
07:55:25Skrylari don't have the link on hand but i recall an article talking about timing attacks which made use of cmp() exiting early, so they could make educated guesses about how their brute forces were succeeding
07:59:02*flyx read the nimrod tutorial. most things look nice, but generics look like C++ templates
07:59:34flyxis it possible to constrain generic parameters?
08:02:51EXetoCthey will share some aspects obviously
08:02:54EXetoCflyx: http://build.nimrod-lang.org/docs/manual.html#type-classes
08:03:31EXetoCyou should see "T: int|string" there
08:04:17flyxah, nice
08:07:10EXetoCscroll down and you'll see "User defined type classes" which allows for more detailed constraints among other things. it's new and relatively untested though
08:08:28flyxwow
08:08:49flyxthere are quite some features in nimrod I've never seen before
08:09:34flyxwell, mostly the compile-time things
08:11:23*DAddYE joined #nimrod
08:11:56flyxis there any preference of a build system? plugins for existing build systems?
08:17:32EXetoCflyx: I only know of this https://github.com/fowlmouth/nake
08:17:54EXetoCcaching is done by the compiler
08:24:10flyxI'm sceptical about nimrod's approach to compilation, or I may not fully understand it yet
08:24:25flyxso I only give one file and the compiler automatically discovers all other files?
08:25:09flyxwhat if I need different flags for different files?
08:26:27Araqyou add .push and .pop pragmas to the files that need it then
08:28:08*brson quit (Quit: leaving)
08:28:35flyxI meant more like, defines used in when statements, that are not known in the file
08:30:17Araqnot sure what you mean
08:32:47AraqVarriount: to answer your questions: braces and endx parsers have never been implemented
08:33:30flyxwell I just started reading the docs, so I may not fully understand about how everything works
08:34:08flyxI assumed values used in "when" statements can be given on the command line
08:34:35flyxso I wondered, how could I set such a value for only one source file if everything is compiled at once
08:35:05Araqyou can use --define:foo and when defined(foo) and you're right that it is a global switch then
08:35:25Araqbut it's not a problem in practice afaict
08:35:45Araq'defined' has other problems
08:35:49flyxokay. I might be too familiar with "classical" one-file-at-a-time-compilation
08:37:26flyxwhat about headers? there don't seem to be any in nimrod, how can I use a nimrod-compiled library in my code?
08:38:23Araqread the tutorial or the manual then, keywords: module, import, export marker *
08:43:08flyxI saw that, but what happens when I import something which is not available as source, but only as compiled library? does the compiler "extract" the exported definitions from the library and make them available in my code?
08:45:17EXetoCthere's --app:lib and --app:staticlib
08:45:55flyxsure. I understand how I can create a library, but I don't really understand how to use it
08:45:57EXetoCwhich doesn't answer the question :p
08:46:38flyxlet's say I want to spread a nimrod library as binary package. I include the nimrod-compiled binary and nothing else?
08:48:11flyxthe developer using the library also needs a way of knowing the exports of the library, so I reckon I have to include *some* form of include/header files
08:49:18Araqflyx: there are symbol files which you can distribute instead of nimrod files, except that they are currently broken
08:49:30flyxah
08:49:42Araqthey are also quite easy to disassemble but we can fix that
08:50:56flyxis nimrod on the whole a spare-time/volunteer project?
08:51:02EXetoCmost people just import complete modules though
08:51:19EXetoCincluding the standard library
08:51:46flyxwell that works for small projects
08:52:51EXetoCI think it works for most projects, assuming that the source code is indeed available
08:53:35flyxI mean, look at C++, the folks there are doing stuff like precompiled headers to speed up compilation, because it takes a fair amount of time for bigger projects.
08:55:25EXetoCthis will obviously be dealt with at some point, but keep in mind that nimrod code compiles a lot faster
08:56:05*_fel1x quit (*.net *.split)
08:56:05*oxful quit (*.net *.split)
08:57:35flyxwell. so far, nimrod looks promising
08:57:41flyxI might want to give it a try
09:03:05*_fel1x joined #nimrod
09:03:26*oxful joined #nimrod
09:10:23EXetoCflyx: ok. feel free to put that limitation on the record, if it hasn't already
09:23:46flyxhm. the standard library looks pretty vast. is just everything someone writes that looks usable included there?
09:24:16Araqdepends on what you're looking at, 0.9.2 was prior nimrod got a package manager
09:24:38*flyx is looking at http://nimrod-lang.org/lib.html
09:24:58Araqnow that this exists, things are moved from the core to external packages
09:25:27flyxah, okay
09:26:35Araqyou're looking at the documentation for 0.9.2 fyi
09:27:18Araqbut yes, the stdlib is quite big
09:27:36Araqit still has some serious holes like a lack of a bignum implementation
09:28:45flyxthe stdlib may be a good reason to switch to nimrod
09:33:14NimBotAraq/Nimrod devel 274aff5 EXetoC [+0 ±1 -0]: Better names.
09:33:14NimBotAraq/Nimrod devel ec79e37 EXetoC [+0 ±1 -0]: Update test with new names.
09:33:14NimBotAraq/Nimrod devel 70d3078 EXetoC [+0 ±1 -0]: Use separate names for type-based allocation procs rather than overloading.
09:33:14NimBotAraq/Nimrod devel eb96089 EXetoC [+0 ±1 -0]: Update unit test.
09:33:14NimBot4 more commits.
09:34:34Araqdom96: if you want the IpAddress stuff in net.nim, merge PR #972
09:34:48AraqI won't because I'm not sure it belongs in there
09:35:23AraqEXetoC: can you move the mongodb wrapper to its own package?
09:46:40NimBotAraq/Nimrod devel 5626845 Miguel [+0 ±1 -0]: 'Connection' argument in 'Open' was not used, so MySQL host and port were always default ones. Now 'Connection' is treated as 'host:port'.
09:46:40NimBotAraq/Nimrod devel 0a322a3 Miguel [+522 ±210 -475]: Merge branch 'devel' of git://github.com/Araq/Nimrod
09:46:40NimBotAraq/Nimrod devel ff5d66a Miguel [+12 ±88 -3]: Merge branch 'devel' of git://github.com/Araq/Nimrod
09:46:40NimBotAraq/Nimrod devel 3963987 Miguel [+1 ±5 -1]: Merge branch 'devel' of git://github.com/Araq/Nimrod
09:46:40NimBot2 more commits.
09:46:57*aftershave_ quit (Quit: Textual IRC Client: www.textualapp.com)
09:47:18*aftershave_ joined #nimrod
09:47:28*aftershave_ quit (Client Quit)
09:47:43*aftershave joined #nimrod
09:51:41*cark quit (Read error: Connection reset by peer)
09:52:22EXetoCAraq: I have. it's incomplete though, but the old one doesn't even work so I might as well remove it then I guess
09:53:05Araqthe old one *used* to work, I tested it
09:53:40Araqbut API stability is not something important for hippster nosql programmers
09:54:17*cark joined #nimrod
10:00:53EXetoCI know, you said that
10:04:10AraqEXetoC: ok, I'll simply remove the mongodb wrapper then, good?
10:04:11*nande quit (Read error: Connection reset by peer)
10:07:18EXetoCAraq: ok
10:07:41EXetoCno one is using it is what I'm saying, so that's why it can be removed now
10:08:01EXetoCunless someone happens to use it in conjunction with an old version of MongoDB, but that seems unlikely
10:11:17EXetoCso, should my xml example parse correctly? because a few characters outside the string literal are included in that case. in my case, the web server that I queried gave me a similar string with a raw ampersand in it
10:22:22dom96Araq: If you just blindly execute commands then you won't get anywhere.
10:22:53EXetoCeventually he will
10:23:33Araqdom96: that's my point, I want to be able to do this
10:23:57EXetoCwhen?
10:24:14dom96Araq: babel is not a mind reader
10:24:36Araqdom96: question is: do you mind patches that make it read my mind at least?
10:24:57dom96Araq: Depends on the specific patch
10:25:41Araqbabel update # should update all installed packages. do you agree?
10:26:09dom96no
10:26:34EXetoCI think there should be a separate command for that
10:26:36EXetoCupgrade?
10:26:58dom96Yes. 'update' already has a purpose.
10:27:05dom96If you read --help you would know what it is.
10:27:08*filwit joined #nimrod
10:27:11AraqEXetoC: but this way lies madness, upgrade vs update are horrible for a non-native speaker at least
10:27:52dom96Yeah. That's true. But it's either that or we will have: update-packages-json and update-packages
10:28:29Araqupdate-list and update-packages is good
10:28:35*q66 joined #nimrod
10:28:48dom96Alright
10:29:00dom96I can deal with that.
10:29:40EXetoChey, what happened to short names? :p I think we short have short names for everything though
10:29:54EXetoCshort/long options
10:29:56dom96However, due to the way that babel operates, updating all packages isn't exactly trivial
10:30:17dom96or rather, it's trivial but it's not trivial to only update the packages which have changed
10:30:19Araqdom96: I can imagine but you can simply iterate over the babel directory
10:30:33dom96because there is no way to tell if the git repo changed.
10:30:37dom96remotely
10:31:25Araqyeah I can imagine
10:31:57dom96So I likely won't implement that.
10:32:21EXetoCwe can change that behavior later then, because at some point the whole system needs to change in order to accomodate a bigger repository
10:32:39dom96Although you've hit an interesting bug.
10:32:48dom96The dependencies may need updating.
10:33:01dom96Even if they are already installed
10:34:58dom96But that may just be an issue with aporia's babel file.
10:35:07dom96It depends on gtk2 >= 1.0, not #head
10:36:12NimBotnimrod-code/Aporia master d3f49aa Dominik Picheta [+0 ±1 -0]: Now depends on gtk2#head
10:36:47dom96Yep. Works now.
10:37:42Araqah
10:37:49AraqI see, cool
10:38:07Araqso we already have proper dependency tracking
10:38:31dom96I think so.
10:38:36dom96Depends what 'proper' means
10:41:26*DAddYE quit (Remote host closed the connection)
10:41:53*DAddYE joined #nimrod
10:43:42*Matthias247 joined #nimrod
10:45:28*io2 joined #nimrod
10:46:01*DAddYE quit (Ping timeout: 244 seconds)
10:47:41*io2 quit (Client Quit)
10:55:50*io2 joined #nimrod
11:04:16*Matthias247 quit (Read error: Connection reset by peer)
11:10:30Skrylarhow not to do a filing system: yamaha's list of voice patterns
11:10:58Skrylarmake sure that all 3 bytes have completely nonsensical order and settings that way its completely aggravating to index
11:15:21*Endy joined #nimrod
11:22:52*noam__ is now known as noam
11:42:26*DAddYE joined #nimrod
11:47:16*DAddYE quit (Ping timeout: 265 seconds)
11:57:09*filwit quit (Quit: Leaving)
12:33:59*eigenlicht quit (Ping timeout: 240 seconds)
12:42:38*psquid quit (Ping timeout: 240 seconds)
12:43:11*psquid joined #nimrod
12:49:18*psquid quit (Quit: worok)
13:29:30*darkf quit (Quit: Leaving)
13:29:37*BitPuffi1 quit (Ping timeout: 240 seconds)
14:07:21*xenagi joined #nimrod
14:32:57*[1]Endy joined #nimrod
14:35:20*eigenlicht joined #nimrod
14:36:55*Endy quit (Ping timeout: 265 seconds)
14:36:56*[1]Endy is now known as Endy
14:46:40*flaviu joined #nimrod
14:47:19*BitPuffi1 joined #nimrod
14:50:02*BitPuffi1 quit (Client Quit)
15:06:49*silven joined #nimrod
17:24:49*woodcut quit (Remote host closed the connection)
17:52:58*Endy quit (Ping timeout: 240 seconds)
18:03:45*nande joined #nimrod
18:23:30OrionPKhrm
18:23:30*r0b1 joined #nimrod
18:23:50OrionPKwhat's new folks
18:25:55flaviudom96: Just came across your closure macro, its going to be very useful, thanks
18:41:43*Matthias247 joined #nimrod
18:54:29*Demos joined #nimrod
19:23:41Varriountflaviu: dom96 has a closure macro?
19:24:12flaviuVarriount: https://gist.github.com/dom96/9155536
19:24:38flaviuReally neat, it lets (x,y)=>body
19:27:55VarriountKinda like python's lambdas
19:28:34flaviuSeems much closer to scala's
19:30:27VarriountAraq: Removed the debug code from my PR
19:31:12Varriountflaviu: We need a nimrod-snippets repo. Its code like this that's convenient, but not exactly sophisticated enough for a package.
19:35:19*askatasuna joined #nimrod
19:38:23flaviuVarriount: Good idea, but I think that particular snippet should be extended into a package for functional programming
19:40:33Matthias247I think that is even so much helpful that it should go in the stdlib or even the language ;)
19:54:45AraqMatthias247: we decided to leave it as a macro to show off nimrod's power
19:59:02flaviuAraq: wouldn't hurt for it to be in the stdlib. I stumbled upon it coincidentally.
20:00:58flaviuIt doesn't show anything off if no one shows it off
20:02:03fowlbe nice if (x: type, y: type) => .. worked
20:13:07Demosfowl, do you have tests for that assimp wrapper?
20:15:09fowlDemos, no but i have an example usage: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/musings/nim3d/lib/models.nim
20:16:02Demosdoes that run?
20:16:51DemosI ask because I think the TMesh structure is wrong
20:16:59fowlit used to
20:17:24DemosI am writing a test now, but wanted to know if it was working for you. Is that valgrind clean?
20:18:40fowlthAT was a translation of a tutorial iirc
20:24:21fowlDemos, i just looked at aiMesh vs TMesh, it looks fine
20:24:49Demosoh is TMesh.texCoords an array of four arrays, one for each texcoord
20:25:04Demosso like all the us...... all the vs ..... all the ws .....
20:25:56fowl C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
20:26:34fowlits an array of pvector3d
20:27:46Demosright, but I think in this case the pvector3d is an array of lengh mNumVertieces
20:44:12*OrionPK quit (Ping timeout: 252 seconds)
20:49:32fowlDemos, what makes you think that
20:49:59DemosI just did not understand the docs correctly
20:50:20Demosit supports sever uv(w) coords per vertex
20:51:57NimBotAraq/Nimrod devel 34ddb30 Clay Sweetser [+0 ±1 -0]: Tester now outputs all the test results of the current test run to json.
20:51:57NimBotAraq/Nimrod devel 4c2fec8 Clay Sweetser [+0 ±1 -0]: Removed debug code
20:51:57NimBotAraq/Nimrod devel bf982e9 Andreas Rumpf [+0 ±1 -0]: Merge pull request #981 from Varriount/tester/enhanced-json-output... 2 more lines
21:01:58*zahary1 quit (Read error: Connection reset by peer)
21:02:01Demosit would seem that if you use {.push dynlib:Foo.} to apply the {.dynlib.} pragma to functions than --dynlibOverride fails to work
21:02:03*zahary joined #nimrod
21:05:32AraqDemos: knowing how it's implemented, that seems unlikely
21:07:59Demoswelp when I move dynlib: from the {.push.} pragma to each function the compilation fails with --dynlibOverride (as it should) but when I do not the compile succeeds but the program fails to start because it can not find the library
21:10:43Araqok please report it
21:15:19*nastyanst quit (Remote host closed the connection)
21:18:14fowlim thinking of combining the chipmunk, ODE and bullet wrappers into one package
21:20:26Araqfowl: many small packages are preferable over fewer bigger ones.
21:20:42AraqThe reason? github language usage statistics.
21:21:31DemosAraq, it seems that although it now works with --dynlibOverride it still loads a dynlib
21:21:40DemosI think it may just be a windows "thing:
21:25:56dom96flaviu: Matthias247: Varriount: the closure macro will hopefully make it into the stdlib once some of the issues are ironed out
21:26:39dom96I'm also planning to add a proc type description macro which will allow: (string, int) -> string
21:26:53dom96instead of proc (x: string, y: int): string
21:26:57DemosARRRRRGH pkg-config is broken in msys2
21:27:20flaviudom96: You can do that? is there any documentation for this feature?
21:27:59dom96flaviu: You will be able to once I create the macro which will allow it.
21:28:43dom96<fowl> be nice if (x: type, y: type) => .. worked
21:28:56dom96The macro supports that IIRC
21:29:14flaviuNo, I mean for the macro. Is there any documentation for type macros?
21:30:36dom96There is no special macro required for this. Just read the general docs.
21:35:45*Endy joined #nimrod
21:43:59Demoswow so assimp actually fails to build in release mode on windows
21:44:04Demossorry in debug mode
21:53:22*OrionPK joined #nimrod
21:59:13fowlthats ok
21:59:23fowlresil fails to build for me but at least devil still works
22:01:07*Demos_ joined #nimrod
22:03:59*Endy quit (Ping timeout: 240 seconds)
22:04:55*r0b1 quit (Ping timeout: 244 seconds)
22:17:38renesac"The difference in default timer function is because on Windows, clock() has microsecond granularity but time()'s granularity is 1/60th of a second; on Unix, clock() has 1/100th of a second granularity and time() is much more precise. "
22:18:02renesac"On either platform, the default timer functions measure wall clock time, not the CPU time. This means that other processes running on the same computer may interfere with the timing.
22:18:33renesac<-- how nimrod cpuTime() works in regards to that?
22:20:07renesacwhat are the equivalents to python's time() and clock() on nimrod, or the functions in times work the same independent of the OS??
22:20:21Varriountrenesac: cpuTime is a different kind of api call for nearly all systems. It's usually a monotomic timer that starts either when the application starts, or when the first call is made.
22:21:18renesacyeah, but what about the precision of cpuTime()?
22:21:30renesacwhat is it in linux, and is it the same on windows?
22:22:16Araqiirc cpuTime() - cpuTime() produces a time diff in ms on every OS
22:22:30renesac" However, it may measure the real time instead (depending on the OS)"
22:23:10renesacit would be useful to know which os it measures the real time
22:23:17AraqI think it does *cpu* time on posix, real time on windows
22:23:46renesachum
22:23:56VarriountAraq: Actually, looking at the source of times.nim, it just uses clock() in the standard c runtime
22:24:05renesacso cpuTime() is probably equivalent to python's clock()
22:24:53renesacso I probably want the time() equivalent on unix
22:27:19VarriountHm.. cpuTime() should probably be altered to use getHighPerformanceClock() on windows.
22:29:02AraqVarriount: yeah do it
22:29:46renesacgetHighPerformanceClock() returns cpu time or real time?
22:30:16renesacand it would be good to have an equivalent precision on unix, as it is now 1/100th second precison aparently...
22:30:40*renesac still trying to wrap my head around this timer zoo
22:30:44renesac*his
22:30:46Varriountrenesac: http://msdn.microsoft.com/en-us/library/windows/desktop/ff553053(v=vs.85).aspx
22:31:02VarriountI don't know what you mean by 'cpu time' and 'real time'
22:31:40VarriountDo you mean, a monotomically increasing counter, and a system wall clock time?
22:32:28renesacif it counts time used by other processes that may have stopped your process, for example, it is 'real time'
22:32:37Araqcpu time stops and resumes when the OS schedules another process
22:32:40renesacif it only counts the cputime of your process, it is cpu time
22:32:51renesacyeah
22:33:24renesacI *think* that a function named cpuTime() should return the cpu time
22:34:07*r0b1 joined #nimrod
22:34:28Varriountrenesac: http://msdn.microsoft.com/en-us/library/ms725473.aspx
22:34:49VarriountSorry, I don't have a map. Let's hope no-one gets lost and eaten by a tiger.
22:34:54Araqand I *know* that was hard to achieve portably and so we decided it's better to have an approximation for cpuTime
22:35:05Araqotherwise you do:
22:35:19Demos_yup the assimp wrapper is binary incompatible with assimp, will fix
22:35:23Araqwhen defined(cpuTime): cpuTime() else: clockTime()
22:35:39Araqwhich is hardly an improvement over cpuTime()
22:36:08Demos_also I think it is relevant that microsoft's version of the C++ standard lib has a function called std::chrono::high_percision_timer::now() and it has a resolution of 8ms, this is supposed to be the highest percision timer
22:37:31VarriountDemos: That probably uses the QueryPerformanceCounter api call
22:37:44Araqugh the WinAPI is so ugly. Why so many vowels ...
22:37:57Araqunix proved they are not necessary
22:38:15VarriountAraq: That's not necessarily a good thing.
22:38:32VarriountBoth are at the ends of two extremes
22:38:38Araqcode simply looks clnr ths wy
22:39:47*r0b1 quit (Ping timeout: 265 seconds)
22:40:10AraqVarriount: my humor is still subtle, I guess
22:40:13renesachttp://msdn.microsoft.com/en-us/library/windows/desktop/dn553408 <-- there are quite a few calls that give you 10~16ms resolution on windows...
22:40:57Varriountrenesac: You could use this - http://msdn.microsoft.com/en-us/library/windows/desktop/ms683237(v=vs.85).aspx
22:41:08VarriountAll you have to do is get the main thread handle.
22:41:31VarriountWhy exactly do you need this time information for?
22:41:40Demos_you need it in games
22:41:49renesactimeit clone
22:42:05renesacI'm using cpuTime currently
22:42:13Demos_although the really fast timers have some problems where they can sometimes be different depending on which CPU core you are getting information from
22:42:22Varriountrenesac: Then I'll see about updating cpuTime() to use QueryPerformanceCounter
22:42:24renesacand by the way it works it don't need that much precision
22:42:37VarriountThat is what such things are supposed to use.
22:42:40renesacbut 1/60th second is pretty low precision...
22:43:13renesacmilisecond precision would already be cool, and the more the better
22:43:17Araqrenesac: in system/ there is a much better module
22:43:22renesacI'm on linux now, though
22:43:35AraqI didn't expose it because then I have to maintain it
22:43:42renesacAraq, I saw it, for the gc right?
22:43:47Araqright
22:43:48renesacyeah
22:44:22Demos_wow the GC makes valgrind a sad panda
22:44:28renesacVarriount, you know about this: https://github.com/Araq/Nimrod/blob/devel/lib/system/timers.nim
22:44:29renesac?
22:44:49Varriountrenesac: Vaguely
22:46:59renesacwhat I would need is this getTicks exposed
22:47:48renesacand the '-'
22:49:28Araqrenesac: make a proper module out of it, copy&paste is allowed
22:49:43renesachum, ok
22:49:56AraqI like to shield the GC implementation from a stdlib module
22:50:21Araqthat will get overhauled soon because it doesn't follow "software engineering practice as introduced by Ruby"
22:51:27*Araq 's mood is on a summit
22:55:06VarriountAraq: Ooh, is it on one of the mountains in Garmisch?
22:55:58*r0b1 joined #nimrod
23:00:36VarriountHi r0b1
23:05:06AraqVarriount: do you like German music?
23:06:26r0b1yo Varriount
23:06:52VarriountAraq: I haven't had much chance to listen to German music. The only one I know well is '99 Luftballoons'
23:07:23*dom96 <3 german music
23:08:18Araqhum who was the guy who used to live in germany? Demos?
23:08:30Demosnope
23:08:51VarriountI used to live in Germany
23:09:04VarriountHowever I went to school on a US military base.
23:09:14Araqah good, so I'm not insane
23:09:26*Araq laughs and coughs
23:11:16Varriount"But I don't want to go among mad people." "Oh, you can't help that. We're all mad here. I'm mad. You're mad."
23:11:49VarriountAlice in Wonderland in a really strange story.
23:12:12renesachttp://nadeausoftware.com/articles/2012/03/c_c_tip_how_measure_cpu_time_benchmarking <-- ok, this sorts out the cpuTime() confusion... with lots of #ifdefs
23:13:04*Araq played Alice in Wonderland on Hard
23:13:12renesacbasically, for windows it should be 'GetProcessTimes'
23:13:38*Demos_ quit (Ping timeout: 244 seconds)
23:13:46renesacfor other unixes, getrusage() seems good for microsecond precision
23:14:14Araqwhat is "other unixes"?
23:14:34renesacactually, for any unix
23:14:38renesacincluding linux
23:14:46renesacposix compilant oses
23:14:52renesacI mean
23:15:40renesacwell, it describes each option, and offers a simple table as summary
23:15:46renesacin that link
23:16:33Araqmuhaha, posix compliant means little
23:17:12*zezba9000 joined #nimrod
23:17:22Araqmacosx will have its own way, BSD will follow an older version of the standard and linux only supports it with kernel 2.7.2
23:17:34*carum joined #nimrod
23:17:41renesacyeah, clock_gettime( ) shows that...
23:18:28renesacbut getrusage() seems consistent across all posix compilant systems
23:18:54renesacexcept for that 32 bit vs 64bit thing...
23:19:12renesache don't specify when the 32bit interpretation was deprecated...
23:19:46renesacbut I guess it is not a problem for anybody running an updated OS now
23:19:53Araqjust make it work on haiku OS
23:20:21renesache don't say anything about haiku OS there ^^'
23:20:37Demoswas linux kernel 2.7.2 when relatime became default?
23:20:45renesacprobably an "else: clock()" takes care of that
23:20:46dom96Make sure it works in nimkernel too. You may need to implement most of the kernel first though :P
23:21:07AraqDemos: don't take me serious when i'm in the "mood"
23:21:41Demosyeah that is not a real kernel... :\
23:21:45Demoshehe
23:22:23dom96hrm... I should add some ASCII porn to nimkernel. That's all people want nowadays anyway.
23:22:54VarriountWhat's up with the Haiku OS mentions? I've heard it mentions a couple times on IRC, as well as in the forums
23:23:33fowlVarriount, haiku is the future
23:23:58dom96I thought linux was the future
23:24:06flaviufowl: how so?
23:24:19Varriountdom96: Use this -> http://text-mode.tumblr.com/post/55332433389/lesson-learned-dont-use-irc-for-presentations
23:24:27*Demos_ joined #nimrod
23:24:32flaviudom96: 2014 is the year of the linux desktop :P
23:24:37dom96Varriount: hah
23:25:54AraqVarriount: I like the Haiku project because it's not unix and tries to produce a decent desktop OS
23:27:26dom96Meh. It's not written in Nimrod and therefore inferior in comparison to nimkernel.
23:27:43EXetoCflaviu: no 2015
23:27:49Araqnimkernel is in a class of its own, ofc
23:28:49dom96Nimkernel is a state of the art OS. ASCII, yellow background, text printing with a different background /and/ foreground color, and a choice of 16 fine colors.
23:29:05dom96It doesn't get better than that.
23:30:12Araqalso nimkernel introduces the revolutionary "everything is not implemented" abstraction
23:30:30Araqwhich ensures perfect interoperability between subsystems
23:30:38dom96haha
23:30:45dom96Precisely.
23:31:14renesacdoes it fit on a floppy disk?
23:31:53Araqnimkernel is a time saver par excellence, it lets you forget about your computer and go swimming instead
23:32:38Araqyou'll never be more productive with a different OS
23:33:04dom96It's so small that you can fit it on a single punch card!
23:33:45flaviurenesac: I think that it would with dead code elimination
23:34:06flaviualso, there are apparently 200MB floppy drives
23:34:28renesacthose are zip drives
23:34:54flaviurenesac: really? looks floppy to me: http://www.karbosguide.com/images/hifd.jpg :P
23:35:31renesacoh, I haven't seen those
23:38:37flaviudom96: error handling is broken, what if two errors happen right after each other? Wouldn't one be replaced before the user could read it? :)
23:42:00dom96That is a very good point.
23:42:31dom96A fix will come in Nimkernel 2.0.
23:42:55dom96Yours for only $29.99!
23:53:24Demos_is there a way to specify the packing of a struct
23:53:33Demos_I am wrapping a library that uses #pragma pack(1)
23:53:50AraqDemos_: that's a tough one
23:54:08Araqyou can import the header
23:54:16Araq(.header pragma)
23:55:07Demos_not really ideal
23:55:53Araqdepending on the struct, the pragma pack(1) might not be necessary
23:56:34Demos_actually it may all be windows specific code
23:57:44Demos_oh no it looks like these are types from the windows headers that this library just decided to copy
23:58:44zezba9000Hey I'm dabbiling in the idea of making a C# to nimrod converter.
23:58:45zezba9000Can't spend to much time in it yet, but find the idea promising.
23:58:45zezba9000I can use NRefactory to convert the C# sytax tree to pure nimrod code.
23:58:45zezba9000This would keep human readability from C# to Nimrod and make debuging easy when writing the converter.
23:58:45zezba9000I plan on looking into this for personal reasons to get more performance out of C# and i'm sure others might find it usful if I end up doing it.
23:58:46zezba9000Any thoughts or am I just speaking to the wrong crowd ;p
23:59:07zezba9000... Sorry for the word dump...