<< 25-06-2014 >>

00:12:40Araqlol "doesn't read well on phone"
00:12:57Araqyeah ... well ... nothing does ... guess why
00:13:50Araqdom96: btw a good hacker news answer would be to explain to them how open source works
00:14:27Araq"hmm Nix is cool, I'll patch the C++/Perl implementation to work on Windows so that we can use Nix for Nimrod ..."
00:15:53Araq<-- spot the error :-)
00:17:14AraqNix also solves a different problem
00:17:23dom96I did answer one of the comments
00:17:34Araqit seems to be overly concerned with reproducible builds
00:17:44Araqso every version is nailed down
00:18:21Araqwell you can do that with Babel, it's called "include your deps by copying the directories"
00:20:20*superfunc joined #nimrod
00:20:23Joe_knockAraq: You must not like many online communities :P
00:22:44AraqJoe_knock: I built a programming language for geniuses because programmers are retarded
00:25:45*sdw joined #nimrod
00:25:53Joe_knock:D
00:27:10Joe_knockAraq: Your opinion on this: http://www.youtube.com/watch?v=b2F-DItXtZs? :D
00:29:32*darkf joined #nimrod
00:33:05AraqJoe_knock: it's funny but I like MongoDB
00:33:21Araqit's good when you know what you're doing
00:34:40EXetoCthat's not the impression I got
00:34:46EXetoCI need to complete the wrapper already
00:35:49*Jehan_ quit (Quit: Leaving)
00:37:09superfuncAraq: Is there any plan to lift the capture maximum on pegs?
00:38:31Araqsuperfunc: no, you need to copy&paste the pegs module into something that builds a real parser
00:38:56Araqbut then why would you? there are much better parsing algorithms around
00:40:08superfuncok
00:51:19*q66 quit (Quit: Leaving)
00:51:30superfuncI had only thought about it because it provides a really clean way to define a grammar
01:04:47*Jesin joined #nimrod
01:17:39*superfunc quit (Quit: leaving)
01:18:23*superfunc joined #nimrod
01:49:00*hoverbear joined #nimrod
01:56:03*brson quit (Quit: leaving)
01:57:54*vendethiel- quit (Ping timeout: 255 seconds)
02:02:35*vendethiel joined #nimrod
02:03:52*saml_ joined #nimrod
02:03:53*superfunc quit (Read error: Connection reset by peer)
02:08:25*Demos joined #nimrod
02:09:16*superfunc joined #nimrod
02:11:59*superfunc quit (Client Quit)
02:12:15*superfunc joined #nimrod
02:23:40*superfunc quit (Quit: leaving)
02:39:41*Demos quit (Ping timeout: 244 seconds)
02:58:38*goobles joined #nimrod
03:11:46*brson joined #nimrod
03:11:47*brson quit (Client Quit)
03:12:05*brson joined #nimrod
03:12:14*brson quit (Client Quit)
03:32:15gooblesnimrod 4 hot swap
04:01:11*xenagi quit (Quit: Leaving)
04:13:32*Joe_knock quit (Ping timeout: 245 seconds)
04:24:28*joelmo quit (Quit: Connection closed for inactivity)
04:45:17*saml_ quit (Quit: Leaving)
04:48:02*ARCADIVS joined #nimrod
04:52:46*kemet joined #nimrod
04:55:44*kemet quit (Remote host closed the connection)
04:58:02*kemet joined #nimrod
04:59:40*flaviu quit (Ping timeout: 240 seconds)
05:22:56*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
05:52:42*hoverbear quit ()
06:00:59fowlhow can i do this in nimrod, it requires offsetof(ty,field) https://docs.python.org/2/extending/newtypes.html
06:10:06*brson joined #nimrod
06:46:29*brson quit (Read error: Connection reset by peer)
07:25:14*ARCADIVS quit (Quit: WeeChat 0.4.3)
07:35:07flyxfowl: interesting question. I cannot think of anything better than using pragma packed to be able to calculate the offset of the object fields
07:37:12Araqyou can importc offset:
07:38:36Araqnah screw this
07:39:31Araqbut you can do: cast[PNimType](typeInfo(FooType)).sons[3].offset # offset of 3rd field
07:40:03Araqor something like that, my type info voodoo is rusty
07:40:13flyxwouldn't that be the 4th field?
07:40:37Araqthe 3rd field where also the 0th field exists :P
07:40:43flyx^^
07:40:45Araqso yes, the 4th field
07:40:46flyxnice one
07:42:00flyxI need a cheat sheet for stuff one can do at compiletime
07:42:40Araqeverything except:
07:42:48Araq- go *up* in the AST
07:43:00Araq- looking up an arbitrary symbol
07:43:13*Trustable joined #nimrod
07:43:17Araq- using the FFI
07:43:50*ARCADIVS joined #nimrod
07:43:52Araq- processing types (as opposed to processing the type's AST)
07:44:15Araq1-3 are intentional restrictions
07:44:30Araq4 is planned
07:45:07flyxwhere is typeInfo declared? I cannot find it in macros
07:45:14Araqsystem
07:45:43flyxhum. according to the doc, there's only getTypeInfo
07:45:57Araqit returns a pointer, and the real type is not exported :P
07:46:11Araqyeah, told you I'm rusty
07:46:20Araqit's getTypeInfo then
07:47:08flyxthat works on a value, not a type. can I get this from a typedesc?
07:47:26Araqhmm damn
07:47:53Araqyou can try ...
07:48:36Araqproc getTypeInfo*(x: typeDesc): pointer {.magic: "GetTypeInfo", gcsafe.}
07:48:48Araqin fact, try this:
07:49:06Araqinclude "system/hti.nim"
07:49:23Araqproc getTypeInfo*(x: typeDesc): PNimType {.magic: "GetTypeInfo", gcsafe.}
07:49:53Araqecho getTypeInfo(FooType).node.sons[3].offset
07:52:02*kunev joined #nimrod
07:53:22flyxError: internal error: evalOp(mGetTypeInfo)
07:53:25flyxon last line
07:53:53Araqfix it
07:54:11Araqadd 'mGetTypeInfo' to the list of unsupported ops in evalOp
07:54:48Araqthen all you need to do is ensure mGetTypeInfo works for typedesc in ccgexprs.nim
07:55:37flyxmight have a look at it later today
07:55:41Araqbut this should already work
07:55:48Araqso it's only the 1 fix
07:55:51Araqtry it now
07:55:51flyxunfortunately, I get payed for doing other, less interesting stuff :/
07:55:56Araqmake a PR
07:56:12Araqflyx: that's why you get *paid*
07:56:25flyxah, my bad
07:56:42Araqno, I mean it's the nature of the universe
07:56:50Araqthey pay you because it's no fun
07:59:07flyxit could be better. I mean, I could search a better job or go back to university and make a Dr.
08:00:40flyxmost things are better than maintaining 10 year old Java code
08:01:02Araqugh. I feel for you.
08:02:36*BitPuffin quit (Ping timeout: 244 seconds)
08:02:50Araqhow many design pattern per line? ;-)
08:04:46flyxdunno. is „we split the code into multiple enterprise modules so we cannot debug-step from one into another“ a design pattern?
08:05:40flyxah well, it's Java, so, yes it is
08:07:30flyxI still cannot wrap my head around why *anyone* could think this Java Enterprise stuff is useful for anything other than ensuring that the customer pays large sums for continuous support
08:07:46flyxbut perhaps that's the point
08:10:40*ehaliewi` quit (Ping timeout: 240 seconds)
08:17:30fowlinteresting Araq
08:17:41fowli always wondered what that gettypeinfo thing is
08:36:05*joelmo joined #nimrod
08:44:22*ARCADIVS quit (Quit: WeeChat 0.4.3)
08:48:38Skrylarflyx: but bigger balls of mud = more billable hours!
08:52:40*BitPuffin joined #nimrod
09:43:03*Trustable quit (Ping timeout: 240 seconds)
09:43:39*vendethiel quit (Ping timeout: 255 seconds)
09:45:25*vendethiel joined #nimrod
09:47:39*Trustable joined #nimrod
10:02:10*vendethiel quit (Ping timeout: 240 seconds)
10:02:15*vendethiel- joined #nimrod
10:12:10*Trustable quit (Ping timeout: 240 seconds)
10:24:32*Trustable joined #nimrod
10:34:09*soc joined #nimrod
10:41:05*q66 joined #nimrod
10:41:10dom96hi
10:45:18EXetoCho
10:50:31*vendethiel- quit (Ping timeout: 244 seconds)
10:51:01*vendethiel joined #nimrod
11:03:00*vendethiel- joined #nimrod
11:03:32*vendethiel quit (Ping timeout: 245 seconds)
11:36:37*saml_ joined #nimrod
11:37:01*meguli joined #nimrod
11:37:29*meguli quit (Client Quit)
11:49:00*Johz joined #nimrod
11:52:44*q66 quit (Ping timeout: 252 seconds)
12:05:01*q66 joined #nimrod
12:20:07*saml_ quit (Quit: Leaving)
12:22:42*untitaker quit (Ping timeout: 245 seconds)
12:25:42flyxso, um, when I stuff too much things into a TSet, I get "Error: interpretation requires too many iterations"
12:26:14flyxthis seems to come from a call in sets.nim: high(s.data)
12:28:15flyxthis happens when 64 elements are in the set
12:29:36*untitaker joined #nimrod
12:35:46flyxsame thing happens with TTable
12:43:30flyxonly at compile time
12:45:25Araqhmmm well we have a bug report about TTable not always working properly at compile time
12:48:17flyxhm yes, read it, but this is different
12:48:37flyxit originates in the hash calculation of TSet and TTable
12:51:18flyxI'll file an issue
12:54:11Araqok
13:04:36flyxhttps://github.com/Araq/Nimrod/issues/1305
13:05:38Araqflyx: wanna fix these VM bugs?
13:06:17flyxAraq: well I can try.
13:06:50Araqwell you'll need my help
13:09:45flyxokay. I'll go shopping and do some other boring but necessary RL stuff, then I'll return and ask you about the VM
13:18:11Araqgood
13:28:12*darkf quit (Quit: Leaving)
13:41:55Skrylarit always sucks when you get a programming problem so fundamentally boring that it grinds all of your coding to a halt because you hate it that much
13:42:18*pafmaf joined #nimrod
13:55:36flyxAraq: okay, I'm ready
13:57:28Araqwell what does echo high(s.data) produce in sets.nim?
14:01:25*flaviu joined #nimrod
14:04:10flyxalways 63. interestingly, if I add it before the line that fails, it does produce its usual output right before the fail
14:04:58flyxso high(s.data) seems to be working on its own.
14:05:56Araqer ... you do run the compiler in debug mode, right?
14:06:15flyxah, I should, I guess
14:07:18*Jehan_ joined #nimrod
14:08:49flyxdoes it matter? the error is in the VM, does debugging alter the macros that run in the VM?
14:09:06flaviuflyx: You get a stack trace
14:09:36flyxflaviu: I also get a stack trace without --debugger:on
14:13:49flyxthe stack trace doesn't seem right
14:15:38flyxwhat happens seems to be that the following loop doesn't return, because it loops over all entries - which happen to be 64 and are all filled
14:16:56*hoverbear joined #nimrod
14:17:16flyxand the set doesn't recognize this and doesn't expand
14:18:06flyxafaik, the theory tells it's a good idea to expand a hash table when 50% is filled
14:18:07Araqwell that pretty much means sets.enlarge doesn't work properly
14:18:38Araqit uses 66% look at mustRehash
14:18:43*hoverbear quit (Client Quit)
14:19:27Araqmy suspicion is: swap(s.data, n)
14:19:43Araqif that fails to update 's.data' properly you'll likely see this misbehaviour
14:19:47flyxwell, the loop in rawGetImpl doesn't return until a match is found
14:19:55Araqyes
14:19:55flyxbut after the loop, there is a result = -1
14:20:04Araqbut the bug happens before
14:20:06flyxwhich would lead to a call to enlarge
14:20:22flyxbut the code never gets there
14:20:30Araqlisten to me
14:20:37flyxokay
14:20:44Araqif the data array is 100% full, that is the bug
14:20:55Araqit should never be this full in the first place
14:21:12Araqso it failed to enlarge *before* the mget call
14:21:31Araqso that's your problem
14:23:08flyxokay. so I never call anything but incl on the set, so the only point where enlarge could get called, is in inclImpl()
14:23:16*goobles quit (Ping timeout: 246 seconds)
14:23:36flyxthat only happens if rawGet returns a negative number
14:24:49flyxokay, this happens when an empty slot is found
14:27:45Jehan_flyx: Do you have the code to look at or is it too complex for a gist?
14:28:09flyxJehan_: it's right here: https://github.com/Araq/Nimrod/blob/devel/lib/pure/collections/sets.nim
14:28:22Jehan_No, I mean how you use it.
14:28:31Jehan_I know where sets.nim is. :)
14:28:46flyxah, that's included in my issue: https://github.com/Araq/Nimrod/issues/1305
14:29:33Jehan_Ah, I see. Looks like I got in on the tail end of the discussion.
14:30:06Araqflyx is debugging sets.nim instead of the vm :P
14:30:48Jehan_It works when running it outside the VM.
14:31:27flyxjup, swap is the problem
14:31:37flyxafter swap, both n and s.data have a length of 64
14:32:45flyxthe order of the parameters doesn't matter
14:32:52Araqsee? it helps to listen
14:33:17flyxjep. I just wanted to get my grips on the code
14:34:58Araqthe opcode for swap is opcSwap
14:35:06flyxk
14:35:23Araq90% of the vm bugs are not in the vm, but in vmgen which is its code generator
14:36:02Araqso have a look at line 792 in vmgen.nim
14:36:12Araqand lots of things are suspicious
14:37:44Araq'setLen' takes a 'var' parameter and these needs lots of complex logic to support in the VM
14:38:01Araqso it calls: c.genAsgnPatch(n.sons[1], d)
14:38:08Araqfor its var parameter
14:38:15Araqswap does nothing like that
14:38:44Araqalso the 2nd argument is stored in a "tmp" and then freed with freeTemp
14:39:00Araqthis should be a nop, but it makes no sense
14:39:24Araqthe 2nd arg is a var parameter too and these are not kept in temporary registers
14:40:34AraqI gotta go, see you later
14:40:54Araqtry to call
14:40:56Araq c.genAsgnPatch(n.sons[1], d)
14:41:08Araq c.genAsgnPatch(n.sons[2], tmp)
14:41:13Araqfor mSwap
14:41:17Araqbye
14:41:23flyxkay, bye
14:47:53flyxI should upgrade to an SSD sometime to get better compile times
15:03:27*Puffin joined #nimrod
15:03:57*BitPuffin quit (Ping timeout: 245 seconds)
15:04:47flyxjup, this works
15:04:58*flyx prepares a PR
15:05:12*pafmaf quit (Quit: This computer has gone to sleep)
15:05:55*Puffin is now known as BitPuffin
15:12:03*pafmaf joined #nimrod
15:16:17*vendethiel- quit (Ping timeout: 272 seconds)
15:17:28*pafmaf quit (Quit: This computer has gone to sleep)
15:18:13KevinKelleyqueues bug? compiler says "error: undeclared identifier: count" on call to q.dequeue()
15:19:01KevinKelleylooks like the count member is non-public, maybe a visibility problem in the gen'd code?
15:19:57*vendethiel joined #nimrod
15:26:47*pafmaf joined #nimrod
15:29:27*pafmaf quit (Client Quit)
15:31:36Jehan_KevinKelley: I think that's fixed in the devel branch.
15:32:41Jehan_Hmm, no, apparently the fix didn't go through.
15:35:57*pafmaf joined #nimrod
15:36:51Jehan_Ugh, it was fixed and apparently got reverted accidentally in another patch.
15:38:01Jehan_Or not? That patch says it fixes the issue for real, and now that I'm trying it, it seems to compile cleanly.
15:38:59*io2 joined #nimrod
15:44:20*Johz quit (Quit: Leaving)
15:56:57*pafmaf quit (Quit: This computer has gone to sleep)
16:00:29*Demos joined #nimrod
16:00:37*pafmaf joined #nimrod
16:02:31*hoverbear joined #nimrod
16:02:41*pafmaf quit (Client Quit)
16:03:10Demosdom96, ping
16:13:39*kunev quit (Quit: leaving)
16:13:46dom96Demos: sup
16:14:24Demosis anyone working on fixing and improving the times module?
16:14:26NimBotnimrod-code/babel master f194dbf Grzegorz Adam Hankiewicz [+0 ±1 -0]: Updates required nimrod compiler version in readme.
16:14:26NimBotnimrod-code/babel master edd92a2 Dominik Picheta [+0 ±1 -0]: Merge pull request #45 from gradha/pr_updates_nimrod_version... 2 more lines
16:14:44dom96Demos: Not that I know of. What do you want to fix in it?
16:15:42Demosaccording to the GSoC document there is a bug in the `-` operator, I also really want high precision timer support, although I dont know if times is the right place to do that
16:16:19*pafmaf joined #nimrod
16:17:05dom96ahh, go ahead. I think the compiler makes use of a high precision timer maybe you could just grab the code from there.
16:17:16dom96It's used for the real-time GC IIRC
16:17:22dom96not sure where to look though
16:22:27Demosyeah I looked over there (lib/compiler/timers.nim). I am not sure if that should be integrated into times or not. Times seems to be more about wall clocks and dates
16:26:43Demoshmmmm to fix the error in times `-` we would have to know when to switch to the julan calender....
16:37:44*johnsoft joined #nimrod
16:47:13*nande joined #nimrod
16:53:14*Matthias247 joined #nimrod
16:53:56*brson joined #nimrod
17:00:38*askatasuna joined #nimrod
17:00:52*pafmaf quit (Quit: This computer has gone to sleep)
17:03:46*soc quit (Quit: Leaving.)
17:05:33*hoverbear quit (Ping timeout: 240 seconds)
17:06:20*pafmaf joined #nimrod
17:06:24*hoverbear joined #nimrod
17:11:25*superfunc joined #nimrod
17:11:33superfuncmorning everyone!
17:12:44*Jehan_ looks at the clock. "Yeah, right …" :)
17:13:15EXetoChe's in one of those silly timezones
17:13:15superfuncYou'll have to forgive my typical california antics
17:13:53Jehan_Oh, I was just kidding. I mean, I lived in Oregon only a few years ago.
17:14:39Jehan_Calling my family while they were having breakfast and just before I was about to go to bed was an interesting experience. :)
17:14:39superfuncOregon isn't too bad, I'm in Eugene for a few more days. But I'll be happy to get back to San Jose where the internet wont suck
17:15:30Jehan_Heh. I think I had Comcast back then. It wasn't bad, just horribly expensive.
17:17:39superfuncIts that or AT&T in the bay area
17:18:05superfuncSome new ISPs are popping up in SF, and google fiber is supposed to hit the valley soon, so I suppose there is hope
17:21:59*pafmaf quit (Quit: This computer has gone to sleep)
17:22:40*Demos quit (Ping timeout: 244 seconds)
17:24:36flyxin a macro, how can I tell the compiler to fail with an error message that displays file, line and column of a PNimrodNode?
17:29:53*aarondabomb joined #nimrod
17:30:10*aarondabomb left #nimrod (#nimrod)
17:30:12superfuncfowl: Why is static linking disabled in sdl2?
17:30:43*pafmaf joined #nimrod
17:33:44*io2 quit (Ping timeout: 260 seconds)
17:34:30Araqflyx: now fix the other reported VM bug please, about 'add' iirc
17:34:58flyxAraq: string.add? aye, sir!
17:35:19superfuncJehan_: Do you know much about the implications of using something that is LGPL? the license I'm looking at says I have to provide a way for the user to link with something else. Is providing the source sufficient?
17:35:59Araqflyx: this is done by mAppendStrCh, mAppendStrStr and mAppendSeqElem
17:36:00Jehan_Source should generally be sufficient, as long as it actually compiles.
17:36:27Araqthese all call genBinaryStmtVar
17:36:38superfuncOk. I should just convert my code from sdl1.2 to sdl2 to avoid it altogether.
17:36:40Jehan_Not a big fan of either the LGPL or the GPL, so I'm avoiding them as much as I can.
17:36:50Araqwhich contains this line:
17:36:52Araq #c.genAsgnPatch(n.sons[1], dest)
17:37:01Araqwhy is it disabled? I don't know
17:37:10Araqenable it and watch everything work ...
17:37:21Araqbtw you should really run the test suite
17:37:34Araqnimrod c tests/testament/tester
17:37:40flyxkk
17:37:42Araqtests/testament/tester cat vm
17:37:48superfuncJehan_: I think sdl2 is zlib
17:38:22Araqand the category 'macros' too
17:38:28Jehan_superfunc: I don't even know what sdl2 is. :)
17:39:00fowlflyx, i disabled it because it wasnt supported in the other modules
17:39:14superfuncOh, my bad lol. Its a game library. Fowl made wrappers for the old version(1.2) which is LGPL and the new(2.0) which is zlib
17:39:43Jehan_Gotcha.
17:40:12fowlflyx, you can enable it if you like but dont do it like the guy in issue #2
17:41:19superfuncfowl: was your previous message to me?
17:41:29superfuncfowl: about statically linking sdl2
17:42:30*hoverbea_ joined #nimrod
17:42:35fowlyeah sry
17:42:43superfuncok, I figured. Thanks for answering
17:43:09superfuncI guess I'll stick with 1.2 for now.
17:43:17fowlwhy?
17:43:35superfuncI wanted to statically link sdl in.
17:44:15*hoverbear quit (Ping timeout: 255 seconds)
17:44:53fowli dont think the 1.2 has that option? i just did it for an experiment
17:45:20fowlit is easy to re-enable though, just uncomment some stuff and make a PR
17:47:49*BitPuffin quit (Ping timeout: 264 seconds)
17:48:01superfuncI think I did in in 1.2 by passing all the flags through to gcc
17:49:04*BlameStross joined #nimrod
17:50:37*Skrylar quit (Ping timeout: 245 seconds)
17:50:45flyxenabling the line neither fixes the bug I reported nor the bug it possibly duplicates
17:51:30*io2 joined #nimrod
17:52:20Araqhi BlameStross welcome
17:52:28Araqflyx: ok ... too bad
17:53:00flyxthe tester currently raises an error in tcompiletimetable.nim
17:53:10flyxI'll see if it vanishes if I remove the change
17:53:28Araqno that's a currently failing test iirc
17:53:42Araqbut sure check it
17:54:29superfuncAraq: Does --passC and --passL supersede nimrod code that tries to disable static linking?
17:55:11Araqsuperfunc: --passC and --passL all append to some internal buffer, dunno the order but the compiler tells you how it invokes GCC
17:55:19flyxsame test error without the change. and both times, there's also a test in macros failing, tstringinterp.nim
17:56:10superfuncOk, I was able to statically link sdl1.2 without problem. Checking with ldd filename, I only saw libc and a few other things, so I think my understanding of it is correct.
17:56:52fowlsuperfunc, the easier way is {.passl: gorge("pkg-config --libs sdl2").}
17:56:58Araqflyx: tstringinterp should not fail ... argh
17:57:11superfuncfowl: Much easier
17:57:16superfuncI wish I had known that lol
17:57:25superfuncbecause the string of things to include was huge
17:57:43flyxAraq: okay, I'll test again without my previous change
17:58:32fowlsuperfunc, if you uncomment this you're good to go https://github.com/nimrod-code/sdl2/blob/master/src/sdl2.nim#L8
17:58:54AraqI still don't get why you all want static linking
17:59:12Araqdoesn't gorge("pkg-config --libs sdl2") tell you that it simply DOESN'T work?
17:59:43*pafmaf quit (Quit: This computer has gone to sleep)
18:00:11flyxwell, the test fails on current devel without any of my changes
18:00:11fowlshrug
18:03:20Araqflyx: yeah it's some other regression. yay
18:03:46*Matthias247 quit (Read error: Connection reset by peer)
18:06:07superfuncfowl: thanks
18:06:34superfuncI just realized something, to Araq's point. You can't really get a completely self-contained binary anyways because of libc
18:07:32superfuncfowl: I have one last question, if you don't mind
18:07:44fowlok
18:08:42superfuncDo you see much benefit to a 2D game for sdl2 over sdl1.2. I've read that sdl2 offloads a lot of cpu work onto the gpu if available, but I don't see it being much of an issue in this case
18:10:00Trixar_zaIt does that by plugin directly into mesa if memory serves
18:10:04Trixar_zaplugging *
18:11:36Trixar_zaYou'll probably get better support with sdl1.2 than for sdl2 on systems with older versions of OpenGL or SDL
18:11:58Trixar_zaNot that sdl1.2 doesn't have it's own host of problems
18:12:33fowlsuperfunc, sdl2 is being worked on, its changed a lot since 1.2
18:13:37fowli like the new api, and it can target android/ios
18:13:46superfuncOk, now you have me
18:14:37fowli wouldnt worry about supporting old computers either, one day we'll round up all computers over a year old and burn them (i had a dream about it)
18:14:45superfuncIt really wasn't that much code to convert, I was just being lazy.
18:17:36*io2 quit (Ping timeout: 260 seconds)
18:28:24*hoverbea_ is now known as hoverbear
18:40:41*vendethiel quit (Ping timeout: 244 seconds)
18:40:44*vendethiel- joined #nimrod
18:41:41reactormonkAraq, what do you think of {.borrows *.} ?
18:42:13*Demos joined #nimrod
18:42:36flyxTSets seem to miss union and intersection
18:42:52reactormonkMaybe & and |
18:43:04Araqthat would be + and * in nimrod
18:43:23Araqbut yeah quite likely that they missing
18:43:27Araqadd them
18:43:40flyxwill do
18:43:45Araqreactormonk: dunno, sounds like a bad idea
18:45:00reactormonkAraq, let's say you want to implement meters as a type. type meters = distinct float {.borrows: *.} sounds good to me
18:45:37Araqand what does the * mean?
18:45:57Araqmeter+meter == meter
18:46:05Araqmeter*meter == meter?
18:46:27reactormonkhm, duh
18:46:46reactormonkBut I suppose "import all additive constructs" is too complicated
18:47:39Araqmeter * <no unit of measure> == meter btw
18:48:08reactormonkanything required to make that work?
18:48:21NimBotAraq/Nimrod devel 15456b5 def [+0 ±1 -0]: Use monospace as fallback font on website
18:48:21NimBotAraq/Nimrod devel 7a5be93 Simon Hafner [+0 ±1 -0]: Merge pull request #1293 from def-/website-monospace... 2 more lines
18:48:41reactormonkis it {.effect.} or {.effects.}?
18:48:50superfuncls
18:48:58reactormonk^^
18:49:07flyxwhat does the dirty pragma do?
18:49:14AraqI don't know, reactormonk :-)
18:49:35Araqflyx: you have to be over 18 to use the dirty pragma
18:50:22NimBotAraq/Nimrod devel 3c89ad7 def [+0 ±1 -0]: Rename {.effect.} to {.effects.} in Tut 2
18:50:22NimBotAraq/Nimrod devel f793523 Simon Hafner [+0 ±1 -0]: Merge pull request #1294 from def-/tut-fix... 2 more lines
18:50:35flyxAraq: I am 27 and know how to code C++ without shooting myself in the knee, does this suffice?
18:51:23reactormonksuperfunc, nice issue report
18:51:33Araqflyx: 'dirty': every identifier is looked up in the instantiation context
18:52:02Araq(you can still override this with a 'bind' statement I think)
18:52:48flyxah. well, I'll be probably just calling the low-level stuff, so I don't need it myself
18:53:21Araqthe macro system is actually quite easy to understand once you spent a few years thinking about it
18:53:22reactormonkAraq, you want more documentation? Go read that PR from gradha (#1299)
18:53:28flyx^^
18:53:46Araqthere is immediate vs. non-immediate
18:53:51Araqand dirty vs clean
18:54:06flyxoh no, my music stopped! skill--
18:54:35flyxyeah, I already used immediate a lot
18:54:37reactormonkdirty ones can interact with the calling code other than arguments passed
18:54:48reactormonk... data flow wise.
18:54:55Araqimmediate means "doesn't participate in overloading resolution" (and so supports more dangerous stuff)
18:55:29Araqdirty means "look up the symbols as a C macro does"
18:56:18superfuncreactormonk: what?
18:56:42reactormonksuperfunc, it looks well constructed.
18:57:00superfuncThe bug I reported?
18:57:07reactormonkyup
18:57:32superfuncOh, thanks lol. It was so minor, but I figured better to report than not
19:06:40Araqwhat the heck ... dom96 !
19:06:59Araqgot closure iterators to work again
19:18:36superfuncdependency hell makes for a sucky wednesday
19:20:15flyxwhy doesn't TOrderedSet have excl()? is this by design?
19:25:12flyxwell, I guess union on ordered sets doesn't make much sense anyway
19:41:53dom96Araq: ?
19:42:40dom96Araq: oh, you got them to work. Why the what the heck?
19:50:04Araqbecause it finally worked
19:50:37Araqflyx: iirc excl is hard to implement for TOrderedSet and might even require a less efficient data structure
19:51:24dom96Araq: well I guess they're still not perfect or else I would see some commits already
19:52:42flyxAraq: can I just add tests to tests/sets?
19:53:39*Matthias247 joined #nimrod
19:56:34Araqflyx: the test has to start with t and then it will be run by the tester, yes
19:56:49flyxgood
19:56:52flyxPR incoming
19:57:42Araqdom96: well yes but at least simple closure iterators work again
19:58:10dom96Araq: good
19:58:27dom96I guess it's time for me to stop playing Far Cry 3 and get back to work.
20:02:05Araqbbl
20:02:23flyxah damn, I cannot create a new PR on the same branch while the old one is still pending
20:02:36flyxcan't github do cherry picking for PRs?
20:03:27Araqflyx: so push somebody to accept your PR
20:03:35Araqbut not me, I'm not here
20:05:17*flyx carefully pushes dom96
20:05:26dom96flyx: why can't you create a new branch?
20:05:36flyxdom96: sure, I can
20:05:43flyxwas about to do that
20:07:28dom96I'm not confident enough to be accepting vmgen changes :P
20:07:45flyxkk
20:33:17superfuncHmm, any idea why I'm not able to declare something as const when its initializers only depend on const values?
20:34:12superfuncEg. const some_x*: int = 5 ... position_rect* = TRect(x:some_x,..)
20:34:22superfuncbut if its in under var it works
20:36:35flyxbecause TRect is an object?
20:36:50superfuncCan we not have const objects?
20:37:17flyxno, according to the manual: „Constants cannot be of type ptr, ref, var or object, nor can they contain such a type.“
20:37:33superfuncThanks flyx, I didn't know that :)
20:37:53flyxyou can of course use let instead
20:37:53superfuncI should get around to finishing reading that tonight
20:38:23superfuncyep, thats what I ended up doing
20:40:56flyxwell. enough coding for today
20:41:28*flyx goes getting some sleep
20:41:36flyxbye folks
20:45:07*vendethiel joined #nimrod
20:47:16*vendethiel- quit (Ping timeout: 244 seconds)
20:48:05*vendethiel quit (Read error: Connection reset by peer)
20:48:28*vendethiel joined #nimrod
20:52:23*BitPuffin joined #nimrod
20:53:38Jehan_superfunc: `let` values are still immutable, so you won't see a difference.
20:54:11Jehan_As I understand it (caveat, I may be wrong) `const` values are those that can actually be put in static memory.
20:54:20Jehan_`let` values still are constructed at runtime.
20:54:22*askatasuna quit (Ping timeout: 245 seconds)
20:54:23superfuncYeah, there is a problem with using let though
20:54:32superfuncif you need to take its addr
20:55:05superfuncso I had to use a var anyways
20:57:55*fowl quit (Quit: Leaving)
21:01:08Matthias247just after we talked about it - android seems to get rid of JIT
21:05:58*superfunc quit (Quit: leaving)
21:18:33*johnsoft quit (Ping timeout: 240 seconds)
21:19:08*johnsoft joined #nimrod
21:31:55Jehan_Matthias247: Oh? Haven't seen that.
21:34:04Jehan_Ah, interesting. So, they compile during installation. Hmm.
21:34:09Matthias247Jehan_: read only a short german press report about Google IO and Android L. There they say that Android L dismisses Dalvik for Android Runtime (ART), whicch is an ahead of time compiler during installation
21:34:30Jehan_Yeah, reading up on it on Ars Technica right now.
21:34:33Matthias247sounds logical
21:34:36Jehan_It does make sense.
21:34:39Matthias247even windows does this :)
21:34:47Matthias247for the .net runtime
21:34:59Jehan_They retain code portability and get better speed.
21:35:23Matthias247yes, and they can still distribute architecture-independent APKs
21:35:39Jehan_Yup, that's what I meant by portability.
21:36:13Matthias247ok, you could also distribute LLVM IL in those packages and compile them at installation ;)
21:36:25Jehan_Heh. Same difference.
21:36:32Matthias247I think that's what pncal does
21:36:38Matthias247pnacl
21:36:45Jehan_I wouldn't be surprised if they are actually using LLVM for this.
21:36:56Jehan_Since they're heavily invested in the development.
21:37:36Matthias247don't think so
21:38:02Jehan_Google employs a few Clang/LLVM core developers?
21:38:37Matthias247yes, but I don't think llvm helps in reading java bytecode
21:39:00Jehan_No, they're probably translating JVM bytecode to LLVM IR and then compile that.
21:39:13Matthias247ok, they could add a frontend which transforms the bytecode/dex to IR
21:39:32Jehan_Actually, Dalvik bytecode, as I recall. :)
21:40:01Matthias247but I think google has also enough expierence in direct code generation to do it without LLVM. E.g. they also do it in the Dart VM
21:40:36Jehan_On a related note, I have now discovered Avian and think I can pretty much dump C++ entirely, even for the odd personal project.
21:41:02Jehan_Matthias247: Yeah, but they have only finite developer time. Still better to reuse what they have.
21:41:12Matthias247this? https://github.com/ReadyTalk/avian
21:41:48Jehan_Yeah.
21:42:45Matthias247but I thought a JIT can optimize some things that ahead-of-time can't, e.g. devirtualization?
21:43:24Matthias247or will an ahead-of-time compiler still have more time and possibilies for optimization?
21:43:25Jehan_What's the context for that question?
21:43:35Jehan_What Google is doing with Android?
21:43:39Matthias247yes
21:43:58Jehan_It's a double-edged sword, especially on mobile architectures.
21:44:08Jehan_JIT optimization doesn't come for free.
21:44:35Jehan_Oracle's JVM takes quite a bit of time to warm up and have reasonable performance, for example.
21:45:00Jehan_Which is one reason why Java tends to do poorly on microbenchmarks, but pretty well on large systems.
21:45:22Jehan_You can do a lot of devirtualization at compile time even without JIT.
21:46:09Jehan_The biggest direct benefit of a JIT is that you don't incur overheads for position-independent code, linker indirections to stubs, and a few other things.
21:46:14*pafmaf joined #nimrod
21:49:34Matthias247Jehan_: can the avian thing do java8 lambdas? ;)
21:49:40flaviuAre people really including warmup in JVM microbenchmarks? I thought its common knowledge that a library to do your microbenchmarks is absolutely essential.
21:49:49Jehan_Matthias247: No idea. It's a recent discovery.
21:49:59Jehan_I know that it's slower than Oracle's JDK.
21:50:17Matthias247android is also slower ;)
21:50:54Jehan_But it's an alternative if a system doesn't have JDK installed without dragging in a huge JDK installation.
21:51:07Jehan_At least in theory, I'm still investigating some of the details.
21:51:30Jehan_The standard build process still requires a Java compiler to build the standard classes.
21:51:42Jehan_But it should be possible to ship the bytecode and forgo that step.
21:53:03Jehan_The ultimate reason why I've still been occasionally falling back to C/C++ is simply that you can get it to run anywhere.
21:53:16Matthias247hmm, I've also fascinated a guy from an embedded company this week: "I could compile your c# library and applications with a single mono command and it immediatly run on linux"
21:53:38Jehan_Heh. :)
21:53:54Jehan_I'm actually pretty impressed by what the Xamarin guys are doing. At the same time ...
21:54:07Jehan_This attitude strikes me as just a tad optimistic.
21:54:17Matthias247yes
21:54:28flaviuMatthias247: Last time I checked, the performance isn't as good as .Net, so it isn't really suitable for things that need speed
21:55:02Jehan_flaviu: It isn't, but few things really do need speed. Those that do don't use .NET, either.
21:55:16Matthias247flaviu: we didn't perform measurements. But for most things it would still be fast enough
21:55:36Jehan_What I found funny was the belief in portability between Windows and Linux.
21:55:45Matthias247And it would be still way faster than python and co
21:55:50Jehan_No other platform has made that magically possible, so why the CLR?
21:56:24flaviuJehan_: Huh? Java does that very well.
21:56:43Jehan_Matthias247: Yes. I have actually used Mono quite a bit in the past.
21:57:17Matthias247I will at least look forward to use it for a lot of prototyping and testing related stuff
21:57:32flaviuAlthough the look-and-feel emulation isn't particularly good, it mostly works
21:57:43Jehan_flaviu: There are still platform differences that make write-once-run-anywhere hard. You can't just conjure away central differences in how the OS works.
21:58:43Matthias247yes. But writing cross-plattform C++ code is therefore in most cases even harder :)
22:01:34Jehan_Matthias247: No doubt. I only ever used it when I needed fairly low-level stuff.
22:02:05Jehan_The problem is that sometimes I have to deploy code on machines without a JDK.
22:02:38reactormonkJehan_, entertaining
22:02:43Jehan_Pretty barebones Linux installations.
22:02:52reactormonkHow many?
22:03:04Jehan_Or with a really outdated Java version.
22:03:43Matthias247be happy when you don't have to deploy on windows ce ;)
22:04:25Jehan_Matthias247: I am grateful.
22:04:41Jehan_But you'd be surprised how much behind times some HPC installations are.
22:08:20VarriountExample of how hard it is to write cross platform abstractions: File Event Monitoring
22:08:22Jehan_Nimrod has actually been pretty useful in this regard, too.
22:08:49Jehan_Because the basic stuff makes very few platform-specific assumptions.
22:09:14flaviuVarriount: Aren't most your issues there with GC interactions?
22:09:25Jehan_Other than my day job (and as a target for code generation), I hope to be C++-free within the year.
22:09:38*pafmaf quit (Quit: Verlassend)
22:11:32Varriountflaviu: And OS abstractions. The file event monitoring interface across OS's is... different.
22:12:22flaviuVarriount: Do you have a couple links?
22:12:40Varriounthttp://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx
22:12:48flaviuThanks
22:12:50Varriounthttp://man7.org/linux/man-pages/man7/inotify.7.html
22:13:04Varriounthttp://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
22:13:59Varriountflaviu: Yes, I'm dealing with only Windows, but I have to modify the behavior such that it is consistant with other platforms.
22:15:18flaviuThe windows method definition makes my eyes bleed
22:15:31Varriountflaviu: Oh good, I'm not the only one.
22:16:36VarriountSpeaking of GC issues, a really useful tool for nimrod would be some sort of runtime analyzer which draws a network chart of all the references an object holds
22:17:26Matthias247the winapi is complex as hell. But still more efficient than linux things ;)
22:18:04flaviuMatthias247: Maybe so, but I'd prefer a simple, less efficient API than a complex, super efficient API
22:18:07VarriountMatthias247: I couldn't judge without some sort of comparison.
22:18:16flaviuEspecially when dealing with slow things like IO
22:18:45VarriountMy IT supervisor always complains about how slow things hosted on Windows are, but that may be the fault of server implementations.
22:19:00Matthias247IO can be the bottleneck for some kinds of applications
22:19:02flaviuVarriount: Did you make sure power saving mode is off?
22:19:11Varriountflaviu: What?
22:19:23flaviuhttp://serverfault.com/questions/94212/does-cpu-power-management-affect-server-performance
22:19:41VarriountI have no idea. I've only been an intern for about 4 weeks.
22:19:51VarriountI'll ask him about it though.
22:23:41*johnsoft quit (Ping timeout: 240 seconds)
22:24:35*johnsoft joined #nimrod
22:28:53OrionPKhola
22:33:17flaviuVarriount: That actually might not be that hard
22:34:02flaviuhttp://huffman.ooz.ie/tree.dot?text=TO%20BE%20OR%20NOT%20TO%20BE -> http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Huffman_%28To_be_or_not_to_be%29.svg/406px-Huffman_%28To_be_or_not_to_be%29.svg.png
22:34:21flaviuI don't have time to implement it though
22:36:35Varriountflaviu: I'm thinking that it would be nice to be able to do that for arbitrary structures, so that one could easily find cyclic dependancies
22:37:30*Jehan_ quit (Quit: Leaving)
22:48:03*TylerE quit (Ping timeout: 240 seconds)
22:51:10*TylerE joined #nimrod
23:04:28Araqdom96: the bat file generation should be easily fixable via the encodings module, right?
23:06:23dom96no idea
23:06:37Araqwell now you know
23:06:49Araqit should be
23:07:52dom96why not just tell me instead of asking me?
23:08:22Araqwell I have no idea how you do the bat file generation
23:09:21dom96Isn't it obvious?
23:09:46Araqdidn't look at the code
23:10:09*Matthias247 quit (Read error: Connection reset by peer)
23:10:33*joelmo quit (Ping timeout: 240 seconds)
23:11:37dom96Araq: You don't need to look at the code to guess.
23:12:16Araqwell I guessed and asked you but all I got was "no idea" :P
23:13:49*joelmo joined #nimrod
23:14:18*superfunc joined #nimrod
23:15:46dom96In any case, it seems to me that the solution is to change the code page.
23:16:41*hoverbear quit (Ping timeout: 240 seconds)
23:16:48*hoverbea_ joined #nimrod
23:19:02Araqbut to what?
23:19:46AraqI think the better solution is to convert the utf-8 to OEM or whatever it's called before writing the bat file
23:19:56*sdw left #nimrod (#nimrod)
23:22:51flaviuVarriount: ReadDirectoryChangesW is horrible. It looks like the easiest way to use it correctly is to spin off a new thread for each directory
23:23:28dom96Araq: It may be better, but it's more complex.
23:23:33flaviuhttp://qualapps.blogspot.com/2010/05/understanding-readdirectorychangesw_19.html
23:24:38Araqdom96: no, it's 1-3 lines of code thanks to encodings.nim
23:25:56dom96there is like 100 different OEM encodings I think
23:26:23*darkf joined #nimrod
23:27:36Araq"You have to save the batch file with OEM encoding. How to do this varies depending on your text editor. The encoding used in that case varies as well"
23:27:46Araqah you're right, I misread the SO answer
23:27:53Araqtoo bad
23:28:11dom96code page 65001 is UTF-8 btw
23:28:47*hoverbea_ quit ()
23:28:49dom96But who knows if that works on every version of Windows...
23:31:45dom96better yet, babel should just change the code page for the user instead.
23:33:39Araqhttp://msdn.microsoft.com/en-us/library/windows/desktop/dd319072%28v=vs.85%29.aspx
23:33:57AraqCP_OEMCP The current system OEM code page.
23:36:05dom96http://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8
23:37:33VarriountI had to do that in order to get Unicode output from skyrlar's unicode module to display correctly.
23:38:02Araqdom96: I think this switches codepages permanently
23:38:20dom96Araq: Yes.
23:38:44dom96There is no reason for the user not do that
23:39:13Araqhmm makes sense
23:39:21VarriountUnless they use programs which use other code pages...
23:39:40VarriountOr rather, programs which have worked around the default code page using other means.
23:39:42Araqwell my idea requires 1 line of code to add to encodings.nim and then it'll work
23:39:57dom96Araq: implement it then
23:40:48Araqalready did
23:42:25Araquse it like so:
23:43:23Araqconvert(batContents, destEncoding = "OEMCP", srcEncoding = "UTF-8")
23:44:36dom96implement it in babel :P
23:45:19VarriountWhat exactly does that do?
23:48:18Araqit ends up calling MultiByteToWideChar with CP_OEMCP
23:48:48VarriountAh.