<< 30-01-2014 >>

00:00:17AraqBitPuffin: I fixed EXetoC's babel package
00:00:20BitPuffindom96: yes and I have nothing on my plate, good plan there
00:00:27filwitlol, still laughing from the first one BitPuffin
00:00:28Araq(don't remember the name)
00:00:38BitPuffinAraq: the glfw one?
00:00:48EXetoCyes
00:00:49DemosVarriount, you want me to compile that code with VCC?
00:01:17VarriountDemos: And debug it, if it crashes, yes
00:01:24BitPuffinHonestly I don't even know what caused the bug because the error wasn't saying anything useful like oh, which line it went south
00:01:31BitPuffinbut I'll try it with the latest
00:01:52Discolodai need to watch SG-1 again
00:02:12AraqDiscoloda: StarGate?
00:02:13VarriountSince you are the only one here who has a chance of getting a look into what is going wrong with getcompletionqueuestatus
00:03:02DiscolodaAraq: yes
00:03:48BitPuffinfilwit: We are watching the programming landscape and it looks like Rod is just penetrating its way into the community
00:04:23filwitBitPuffin: there's so much gold to that idea, it would be hilarious, lol
00:04:52DemosI am really quite opposed to changeing the name
00:04:57DiscolodaAraq: i think a language called "Zero Point Module" would be nice, shortened to "zpm". thought of it when you mentioned Stargate
00:05:13BitPuffinraphics/terrain.nim(70, 31) Info: instantiation from here
00:05:15BitPuffinlib/system.nim(698, 9) Error: type mismatch: got (array[0..999999, TVec3], nil)
00:05:17BitPuffinbut expected one of:
00:05:27BitPuffin<long list> believe that was the same error as before
00:06:29AraqDiscoloda: there is no point in zero point though ;-)
00:07:17BitPuffinactually the error kind of makes sense
00:07:23BitPuffinWhich the last one didnlt
00:07:59BitPuffinSo I guess you fixed it Araq :) nice
00:08:21Araqno, zahary did, most likely
00:08:27DiscolodaAraq: that makes it sound meta
00:08:47BitPuffinah
00:09:11AraqDiscoloda: anyway, stop watching SG1, work on quake 2-3 instead :P
00:09:45BitPuffinso quake -1
00:10:19DiscolodaAraq: heh. im considering parsing a proper AST for C, then convert that to Nimrod AST
00:10:40Demoschangeing the name is a really bad idea... I think the name is different enough to sick out, and reflects how nimrod does things in interesting ways that break from the C/Simula derived mainstream languages
00:10:53DemosDiscoloda, break out the libclang yo!
00:11:17Discolodayou can get a AST from clang?
00:11:22DemosI think so
00:11:27Demosone for c++ even
00:11:31AraqDiscoloda: I considered that too and came to the conclusion it's worthless
00:11:41Araqjust patch the nimrod AST afterwards
00:11:43dom96I think that if **Dr Dobbs** doesn't mind putting Nimrod on their cover letter that the name is really fine.
00:11:47Araqno need for 2 ASTs
00:14:05Demosright. C is simple enough for that to work. It may make c2nim accept more source files though, since right now there is a good chance of it rejecting the code you give it
00:14:26Discolodaother than c2nim, the C AST can then have a API, for doing transformations on C with Nimrod. like https://github.com/eliben/pycparser or http://hackage.haskell.org/package/language-c-0.3.1.1/docs/Language-C-Syntax-AST.html. both the C AST library and c2nim should be babel packages. right?
00:15:45Demosright, however we probably would want to build that API on already existing tools (libclang) which pulls in a whole slew of dependencies, not sure how babel handles c++ deps
00:17:11VarriountGod.. no... no autoconf.. *whimper*
00:17:13AraqDiscoloda: people won't accept it anyway
00:17:31Araqthey will tell you should (lib)clang instead
00:17:38BitPuffinthat's true actually, c2nim (+ endb etc) _should_ be babel packages no?
00:18:02AraqBitPuffin: I guess
00:18:31DemosLLVM uses cmake afaik
00:18:43AraqDiscoloda: in fact, perhaps you should use (lib)clang and make clang2nim
00:18:47BitPuffinAraq: since you don't wanna end up as disorganized as fowl ;)
00:19:28AraqI was annoyed by the long compile times of LLVM and the enterprisey API, so I wrote my own C parser
00:19:46dom96Yes. nimgrep, niminst and everything in tools/ should be a babel package too.
00:19:56dom96The website should be split into a separate repo too.
00:20:14Araqwhich was more fun anyway plus I could tweak it for my purposes
00:20:25dom96Anyway, good night.
00:20:58DemosAraq, libclang does not look /that/ bad on first inspection, but I agree that the compile times are pretty bad
00:21:37Demosthen again I think that once you add GCC extensions, MSVC extensions, parsing for nonstandard stuff, and c++ things get big
00:22:12DemosI would really like the c parser in c2nim to actually parse 99.9% of source files, which it does not currently
00:22:56Araqdunno, I try to clean up everything anyway
00:23:14Araqso fixing the C or the produced nim makes little difference
00:24:35BitPuffinwat, clang compiles waaaAAAAAy faster than GCC in my experience
00:24:47Demosright, but it is nice to be able to generate the nim file directly from the C header with little changes, then change stuff in nimrod
00:24:58DemosBitPuffin, I have not found that to be the case
00:25:13Demosalthough it depends on what compile options you have
00:25:21BitPuffinDemos: I guess
00:25:25DemosI hear disableing all xcompalation helps a lot
00:25:27BitPuffinDemos: either way it's a way better compiler imo
00:25:41BitPuffinDemos: since it nice with pointing out where things went wrong
00:25:43Demosclang actually tells you its progress though, which is nice
00:25:57Demosgcc is getting much better as well
00:26:11Demosbut yeah, clang is badass
00:26:24BitPuffinat least as badass as a c compiler can be
00:26:32*aruniiird joined #nimrod
00:26:56Demosheh writing a c++ compiler from scratch like they did is no small taks
00:26:58Demos*task
00:27:16EXetoCsounds like a fun weekend project
00:27:30filwitAraq: semexprs:733, 'destType' is be declared be never used.. what am i missing?
00:27:39filwitAraq: any hints?
00:27:50filwitAraq: trying to hunt my OOP bug down again
00:28:04*adoniscik joined #nimrod
00:28:23filwitjust wondering what is going on with the code there
00:29:41Araqhi adoniscik welcome
00:29:56filwitAraq: sorry, stupid question, nevermind
00:30:56DemosVarriount, gcc compiles proactor fine but vcc fails with that devide by zero
00:30:56adoniscikAraq, thanks. I came here just to see the community and thank you for the great language. When's 1.0 due?
00:31:06filwitwait.. no it's not, it's just being assigned to something instead of using 'discard'
00:31:08Demoswhen I run the gcc version I get a bunch of output with lots of []s
00:31:30filwitit builds fine with discard. must have been used at one point and now isn't.
00:31:43VarriountDemos: And it doesn't crash?
00:31:49Demosfilwit, I think I may have seen something in the github issues about destType, check the last few issues
00:31:57DemosVarriount, when compiled with gcc no
00:32:07filwitDemos: thanks, i'll check
00:32:14VarriountIn both debug and release? What bit-ness?
00:33:00Demos64bit debug atm
00:33:26Demoswhoop release crashes it
00:33:50VarriountDo you get a error or something?
00:34:41Demosjust a segfault
00:34:55Demosyou said the stacktrace was in msvcrt someplace
00:35:16VarriountDemos: Well, yes, at the call to getQueuedCompletionStatus
00:35:44VarriountHowever there are no symbols gcc can use to get into those calls, and I can't compile the code with vcc
00:36:27Demoswell I can debug it, but I need to generate symbols, so give me a moment
00:36:39Demosmy intel command prompt shortcut went and hit
00:36:41Demos*hid
00:36:55Araqadoniscik: 1.0 is december this year ... but it gets more and more unlikely
00:37:39reactormonkVarriount, http://dpaste.com/1576055/
00:37:41reactormonknot sure if it works
00:38:56*Varriount quit (Quit: Leaving)
00:39:18*Varriount joined #nimrod
00:39:44VarriountHrm
00:40:18VarriountAraq: Under what circumstances are arguments to procedure calls copies?
00:41:08DemosVarriount, if you put the pragma or if the compiler feels like it
00:41:23Demoswith some possible FFI exceptions
00:42:22Demosaraq will have to say what the compiler actually does. But I asked him a while ago if the compiler decides for you for regular : T params and he said it did
00:42:47VarriountOk, that's what I thought
00:43:07VarriountSo you should be careful if you try to get the address of a parameter
00:44:10Demosyeah
00:44:25filwitif i'm trying to fix bugs related to macro/templates, should I be hacking on devel or vm2?
00:44:32Araqno. why? you can't take the address of a parameter
00:44:33Varriountfilwit: devel
00:44:36Demosand you should not modify the value of something passed like that ever, so taking a pointer is pointless
00:44:41filwitVarriount: k
00:44:52Demosthank you filwit!
00:45:04filwitDemos: for what?
00:45:28Demosfor trying to fix all the macro bugs
00:46:09filwitDemos: ah, well i'm mostly trying to fix the ones related to my project
00:46:51filwitDemos: but once i get a bit more familiar with hacking on the compiler i might try and tackle a few things from the bug list
00:51:39*BitPuffin quit (Ping timeout: 252 seconds)
00:53:14*BitPuffin joined #nimrod
00:55:46VarriountDemos: How goes the debugging?
00:57:31DemosI needed to reinstall icc, since I removed it a while back when it broken visual studio
00:57:48VarriountDemos: Can you test out a binary for me?
00:58:09DemosI have the binary, I need icc to make debug symbols
00:58:24Demoslet me try running the gcc generate binary through windbg
00:58:53filwitfrom macros, what's the difference between nnkIdent(!"..") and nnkIdent("..") ?
00:59:15filwitwhat does the '!' do?
01:00:00*adoniscik quit (Quit: Leaving)
01:00:03EXetoCproc `!`*(s: string): TNimrodIdent {.magic: "StrToIdent".}
01:00:45filwitthanks
01:03:19Araqfyi '!' existed before ident"foo" was valid syntax ...
01:03:36Araqnowadays I wouldn't make that an operator
01:05:16VarriountWould would happen if you pass a 'ref' to a native os call, instead of a ptr?
01:05:57filwitAraq: i wasn't going to comment, lol
01:06:16filwitAraq: but they do different things though, ident".." returns a PNimrodNode
01:10:51VarriountDemos: While you wait for intel to setup, please test this binary -> https://drive.google.com/file/d/0B077nrrf63xtMmwyeUJvaXpJQ00/edit?usp=sharing
01:11:38Demosthe 32bit one seems to work, the 64bit one not so much
01:11:55VarriountAnother segfault?
01:12:06Demosprolly
01:16:32VarriountDemos: How about now -> https://drive.google.com/file/d/0B077nrrf63xtZjBtcjdFSEhWLWs/edit?usp=sharing
01:16:58filwitAraq: any tips on debugging the VM?.. my whole stack trace is just "gen, gen, gen, genIf, gen, etc.."
01:17:46filwitAraq: can't tell exactly which part of my code is causing the VM to crash, and I need the whole thing intact or I'll cause a totally different crash cause the AST isn't setup right..
01:19:58Demosthe 32 one works the 64 does not
01:20:09Araqfilwit: give me the stack trace please
01:24:35filwitAraq: it's alright man, i'm not trying to take up all your time. I'm sure i can figure it out myself, just wanted to know if you had any way you usually do it. Here's the stack trace just in case: https://gist.github.com/PhilipWitte/8700931
01:26:24Araqfilwit: ah that thin, you can disable this internal error and see if that already fixes it
01:27:02filwitAraq: not sure what you're suggesting. How to disable internal errors?
01:27:59filwitAraq: now that i take a second look, i can kinda see which part of my macro (which calls a compile-time proc) is messing up, based on the trace
01:29:00Araqhymn.nim(14, 4) ...
01:29:31filwitoh, what? damn how did i miss that...
01:29:42filwitthanks
01:30:09VarriountAraq: This is going to sound redundant, but is there anyway to compile a program in release mode, but retain stack traces?
01:30:10filwitseriously feel kinda retarded now though, so yeah
01:31:30AraqVarriount: you can explicit turn on stack traces but every other check off
01:31:39DemosVarriount, I think in gcc it is -g -O3
01:31:59Demosfor the C compiler, which may be enough
01:32:03Araqoh yeah gdb has its own stack traces, right
01:32:09Araq--lineDir:on
01:32:30VarriountDemos: I think I found a bug, if not *the* bug that's causing the segfault.
01:33:03Demosoh, damn I was just getting set up. I think. I lost my train of actions when like 40 things started happening.
01:33:26VarriountDemos: Huh?
01:34:17DemosI am working on math homework, being pestered by people on steam, dealing with email, getting icc working, and getting the debugger installed all at the same time.
01:37:09Araqgood night
01:39:26DemosI am getting symbols when it breaks before starting main but once the segfault happens I get nothing
01:40:36*ddl_smurf quit (Quit: ddl_smurf)
01:42:40Demosshit compileing with --cc:icl -d:release works
01:42:44Demosfor the version you gave me
01:43:01*DAddYE quit (Remote host closed the connection)
01:43:37*DAddYE joined #nimrod
01:46:26Demoshm what is the nimrod command to generate nim code in c comments
01:46:59*aruniiird quit (Quit: Leaving)
01:47:44Demoswhat was the bug you found?
01:48:35*DAddYE quit (Ping timeout: 272 seconds)
01:54:21VarriountDemos: Allocation bug
01:54:40Demoswhere
01:54:59VarriountAround line 255
01:55:03Varriountin proactor.nim
01:55:44VarriountAn "Overlapped" structure is being allocated on the stack, and then it's address is sent to the connectEx api call
01:56:39VarriountWhen getQueuedCompletionStatus is later called, the address will point to a deallocated piece of memory
01:57:14VarriountThat is, getQueuedCompletionStatus will set one of it's arguments to the address previously passed in
01:58:48VarriountThe binaries I gave you fixed that bug (I stored the overlapped object in a sequence, in a Proactor object
01:59:57Demoswhich binaries
02:00:10Demosthe newest ones, because if I recall they still had problems
02:00:15VarriountYeah
02:00:27VarriountDemos: Let me just give you the updated code
02:01:05VarriountDemos: https://gist.github.com/Varriount/5ec6370dd37bb51cd947
02:01:11VarriountOnly proactor.nim is changed
02:01:36Demoshttps://gist.github.com/barcharcraz/d7836e3c2d7a497472a9 <--- memory analysis in case you care
02:02:01VarriountDemos: Woah, what program generated that?
02:03:45DemosIntel Inspector, I am 85% sure I can use the license I have (student) to analyze your code, as long as you don't pay me for it
02:04:08Demosand I compiled the new sources with gcc, segfualt ahoy
02:04:17VarriountAnd the line?
02:04:39Demosfrozen bash please wait
02:04:45VarriountO_o
02:09:22VarriountDemos? You there?
02:09:25Demosyeah
02:09:34Demosgdb does not give any debug information... ever
02:09:40Demosor rather gcc does not
02:10:13VarriountYou have to use --linedir:on --debuginfo for nimrod debug info
02:10:39DemosI did not
02:10:55Demosstill nothing
02:11:04DemosI am compileing in -d:release, but I need to otherwise it works
02:11:28VarriountDemos: Try --passc:"-g" for c info
02:11:58Demosstill nothing
02:16:45VarriountDemos: You could compile them yourself, and omit the "-O3" line
02:17:17Demoshm good idea
02:23:26Demosif I give gdb the "info functions" command it returns everything I would want
02:23:43VarriountHuh?
02:24:38Demosyeah debug symbols are not the problem
02:25:14VarriountThen.. stack traces are?
02:25:24Demosyeah
02:25:34VarriountGah.
02:26:28VarriountDemos: So intel compiler won't use the debug symbols?
02:26:40VarriountEr, the windows debug symbols?
02:26:53Demosthe intel compiler can generate windows debug symbols just fine, but it will not generate code that crashes
02:27:10Demosidea
02:28:13Varriount?
02:33:00Demostry and find the symbol corosponding the the memory address in the executable containing the intruction that caused the segfault, but gcc does not have that symbol or else it would just show it
02:37:43VarriountDemos: I have no idea how to do that (and it might not work for me, seeing as all of the binaries work for me)
02:38:09Demosyeah it is the 64bit binary that fails for me
02:38:12Demosbuilt with gcc
02:38:29VarriountWhat version gcc do you have?
02:38:47Demosmingw-w64-i686-gcc 4.8.2-6 (mingw-w64-i686-toolchain mingw-w64-i686)
02:41:13VarriountDemos: You're using a 32 bit compiler on a 64 bit machine?
02:41:41Demoswhat? that is a 64bit compiler
02:42:02Demoswait I have the 64bit one as well
02:42:03Varriount'i686'?
02:42:16Demossorry I have both installed
02:42:33Demosusing mingw-w64-x86_64-gcc 4.8.2-6 (mingw-w64-x86_64-toolchain mingw-w64-x86_64)
02:42:48VarriountHow did you get that specific printout?
02:44:00Demospacman -Qs gcc
02:44:30VarriountAnd I could have sworn pacman was meant for arch linux.
02:44:43Demosmsys2 uses it as well
02:45:02DemosI personally have built it on arch (ofc) macOS 10.9, and RHEL
02:45:08VarriountOh, there's an msys2 out now?
02:45:18VarriountI just have silly msys
02:45:19Demosin beta
02:45:34Demosmsys64 does the same thing, using gcc-4.8.1
02:45:41VarriountSo, what do we do know?
02:46:21Demosit works in clang 3.4 but never gets to the polling thing
02:46:32VarriountOh? What happens?
02:46:33Demosoh wait yes it does
02:46:44Demosmsys2's console was just being bad
02:47:37Demosalso for the gcc build that fails intel inspector reports an invalid memory access at address 1398B
02:47:57Demoswhich contains: or qword ptr [rcx], 0x0
02:48:03*DAddYE joined #nimrod
02:48:09VarriountSo, a nil pointer?
02:48:18Demosright, or invalid memroy
02:48:40Demosbut yeah
02:48:56Demosnote that I do not know x86 assembly
02:49:51VarriountMaybe I could set the program to repeatedly connect and disconnect
02:50:02VarriountThat might cause the bug to pop up again
02:50:11VarriountThat is, again for me
02:52:00VarriountDemos: Any idea why for some procedures you can pass 'nil' as an argument, but not others?
02:52:44EXetoCthe literal? are they vars?
02:52:53Varriountliteral
02:52:55*DAddYE quit (Ping timeout: 272 seconds)
02:54:18VarriountDemos: Add echos around the getQueuedCompletionStatus call, and any other interesting areas
02:55:11EXetoCI don't know if it fails at compile-time, but if the param is a var then you need to pass in one
02:56:29VarriountEXetoC: This is a wrapped procedures. I'm calling CreateIOCompletionPort, and can't pass in nil to the key params
02:57:08VarriountThe key parameter is a ptr to a ptr to a int32
02:58:25Demoscan you cast[ptr ptr int32](0) or something like that?
02:58:39VarriountIs that the same as nil?
02:59:15Demoswell... actually I dont think it is garenteed by the C standard. But on any modern system that has an OS it will be
02:59:49*DAddYE joined #nimrod
03:00:02Demosand zero will convert to a null pointer
03:00:05Demosin C
03:00:07EXetoCno csize(0) needed?
03:00:30Demoswhy would you need that?
03:00:59VarriountDemos: I wonder if it would be possible to add a getlasterror call to the signal handlers
03:01:53VarriountDemos: Also, have the echo statements revealed anything?
03:02:09Demosno, I need to finish this math, it is due at midnight
03:02:15Demosbut let me try a quick thing first
03:02:17VarriountAh, I see
03:03:55Demosyou using winsock?
03:04:09VarriountDemos: Yes
03:06:31Demosno dice
03:06:38EXetoCI just forgot about the difference between int in C and Nimrod
03:06:54VarriountEXetoC: What?
03:13:42VarriountEXetoC: Do you have a windows machine available,real or virtual?
03:15:36EXetoCVarriount: no
03:20:54Demoshey it says "setting callback with key: nnn" before crashing, what is that? I notice the number changes based on compile settings
03:21:31VarriountDemos: The number is the socket
03:21:42Demosoh, so it is just picking a differnt socket
03:21:46Demosfalse alarm
03:21:53*Demos does not know much about networking
03:22:01VarriountDemos: Funny, that's the place where nimrod's gcassertions fail when I turn them on
03:22:40EXetoCdebugging socket stuff?
03:22:50VarriountEXetoC: Sorta
03:23:44DemosI mean the crash is in between there and the next time output happens
03:24:18VarriountDemos: Can you add an echo right after the last line on setcallback?
03:24:27EXetoCfun fun fun
03:24:32EXetoChappy coding. cya
03:25:10Demosyeah it gets hit
03:25:23VarriountThe echo on the last line?
03:25:30Demosmmhmm
03:25:36Demoswhat calls that setCallback function
03:25:50VarriountLine 272
03:26:07VarriountThe connect procedure
03:26:55VarriountDemos: If you need to finish your homework, go ahead. I'd hate to keep you from it.
03:27:40Demosit is just stupid linear algebra computation problems... not very hard, not very easy to focus on
03:29:32DemosOK p.poll on line 327 is on the callstack of the crash
03:30:15VarriountDemos: Well, yes, however that's the procedure call of the poll procedure
03:30:32DemosI figured
03:30:53Demosthe callstack gdb gave me only had 2 functions on it, although it looked pretty garbled
03:31:15VarriountWhat was the callstack?
03:32:02VarriountNew version of the proactor.nim file. Fixed possible cast errors -> https://gist.github.com/Varriount/5ec6370dd37bb51cd947
03:32:16Demoswowah more functionz
03:32:33Varriount?
03:32:52Demoson gcc's callstack
03:33:05VarriountGist?
03:33:29Demosno meaningful even with debug info they are like 0x0000ajsfhlakfhelk in ?? ()
03:34:49Demosstill broken
03:35:21VarriountDarn
03:35:35Demoswhat windows fucntion is GetCompletionStatus calling
03:35:55VarriountThat is the windows function
03:43:04VarriountDemos: can you change "statusOverlappedPtr" at around line 160 to point to an actual overlapped object?
03:43:18VarriountSo that it looks something like
03:43:20Varriount statusOverlapped: Overlapped
03:43:20Varriount statusOverlappedPtr = addr statusOverlapped
03:44:10Demoswhere is StatusOverlapped?
03:44:21VarriountNo where, I added it
03:47:28Demosit is an out param, and since it does not crash on debug builds...
03:49:49VarriountI'm just at my wits end on what to do.
03:52:30DemosYES! I have it so that it runs fine when just run regularly (using gcc x64 and so on) but crashes under appverifier
03:52:47Varriountappverifier?
03:53:14VarriountWhat did you change?
03:53:40Demosnothing, I just realized that I had it running with appverifier on
03:53:48Demosappverfier tells windows to be mean to a process
03:54:01Demoslike allocateing stuff at the end of pages and stuff
03:55:06Varriountand...?
03:55:48VarriountBut appverifier wasn't running when you ran the binaries I gave you, was it?
03:59:34Demosno it was. I think the appverifier just sets some registry settings
04:00:34VarriountDemos: But should we be worried that it crashes under appverifier?
04:00:42*DAddYE quit ()
04:01:57Demoswell yeah, but crashes are good
04:02:06Demoswe are closeing in on the prey
04:02:17VarriountWait, I think I misunderstand
04:02:43VarriountSo, you can now get it crash.. when? In debug mode?
04:02:56VarriountAnd is this because appverifier is off, or on?
04:05:35Demosit is built in debug but with --opt:speed
04:05:55Demosand if appverifier is on, does not matter what options, it crashes
04:06:24VarriountAnd the stack trace?
04:07:20Demoswell we know the stack trace
04:07:44Demosit crashes at line 162 after poll has been called from the main loop
04:08:34VarriountDemos: Does it crash with icc?
04:08:57VarriountIf it does, you can use the windows debug symbols (I think?)
04:09:33Demosnope
04:09:48Demoslike I said though, not terrably useful
04:10:24VarriountSo how do you think we should precede?
04:10:59DemosOK I got a breakpoint right before the crash
04:11:16Demoswowah I got an appverifier stop
04:11:25VarriountIs that good?
04:12:32Demoswell we know that it crashes when I set a breakpoint as well as when I do not, which is nice
04:14:34Demoshttps://gist.github.com/barcharcraz/437db6c66b1c3f7c7ade <--- crash analysis
04:18:09VarriountWow, that text at the top seems almost friendly
04:18:58VarriountDemos: It's odd that it says that there were only 2 parameters
04:20:07DemosI think those are params for the Access Violation Exception
04:20:21Demosalso known in the unix world as SIGSEGV
04:22:40VarriountDemos: What we don't know is if it was a sub-call in the GetQueuedCompletionStatus code that did it, or a parameter, ir what
04:23:11Demosit was probably a parameter
04:23:30Demosor some kind of callstack thing
04:24:48Demoslets not assume that the windows API is broken
04:24:54VarriountWell, it said it was a *write* access failure
04:25:08VarriountSo.. something in one of the 'out' parameters?
04:26:02Demosmaybe, we should figure out where in memory each thing is, what registers things are going into, and what is passed where
04:27:45VarriountThe thing is, I explicitly took each address parameter from a newly created object, so none of them should be null
04:29:19Demosyeah, I suspect that it is some kind of invalid sized thing, since it is so sensitive to compile options
04:29:29Demoslike enableing endb makes it not crash
04:30:24VarriountIf only stupid VS would compile things right.
04:30:27Demosyou said there were GC assertions getting thrown
04:30:34Demoswell this is gcc being bad
04:32:05VarriountDemos: Yeah, but the assertions are in a completely unrelated place. When an entry is being put into the table for a callback
04:32:32Demoswhat if there is a memory error there and we are getting garbage from the table
04:33:33VarriountWell, let me see if I can remove the table from the equation.
04:34:54VarriountDemos: Does seq type have a find proc?
04:36:46DemosI have no idea, I really wish procs like find could be written seperately from the data structure
04:37:04VarriountDemos: They can
04:37:23Demosright in terms of `[]`
04:37:27VarriountActually, there is a find, its needed for 'x in y'
04:37:48Demosso can't you just use that one
04:39:28VarriountNo, I think I can
04:39:41VarriountUse two seqs, one for keys, one for data
04:40:02Varriountonly one key:data pair is added, so indexes will be the same
04:40:53VarriountDemos: Updated gist - https://gist.github.com/Varriount/5ec6370dd37bb51cd947
04:41:01Demoswowah just noticed tests/showoff/tdrdobbs_examples.nim
04:42:19Demosare the gc asserts fixed
04:42:55Demosthe error is different
04:43:09VarriountWhich error?
04:43:31Demosa segfault
04:44:29Demosit only happens with -d:release now, not with --opt:speed
04:45:05Demosthe stacktrace seems different as well
04:45:13VarriountDemos: The GC assert happens on line 152
04:45:18Demosstill
04:45:20Demos?
04:45:24VarriountYeah
04:45:32VarriountWhen the key is added
04:45:50Demoslook, fix the GC assert first, since you can repro it, then we will see if my ghost errors are still around
04:50:52VarriountDemos: Fixed the gc assert
04:50:58VarriountGist is at the same link
04:52:15*psquid quit (Ping timeout: 272 seconds)
04:53:06*psquid joined #nimrod
04:57:34VarriountDemos?
04:58:34Demosyeah, realized I forgot a math problem, solved it at 11:58, due at 11:59
04:59:31Demosnuts
04:59:40Demosstill segfaults
05:02:15VarriountDemos: Is it possible to turn off divide by zero tracking for vcc?
05:03:01DemosI dont think it is an option
05:03:09Demosit is a bug in VC's preprocessor
05:03:30Demosnow one may be able to run cpp from mingw on the files then turn them over to vcc for actual compilation
05:03:53VarriountOh, in the preprocessor? It's easy to preprocess the files
05:04:03DemosI /think/
05:04:19DemosI kinda doubt it would help
05:05:41DemosI should go to sleep. I have to be presentable tomorrow
05:05:55VarriountYeah, I do too
05:06:10VarriountThanks for your help Demos, I really appreciate it
05:06:28VarriountHopefully this bug can be tracked down
05:06:44Demosyeah, I would say the best way to get this is to just go through the assembly and track where the execution without the bug differs from the one with
05:06:51*dmac joined #nimrod
05:06:59Demosin terms of the values of the params passed into that windows function
05:10:46Demosin a kinda sick way I like these kind of bug hunts because you are always "right about to find it"
05:11:11VarriountI can completely understand that
05:17:21*xenagi quit (Quit: Leaving)
05:21:22*Demos quit (Quit: Leaving)
05:42:17*xtagon quit (Ping timeout: 272 seconds)
05:46:57reactormonkanyone got an idea on lib/system.nim(1627, 7) Error: undeclared identifier: 'data' ?
06:04:45*brson quit (Quit: leaving)
06:05:13*brson joined #nimrod
06:27:40*BitPuffin quit (Ping timeout: 252 seconds)
06:51:44*shodan45 quit (Remote host closed the connection)
06:52:03*shodan45 joined #nimrod
06:53:35*BitPuffin joined #nimrod
06:58:30*BitPuffin quit (Ping timeout: 251 seconds)
07:26:52reactormonkok, WTF. How can both echo(not indexes[x.len-1] == -1)
07:26:55reactormonk echo(indexes[x.len-1] == -1)
07:26:57reactormonkreturn false?
07:27:09reactormonkparens apparently O.o
07:33:50*zahary joined #nimrod
07:50:38*brson quit (Ping timeout: 264 seconds)
07:51:49*DAddYE joined #nimrod
07:52:27*brson joined #nimrod
07:54:04*brson quit (Client Quit)
08:00:33*brson joined #nimrod
08:08:06NimBotAraq/Nimrod devel 6aef208 Simon Hafner [+1 ±1 -0]: added Cartesian product
08:09:12reactormonkoops. Oh well, it should work.
08:09:56NimBotAraq/Nimrod devel b7079ec Simon Hafner [+0 ±1 -0]: forgot to export product
08:12:37filwithey zahary, I was wondering if you could look at my pull-request (https://github.com/Araq/Nimrod/pull/849) when you have a moment since's it's a very simple one-liner fix, but, while it fixes all my tests, I'm not familiar with Nimrod AST yet to know if the change I made was best suited to solve the problem (overload existing templated procs, in my example case 'new', with 'typedesc' as a first param).
08:14:26filwitzahary: i'm not trying to be pushy or anything, but I'm eager to know if I made the right decision :)
08:15:20filwitoverloading**
08:22:48zaharysorry filwit, I'm on vacation right now and in the little time I spent on the computer I usually have to respond to some issues from work
08:23:03zaharyif the fix works for you, just use it and I'll review it at some point
08:23:55Araqzahary: is tfUnresolved supposed to be set for a tyTypeDesc with no son?
08:25:03filwitzahary: no worries, enjoy your holiday :) I'll look forward to your review when it happens.
08:25:28*dmac quit (Quit: Leaving)
08:26:15*ddl_smurf joined #nimrod
08:26:18filwitbbl
08:26:21zaharynot exactly, tfUnresolved is set on a type that will be bound during sigmatch. proc foo(T: typedesc, foo: T)
08:26:45zaharyT here is skParam with type typedesc with tfUnresolved set
08:28:00Araqok then filwit's patch is correct I think
08:33:49filwitAraq, zahary: okay, thanks! I'll look into the specifics of what you're talking about to better understand later.
08:35:34filwitthough it sounds all pretty straight forward (I can deduce from the names)
08:37:44*vbtt_ joined #nimrod
08:40:31Araqfilwit: read all the type sections in ast.nim and you get a good overview
08:41:17vbtt_so what's the next cool feature of nim(rod) that's in the works and i could blog about?
08:42:24Araqmimic types I guess
08:42:47Araqbut I don't think any work on them has started
08:43:11AraqI'm in feature freeze mode, tracking all the hard bugs
08:45:58filwitAraq: k thanks, will do. I'll be gone for a few hours now, bbl
08:46:17*brson quit (Quit: leaving)
08:48:14vbtt_glad about feature freeze.
08:48:22*vbtt_ goes to look up mimic types
08:50:22*BitPuffin joined #nimrod
08:51:44*zahary quit (Quit: Leaving.)
08:53:11Araqvbtt_: we invented these, I don't think you can "look them up"
08:53:40vbtt_yeah, my lookups went nowhere.
08:54:05vbtt_if you don't mind - what is a mimic type?
08:54:33Araqtype Foo = mimic string
08:54:43Araqvar s: Foo
08:55:33Araqf(s) # f takes a string, but is generalized to Foo here, so f(s) is valid
08:55:59Araqit's a form of post generalization
08:56:18vbtt_how is it different from a type alias?
08:56:47Araqwell the syntax is not finished
08:57:18Araqtype Foo = mimic string object
08:57:44Araq data: array[32, char] # fixed size
08:58:22Araqproc len*(s: Foo): int = strlen(s.data)
08:59:04Araqproc `[]`(s: Foo, i: int): char = s.data[i] # Foo supports len and [] like strings
08:59:35Araqf(s) # f only uses 'len' and '[]', so post generalization of 'f' to Foo works
08:59:53vbtt_i see
09:00:29Araqbut it's highly experimental and has lots of issues
09:01:40vbtt_you have a non-union type, but then after the fact you define another non-union type and consider the original type to be a union type containing the original non-union and the newly defined type.
09:02:02Araqno
09:02:27Araqfor me union type implies they share a representation at runtime
09:02:47Araqbut instead 'f' is transformed to f[T]
09:02:52vbtt_ah ok - i meant conceptually (i.e. s/union type/sum type)
09:03:11vbtt_yeah parameterized type is another way to think about it.
09:03:27Araqnon-generic -> generic # post generalization
09:03:38Araqgeneric -> non-generic # classic instantiation
09:03:52vbtt_and this works for static dispatch only?
09:04:26Araqit only works when you have the body of 'f'
09:04:39vbtt_ah right.
09:07:38Araqin fact, I can only see it working for strings and perhaps matrixes but these are important enough to try the feature
09:08:18vbtt_i'm thinking about where this could be used.
09:08:35Araqit's obvious, isn't it?
09:08:36vbtt_why did you go for a new type definition, rather than semantics that adapt any type to another type?
09:09:53vbtt_e.g. type MyType = object ...
09:10:16vbtt_# hmm, i'd like to call this function but it only accepts strings...
09:10:39vbtt_proc `[]`(x: MyType as string, i) = ...
09:10:51vbtt_proc len(x: MyType as string) = ...
09:10:52vbtt_etc.
09:10:56*Eruquen quit (Quit: waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah)
09:10:58vbtt_f(MyType())
09:11:13vbtt_this allows the same object to be used as a string and as an int or whatever.
09:11:20BitPuffinEXetoC .com is down
09:12:20Araqvbtt_: how can this possibly work in the compiler? it can't unless you annotate MyType as string-like
09:12:57Araqotherwise foo(bar) # type mismatch, but lets try it anyway?
09:13:17vbtt_Araq:when the compiler parsed the definition of `[]` it marks MyType as string-like with the `[]` function defined.
09:13:29vbtt_*parses
09:14:05Araqvbtt_: ok but (a) your notation requires 'MyType as string' in plenty of places
09:14:24Araqand (b) doesn't reflect reality as the compiler needs to implicitly annotate the type
09:14:49vbtt_yeah
09:15:06Araqbut in fact
09:15:20Araqthe object defintion and the 'mimic' declaration will be decouple
09:15:23Araq*decoupled
09:15:31vbtt_ah ok - that makes sense.
09:15:48Araqwe haven't decided on a syntax
09:15:49vbtt_as long as it can say MyType mimics string, footype, anothertype
09:15:59Araqyeah
09:16:38vbtt_i have to think about this feature. it seems to allow usage of a function that was not intended by the author.
09:16:56Araqexactly, it does
09:16:59vbtt_so i have a 'string-like' type and i want to use functions defined for strings.
09:17:09Araqyeah
09:17:38Araqit's more of a "quick hack" to make non-generic code behave
09:17:58vbtt_ok. as long as it's understood as a hack, it's fine.
09:18:25vbtt_cos really the right thing would be to change the original function to be generic.
09:18:31Araqindeed
09:18:49Araqexcept for the fact that *everything* could be generic
09:18:56vbtt_but hacks are needed in practice, so this is fine.
09:19:03Araqat the cost of compile time and complexity
09:19:50Araqwell we see how it works out in practice, has never been tried afaict
09:20:49Araqit is in fact, strutils vs D's ranges
09:21:10Araqstrutils is simple to understand but doesn't generalize
09:21:38AraqD's ranges are harder but generalized
09:22:11vbtt_f[T](x:T) means *any* type T but f(x: String) means any type that has been explicitly tagged as 'string'. this may be a good idea in it's own right.
09:23:11vbtt_it's implied that there is a subset of all types that mimic string, and the function is only valid for those.
09:23:47vbtt_so the type checks will be easier, rather than checking every operation, first check whether the type has been tagged (this will reject most types with a quick check)
09:23:51vbtt_am i correct?
09:24:14AraqI can't follow you, sorry
09:24:26vbtt_ok, nevermind.
09:26:12Araqwe *could* later have f(x: like string) so 'f' acknowledges the fact that it is post generalization candidate
09:26:44Araqbut then you need to specify what 'string-like' means
09:26:57Araq(uses 'len' and readonly '[]'? who knows...)
09:26:58vbtt_it's just a tag, an identifier to classify types.
09:27:12vbtt_it's the first check for any object passed to that function.
09:27:18Araqwell there are lots of possibilies
09:27:23Araq*possibilities
09:27:47vbtt_well if you define what string-like means exactly, then it's just a type class.
09:28:03*CarpNet quit (Ping timeout: 260 seconds)
09:31:13Araqyes, indeed
09:33:00vbtt_so if you want another feature it could be less precise than a type class, but more than a generic [T].
09:33:05vbtt_but yeah, open to possibilities.
09:36:43vbtt_in summary, interesting idea, but i'll wait until it's fleshed out more.
09:37:11vbtt_btw, did you have a resolution for re 's' vs re's' ?
09:37:20vbtt_Araq:^
09:40:48Araqproc re(s)(s: string{command}): TRegex {.error.} # my idea, doesn't work for obvious reasons
09:41:14Araqyou can still prevent it with a TR macro, but this sucks
09:42:41*DAddYE quit (Remote host closed the connection)
09:43:25vbtt_re @'blah'
09:43:27vbtt_re !'blah'
09:44:12vbtt_i guess they're both operators so it won't work.
09:44:23Araqyes, plus what's the problem you're trying to solve?
09:44:59vbtt_the fact that a space between re and the quoted string literal will behave differently than the no-space
09:45:16vbtt_it will trip up people all the time, specially because in many cases it will work (when no escapes used)
09:45:25*BitPuffin quit (Ping timeout: 245 seconds)
09:45:27Araqthat's no problem
09:45:40vbtt_no?
09:45:54Araqwe'll also get echo $foo vs echo $ foo
09:46:31Araqor take C's p/*q vs p/ *q
09:46:47Araqspaces are important, live with it :P
09:48:24vbtt_yeah the dollar thing is confusing too.
09:49:11Araqwhy?
09:50:03Araq(btw C# has "" and @"" and indeed it causes problems for the people not knowing c# well. but what is the solution?)
09:51:57vbtt_Araq: of course when the programmer is careful this is not a problem. but it would be nice if the compiler catches honest mistakes for times when the programmer slips up.
09:53:34Araqvbtt_: this effort however is much better spent on non-trivial things like type mismatch errors etc, errors coming from deeply nested instantiations etc.
09:54:05Araqwe have to assume people know the very basics of how lexing and parsing works in nimrod
09:54:14Araqotherwise we'll get nowhere
09:55:06*Mordecai joined #nimrod
09:55:34*BitPuffin joined #nimrod
09:56:38*psquid quit (Ping timeout: 264 seconds)
09:56:41vbtt_that's kind of acceptable, i suppose
09:57:13*CarpNet joined #nimrod
10:02:12*Eruquen joined #nimrod
10:02:16Araqfyi the plan is that i+1 * 3 will be parsed as (i+1) * 3
10:02:31Araqspaces determine operator precedence
10:04:29*BitPuffin quit (Ping timeout: 272 seconds)
10:04:31Araqlikewise e [1, 2, 3] should mean e([1,2,3]) and e[1,2,3] should be array-like access
10:04:49Araqf (1,2) # passes tuple to f
10:04:59Araqf(1,2) # passes 1, 2 to f
10:06:45Araqa|b * c # current situation: argh, does | bind tighter than *
10:06:46vbtt_what about i + 1 * 3
10:07:03Araqa|b * c # future situation: no need to lookup anything
10:07:37Araqvbtt_: i + 1 * 3 # fine
10:07:56vbtt_if space is going to be that important then the raw string/ escaped string is not an issue
10:08:24vbtt_i mean - what is it parsed as? is 1 space equivalent to any number of spaces?
10:08:35Araqno, it is not
10:08:54Araqnumber of spaces can be used to encode precedence
10:08:59vbtt_i see
10:09:07Araqbut we can limit it somehow
10:09:18vbtt_unique feature, don't know if i like it yet.
10:09:19Araqmaybe the number of spaces need to be doubled
10:09:41Araqso 0, 1, 2, 4, 8 spaces are fine and everything else is not
10:10:08Araqsomething like that
10:10:27Araqthe difference between 4 vs 5 spaces is hard to see
10:15:06Araqalso this feature can give us postfix operators: a* * *b is (a*) * (*b)
10:15:23Araqbut I'm not sure we need it
10:15:55vbtt_wow reading code is going to be like solving puzzles.
10:16:29AraqI don't think so, instead reading code is very intuitive
10:17:01Araqno need to lookup precedence rules in a table like we have in the manual
10:17:18Araqno need to lookup the definitions of * either
10:17:53Araqit is parsed as the layout suggests
10:20:21*filwit quit (Ping timeout: 248 seconds)
10:22:58Araqas a nice side effect people are forced to write 'f(1, 2)' and can't write it as 'f (1, 2)' which I personally cannot stand :-)
10:31:39*BitPuffin joined #nimrod
10:33:55*vbtt_ quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:57:07*BitPuffin quit (Ping timeout: 252 seconds)
10:59:19*BitPuffin joined #nimrod
10:59:50*bbodi joined #nimrod
11:37:26EXetoCBitPuffin: yup. don't have much to show atm
11:38:02*BitPuffin quit (Ping timeout: 264 seconds)
11:50:35*Mordecai is now known as psquid
12:10:26*BitPuffin joined #nimrod
12:18:53*isenmann quit (Ping timeout: 252 seconds)
12:27:34EXetoCBitPuffin: just gotta add a blog post or something
12:27:39*isenmann joined #nimrod
12:44:02*BitPuffin quit (Ping timeout: 264 seconds)
12:57:37*BitPuffin joined #nimrod
12:59:12EXetoCBitPuffin: cirjewoxrwe
13:00:05*EXetoC quit (Quit: WeeChat 0.4.2)
13:06:24*PortableEXetoC joined #nimrod
13:06:27*PortableEXetoC quit (Client Quit)
13:13:47*EXetoC joined #nimrod
13:35:33*BitPuffin quit (Read error: Connection reset by peer)
13:35:56*BitPuffin joined #nimrod
13:37:25bstrieAraq: re: changing the name, I'm all for it :P
13:38:40bstrieAraq: let's not forget why makefiles have been stuck with their terrible whitespace syntax for the past 40 years... http://stackoverflow.com/a/1765566/865424
13:39:00bstrie"oh no, I have a dozen users! I can't change it NOW!!"
13:39:34EXetoC-.-
13:45:47Araqbstrie: do the Rust people consider a name change?
13:46:35bstrieAraq: honestly I think we're all in love with the name "Rust" :P
13:47:23Araqmakes sense :P
13:47:24bstriepersonally I like it because it has sensory connotations... the color of it, the touch of it
13:47:43bstrielends itself well to having a "worn and industrial" theme
13:47:50bstriebut maybe I'm silly :P
13:47:59bstriethere are definitely people out there who *don't* like the name
13:48:30bstriebut I've only seen these people on reddit and HN. by the time they make it to the IRC channel we've filtered for people who don't care :P
13:48:42*radsoc joined #nimrod
13:49:49bstrieAraq: to be honest, one of the big reasons why I think the name should be changed is that quote at the top of the website... for any speaker of american english, it's somewhat baffling :P
13:50:40bstriewhile "nimrod" as-an-insult might be a fairly obscure word to anyone not raised on bugs bunny cartoons, there's *nobody* who catches the biblical reference
13:51:13bstrieI consider myself much more well-versed in mythology than the average person, and I didn't realize the reference for a very long time
13:51:38Araqwell the quote is obviously ironic either way
13:52:12Araqbut as I said, I don't like nobody gets the reference either
13:52:29bstrieI do think the logo looks nice though
13:56:50bbodihi all!
13:57:38bbodiHas typedesc types the .name property in the devel version? I can't echo it: "type: " & T.name
13:57:50bbodi Error: type mismatch: got (typedesc[string])
13:59:34Araqbbodi: I don't think this feature has been ported to the vm ... sorry
14:00:08Araqbut you should get a crash instead of an error message, so there seem to be 2 issues here
14:00:14bbodiwhat do you mean under 'vm'?
14:00:33Araqthe virtual machine that is now used for compile time evaluation
14:00:37bbodiin that case, its a feature, because error messages is better than crash :D
14:01:23bbodisorry, I havent got the most recent version of the compiler, its just some version of the 9.3
14:01:54Araqlol neither do I
14:02:08AraqI really need to merge with devel
14:05:33bbodiI really like Nimrod, sometimes I can coding through days with Nimrod and feeling the "Flow". But sometimes I stuck with some weird bug/feature/dunno, and it really make me crazy
14:05:49Araqbstrie: btw how do owned pointer distinguish between thread local and shared allocation? I guess they distinguish with their region parametrization?
14:06:15bbodiI dont want to complaint, morover, let me thank you for your work with that fantastic language :)
14:06:21EXetoClet's see if I can figure out how to transform a template string with a filter
14:06:42Araqbbodi: it will get better soon
14:20:10bstrieAraq: I'm not sure what you mean by "distinguish", owned pointers always point to task-local data. you can't share that data without moving ownership to another task
14:21:27bstrieAraq: though "tasl-local" there is sort of a misnomer, owned things may be allocated in a heap that's independent of tasks, for faster transference of ownership... but that's an implementation detail :P
14:21:48bstrieand also "tasks" might themselves be threads, if you're using the 1:1 runtime
14:23:03*tumak quit (Ping timeout: 245 seconds)
14:23:24Araq"owned things may be allocated in a heap that's independent of tasks, for faster transference of ownership" <-- pretty much what I mean
14:24:04*tumak joined #nimrod
14:24:31Araqhow does this work? I can't imagine the compiler does this as an optimization?
14:29:36bstrieAraq: not an expert but... iirc there's just a single heap per process. all owned things from any task get allocated there. there's no runtime checking for access, the compiler ensures that ownership makes sense
14:30:47Araqok so you have a global shared heap
14:31:25Araqthis means you need to lock the heap for 'alloc' or use a lock-free allocator
14:32:40Araqbut ok, you can optimize away this if you can prove there is no ownership transfer
14:33:09bstrieaccording to the people in #rust-internals, "malloc and free are reentrant, so we don't need to lock the heap"
14:33:44bstrieand then of course they go on to say it's more complex than that, but w/e
14:33:45bstrie:P
14:33:58AraqI don't understand this
14:34:10Araqreentrant is a strange word in this context
14:35:09bstrieAraq: https://botbot.me/mozilla/rust-internals/msg/10342764/
14:37:00bstrieAraq: you know you're welcome to just go over to irc.mozilla.org and ask yourself, I'm not a compiler developer, just a groupie :P
14:38:15AraqI was there but it spams my bouncer ;-)
14:38:23Araqtoo much action for rust
14:38:40Araqanyway, thank you, I got the answer
14:39:46*darkf quit (Quit: Leaving)
14:44:47*Mordecai joined #nimrod
14:45:37*psquid quit (Ping timeout: 265 seconds)
14:45:39*Mordecai is now known as psquid
14:46:16BitPuffinEXetoC: no excuse
14:50:09EXetoCBitPuffin: is too
14:51:35EXetoCthat didn't take too long to figure out https://gist.github.com/EXetoC/8710132
14:52:25AraqEXetoC: you cannot possibly import from 'compiler'! it's all voodoo code in there :P
14:53:06*brihat quit (Quit: Leaving.)
14:53:14EXetoC:/
14:53:21*brihat joined #nimrod
14:57:04AraqEXetoC: take it as a compliment
14:57:26Araqand no, these APIs do not change quickly, if at all
14:59:05BitPuffinEXetoC: nop
14:59:31EXetoCok
15:00:55EXetoCBitPuffin: yes :p but I might create a blog post soon. perhaps about how to navigate with.. GREP :-)
15:01:21BitPuffinEXetoC: ack!
15:01:26BitPuffinoch VE
15:01:44EXetoCI don't think it works very well when function prototypes spans multiple lines though, but that hasn't been a problem so far
15:05:53EXetoCBitPuffin: ok, maybe I'll follow up with that some other time
15:06:20EXetoCBitPuffin: VE?
15:08:48BitPuffinEXetoC: ack och ve
15:09:07BitPuffinEXetoC: be swedish damn it
15:14:26EXetoCoh yeah, that showed up when I googled
15:17:43*radsoc quit (Ping timeout: 272 seconds)
15:19:59EXetoCgrep "proc.*\*.*TFoo.*\):.*TBar"
15:20:36EXetoCperhaps we could have an ast-based grep tool some day. this works alright like I said, but it's more complicated than it has to be
15:21:06AraqEXetoC: build it, it's cool and 'easy'
15:24:14EXetoCyeah, might not be that hard
15:24:45BitPuffinwhat's nimgrep then?
15:26:42AraqBitPuffin: still string based
15:27:06*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:27:38BitPuffinAraq: but what's the point of it, then?
15:30:35Araqit works? and grep doesn't?
15:33:36BitPuffinthat's news
15:33:39BitPuffinack works though
15:33:47BitPuffinEXetoC claims that grep works though
15:34:43*io2 joined #nimrod
15:35:46Araqso do a feature comparison to get my point
15:35:57BitPuffinas if the time exists
15:45:25*[1]Endy joined #nimrod
15:46:32bbodiAraq: Once you said me that multi-methods work with generic type as well. Is it true in a case where the parent's method doesn't contains the generic type, only the child does? e.g.: method foo(self: Base) for the parent "class" and method foo[T](self: Child[T]) for the children.
15:50:26*[2]Endy joined #nimrod
15:53:59*[1]Endy quit (Ping timeout: 260 seconds)
15:56:32EXetoCBitPuffin: yes, for the use cases I've had to deal with, but it would've been less useful had certain shell features not been available
15:59:04BitPuffinsuch as aliasing?
16:07:15EXetoCBitPuffin: that and globbing mostly, when -R doesn't suffice
16:07:21Araqbbodi: compiler/semcall.nim, around line 23
16:07:35*OrionPK quit (Remote host closed the connection)
16:08:41AraqI wrote down my knowledge in a comment in the compiler ... ;-)
16:11:06Araqsee tests/methods/tmultim6.nim
16:14:08Araqin other words, yes it works
16:14:30Araqbut it is subtle
16:17:06Araqin fact it is taking me 10 minutes to figure it out...
16:25:24bbodiThanks, I check it
16:27:14Araqno need, I now know everything again
16:27:22Araqso what's your problem?
16:28:49bbodiThe example I wrote above. Should it work?
16:29:04Araqyes
16:29:50Araqyou need to instantiate things explicitly though so that it is added to the dispatcher as in my example
16:37:30bbodihm You are right. I reproduced my case in a much simpler way, and here it works. Then I have another problem
16:51:24*shodan45 quit (Quit: Konversation terminated!)
16:58:41*psquid quit (Ping timeout: 272 seconds)
17:08:58*Mat3 joined #nimrod
17:09:02Mat3hi all
17:21:36*zahary joined #nimrod
17:22:41reactormonknow I've written my product, but I've forgotten what I wanted to use it for :-/
17:23:04Mat3hello reactormonk
17:43:30*icebattle quit (Quit: leaving)
17:54:38*Icefoz joined #nimrod
17:54:57*DAddYE joined #nimrod
18:05:22*brson joined #nimrod
18:16:26Mat3ciao
18:16:35*Mat3 quit (Quit: Verlassend)
18:22:48*brihat left #nimrod (#nimrod)
18:24:33EXetoCBitPuffin: using ack and ack.vim now. do I get a cookie?
18:36:03*brihat joined #nimrod
18:38:15reactormonkI have a bunch of items which are produced from other items. I have the list of products required for each product, the whole graph is about 4 levels deep. How do I construct every possible path of construction?
18:43:16*filwit joined #nimrod
18:46:12*zahary quit (Quit: Leaving.)
19:03:25reactormonkError: expression ':delegator("input", current)' cannot be called
19:03:29reactormonkpossibilities.add(@[TReaction(inputs: current.input*factor, output: current.output*factor, numberOfFactories: current.numberOfFactories*factor)])
19:03:50reactormonkcurrent is a TReaction
19:04:19reactormonkcurrent is a TReaction
19:04:22reactormonkoops
19:06:25EXetoCis input accessible?
19:06:43EXetoCthat error message confused me before, but now I know about delegators
19:11:39EXetoCno tests for delegators eh? the feature appears to work
19:12:21reactormonkfixed it.
19:12:30reactormonkalso rewrite a bit of helper functions for cleaner code
19:12:49reactormonkany way to tell repr to give me a ruby-like `inspect`? Without all the memory addresses etc.
19:13:01VarriountWhat are delegators again?
19:14:20EXetoCVarriount: http://build.nimrod-lang.org/docs/manual.html#delegator-pragma
19:15:34EXetoC"The delegator pragma can be used to intercept and rewrite proc call and field access..."
19:15:53VarriountThat could be handy for the parseCfg module
19:17:36EXetoCJust as I started using parsecfg
19:21:14*Icefoz quit (Ping timeout: 264 seconds)
19:25:50EXetoCwhy do some ctor procs modify some input rather than returning an instance of said type?
19:27:42EXetoCmodifying an input and not returning anything that is. just wondering, because the latter is more convenient
19:28:06Araqefficiency
19:32:44EXetoCYou think the caller should specify noInit? I can't think of anything else
19:33:45Araqit's re-using memory vs allocating
19:34:06AraqI guess where you encountered it, it doesnt matter
19:34:31*xtagon joined #nimrod
19:36:12reactormonkhow much overhead is a set over a seq?
19:36:18reactormonk< 10 elements
19:37:38*BitPuffin quit (Ping timeout: 245 seconds)
19:37:48Araqsystem.set is almost always smaller, TSet is a hash set with 1/3 of space overhead over a seq
19:38:45reactormonkkk, I create them with 16 initial size
19:44:37*LordAndrew joined #nimrod
19:45:01*OrionPK joined #nimrod
19:50:38Discolodasystem.set works like a bit array, so a set of an enum with over 300 values would be 38 bytes
19:52:37EXetoCAraq: I don't think so, but then again it's part of the compiler
19:55:30EXetoCI wonder if a syntax unification would involve too much magic, but overloading for this purpose seems to be acceptable
19:56:10EXetoCproc init(): T = init(result)
19:56:39Araqno a "syntax unification" is planned but for different reasons
19:56:52Araqwell ... the plans are not fleshed out
19:56:54EXetoCinteresting
19:59:21*brson quit (Quit: leaving)
19:59:36*brson joined #nimrod
20:02:04EXetoCAraq: for facilitating in writing generic code?
20:02:13reactormonk TReaction = object of TObject
20:02:15reactormonk inputs: TSet[TItem]
20:02:22reactormonk^ works with seq[TItem], doesn't work with TSet[Item]
20:02:27reactormonkError: cannot instantiate: 'A'
20:08:31Varriountcan arrays in c hav4 negative subscripts?
20:08:39Varriount*have
20:09:41reactormonkoops, n/m
20:09:47reactormonkVarriount, subscripts?
20:10:11VarriountI'm trying to get nimrod to compile via microsoft's visual c compiler
20:10:28VarriountAnd am getting copius compiler errors
20:12:32reactormonkHow do I write my own hash function?
20:12:36reactormonk... for my object
20:12:53reactormonkI don't see any function I can combine two hashes with
20:14:35reactormonk!& apparently
20:15:50reactormonkError: type mismatch: got (TSet[TItem], proc (TItem): TItem{.closure.})
20:15:57reactormonksystem.map(data: var openarray[T], op: proc (var T){.closure.})
20:15:59reactormonkaww
20:23:54*zahary joined #nimrod
20:30:55reactormonkbtw, how do I write a set literal?
20:34:33vbttI've been thinking about the possible syntax modifications. mixing prefix, postfix, infix syntax with space sensitivity could be very confusing.
20:34:44vbtta* b
20:35:27vbttis it an infix operator or a postfix operator with a function call?
20:35:39Varriountreactormonk: A set literal is {}
20:36:00vbttsimilarly. a* *b vs. a ** b vs a**b etc.
20:36:32Varriountvbtt: Araq has plans for signicant spacing
20:36:56vbttVarriount:yeah i know.
20:37:04vbttwhich is what i'm expressing concerns about.
20:37:15vbttbut we'll see what syntax rules are chosen.
20:37:27vbttso far, i dont like the idea.
20:38:00vbtta+b * c is an easy example but once you have more than one space, parsing it by eye seems harder than just parsing the parenthesized version.
20:38:16Varriountvbtt: Well, you could always turn it off
20:38:31vbttthe problem is other people's code.
20:38:38vbttwhich you often have to read.
20:41:07vbttthe only thing simple enough for me to visually parse is if no-space=prefix|postfix|composite-operator and space-on-both-sides=infix-operator
20:41:42reactormonkvbtt, cool
20:41:52vbttanyway, let's see what syntax is selected.
20:42:28reactormonk{TItem(typeID: TTypeID("2308"), amount: 3000)} gives me Error: ordinal type expected
20:42:35reactormonkuhh @ Varriount
20:44:14VarriountFor what?
20:44:31Varriountreactormonk: Yeah. You said a set literal, that is a set
20:45:11VarriountThe built in sets can only contain ordinal types
20:46:43VarriountThe 'sets' module doesn't have a literal (although that could be fixed with a macro)
20:50:15Varriountreactormonk: Built in sets are bit sets, and can only contain ordinals. The hash sets in the sets module can contain more than just ordinals, but they are also less efficient than built in sets (both are probably quite efficient, but there is a difference)
20:50:51Araqvbtt a* b would be a postfix operator with a function call obviously
20:51:03Araqa * b would be an infix operator
20:51:09vbtthehe
20:51:23AraqI can't imagine how it can ever be difficult to figure out
20:51:29*vbtt thinks is amusing how Araq tags on 'obviously' to statements.
20:51:49Varriountvbtt: I have to agree with Araq on that one though
20:52:20Araqvbtt: however postfix operators are not in the initial proposal for space sensitivity
20:53:35*filwit quit (Ping timeout: 260 seconds)
20:53:36Araqalso the argument "can be confusing" is getting tiresome
20:54:05VarriountEverything can be confusing, given enough ignorance and misuse
20:54:14Araqwhat if I have in C a+1 * 3 ? is the whitespace that is ignored by the C compiler not confusing?
20:55:06Araqwhat if "other people" write code this way? should I trust the compiler or the spaces?
20:57:11*[2]Endy quit (Ping timeout: 272 seconds)
20:58:16VarriountAraq: I have an article I think you might like -> http://naildrivin5.com/blog/2013/05/17/source-code-typography.html
20:59:12vbttof course everything can be confusing but representation matters.
20:59:29vbttthere's a reason we dont do math in roman numerals for e.g. even though its possible.
20:59:54Varriountvbtt: Have you seen calculus?
21:00:14vbttreadability and convenience matter. also how error prone something is. e.g. I know about the 'except A, B:' gotcha in python since forever yet I still make that mistake sometimes.
21:01:42vbttthere's a difference between 'somthing different that just takes getting used to and then its just as easy, if not more' and 'something different that takes getting used to but actually worsens productivity'
21:02:11vbttVarriount:what about calculus?
21:03:14vbttcalculus semantics have inherent complexity. now imagine calculus using roman numerals - thats like adding unnecessary syntactic complexity on top of it.
21:03:53Varriountvbtt: Have you seem all the logic symbols calculus takes?
21:04:02vbttVarriount:no.
21:06:05vbttAraq: C is confusing of course. the type declarations are particularly confusing because of the chosen syntax.
21:06:13Varriountvbtt: http://plato.stanford.edu/entries/logic-linear/psystems2a.jpg
21:07:29vbttVarriount:ok. what's the point you're making though?
21:08:22Varriountvbtt: Just that technically we do do match in roman numerals
21:08:38Varriount*math
21:08:47VarriountWell, roman symbols anyway
21:08:51VarriountOr greek
21:09:34Varriountvbtt: Perhaps the ability to turn significant spaces to parens could be added to 'nimrod pretty'?
21:09:41vbttVarriount:I don't think you get my point. I'm not talking about using non numeric symbols to represent something.
21:10:09reactormonkVarriount, hm, so how do I get a TSet literal?
21:10:13vbttVarriount: I'm talking about roman numerals vs arabic.
21:10:25Varriountvbtt: FYI, I'm neither for nor against significant spaces. I'm just throwing things into the conversation
21:10:53Varriountreactormonk: Probably use a macro to turn a set literal into a tset
21:10:54vbttboth can represent all positive integers, yet, nobody uses roman because its just so inconvenient.
21:11:35Varriountreactormonk: Or just make a set and add things to it manually
21:12:01reactormonktoSet doesn't work :-/
21:12:03reactormonkError: undeclared identifier: 'data'
21:12:18VarriountHuh, that seems familier to a recent bug posted.
21:12:30reactormonkyup
21:12:46Varriountreactormonk: Could I get a gist of your code?
21:12:54reactormonklet's reduce the problem a bit
21:13:11Varriountreactormonk: I have to go in a couple minutes. Calculus calls
21:14:32reactormonkVarriount, http://dpaste.com/1577600/
21:14:37reactormonkfull code
21:14:47reactormonkdoesn't appear in http://dpaste.com/1577601/
21:15:05vbttanyway, g2g. will wait for the syntax details before fruther comments. however i leave you with these: a*(b) (a)*b
21:15:11*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
21:23:56*BitPuffin joined #nimrod
21:28:10BitPuffinEXetoC: yes you get a cookie
21:28:10*silven quit (Remote host closed the connection)
21:31:06*silven joined #nimrod
21:32:03*brson quit (Quit: leaving)
21:33:18reactormonkVarriount, found it. == for sets is broken
21:42:00*shodan45 joined #nimrod
21:55:05*XAMPP quit (Ping timeout: 272 seconds)
22:06:13*io2 quit ()
22:13:03reactormonkAraq, https://github.com/Araq/Nimrod/pull/857 can you double-check?
22:19:46*BitPuffin quit (Quit: WeeChat 0.4.2)
22:42:36*Mat3 joined #nimrod
22:42:39Mat3hi
22:55:14*Mat3 quit (Quit: Verlassend)
23:09:28*brson joined #nimrod
23:11:24Araqreactormonk: ah, makes sense
23:11:40Araq== for object accesses a.data
23:12:02Araqbut this is not allowed outside the module as it would break encapsulation
23:12:28Araqyour patch is not entirely correct though
23:13:06Araqyou need to check that ever element of set a is in set b as the order could differ
23:13:22Araqand that s.counter == t.counter
23:14:00Araqin fact
23:14:14Araqimplement '<=' for TSet's
23:14:24Araqand == then becomes:
23:14:44Araqs.counter == t.counter and s <= t
23:16:46*ddl_smurf quit (Quit: ddl_smurf)
23:22:58*darkf joined #nimrod
23:36:59*psquid joined #nimrod
23:48:57*filwit joined #nimrod