<< 20-05-2014 >>

00:01:02*xenagi|2 quit (Ping timeout: 265 seconds)
00:04:34*darkf joined #nimrod
00:08:03Demos_looks like they have a scenegraph :(
00:09:30*ehaliewicz joined #nimrod
00:09:46filwitwhy the :( ?
00:11:52Demos_scene graphs are dumb
00:12:13Demos_you don't really want to bless one ordering like that
00:12:16*brson quit (Ping timeout: 240 seconds)
00:12:34Demos_but it looks decent I guess
00:21:14Demos_way to make a union with one member MS
00:28:01flaviu1Wow, binary 0 is float zero in IEEE 754
00:33:00*xenagi|2 joined #nimrod
00:33:39*xenagi|2 quit (Client Quit)
00:34:18*xenagi|2 joined #nimrod
00:35:52*xenagi quit (Ping timeout: 240 seconds)
00:41:41flaviu1I can't cast to an unchecked array here: https://gist.github.com/flaviut/7f2a831516301ff0f890#file-mysystem-nim-L16-L20
00:41:41flaviu1A bug I assume?
00:43:38*boydgreenfield joined #nimrod
01:13:14*boydgreenfield quit (Ping timeout: 240 seconds)
01:13:31flaviu1Is there a way to tell the compiler I don't care about type-based alias analysts besides emit?
01:14:38flaviu1Because `cast`, which should be instant, goes through a memcpy
01:20:15fowlcast doing memcpy? wat
01:22:55*boydgreenfield joined #nimrod
01:23:32flaviu1fowl: Technically casting without memcpy is undefined behavior, nimrod is correct.
01:26:34EXetoCthat should apply only to value types
01:27:01*q66 quit (Quit: Leaving)
01:27:31*BitPuffin quit (Ping timeout: 240 seconds)
01:27:39Demos_hm so I have a 5,000 LOC long type section and the stuff at the top can not use pointers to the stuff at the bottom
01:27:54fowlDemos_, i have the same problem
01:28:05Demos_fowl: really!
01:28:18flaviu1http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html down at Violating Type Rules
01:28:25fowlyea in mruby.nim on my github
01:29:15Demos_goddamn
01:29:22Demos_how did you fix it
01:29:57fowli havent yet, im probably going to replace things with opaque structs
01:29:58*boydgreenfield quit (Ping timeout: 265 seconds)
01:30:10Demos_I really can not do that though
01:30:17Demos_I may be able to shuffle things around
01:30:20fowli dont think i can either
01:30:21Demos_but this needs to get fixed
01:30:33Demos_my problem came up in d3d11.nim
01:30:46Demos_and I was /so/ close to finishing the wrapper
01:31:02fowlis it uploaded somewhere
01:31:03fowlin the cloud
01:31:11Demos_yes, let me push
01:32:54Demos_https://bitbucket.org/barcharcraz/directnimrod
01:35:01Demos_I think having a direct3D wrapper is important
01:35:08fowlDemos_, you should separate enums from the rest of the types
01:35:23Demos_good idea
01:35:36*Demos_ starts think up how he can get vim to do that
01:40:23EXetoCflaviu1: casting and then dereferencing might blow up the universe?
01:41:25flaviu1EXetoC: Your compiler may implement it differently, but mine does `rm -rf --no-preserve-root /` if it thinks I may be exploiting undefined behaivor
01:43:13EXetoCright, well you just cast the rhs instead when assigning
01:43:39EXetoCI don't know if I take that approach very often. oh well.
01:44:12EXetoCor maybe I do
01:45:33EXetoCI guess it makes more sense conceptually
01:46:07flaviu1Nimrod is somewhat right in using memcpy, but I'm smarter and I know my memory has never been anything but void*, so I can cast however I want
01:46:27springbokMaybe just use C?
01:47:44flaviu1springbok: I think I'll do that, but my goal here is to create my own version of the nimrod libraries, so it should be mostly nimrod. Emit should work though...
01:47:51Demos_fowl: how long is your problematic module?
01:49:07springbokPatient: Doctor...it's hurts when I do this. Doctor: Don't do that.
01:52:41flaviu1springbok: I swear I think I know what I'm doing :P
01:59:18filwitflaviu1, which libs are you remaking and what is different in yours?
02:00:00flaviu1filwit: stdlib, mine has O(1) substrings and predictable string copying
02:00:29flaviu1it also has dumb variable length arrays
02:00:45filwitokay, just curious
02:01:26flaviu1filwit: If you care to look at the so-far non-functioning code, https://gist.github.com/flaviut/7f2a831516301ff0f890
02:03:17fowlDemos_, not quite as long but i have many headers to go
02:03:36Demos_looks like I got mine working
02:04:44Demos_YAY! it compiles
02:16:28Demos_I still gotta test it but that is really cool, less effort than I though
02:16:31Demos_thought
02:16:49Demos_I may be missing some constants that came from #defines
02:16:55Demos_since I had to add them back in myself
02:26:12flaviu1I know nothing about C wrapping libs, but can't you run the preprocessor first and parse that?
02:27:00Demos_yeah that is what I did, but the output is ~300,000-500,000 lines of code for any given header
02:27:11Demos_(this is why C and C++ compile so slowly)
02:27:29Demos_and there are #defined constants that you need to add back in
02:27:54Demos_I was just happy that the preprocessor eliminated the microsoft extensions
02:27:56Demos_mostally
02:43:17*nande_ joined #nimrod
02:43:21Demos_YAY! D3D11CreateDevice works
02:43:44Demos_I dont really feel like doing a more comprehensive test atm, but at least that works
02:44:29Demos_I can not think of any other language that has a binding to modern Direct3D!
02:44:35Demos_except C/C++
02:44:40Demos_and microsoft languages
02:45:49*zezba9000 left #nimrod (#nimrod)
03:07:00fowlwhats a good operator for "join"? i want to use >|<
03:07:14flaviu1fowl: `join`
03:07:24fowlthats not an operator
03:08:26flaviu1Its the most readable, with >|< you save one char and make it harder to read without familiarity.
03:09:45fowlyes.. they'll have to learn my way of thinking >:)
03:09:51*fowl rubs his hands together and laughs
03:11:41Demos_hm I dont know how to get the extra params that get passed to winMain in a GUI app
03:32:49*flaviu1 quit (Remote host closed the connection)
03:33:09fowlstackoverflow has a lot of windows api questions
03:33:33fowluse something multiplatform tho
03:33:39fowldo it for jesus
03:38:20Demos_well these are tests for Direct3D, which is doubtfull to be multiplatform
03:38:36Demos_speaking of I can nto seem to call DefWindowProc, due to some kind of nimrod bug
03:44:09*bjz joined #nimrod
03:47:46*springbok quit (Quit: Leaving)
04:23:04*xenagi|2 quit (Quit: Leaving)
04:46:37fowlproc `<!--` (..) = D:
04:51:27*dymk joined #nimrod
04:55:22*nande_ quit (Remote host closed the connection)
05:41:25*filwit quit (Ping timeout: 276 seconds)
06:05:00*Demos_ quit (Read error: Connection reset by peer)
06:15:37*hoverbear quit ()
06:39:19*BitPuffin joined #nimrod
07:51:26*tumak quit (Read error: Operation timed out)
07:51:32*tumak joined #nimrod
07:54:15*zahary quit (Ping timeout: 258 seconds)
08:26:24*zahary joined #nimrod
09:16:06*ehaliewicz quit (Read error: Connection reset by peer)
09:16:19*ehaliewicz joined #nimrod
09:16:34*Varriount|Mobile joined #nimrod
09:17:43Varriount|MobileSomeone clever might be able to slip in a comment about Nimrod here -> http://www.reddit.com/r/programming/comments/260ab8/the_safe_construct_on_my_wishlist_for_programming/
09:31:04AraqVarriount|Mobile: he essentially wants nimrod's tracked exceptions
09:31:11Araqso write that
09:40:41Varriount|MobileYou might even be able to implement the block level granularity using templates and closure procedures
09:48:02Varriount|MobileAs a side note, does the compiler apply exception tracking to templates?
09:52:13Araqno
09:52:36Araqthey are expanded and the resulting code is tracked
09:53:13*easy_muffin joined #nimrod
09:53:17*easy_muffin quit (Client Quit)
09:56:24*kunev joined #nimrod
10:25:34*Johz joined #nimrod
10:25:38*Johz quit (Read error: Connection reset by peer)
10:28:18*Varriount|Mobile quit (Remote host closed the connection)
10:28:35*Varriount|Mobile joined #nimrod
10:32:05*BitPuffin quit (Ping timeout: 264 seconds)
11:04:15*BitPuffin joined #nimrod
11:09:17Varriount|MobileHm, I wonder if this could be used in the stdlib, either as support for certain process api's, or as a paradigm model for an osproc-like module
11:15:54*ehaliewicz quit (Ping timeout: 240 seconds)
11:27:57AraqVarriount|Mobile: there is an .effects pragma that you can use within a code block to make the compiler list the effects up to this point fwiw
11:29:31*kunev_ joined #nimrod
11:30:58*kunev quit (Disconnected by services)
11:31:05*kunev_ quit (Client Quit)
11:31:22*kunev joined #nimrod
12:11:17*untitaker quit (Ping timeout: 252 seconds)
12:18:17*untitaker joined #nimrod
12:18:22*bstrie joined #nimrod
13:19:27*darkf quit (Quit: Leaving)
14:18:42*darkseas joined #nimrod
14:20:24darkseasHello all.
14:28:12*q66 joined #nimrod
14:28:12*q66 quit (Changing host)
14:28:12*q66 joined #nimrod
14:29:06darkseasI've seen some of you have had success with nimrod on RPi, has anyone tried a BeagleBoard? Any reason for difficulties on the Arm7 arch?
14:43:27*bjz quit (Ping timeout: 252 seconds)
14:44:15*darkseas left #nimrod (#nimrod)
14:44:41*BitPuffin quit (Ping timeout: 264 seconds)
15:23:44*enurlyx joined #nimrod
15:45:03enurlyxDemos_: DefWindowProc should work. I am using it. Maybe you have to export windows.UINT.
15:45:29enurlyxDemos_: Araq said you can not get the parameters from WinMain
15:45:40enurlyxBut you can get them with other functions
15:45:58enurlyxGetModuleHandle for HINSTANCE
15:46:29enurlyxGetStartupInfo for nCmdShow
15:47:17enurlyxhPrevInstance seems unimportant
15:55:55*bjz joined #nimrod
15:58:30*q66_ joined #nimrod
16:00:49*bjz quit (Ping timeout: 252 seconds)
16:02:11*q66 quit (Ping timeout: 252 seconds)
16:02:40enurlyxAraq: If wrapping windows librarys like direct2d or directWrite. Should we use the original headers from microsoft sdk? Wont we get licensing problems if doing so? Headers from MinGw state, that they did not use them but did use the documentation (MSDN) for creation.
16:15:04*enurlyx quit (Quit: Nettalk6 - www.ntalk.de)
16:16:28*hoverbear joined #nimrod
16:24:54*kunev quit (Quit: leaving)
16:35:57*Fernandos joined #nimrod
16:35:58Fernandoshi
16:36:46FernandosI just a short question about nimrod. a) Is it functional? b) Is reflection possible, I mean can code modify itself?
16:37:26*hoverbea_ joined #nimrod
16:40:43*hoverbear quit (Ping timeout: 240 seconds)
16:43:07*BitPuffin joined #nimrod
16:47:01*Fernandos quit (Ping timeout: 276 seconds)
17:00:45*flaviu1 joined #nimrod
17:19:26*brson joined #nimrod
17:22:21*hoverbear joined #nimrod
17:24:16*hoverbea_ quit (Ping timeout: 258 seconds)
17:29:45Araqlicensing problems? I have no idea
17:31:23flaviu1Araq: He seems to have left, but according to the Google vs. Oracle case so far, headers are protected under copyright
17:31:45Araqa) it certainly has functional aspects
17:33:08*kunev joined #nimrod
17:33:49Araqb) reflection is limited to runtime type information and compile time reflection via its macro system
17:34:01Araqflaviu1: I know but people can always read the logs
17:34:34Araqalso I don't think translating microsoft headers will give us trouble
17:34:51Araqhow else should we access the API with a foreign language?
17:36:09*brson quit (Ping timeout: 252 seconds)
17:36:44*brson joined #nimrod
17:38:50flaviu1Microsoft likely won't cause trouble, but they could if they really wanted. "we [the court] conclude that the declaring code and the structure, sequence, and organization of the API packages are entitled to copyright protection"
17:39:43EXetoCare you saying you have to have a C compatibility layer in order to be completely safe? madness
17:43:40EXetoCstupid laws
17:45:36flaviu1EXetoC: Read the EULA: https://raw.githubusercontent.com/apitrace/dxsdk/master/Documentation/License%20Agreements/DirectX%20SDK%20EULA.txt
17:48:25*hoverbear quit ()
17:49:09flaviu1Your wrapper has to be licensed under that EULA, with a big '(c) Microsoft Inc.' at the top. It also requires that 'significant primary functionality' be added, IANAL, but I'd argue wrapping it is 'significant primary functionality'
17:55:27EXetoCok so we just need to adhere to that
17:57:21EXetoCmaybe have a module that's basically a 1:1 mapping, and then high level interfaces can use that
18:34:14*Demos_ joined #nimrod
18:36:01Demos_you are not redistributeing the library, also this is DX11, which is a system component
18:36:08Demos_not an extra lib from MS
18:36:23Demos_I do need to make sure to add copyright stuff to the MS headers
18:36:36Demos_or rather the translated nim files
18:37:46Demos_I did have to add some symbols however, in particular there is a new object type for each anon union that was in the header, and I converted bitfields to int32s
18:38:04Demos_I will probably also add procedures to access the members of the bitfields
18:38:23*hoverbear joined #nimrod
18:39:02Demos_it would be sweet to automate the generation of MS headers, but I can NOT be arsed to write an MSIL compiler, and I looked at the d3d idl files and they were filled with the MSIL equivalent of {.emit.}
18:42:38*hoverbear quit (Ping timeout: 240 seconds)
18:45:54*reactormonk quit (Ping timeout: 240 seconds)
18:47:18*reactormonk joined #nimrod
18:47:41*brson quit (Ping timeout: 264 seconds)
18:47:44*q66_ quit (Changing host)
18:47:44*q66_ joined #nimrod
18:47:46*q66_ is now known as q66
18:52:26flaviu1Is there any way to tell the typechecker to trust me that an `emit` function returns the correct type?
18:53:07flaviu1template actually, not proc
18:54:15*hoverbear joined #nimrod
18:58:40*bjz joined #nimrod
18:59:46*nequitans joined #nimrod
19:03:18Araqflaviu1: no, .emit has the type void
19:04:07*bjz quit (Ping timeout: 265 seconds)
19:04:44Varriount|MobileHm. Looks like someone posted spam on the forum earlier today.
19:05:19*Varriount|Mobile quit (Remote host closed the connection)
19:05:53flaviu1Ok, I'll just inline it manually
19:07:22Araqflaviu1: you can access result via `result` within an emit though
19:07:50Araqwell any symbol with `` in fact, except for overloaded stuff
19:08:04flaviu1Araq: Not generics though
19:08:20flaviu1Err types, not generics
19:08:35Araqhmm dunno
19:08:58Araqtypes should work if the type is a single identifier
19:09:47Araqx <= max(y, z) iff x <= y or x <= z
19:10:11Araqinterestingly this is very hard to infer when you expand the max to if a > b: a else: b
19:10:53flaviu1Araq: Want more papers to read? https://www.cs.cmu.edu/~rwh/courses/refinements/
19:15:11flaviu1It appears the C implicitly casts void* to whatever its assigned to, so my problem is sidestepped :)
19:17:02Araqflaviu1: yay nice link
19:17:17*genivf joined #nimrod
19:17:21Araqusually my own stuff works better though :P
19:17:38Araqbecause I'm not busy with encrypting it in greek
19:17:44Araqhi genivf welcome
19:18:57genivfhello Araq
19:29:02Araqflaviu1: do you happen to know compiler/guards.nim?
19:29:27AraqI'm looking for a decent inference engine that fits it
19:33:44flaviu1Araq: I'm not really familiar with this sort of thing, I just researched it because it seemed interesting. The code is straightforward, I'll see if I can find something though
19:36:14Araqthe version in the new_spawn branch has lots of more stuff in it
19:36:40Araqit's used to prove array indexes correct among other things
20:05:04*Matthias247 joined #nimrod
20:07:51*io2 joined #nimrod
20:08:39flaviu1Araq: http://why3.lri.fr/ seems pretty neat, they set up the library for you and include typical abstract data types. Unlike most theorem provers, it doesn't use any math language. From the homepage: "WhyML is also used as an intermediate language for the verification of C, Java, or Ada programs"
20:10:09flaviu1You'd probably have to make it a separate compiler backend, I don't know if it makes any performance guarantees
20:13:03flaviu1http://why3.lri.fr/queens/queens.pdf
20:13:44Araqwell I'm not looking for software really, but for a powerful calculus dealing with a subset of logic and integer arithmetic that I consider most useful ;-)
20:26:00*zahary quit (Quit: Leaving.)
20:31:47*brson joined #nimrod
20:46:36flaviu1Araq: That's very masochistic, but then again everyone has something strange they enjoy :P. Unfortunately, I don't really have the time to comprehend dense math papers, the best I can do is https://www.cs.cmu.edu/~rwh/theses/davies.pdf , which is a 300 page thesis on implementing refinement types for ML.
20:52:37*Demos_ quit (Read error: Connection reset by peer)
21:02:29NimBotnimrod-code/packages master 270cb0e Erwan Ameil [+0 ±1 -0]: Added jade-nim package
21:02:29NimBotnimrod-code/packages master fb0c431 Dominik Picheta [+0 ±1 -0]: Merge pull request #57 from idlewan/jade-nim... 2 more lines
21:08:13flaviu1I assume that by manually casting, I'm causing the GC to think non-pointers are pointers, causing a sigenv?
21:11:50*TylerE quit (Ping timeout: 252 seconds)
21:13:49*TylerE joined #nimrod
21:16:44Araqflaviu1: 'cast' is a keyword and unsafe for a reason
21:18:23flaviu1Araq: I'm not using cast, it does memcpy. I'm directly emitting C for my cast. Its my own fault anyway, I'll have to figure out how to convince the GC that my object is valid. Probably more hackery with cast
21:19:14Araqyou either allocate via 'new' or there is no way to "convince" the GC
21:19:56*ehaliewicz joined #nimrod
21:20:02EXetoCflaviu1: you can't cast the lhs instead?
21:20:15EXetoCnvm
21:21:12flaviu1Araq: Thanks, I didn't notice `unsafeNew()`. Is there a way to use a finalizer with that?
21:22:07Araqdunno if unsafeNew supports a finalizer
21:22:23Araqbut if not, just add the prototype to system.nim
21:22:33Araqthe codegen supports it already iirc
21:30:50*Demos_ joined #nimrod
21:34:39*kunev quit (Quit: leaving)
22:02:24*bjz joined #nimrod
22:06:39*bjz quit (Ping timeout: 240 seconds)
22:12:19fowlhm
22:24:38*brson_ joined #nimrod
22:24:53*vendethiel quit (Ping timeout: 264 seconds)
22:25:08*brson quit (Ping timeout: 255 seconds)
22:31:41*nequitans quit (Ping timeout: 252 seconds)
22:44:14*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:46:42*Matthias247 quit (Quit: Matthias247)
23:04:45*bjz joined #nimrod
23:06:21*flaviu1 quit (Read error: Connection reset by peer)
23:06:48*flaviu1 joined #nimrod
23:09:39*bjz quit (Ping timeout: 265 seconds)
23:15:23*darkf joined #nimrod
23:18:16*xenagi joined #nimrod
23:25:15*hoverbear quit ()
23:47:21*brson_ quit (Ping timeout: 265 seconds)
23:49:54*brson joined #nimrod
23:54:03*boydgreenfield joined #nimrod