00:01:02 | * | xenagi|2 quit (Ping timeout: 265 seconds) |
00:04:34 | * | darkf joined #nimrod |
00:08:03 | Demos_ | looks like they have a scenegraph :( |
00:09:30 | * | ehaliewicz joined #nimrod |
00:09:46 | filwit | why the :( ? |
00:11:52 | Demos_ | scene graphs are dumb |
00:12:13 | Demos_ | you don't really want to bless one ordering like that |
00:12:16 | * | brson quit (Ping timeout: 240 seconds) |
00:12:34 | Demos_ | but it looks decent I guess |
00:21:14 | Demos_ | way to make a union with one member MS |
00:28:01 | flaviu1 | Wow, 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:41 | flaviu1 | I can't cast to an unchecked array here: https://gist.github.com/flaviut/7f2a831516301ff0f890#file-mysystem-nim-L16-L20 |
00:41:41 | flaviu1 | A bug I assume? |
00:43:38 | * | boydgreenfield joined #nimrod |
01:13:14 | * | boydgreenfield quit (Ping timeout: 240 seconds) |
01:13:31 | flaviu1 | Is there a way to tell the compiler I don't care about type-based alias analysts besides emit? |
01:14:38 | flaviu1 | Because `cast`, which should be instant, goes through a memcpy |
01:20:15 | fowl | cast doing memcpy? wat |
01:22:55 | * | boydgreenfield joined #nimrod |
01:23:32 | flaviu1 | fowl: Technically casting without memcpy is undefined behavior, nimrod is correct. |
01:26:34 | EXetoC | that should apply only to value types |
01:27:01 | * | q66 quit (Quit: Leaving) |
01:27:31 | * | BitPuffin quit (Ping timeout: 240 seconds) |
01:27:39 | Demos_ | 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:54 | fowl | Demos_, i have the same problem |
01:28:05 | Demos_ | fowl: really! |
01:28:18 | flaviu1 | http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html down at Violating Type Rules |
01:28:25 | fowl | yea in mruby.nim on my github |
01:29:15 | Demos_ | goddamn |
01:29:22 | Demos_ | how did you fix it |
01:29:57 | fowl | i havent yet, im probably going to replace things with opaque structs |
01:29:58 | * | boydgreenfield quit (Ping timeout: 265 seconds) |
01:30:10 | Demos_ | I really can not do that though |
01:30:17 | Demos_ | I may be able to shuffle things around |
01:30:20 | fowl | i dont think i can either |
01:30:21 | Demos_ | but this needs to get fixed |
01:30:33 | Demos_ | my problem came up in d3d11.nim |
01:30:46 | Demos_ | and I was /so/ close to finishing the wrapper |
01:31:02 | fowl | is it uploaded somewhere |
01:31:03 | fowl | in the cloud |
01:31:11 | Demos_ | yes, let me push |
01:32:54 | Demos_ | https://bitbucket.org/barcharcraz/directnimrod |
01:35:01 | Demos_ | I think having a direct3D wrapper is important |
01:35:08 | fowl | Demos_, you should separate enums from the rest of the types |
01:35:23 | Demos_ | good idea |
01:35:36 | * | Demos_ starts think up how he can get vim to do that |
01:40:23 | EXetoC | flaviu1: casting and then dereferencing might blow up the universe? |
01:41:25 | flaviu1 | EXetoC: 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:13 | EXetoC | right, well you just cast the rhs instead when assigning |
01:43:39 | EXetoC | I don't know if I take that approach very often. oh well. |
01:44:12 | EXetoC | or maybe I do |
01:45:33 | EXetoC | I guess it makes more sense conceptually |
01:46:07 | flaviu1 | Nimrod 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:27 | springbok | Maybe just use C? |
01:47:44 | flaviu1 | springbok: 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:51 | Demos_ | fowl: how long is your problematic module? |
01:49:07 | springbok | Patient: Doctor...it's hurts when I do this. Doctor: Don't do that. |
01:52:41 | flaviu1 | springbok: I swear I think I know what I'm doing :P |
01:59:18 | filwit | flaviu1, which libs are you remaking and what is different in yours? |
02:00:00 | flaviu1 | filwit: stdlib, mine has O(1) substrings and predictable string copying |
02:00:29 | flaviu1 | it also has dumb variable length arrays |
02:00:45 | filwit | okay, just curious |
02:01:26 | flaviu1 | filwit: If you care to look at the so-far non-functioning code, https://gist.github.com/flaviut/7f2a831516301ff0f890 |
02:03:17 | fowl | Demos_, not quite as long but i have many headers to go |
02:03:36 | Demos_ | looks like I got mine working |
02:04:44 | Demos_ | YAY! it compiles |
02:16:28 | Demos_ | I still gotta test it but that is really cool, less effort than I though |
02:16:31 | Demos_ | thought |
02:16:49 | Demos_ | I may be missing some constants that came from #defines |
02:16:55 | Demos_ | since I had to add them back in myself |
02:26:12 | flaviu1 | I know nothing about C wrapping libs, but can't you run the preprocessor first and parse that? |
02:27:00 | Demos_ | yeah that is what I did, but the output is ~300,000-500,000 lines of code for any given header |
02:27:11 | Demos_ | (this is why C and C++ compile so slowly) |
02:27:29 | Demos_ | and there are #defined constants that you need to add back in |
02:27:54 | Demos_ | I was just happy that the preprocessor eliminated the microsoft extensions |
02:27:56 | Demos_ | mostally |
02:43:17 | * | nande_ joined #nimrod |
02:43:21 | Demos_ | YAY! D3D11CreateDevice works |
02:43:44 | Demos_ | I dont really feel like doing a more comprehensive test atm, but at least that works |
02:44:29 | Demos_ | I can not think of any other language that has a binding to modern Direct3D! |
02:44:35 | Demos_ | except C/C++ |
02:44:40 | Demos_ | and microsoft languages |
02:45:49 | * | zezba9000 left #nimrod (#nimrod) |
03:07:00 | fowl | whats a good operator for "join"? i want to use >|< |
03:07:14 | flaviu1 | fowl: `join` |
03:07:24 | fowl | thats not an operator |
03:08:26 | flaviu1 | Its the most readable, with >|< you save one char and make it harder to read without familiarity. |
03:09:45 | fowl | yes.. they'll have to learn my way of thinking >:) |
03:09:51 | * | fowl rubs his hands together and laughs |
03:11:41 | Demos_ | 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:09 | fowl | stackoverflow has a lot of windows api questions |
03:33:33 | fowl | use something multiplatform tho |
03:33:39 | fowl | do it for jesus |
03:38:20 | Demos_ | well these are tests for Direct3D, which is doubtfull to be multiplatform |
03:38:36 | Demos_ | 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:37 | fowl | proc `<!--` (..) = 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:43 | Varriount|Mobile | Someone 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:04 | Araq | Varriount|Mobile: he essentially wants nimrod's tracked exceptions |
09:31:11 | Araq | so write that |
09:40:41 | Varriount|Mobile | You might even be able to implement the block level granularity using templates and closure procedures |
09:48:02 | Varriount|Mobile | As a side note, does the compiler apply exception tracking to templates? |
09:52:13 | Araq | no |
09:52:36 | Araq | they 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:17 | Varriount|Mobile | Hm, 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:57 | Araq | Varriount|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:24 | darkseas | Hello all. |
14:28:12 | * | q66 joined #nimrod |
14:28:12 | * | q66 quit (Changing host) |
14:28:12 | * | q66 joined #nimrod |
14:29:06 | darkseas | I'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:03 | enurlyx | Demos_: DefWindowProc should work. I am using it. Maybe you have to export windows.UINT. |
15:45:29 | enurlyx | Demos_: Araq said you can not get the parameters from WinMain |
15:45:40 | enurlyx | But you can get them with other functions |
15:45:58 | enurlyx | GetModuleHandle for HINSTANCE |
15:46:29 | enurlyx | GetStartupInfo for nCmdShow |
15:47:17 | enurlyx | hPrevInstance 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:40 | enurlyx | Araq: 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:58 | Fernandos | hi |
16:36:46 | Fernandos | I 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:45 | Araq | licensing problems? I have no idea |
17:31:23 | flaviu1 | Araq: He seems to have left, but according to the Google vs. Oracle case so far, headers are protected under copyright |
17:31:45 | Araq | a) it certainly has functional aspects |
17:33:08 | * | kunev joined #nimrod |
17:33:49 | Araq | b) reflection is limited to runtime type information and compile time reflection via its macro system |
17:34:01 | Araq | flaviu1: I know but people can always read the logs |
17:34:34 | Araq | also I don't think translating microsoft headers will give us trouble |
17:34:51 | Araq | how 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:50 | flaviu1 | Microsoft 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:43 | EXetoC | are you saying you have to have a C compatibility layer in order to be completely safe? madness |
17:43:40 | EXetoC | stupid laws |
17:45:36 | flaviu1 | EXetoC: Read the EULA: https://raw.githubusercontent.com/apitrace/dxsdk/master/Documentation/License%20Agreements/DirectX%20SDK%20EULA.txt |
17:48:25 | * | hoverbear quit () |
17:49:09 | flaviu1 | Your 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:27 | EXetoC | ok so we just need to adhere to that |
17:57:21 | EXetoC | maybe 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:01 | Demos_ | you are not redistributeing the library, also this is DX11, which is a system component |
18:36:08 | Demos_ | not an extra lib from MS |
18:36:23 | Demos_ | I do need to make sure to add copyright stuff to the MS headers |
18:36:36 | Demos_ | or rather the translated nim files |
18:37:46 | Demos_ | 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:04 | Demos_ | I will probably also add procedures to access the members of the bitfields |
18:38:23 | * | hoverbear joined #nimrod |
18:39:02 | Demos_ | 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:26 | flaviu1 | Is there any way to tell the typechecker to trust me that an `emit` function returns the correct type? |
18:53:07 | flaviu1 | template actually, not proc |
18:54:15 | * | hoverbear joined #nimrod |
18:58:40 | * | bjz joined #nimrod |
18:59:46 | * | nequitans joined #nimrod |
19:03:18 | Araq | flaviu1: no, .emit has the type void |
19:04:07 | * | bjz quit (Ping timeout: 265 seconds) |
19:04:44 | Varriount|Mobile | Hm. Looks like someone posted spam on the forum earlier today. |
19:05:19 | * | Varriount|Mobile quit (Remote host closed the connection) |
19:05:53 | flaviu1 | Ok, I'll just inline it manually |
19:07:22 | Araq | flaviu1: you can access result via `result` within an emit though |
19:07:50 | Araq | well any symbol with `` in fact, except for overloaded stuff |
19:08:04 | flaviu1 | Araq: Not generics though |
19:08:20 | flaviu1 | Err types, not generics |
19:08:35 | Araq | hmm dunno |
19:08:58 | Araq | types should work if the type is a single identifier |
19:09:47 | Araq | x <= max(y, z) iff x <= y or x <= z |
19:10:11 | Araq | interestingly this is very hard to infer when you expand the max to if a > b: a else: b |
19:10:53 | flaviu1 | Araq: Want more papers to read? https://www.cs.cmu.edu/~rwh/courses/refinements/ |
19:15:11 | flaviu1 | It appears the C implicitly casts void* to whatever its assigned to, so my problem is sidestepped :) |
19:17:02 | Araq | flaviu1: yay nice link |
19:17:17 | * | genivf joined #nimrod |
19:17:21 | Araq | usually my own stuff works better though :P |
19:17:38 | Araq | because I'm not busy with encrypting it in greek |
19:17:44 | Araq | hi genivf welcome |
19:18:57 | genivf | hello Araq |
19:29:02 | Araq | flaviu1: do you happen to know compiler/guards.nim? |
19:29:27 | Araq | I'm looking for a decent inference engine that fits it |
19:33:44 | flaviu1 | Araq: 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:14 | Araq | the version in the new_spawn branch has lots of more stuff in it |
19:36:40 | Araq | it's used to prove array indexes correct among other things |
20:05:04 | * | Matthias247 joined #nimrod |
20:07:51 | * | io2 joined #nimrod |
20:08:39 | flaviu1 | Araq: 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:09 | flaviu1 | You'd probably have to make it a separate compiler backend, I don't know if it makes any performance guarantees |
20:13:03 | flaviu1 | http://why3.lri.fr/queens/queens.pdf |
20:13:44 | Araq | well 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:36 | flaviu1 | Araq: 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:29 | NimBot | nimrod-code/packages master 270cb0e Erwan Ameil [+0 ±1 -0]: Added jade-nim package |
21:02:29 | NimBot | nimrod-code/packages master fb0c431 Dominik Picheta [+0 ±1 -0]: Merge pull request #57 from idlewan/jade-nim... 2 more lines |
21:08:13 | flaviu1 | I 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:44 | Araq | flaviu1: 'cast' is a keyword and unsafe for a reason |
21:18:23 | flaviu1 | Araq: 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:14 | Araq | you either allocate via 'new' or there is no way to "convince" the GC |
21:19:56 | * | ehaliewicz joined #nimrod |
21:20:02 | EXetoC | flaviu1: you can't cast the lhs instead? |
21:20:15 | EXetoC | nvm |
21:21:12 | flaviu1 | Araq: Thanks, I didn't notice `unsafeNew()`. Is there a way to use a finalizer with that? |
21:22:07 | Araq | dunno if unsafeNew supports a finalizer |
21:22:23 | Araq | but if not, just add the prototype to system.nim |
21:22:33 | Araq | the 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:19 | fowl | hm |
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 |