00:01:04 | JinShil | flaviu: Good to know. Thanks. |
00:01:23 | Varriount|Laptop | Hm. How does one re-generate the icon files? |
00:06:22 | flaviu | http://a.pomf.se/pcbxmo.svg |
00:07:41 | Varriount|Laptop | flaviu: I mean, create the res and obj files |
00:08:01 | Varriount|Laptop | I think I have the res file generated, but I don't know about the obj file |
00:12:57 | * | Trixar_za joined #nim |
00:18:31 | * | Varriount|Laptop quit (Ping timeout: 246 seconds) |
00:18:34 | * | sillesta quit (Ping timeout: 245 seconds) |
00:25:10 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
00:27:26 | * | Trustable quit (Quit: Leaving) |
00:43:17 | * | gokr_ quit (Quit: IRC for Sailfish 0.8) |
00:47:30 | keyle | hm ... bin\nim.exe c koch.nim |
00:47:43 | keyle | lib\system.nim(2512, 9) Error: implementation of 'system.setControlCHook(hook: proc (){.noconv.})' expected |
00:48:02 | keyle | just pulled & compiled on windows x86_64 |
00:48:06 | keyle | anyone? |
00:48:52 | def- | keyle: they just changed something with that I think |
00:49:16 | def- | I'm getting the same error on linux |
00:49:54 | keyle | proc setControlCHook*(hook: proc () {.noconv.}) |
00:50:09 | fowl | should be gcsafe |
00:50:41 | fowl | erm nevermind me |
00:50:44 | def- | keyle: change it to this: |
00:50:46 | def- | proc setControlCHook*(hook: proc () {.noconv.} not nil) |
00:52:17 | def- | Varriount|Mobile or someone: pull please: https://github.com/Araq/Nim/pull/2001 |
00:58:10 | * | BitPuffin quit (Ping timeout: 255 seconds) |
01:02:55 | keyle | thanks def- |
01:04:08 | * | threewood quit (Ping timeout: 264 seconds) |
01:08:51 | keyle | btw, what's a synonym for tainted string? |
01:14:24 | keyle | unsafe string |
01:18:07 | * | sampwing quit (Ping timeout: 252 seconds) |
01:36:28 | * | gsingh93 joined #nim |
01:43:08 | * | drewsrem quit (Quit: Leaving) |
01:43:26 | * | darkf joined #nim |
01:50:27 | * | vendethiel quit (Ping timeout: 264 seconds) |
02:00:21 | * | sampwing joined #nim |
02:00:21 | * | Boscop quit (Ping timeout: 256 seconds) |
02:03:18 | * | VinceAddons quit (Read error: Connection reset by peer) |
02:14:51 | * | vendethiel joined #nim |
02:18:03 | * | threewood joined #nim |
02:32:21 | Varriount|Mobile | Hello threewood |
02:37:54 | threewood | Hello |
02:38:00 | threewood | Not sure why it booted me |
02:39:55 | EXetoC | ping timeout |
02:40:06 | EXetoC | not enough internets |
02:42:56 | * | ARCADIVS joined #nim |
02:47:51 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:53:14 | * | kobayagi joined #nim |
02:54:49 | * | kapil__ joined #nim |
02:58:51 | * | vendethiel quit (Ping timeout: 276 seconds) |
03:00:11 | flaviu | Wow, the amount of optimization the c compiler has done is incredible! |
03:00:28 | flaviu | The assembly hardly resembles the code. |
03:01:53 | * | sampwing quit (Ping timeout: 252 seconds) |
03:12:35 | * | saml_ joined #nim |
03:14:18 | * | kobayagi quit (Quit: Page closed) |
03:20:29 | * | sampwing joined #nim |
03:22:38 | * | Demos joined #nim |
03:40:28 | * | brson quit (Quit: leaving) |
03:44:21 | * | EXetoC quit (Ping timeout: 276 seconds) |
03:47:42 | * | vendethiel joined #nim |
03:55:25 | * | sampwing quit (Ping timeout: 252 seconds) |
04:00:55 | * | Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
04:06:17 | * | jrtjioio joined #nim |
04:08:56 | * | vendethiel quit (Ping timeout: 264 seconds) |
04:13:13 | * | gunn_ joined #nim |
04:14:56 | * | gunn quit (Ping timeout: 264 seconds) |
04:28:30 | * | girvo joined #nim |
04:28:43 | girvo | hey everyone :) |
04:29:30 | keyle | hi |
04:30:27 | girvo | the compiler option: --app:lib|staticlib -- does that work for generating `.so` files for Linux/OSX? |
04:30:31 | girvo | I assume it does |
04:49:49 | fowl | you also need usenimrtl or something similar girvo |
04:54:31 | girvo | okay cheers fowl. Say you were to build a library of some sort, that you want to distribute the binary for, and allow other nim projects to link to it, whats the idiomatic way of doing so without releasing the source for the library itself? |
05:01:17 | keyle | use stdin and stdout ? |
05:07:21 | * | vendethiel joined #nim |
05:12:23 | * | threewood quit (Ping timeout: 240 seconds) |
05:20:30 | fowl | girvo, you have to distribute nimtrl.so also, http://nim-lang.org/nimc.html#dll-generation |
05:20:53 | girvo | Okay cool, cheers fowl |
05:21:45 | girvo | For things that link against C libraries, such as SDL, we use a nim module that basically acts like a header file. I wonder if its possible to generate that from Nim if the original DLL is also written in Nim? |
05:22:23 | * | kniteli quit (Read error: Connection reset by peer) |
05:22:27 | girvo | Or at this point does every nim module need to be distributed with the full source for others to be able to "link" against it |
05:29:52 | fowl | girvo, templates and generic functions wouldnt be in the DLL |
05:30:44 | fowl | dll generation is for c/ffi interop |
05:32:36 | fowl | if you dont care about that though it is possible, using dynlib/importc like a c interface |
05:42:51 | * | saml_ quit (Quit: Leaving) |
05:48:58 | * | Demos quit (Read error: Connection reset by peer) |
05:50:25 | * | vendethiel quit (Ping timeout: 256 seconds) |
06:01:28 | * | Etheco- joined #nim |
06:04:51 | * | Etheco quit (Ping timeout: 264 seconds) |
06:06:43 | girvo | fowl: yeah that's what I figured. That limitation should be fine for the sorts of things I'm thinking about |
06:09:42 | girvo | fowl: being able to link against a compiled nim library (even just statically) may be a useful feature. I don't think any of the "new" compiled languages (go, nim, rust) have a good story for that, and its one of the cool parts of C/C++ IMO |
06:09:50 | girvo | Actually, I think Rust may be able to |
06:37:01 | * | SplinterOfChaos quit (Ping timeout: 255 seconds) |
06:37:04 | girvo | Q: Where is the best documentation for how Nim links to C libraries? I'd like to provide my own `.dylib` for, say, SDL2 and have Nim compile and link against that instead of the OS-wide one |
06:41:30 | * | gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:41:46 | * | jrtjioio quit (Ping timeout: 246 seconds) |
06:42:51 | * | bjz joined #nim |
06:47:04 | * | bjz quit (Client Quit) |
06:50:24 | * | jkguiog87y joined #nim |
06:52:37 | girvo | Basically, I see there is dynlibOverride -- can I pass it a relative path, instead of just a name? |
06:55:11 | girvo | Specifically, an example like this: |
06:55:13 | girvo | nim c --dynlibOverride:lua --passL:liblua.lib program.nim |
06:55:40 | girvo | for the --passL:liblua.lib part, can I say --passL:../Lib/liblua.lib ? |
06:58:11 | girvo | To effectively "dynamically" link, but to a relative path (this is how OS X's applications are typically done, but also how many games are distributed) |
07:01:04 | * | gunn joined #nim |
07:02:27 | girvo | Mwaha! |
07:02:33 | girvo | I answered my own question |
07:02:35 | girvo | --clibdir:DIR modify the linker library search path |
07:02:42 | girvo | Perfect :) |
07:04:24 | girvo | Is the default GC still `refc`? |
07:05:58 | girvo | Wow! Hey, fowl: does this flag do what I think it does? It'll generate the .h file automatically for a nim project compiled to a shared library? |
07:05:59 | girvo | --header:FILE the compiler should produce a .h file |
07:13:58 | girvo | Now comes the interesting part: getting Nim to work with an OS X `.framework` "file" |
07:14:18 | girvo | It is basically just a directory, I believe, so I should be able to use add it to the --clibdir flag? |
07:22:18 | * | gunn quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:23:55 | * | gokr quit (Ping timeout: 256 seconds) |
07:26:47 | girvo | Although, using `otool -L` on my compiled SDL test app, that is linked against libsdl2.dynlib in a folder next to the output binary with the clibdir path set to look there, it seems as though it's been statically linked lol |
07:38:54 | * | vendethiel joined #nim |
07:41:20 | * | girvo quit (Ping timeout: 264 seconds) |
07:45:54 | * | bjz joined #nim |
07:47:05 | * | bjz quit (Client Quit) |
07:48:12 | * | Varriount_ joined #nim |
07:49:27 | * | nickles joined #nim |
07:50:28 | nickles | *: Where would I file CRs? (aka is https://github.com/Araq/Nim/pulls really the right place?) |
07:50:49 | * | Varriount quit (Ping timeout: 255 seconds) |
07:51:55 | * | iivvoo joined #nim |
07:55:31 | * | bjz joined #nim |
07:57:14 | * | JinShil quit (Quit: Konversation terminated!) |
07:58:26 | * | gokr_ joined #nim |
08:00:19 | * | gunn joined #nim |
08:02:20 | * | nickles quit (Quit: Page closed) |
08:22:49 | * | vendethiel quit (Ping timeout: 265 seconds) |
08:27:03 | * | gokr_ quit (Ping timeout: 245 seconds) |
08:28:10 | * | Sphax joined #nim |
08:43:36 | * | BlaXpirit joined #nim |
08:46:16 | * | vendethiel joined #nim |
08:58:35 | * | Sphax quit (Quit: ZZZZZzzzzz) |
09:00:17 | * | Sphax joined #nim |
09:03:30 | * | jkguiog87y quit (Quit: Page closed) |
09:08:55 | * | vendethiel quit (Ping timeout: 272 seconds) |
09:20:52 | * | vendethiel joined #nim |
09:22:59 | * | Trustable joined #nim |
09:42:34 | * | vendethiel quit (Ping timeout: 265 seconds) |
09:44:23 | * | gsingh93 quit (Quit: Connection closed for inactivity) |
09:48:56 | * | vendethiel joined #nim |
09:54:15 | * | akiradeveloper joined #nim |
09:57:31 | akiradeveloper | hi, Nim's effect system can restrict caller's context in compile time? e.g. Function F is only allowed to be called under G or H |
10:11:37 | * | vendethiel quit (Ping timeout: 272 seconds) |
10:12:43 | reactormonk | akiradeveloper, not that I know of. What would be the application of this? |
10:22:11 | * | akiradeveloper quit (Remote host closed the connection) |
10:26:32 | * | akiradeveloper joined #nim |
10:28:36 | akiradeveloper | In fuse, implementation of operation (e.g. open function) should call reply function after it's done and the set of reply functions each operation can call is restricted |
10:29:11 | akiradeveloper | I don't like the implementation of operation call wrong reply function |
10:31:07 | * | VinceAddons joined #nim |
10:33:17 | reactormonk | akiradeveloper, hm, maybe Araq could tell you if you could do something with effects |
10:40:09 | * | jefus__ joined #nim |
10:41:32 | * | EXetoC joined #nim |
10:42:55 | * | akiradeveloper quit (Remote host closed the connection) |
10:43:44 | * | gokr joined #nim |
10:43:59 | * | jefus_ quit (Ping timeout: 245 seconds) |
10:46:38 | * | vendethiel joined #nim |
10:55:22 | * | ARCADIVS quit (Quit: ARCADIVS) |
11:06:30 | * | Sembei quit (Read error: Connection reset by peer) |
11:07:10 | * | MyMind joined #nim |
11:11:51 | * | davidhq joined #nim |
11:13:46 | * | JinShil joined #nim |
11:38:17 | * | JinShil quit (Read error: No route to host) |
11:38:47 | * | JinShil joined #nim |
11:40:25 | * | akiradeveloper joined #nim |
11:52:26 | * | woadwarrior joined #nim |
12:04:39 | * | jefus_ joined #nim |
12:04:39 | * | zahary quit (Read error: Connection reset by peer) |
12:04:48 | * | zahary joined #nim |
12:05:19 | * | yonson joined #nim |
12:07:18 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:07:51 | * | jefus__ quit (Ping timeout: 264 seconds) |
12:15:28 | * | jefus_ is now known as jefus |
12:19:01 | * | keyle quit (Quit: <Morbo> Chitchat achieved!) |
12:28:08 | * | EXetoC quit (Ping timeout: 264 seconds) |
12:49:52 | * | akiradeveloper quit (Remote host closed the connection) |
12:51:03 | * | woadwarrior quit () |
12:54:10 | * | BlaXpirit_ joined #nim |
12:54:25 | def- | http://hookrace.net/blog/what-makes-nim-practical/ |
12:56:49 | * | BlaXpirit quit (Ping timeout: 255 seconds) |
12:56:54 | * | Varriount__ joined #nim |
12:58:28 | def- | Links to reddit and HN at the bottom if you guys want to participate in discussions |
12:59:58 | * | Varriount_ quit (Ping timeout: 245 seconds) |
13:03:03 | * | sillesta joined #nim |
13:09:56 | * | Sphax quit (Quit: ZZZZZzzzzz) |
13:15:59 | * | Sphax joined #nim |
13:30:21 | * | saml_ joined #nim |
13:54:00 | dom96 | def-: Once again. Brilliant job :) |
13:54:06 | def- | dom96: thanks! |
13:56:08 | * | BitPuffin joined #nim |
13:58:15 | * | davidhq joined #nim |
13:58:40 | * | saml_ quit (Quit: Leaving) |
14:29:41 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:35:50 | * | davidhq joined #nim |
14:36:23 | * | davidhq quit (Client Quit) |
14:45:29 | * | threewood joined #nim |
14:53:30 | * | darkf quit (Quit: Leaving) |
15:01:31 | * | kapil__ quit (Quit: Connection closed for inactivity) |
15:07:29 | * | EXetoC joined #nim |
16:00:58 | * | SplinterOfChaos joined #nim |
16:03:56 | onionhammer | def- you should do a more dedicated article on the TCC stuff IMO :) |
16:05:25 | def- | onionhammer: what tcc stuff? Just use --cc:tcc and it works :P |
16:05:31 | onionhammer | lol |
16:05:43 | def- | speed is about 30-50% of optimized gcc/clang |
16:05:47 | onionhammer | you should get the repl working with tcc ;P |
16:05:55 | def- | yes, i should |
16:06:31 | onionhammer | I havent had a chance to give the article a proper read yet, but from what I skimmed it looked good :0 |
16:08:34 | * | booly-yam-9623 joined #nim |
16:12:05 | Araq | def-: you can do: c2nim myconfig.c2nim header.h |
16:12:25 | Araq | with the latest c2nim and put all these special #lines into myconfig.c2nim |
16:12:30 | def- | nice |
16:13:16 | Araq | gotta go, see you later |
16:19:54 | * | Matthias247 joined #nim |
16:23:17 | * | t4nk342 joined #nim |
16:25:59 | t4nk342 | Hi, I am trying to follow and implement: "Kaleidoscope: Implementing a Language with LLVM" in Rust, but sick of Rust borrow checker, is it possible for nimrod to call LLVM code generator? Google could find no bindings |
16:27:46 | dom96 | There is this: https://github.com/fowlmouth/llvm.nim |
16:28:38 | * | davidhq joined #nim |
16:30:01 | t4nk342 | Thank you. Time to switch to exploring Nim :) |
16:30:19 | dom96 | :) |
16:34:48 | * | brson joined #nim |
16:41:30 | * | UberLambda joined #nim |
16:42:34 | * | UberLambda quit (Client Quit) |
16:59:31 | * | t4nk342 quit (Ping timeout: 246 seconds) |
17:04:46 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
17:05:09 | * | Varriount|Busy joined #nim |
17:07:38 | * | JinShil quit (Quit: Konversation terminated!) |
17:11:36 | * | vendethiel quit (Ping timeout: 246 seconds) |
17:13:40 | * | vendethiel joined #nim |
17:24:12 | * | davidhq joined #nim |
17:27:42 | * | davidhq quit (Client Quit) |
17:34:27 | * | vendethiel quit (Ping timeout: 245 seconds) |
17:37:06 | * | mwm joined #nim |
17:38:02 | * | vendethiel joined #nim |
17:38:57 | * | sampwing joined #nim |
17:39:30 | mwm | Does nimble demanding 10.3 suggest that I should build from github? |
17:42:39 | Varriount|Busy | mwm: Yep |
17:44:18 | mwm | Ok, that is vaguely unfortunate, I think. I don't know enough about `brew` to make that work. Beyond "tell brew" it is out of the loop. |
17:44:44 | Varriount|Busy | mwm: You don't know how to build Nim? |
17:45:18 | mwm | I do. Someone gave me a silly MBP, so I am using homebrew. |
17:45:35 | Varriount|Busy | MBP? |
17:45:47 | mwm | My other machine has NixOS, so I am used to workarounds. |
17:45:56 | mwm | Mac Book Pro. OSX. |
17:46:38 | * | booly-yam-9623 quit (Ping timeout: 245 seconds) |
17:46:40 | Varriount|Busy | Ah. |
17:47:06 | Varriount|Busy | mwm: How does OSX prevent you from building Nim? |
17:47:47 | mwm | So far as I know, it doesn't. But people told me to use "homebrew" instead of building my own stuff. |
17:47:47 | * | booly-yam-9623_ joined #nim |
17:48:14 | Varriount|Busy | :/ |
17:48:26 | mwm | And it's pinned to 10.2 (which is likely better than the average posix package manager) |
17:49:21 | Varriount|Busy | mwm: Well, technically 10.3 is just the latest version of Nim from the repository, so it's understandable that Homebrew wouldn't have it as a package. |
17:49:24 | mwm | It's more important to me that nim work as advertised than that I have a "consisstent system image".. so I think it will be ok. :D |
17:50:10 | mwm | I doubt I will be able to deploy to production before Nim 1.0, so should be ok. |
17:50:20 | mwm | That's still Aprilish? |
17:51:36 | BlaXpirit_ | i hope not |
17:51:58 | mwm | Too soon or too late? |
17:52:20 | BlaXpirit_ | i think it's not ready, but i'm just a nobody, so don't take it too seriously |
17:53:35 | mwm | @blaxpirit No worries! I am also an irresponsibly hopeful "nobody" |
17:54:56 | mwm | The crazy quants with which I work want "python-like" syntax.. so I am trying to make nim (which I very much like) to work. |
17:54:58 | BlaXpirit_ | mwm, are you saying that homebrew has 0.10.2? |
17:55:10 | BlaXpirit_ | in that case, it's great |
17:55:54 | mwm | Yes, I thought 10.2 was quite impressive, actually. Until I tried to use nimble to install `c2nim`m |
17:55:58 | BlaXpirit_ | oh i missed your first message |
17:56:28 | BlaXpirit_ | i mean, i can see it, but didn't read it at first |
17:56:49 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:56:49 | BlaXpirit_ | well it may be an option to get an older version of nimble |
17:56:51 | BlaXpirit_ | cuz why not |
17:57:29 | mwm | No worries. I can deal with it for now. In 6 months, it will be a huge issue when I have wasted unsane time on somethin still not stable. :D |
17:59:25 | mwm | At that point everyone will ask "Why not Julia, you idiot?" |
18:00:59 | mwm | `build.sh` should be +x |
18:05:25 | mwm | Installed and working; thanks. |
18:05:44 | Varriount|Busy | mvm: Well, it takes a long time for a compiler to be really "stable", especially when you're running on limited resources |
18:05:57 | Varriount|Busy | We don't have paid workers. :/ |
18:06:22 | mwm | I get that. I have pretty low standards.. even though i spent this even trying to hire one of those workers. :D |
18:06:38 | mwm | s/even/evening |
18:08:38 | Varriount|Busy | Gah. I am tormented by choice over what data structures to use for path representation |
18:11:45 | BlaXpirit_ | Varriount|Busy, seq |
18:11:48 | BlaXpirit_ | what's the deal? |
18:11:56 | * | perturbation joined #nim |
18:12:01 | mwm | Sorry, I am clearly too noobish to help there. On the otherhand I now have a "working" c2nim, so you all have helped me immensely. |
18:12:41 | Varriount|Busy | BlaXpirit_: A sequence of strings incurs indirection penalties and memory fragmentation |
18:13:04 | BlaXpirit_ | then don't use a sequence of strings :p |
18:15:43 | BlaXpirit_ | you haven't named the purpose of this all, or anything |
18:16:28 | Varriount|Busy | BlaXpirit_: Essentially, to represent a filesystem path in a compact, platform agnostic way. |
18:16:39 | BlaXpirit_ | Varriount|Busy, making a lib? :o |
18:16:47 | Varriount|Busy | BlaXpirit_: In my spare time at work. |
18:16:52 | BlaXpirit_ | cool |
18:17:00 | BlaXpirit_ | well Python just recently gained such a library |
18:17:10 | Varriount|Busy | Yes, I know. |
18:17:11 | BlaXpirit_ | and they obviously went the simple way of list of strings |
18:17:13 | def- | Varriount|Busy: what operations do you want to work on the data structure? |
18:17:13 | * | Sphax quit (Quit: CYA!!) |
18:17:35 | BlaXpirit_ | Varriount|Busy, i dunno, you can just store it as one string, but also store indices of separators |
18:17:53 | BlaXpirit_ | so you don't need to scan the whole thing when u only want one part of it |
18:18:24 | Varriount|Busy | BlaXpirit_: Yes, that's one solution. But then you still get an extra indirection if you store the indices in a separate sequence. |
18:18:44 | BlaXpirit_ | that's such tiny indirection, i don't see any concern |
18:18:45 | mwm | Paths in platform-agnostic ways. Sounds simple! |
18:18:49 | * | mwm snickers |
18:18:56 | BlaXpirit_ | hehehe............ |
18:19:00 | * | perturbation quit (Quit: Leaving) |
18:19:01 | Varriount|Busy | BlaXpirit_: I had the idea of reserving space for X number of indices at the beginning of the string, and storing it there. |
18:19:13 | BlaXpirit_ | Varriount|Busy ummm... |
18:19:29 | BlaXpirit_ | that's not gonna pay for itself |
18:19:32 | def- | Varriount|Busy: sounds strange, better in a separate seq/array |
18:19:55 | Varriount|Busy | BlaXpirit_: Why not? |
18:20:22 | * | yonson quit (Ping timeout: 255 seconds) |
18:20:35 | BlaXpirit_ | why yes? |
18:21:11 | Varriount|Busy | BlaXpirit_: No extra indirection, indices are near string data, providing better odds for hitting the cache |
18:21:16 | BlaXpirit_ | if this was C, sure, I'd understand |
18:22:08 | BlaXpirit_ | oh hey, you could allocate a seq and cast a part of it to cstring |
18:22:13 | BlaXpirit_ | D: D: D: |
18:22:14 | mwm | Again, ignorant, but for which cache are you optimising? |
18:22:25 | Varriount|Busy | mwm: CPU cache |
18:22:38 | BlaXpirit_ | (this is not something exclusive to Nim) |
18:23:01 | EXetoC | "int step = static_cast<int>(floor(static_cast<double>(detectorIdsSize * odNumber / sizeMPI))) + 1;" beautiful |
18:23:04 | * | vendethiel quit (Ping timeout: 255 seconds) |
18:23:32 | BlaXpirit_ | yup |
18:24:39 | BlaXpirit_ | let's not scare mwm away, though |
18:24:56 | BlaXpirit_ | that last line of code was C++, if someone is wondering |
18:25:23 | mwm | Again, because I don't know... can you actually introspect on CPU cache from Nim? That'd be crazy-awesome to the point where I believe it t be impossible. |
18:25:58 | Varriount|Busy | mwm: Not really. It's theoretical |
18:27:06 | Varriount|Busy | mwm: Storing data that you're accessing together at one spot in memory should avoid cache misses, as the number of lines the processor has to load into the cache is minimized |
18:27:12 | mwm | Fair enough. I make my living on the sub-ms level (not to the sub-ns level of some of the people with whom I compete), but it's good to know. |
18:29:25 | BlaXpirit_ | Varriount|Busy, how about u abstract it away and worry later |
18:29:33 | mwm | blaxpirit_, I'm not likely to be scared away so much as find myself drowning. :D |
18:29:39 | BlaXpirit_ | this is such a silly optimization... people don't deal with millions of paths |
18:30:11 | * | mwm deals with millions of paths if they are cheap! |
18:30:43 | BlaXpirit_ | and if they do, well, they probably won't use your lib |
18:30:43 | mwm | So.. I don;t deal with millions of paths. :D |
18:30:44 | Varriount|Busy | BlaXpirit_: Says the one not designing an antivirus program, a file copying program, etc. |
18:32:10 | * | mwm likes to use the file system for map-reduce like some kind of idiot. |
18:33:26 | mwm | The world has created a better fool! |
18:34:22 | * | yonson joined #nim |
18:36:20 | mwm | However, please do not design around the worst possible use of yur lib. Otherwise, I will do it. |
18:39:11 | EXetoC | Varriount|Busy: he just said to worry later, if you can |
18:40:15 | Varriount|Busy | EXetoC: Easier said than done. I'm a born worrier |
18:40:35 | * | mwm quit (Quit: just rolling around Denver all day) |
18:41:36 | Varriount|Busy | Anyway, I'm gonna head home. I'm gonna work on fixing bugs then. Less worrying there. |
18:41:40 | * | Varriount|Busy quit (Quit: Page closed) |
18:43:49 | * | semperos joined #nim |
18:44:00 | semperos | on Mac OSX 10.9, trying to get aporia to run; it nimble-installed correctly, but when I run it can't find libgdk-x11-2.0.dylib but that is located in /usr/local/lib |
18:44:10 | semperos | tried defining LD_LIBRARY_PATH=/usr/local/lib as well to no avail |
18:44:35 | semperos | any pointers for next steps to debug? |
18:45:19 | * | yonson_ joined #nim |
18:46:15 | * | yonson quit (Ping timeout: 264 seconds) |
18:48:09 | def- | semperos: you tried "export LD_LIBRARY_PATH=/usr/local/lib"? |
18:48:10 | BlaXpirit_ | semperos, "can't find" or "can't load"? |
18:48:25 | semperos | load |
18:48:33 | semperos | LD_LIBRARY_PATH=/usr/local/lib aporia 1 ↵ |
18:48:33 | semperos | could not load: libgdk-x11-2.0.dylib |
18:48:33 | BlaXpirit_ | well that's kinda different |
18:49:30 | semperos | yep, new to Nim and its tooling, so wasn't sure where I needed to configure paths, if I should have installed aporia differently, etc. |
18:49:50 | BlaXpirit_ | i don't think this is a problem on Nim's side |
18:50:08 | BlaXpirit_ | unless this export fixes things |
18:50:30 | sillesta | i had a similar issue when i tried to install aporia: "could not load: libgtksourceview-2.0(|-0).dylib" |
18:51:31 | sillesta | need to be installed separately? |
18:51:48 | semperos | on my end I tried the export bit and it still cameback with "could not load..." |
18:51:52 | * | vendethiel joined #nim |
18:52:00 | BlaXpirit_ | to be expected |
18:55:47 | semperos | BlaXpirit_: do you have any suggestions of what docs I might read or things I might try to get aporia running given that error? |
18:56:07 | BlaXpirit_ | semperos, try ldd |
18:56:19 | BlaXpirit_ | ldd /usr/local/lib/libgdk-x11-2.0.dylib |
18:56:32 | BlaXpirit_ | if it says "not found" somewhere, there's your problem |
18:56:52 | semperos | BlaXpirit_: thanks, I'll give that a roll |
19:00:00 | semperos | everything seems to be in order: https://gist.github.com/semperos/d954814c9bfd421c1806 |
19:01:31 | BlaXpirit_ | right..... |
19:02:58 | BlaXpirit_ | i don't know anything else |
19:03:15 | * | gsingh93 joined #nim |
19:05:14 | dom96 | semperos: Perhaps the DLLs are 64bit but you are using a 32bit compiler (and thus producing a 32bit binary of Aporia) or vice versa? |
19:05:34 | semperos | BlaXpirit_: thanks for your input |
19:05:39 | semperos | dom96: I'll investigate in that vein, thanks |
19:06:00 | dom96 | You could also try copying that .dylib into the same directory that Aporia's binary is |
19:14:23 | * | vendethiel quit (Ping timeout: 272 seconds) |
19:20:37 | * | vendethiel joined #nim |
19:20:40 | * | perturbation joined #nim |
19:25:38 | * | d3m1gd joined #nim |
19:36:33 | * | booly-yam-9623_ quit (K-Lined) |
19:37:42 | * | yonson_ quit (Quit: Leaving) |
19:39:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
19:43:25 | * | vendethiel quit (Ping timeout: 256 seconds) |
19:44:30 | * | vendethiel joined #nim |
19:48:37 | * | kniteli joined #nim |
19:49:41 | * | mwm joined #nim |
19:52:23 | * | perturbation quit (Quit: Leaving) |
19:54:37 | * | sampwing quit (Ping timeout: 252 seconds) |
20:19:53 | * | sampwing joined #nim |
20:22:10 | * | semperos quit (Read error: Connection reset by peer) |
20:23:25 | * | semperos joined #nim |
20:27:33 | * | vendethiel quit (Ping timeout: 264 seconds) |
20:28:23 | * | mwm quit (Ping timeout: 240 seconds) |
20:29:02 | * | bjz joined #nim |
20:29:29 | * | fwef joined #nim |
20:30:13 | Araq | hi fwef welcome |
20:30:27 | fwef | Hi Araq |
20:30:33 | * | vendethiel joined #nim |
20:31:28 | fwef | Can someone explain why nim is not as popular as let's say golang or rust? From what I've seen in the docs it rocks unimaginably. |
20:32:36 | Araq | there is no big company behind it and it surely has its bugs and dark corners |
20:33:26 | Araq | on the other hand, bugs are getting fixed and the feature set is stable, so we'll get the lang stable within the next months |
20:34:09 | * | gokr quit (Ping timeout: 264 seconds) |
20:34:58 | fwef | Araq: so you are the guy behind Nim? (Assuming from the Nim repo being owned by your account) |
20:36:28 | Araq | yes |
20:37:29 | fwef | Nice work then. ;) |
20:38:01 | ekarlso | soo |
20:38:07 | ekarlso | coding nimble now to handle packages format |
20:48:46 | * | gokr joined #nim |
20:49:46 | * | gokr_ joined #nim |
20:51:49 | EXetoC | ekarlso: system package managers? |
20:53:39 | * | d3m1gd quit (Ping timeout: 252 seconds) |
21:01:32 | * | fizzbooze joined #nim |
21:02:09 | fizzbooze | is there a way to let the compiler warn you if your proc may throw an exception? |
21:02:40 | BlaXpirit_ | Araq, possible recent regression here. This used to work, on 0.10.2 and probably master https://bpaste.net/show/1badb1738e5e |
21:05:22 | BlaXpirit_ | works if template is taken out |
21:05:27 | def- | fizzbooze: proc foo {.raises: [].} = raise newException(ValueError, "foo") |
21:05:46 | def- | fizzbooze: fails to compile since you specified that there should be no exceptions raised but one can be raised |
21:06:09 | fizzbooze | def-: thanks! |
21:06:25 | def- | fizzbooze: more about this here: http://nim-lang.org/manual.html#exception-tracking |
21:06:33 | fizzbooze | is there a HTTP and JSON library build into the stdlib? |
21:06:38 | def- | yes |
21:06:52 | def- | Here's a list of libraries: http://nim-lang.org/lib.html |
21:07:18 | fizzbooze | that's awesome |
21:08:03 | fizzbooze | these are the libraries i can import directly without nimble right? |
21:08:15 | def- | the standard libraries at the top, yes |
21:08:18 | fizzbooze | :) |
21:08:23 | def- | nimble libraries are down there as well |
21:08:40 | fizzbooze | what's the current ETA for 1.0? |
21:08:50 | def- | in a few months |
21:08:58 | def- | (is the last I heard) |
21:09:14 | fizzbooze | btw i really enjoyed your last two nim blogs on proggit |
21:10:07 | def- | thanks |
21:13:21 | Araq | BlaXpirit_: please report it properly |
21:13:38 | Araq | and yes, there have been changes to the templating lookups |
21:13:43 | Araq | use .dirty as a workaround |
21:13:44 | * | vendethiel quit (Ping timeout: 265 seconds) |
21:13:45 | BlaXpirit_ | Araq, just checking if i am maybe mistaken |
21:14:56 | BlaXpirit_ | hm dirty seems to work indeed |
21:18:42 | * | Mat4 joined #nim |
21:18:44 | * | jhc76 quit (Remote host closed the connection) |
21:18:51 | Mat4 | hello |
21:18:59 | Araq | hi Mat4 |
21:19:09 | Mat4 | hi Araq, what's new ? |
21:19:17 | fizzbooze | checked out the source from github just now. built it according to /download.html on the official site, failed in the last step './koch boot -d:release' |
21:20:04 | fizzbooze | http://pastebin.com/b1h8V1Gk |
21:22:05 | * | semperos quit (Remote host closed the connection) |
21:22:47 | Araq | fizzbooze: gcc installed? |
21:25:55 | fizzbooze | yup |
21:25:58 | fizzbooze | 4.9 |
21:26:33 | Araq | well it looks like nim cannot find it? |
21:26:55 | Araq | build without -d:release and with --parallelBuild:1 please |
21:27:44 | ekarlso | exonoo |
21:27:52 | ekarlso | EXetoC: support the packages api |
21:27:56 | ekarlso | vs static packages.json |
21:28:07 | fizzbooze | Araq: same problem, same error message |
21:28:36 | def- | fizzbooze: ./koch boot -d:release --parallelBuild:1 |
21:29:05 | fizzbooze | def-: same error again ;( |
21:29:27 | fizzbooze | it built fine on my laptop. the failed build is on my Digitalocean VM |
21:29:29 | def- | strange |
21:30:39 | fizzbooze | Araq: gcc must have been working correctly because bin/nim was build from csources/ |
21:31:04 | Araq | fizzbooze: the VM has not enough ram? |
21:31:21 | fizzbooze | Araq: oh that is possible |
21:31:23 | Araq | I had this too, I setup some swap partition and swoosh, it worked |
21:31:26 | fizzbooze | it only has 0.5G |
21:31:29 | Araq | yup |
21:31:37 | Araq | that's it then |
21:31:41 | fizzbooze | k gonna try setting up swap |
21:31:47 | def- | more than 500 MB are needed to build nim? =/ |
21:32:12 | Araq | not according to our stats but not all is available to Nim and perhaps there is fragmentation |
21:32:35 | * | Sergio965 joined #nim |
21:33:58 | * | vendethiel joined #nim |
21:34:01 | Araq | but yeah, somebody should look into this at some point |
21:34:53 | Araq | iirc the compiler itself works but then it invokes gcc which uses lots of ram too |
21:34:58 | Araq | and combined they fail |
21:35:07 | def- | Hint: operation successful (81220 lines compiled; 4.272 sec total; 262.268MB) [SuccessX] |
21:35:14 | def- | that means the compiler itself needed 262 MB? |
21:35:20 | Araq | yes |
21:35:40 | Araq | it's quite memory hungry |
21:35:54 | Araq | you can generate a compile script so that the compiler finishes and gcc is invoked later |
21:37:44 | fizzbooze | adding a 0.5G swap worked! |
21:39:07 | * | sampwing quit (Ping timeout: 252 seconds) |
21:39:58 | flaviu | On my ARM build bot, it looks like nim is using only 90MB of real ram. |
21:40:27 | flaviu | Quite a bit more virtual ram though. |
21:41:46 | Mat4 | I had the same problem before compiling Nim for my Raspberri Pi |
21:42:01 | Araq | I think it's all caused by these "nice" ropes with their immutability :P |
21:42:21 | def- | Araq: i'm trying to profile what takes all the memory |
21:42:51 | Araq | def-: just add some counters for newRope, newType, newSym and newNode |
21:42:53 | * | gokr_ quit (Ping timeout: 245 seconds) |
21:42:53 | flaviu | def-: Are you profiling virtual or real memory usage? |
21:43:21 | def- | i was using valgrind --tool=massif so far |
21:43:44 | flaviu | Yeah, nim doesn't use the C stdlib for allocation. |
21:43:53 | def- | oops |
21:43:54 | Araq | valgrind knows nothing about our allocator |
21:44:04 | def- | that explains the weird results, ok |
21:44:22 | flaviu | Araq: How about rawalloc? |
21:44:31 | flaviu | Where does nim do it's allocations? |
21:44:36 | Araq | flaviu: what would that accomplish? |
21:44:44 | flaviu | --tool=massif --alloc-fn=rawalloc_34546 |
21:45:02 | Araq | well it depends on what you want to accomplish |
21:45:22 | flaviu | I want to tell valgrind how to detect memory allocations. |
21:45:30 | Araq | you can also use the builtin memory profiler but it slows everything down |
21:45:42 | Araq | and sometimes it crashes the compiler for some reason |
21:45:52 | fizzbooze | are there examples for this library? http://nim-lang.org/expat.html the page only shows function signatures |
21:46:21 | Araq | fizzbooze: it's just a wrapper. use their C examples as a starting point |
21:47:00 | fizzbooze | thx |
21:47:18 | def- | Araq: thanks, totally forgot about that one |
21:48:55 | Araq | def-: if you can get it to work it immediately tells you the reason for the heavy allocations |
21:49:02 | def- | seems like it broke |
21:49:07 | def- | lib/system/sysstr.nim(110, 5) Error: declared lock level is 0, but real lock level is <unknown> |
21:49:28 | Araq | hu? fix it |
21:50:10 | def- | don't understand the problem |
21:52:05 | flaviu | def-: I worked around it by just deleting the error branch. |
21:52:20 | flaviu | https://github.com/Araq/Nim/issues/1983' |
21:52:29 | Araq | def-: gc.nim line 36 |
21:53:01 | Araq | make that proc header {.benign.} |
21:54:06 | EXetoC | what's that? |
21:54:11 | def- | first I hear of benign |
21:54:45 | Araq | it's just a shortcut for gcsafe, locks: 0 |
21:55:12 | Araq | and yeah at some point we need to make this the default ... |
21:55:17 | def- | doesn't seem to help |
21:55:31 | def- | lib/system/profiler.nim(65, 7) Warning: cannot prove 'nimProfile' is GC-safe. Does not compile with --threads:on. |
21:55:34 | def- | lib/system/profiler.nim(65, 7) Error: declared lock level is 0, but real lock level is <unknown> |
21:55:48 | def- | i guess the same there, I'll just try a bit |
21:55:53 | * | vendethiel quit (Ping timeout: 240 seconds) |
21:56:00 | Araq | let's see |
21:58:02 | Araq | well you need to annotate more stuff with this |
22:00:01 | def- | Araq: how to figure out what stuff? |
22:01:46 | Araq | it's intuitively obvious ;-) |
22:01:58 | ldlework | hehe |
22:02:11 | Araq | lib/system/profiler.nim |
22:02:17 | Araq | TProfilerHook |
22:02:37 | Araq | or rather TMemProfilerHook |
22:02:49 | BlaXpirit_ | can I specify -d:... inside code? |
22:02:50 | def- | works now |
22:03:07 | def- | Araq: want to add it yourself or a PR? |
22:03:18 | Araq | make a pr, I'm lazy |
22:03:31 | Araq | BlaXpirit_: nope and this is by design |
22:03:53 | BlaXpirit_ | Araq, I want some kind of compile-time settings for my library |
22:04:10 | def- | BlaXpirit_: {.checks: on.} and so on? |
22:04:12 | BlaXpirit_ | and the setting makes the way you use it different |
22:04:34 | BlaXpirit_ | when defined(csfmlNoDestructors): |
22:05:45 | BlaXpirit_ | (because destructors don't seem to be tested very much, and I ran into a wall with them, just can't compile anything) |
22:06:05 | Araq | they are in .experimental now |
22:06:18 | BlaXpirit_ | they sure are... |
22:06:24 | BlaXpirit_ | but it's 100% must have for me |
22:06:30 | Araq | ofc that doesn't mean that you should stop complaining ... |
22:06:50 | * | milosn quit (Ping timeout: 244 seconds) |
22:08:38 | BlaXpirit_ | a type that has-a destructible type is just a nightmare |
22:09:13 | * | milosn joined #nim |
22:10:51 | fizzbooze | is there a XML library that can deserialize an XML into a Nim object? all the existing XML stuff in /lib.html look like just parsers |
22:12:38 | ldlework | fizzbooze: marshal module? |
22:12:48 | Araq | fizzbooze: I don't think so. marshal only support json |
22:12:57 | * | Jesin quit (Quit: Leaving) |
22:13:03 | ldlework | oh |
22:13:03 | fizzbooze | i see |
22:13:06 | ldlework | wierd |
22:13:07 | Araq | xml is not sexy anymore, nobody asks for xml |
22:13:26 | fizzbooze | lol |
22:13:41 | ldlework | Does marshal have an api for which you can plop other serialization ontop? |
22:14:00 | def- | Not sure I can understand the profile_result.txt: https://gist.github.com/def-/9d06d2e70a5f146dbf78 |
22:14:42 | * | vendethiel joined #nim |
22:14:47 | Araq | ldlework: no but it uses typeinfo and you can build your own stuff on top of that |
22:16:33 | * | Matthias247 joined #nim |
22:16:45 | flaviu | destructors are experimental now? |
22:17:10 | BlaXpirit_ | yes |
22:17:43 | flaviu | That's literally the last feature I would expect to fall under experimental. |
22:17:59 | Araq | well firstly they are buggy |
22:18:11 | Araq | and secondly the whole approach to destructors sucks |
22:18:23 | BlaXpirit_ | o rly |
22:18:24 | Araq | I want to tie them to an escape analysis |
22:18:37 | * | fizzbooze quit (Quit: WeeChat 1.1) |
22:18:45 | Araq | but this is not version 1.0 stuff, hence it's "experimental" |
22:18:56 | flaviu | BlaXpirit_: please don't make provocative statements, it's rude. |
22:19:11 | BlaXpirit_ | you mean destructors aren't gonna be fixed before 1.0? |
22:19:19 | flaviu | Araq: My use case is C FFI, I don't want to have to do manual free. |
22:19:30 | BlaXpirit_ | everyone has that use case |
22:20:12 | * | Jesin joined #nim |
22:20:26 | Araq | def-: well the numbers are ... confusing to interpret but the gist is that lots of memory is allocated in that exponential blowup which I'm already working on |
22:21:22 | * | MattAitc_ joined #nim |
22:21:24 | * | JinShil joined #nim |
22:21:33 | * | MattAitc_ quit (Client Quit) |
22:21:47 | Araq | flaviu: well for that the current approach might suffice |
22:22:48 | Araq | the workaround that works is to have a proxy ref with a finalizer |
22:23:00 | Araq | that's what re does for instance |
22:24:57 | flaviu | Oh, I see. I thought that finalizers and destructors are the same thing. |
22:25:29 | flaviu | That's perfectly acceptable to me, an extra allocation is a small price to pay for stability. |
22:25:48 | Araq | BlaXpirit_: can you give a typical example that's prevented by the compiler but you like to work? |
22:25:59 | BlaXpirit_ | [:07:57] <BlaXpirit_> a type that has-a destructible type |
22:26:12 | Araq | that's not an example |
22:26:23 | Araq | that's not even a full sentence |
22:27:47 | BlaXpirit_ | it's difficult to explain |
22:27:59 | Araq | gist some pseudo-code |
22:28:33 | BlaXpirit_ | Basically, as I understand, a member destructible object must be initialized immediately and cannot be reassigned later |
22:28:52 | Araq | yup |
22:29:22 | BlaXpirit_ | well there you go, this is unacceptable to me |
22:29:52 | Araq | maybe you can at least swap it |
22:30:28 | BlaXpirit_ | ? |
22:30:56 | Araq | swap instead of '=' |
22:31:00 | Araq | but anyway |
22:31:12 | BlaXpirit_ | :| |
22:31:22 | Araq | maybe you can have 2 types? |
22:31:36 | Araq | one that has a destructor and is exported the other for internal usage? |
22:31:46 | BlaXpirit_ | in my particular case it may not even be logical to reassign |
22:31:53 | BlaXpirit_ | but i'm sure there are a ton of real use cases |
22:32:12 | BlaXpirit_ | Araq, that's a ton of overhead and tedium |
22:32:32 | BlaXpirit_ | and it's not about internal usage anymore |
22:32:44 | BlaXpirit_ | i actually can't use my library properly because of destructors |
22:33:09 | * | sampwing joined #nim |
22:33:20 | Araq | can I find your library anywhere? |
22:33:30 | BlaXpirit_ | https://github.com/blaxpirit/nim-csfml |
22:33:56 | Mat4 | I found use of my CPU cores. Instead of delegating tasks to them I will let run each core a virtual machine processing different programs. That's probably more efficient |
22:35:24 | Araq | BlaXpirit_: which file(s)? |
22:35:30 | Araq | Mat4: nice. |
22:35:38 | BlaXpirit_ | Araq, destructors are absolutely everywhere |
22:35:47 | BlaXpirit_ | every ptr object has a destroy proc |
22:36:08 | BlaXpirit_ | And using such object is a pain |
22:36:42 | Araq | https://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_graphics.nim has none |
22:36:43 | BlaXpirit_ | ah, sorry, Araq. an example is src/private/csfml_graphics_gen.nim |
22:36:55 | Araq | https://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_window.nim has none |
22:37:42 | BlaXpirit_ | also, I changed the "override" pragma to "destroy" pragma |
22:37:51 | BlaXpirit_ | custom one, so i can toggle destructors |
22:38:15 | * | fwef quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
22:40:11 | * | jefus_ joined #nim |
22:41:20 | Araq | ok, well I am still not sure why it's a pita to work with |
22:41:47 | Araq | take Texture for instance |
22:42:06 | Araq | createTempTexture().foo() # shouldn't be common |
22:43:08 | Araq | and when you do: var tex = createTexture() the destructor is called at the end of this scope |
22:43:29 | BlaXpirit_ | that's all nice |
22:43:39 | * | jefus quit (Ping timeout: 252 seconds) |
22:43:42 | BlaXpirit_ | but think about an object that owns a sprite |
22:43:59 | BlaXpirit_ | (because I couldn't subclass Sprite, because it's "final") |
22:43:59 | * | fwef joined #nim |
22:44:15 | BlaXpirit_ | these things tend to circulate like crazy |
22:44:23 | Araq | (you can use .inheritable to get around this, usually) |
22:44:38 | * | saml quit (Quit: Leaving) |
22:44:38 | BlaXpirit_ | that's nice to know |
22:45:22 | BlaXpirit_ | sounds like a lot of "object roots" |
22:45:27 | Araq | well if the sprite has a texture, the sprite itself is destructible and you cannot do wild things with it |
22:45:49 | BlaXpirit_ | nah, sprite doesn't have a texture |
22:45:55 | BlaXpirit_ | player has a sprite |
22:45:58 | BlaXpirit_ | players come and go |
22:46:32 | Araq | well and as they come and go, you cannot attach their lifetime to the stackframe and so destructors cannot work |
22:47:37 | BlaXpirit_ | that kinda makes sense, but the point of reassignment shouldn't be too difficult to track as well |
22:48:04 | BlaXpirit_ | "c++ doesn't have these limitations" |
22:48:48 | Araq | well C++ can overload assignment |
22:48:54 | Araq | we cannot yet. |
22:49:09 | BlaXpirit_ | umm overloading assignment only makes things more difficult |
22:49:40 | Araq | but do you really want a pair of construct/destruct in the assignment? |
22:49:53 | Araq | cause that's what can happen in C++ |
22:50:09 | Araq | and btw |
22:50:13 | BlaXpirit_ | of course, it is obvious that this is what should happen |
22:50:29 | Araq | we have a much more powerful tracking in the compiler |
22:50:42 | Araq | but destructors doesn't use that, maybe it should |
22:50:51 | Araq | but again, I need concrete examples |
22:50:58 | BlaXpirit_ | i'm not saying Nim isn't awesome, just saying it limits me more than C++ in some cases |
22:51:24 | Araq | that's not news to me |
22:51:58 | BlaXpirit_ | limits not simply in features, but in concrete usecases |
22:52:25 | Araq | well you can either complain or help to improve the situation. |
22:52:35 | BlaXpirit_ | I don't think I can help to improve the situation |
22:52:50 | BlaXpirit_ | with things other than complaining or writing issues |
22:53:13 | Araq | I asked you for more and concrete examples |
22:53:25 | BlaXpirit_ | can't come up |
22:53:37 | BlaXpirit_ | my current example is not convincing |
22:53:40 | Araq | I'm not saying "you are stupid, the rules are perfect as they are" |
22:54:04 | Araq | I'm really willing to push this into a usable state even for version 1.0 |
22:54:28 | BlaXpirit_ | [:52:58] one could say that's what happened when i complained about recursive types :p |
22:54:50 | Araq | yeah, one could say that, but it is completely unfair |
22:55:04 | Araq | but I don't see the point in discussing that again |
22:55:44 | Araq | if you feel personally insulted when I criticize your design and designs like these in general, then so be it. |
22:58:18 | BlaXpirit_ | Araq, what about arrays then? |
22:58:31 | BlaXpirit_ | it's actually very typical to have an array of sprites |
22:58:40 | BlaXpirit_ | or any object that has a destructor.,... |
23:02:15 | Araq | well that depends on what the compiler actually requires for this case, I don't know what it does |
23:02:56 | BlaXpirit_ | I can't create a seq with a destructible object |
23:03:08 | BlaXpirit_ | that's definitely limiting |
23:03:16 | Araq | let foo = @[a, b, c] doesn't compile? |
23:04:04 | BlaXpirit_ | .give Araq {.experimental.};type T = object; m: int;proc destroy*(t: T) {.override.} = discard;var t = @[T(m: 5)] |
23:04:07 | Mimbus | Araq: eval.nim(7, 11) Error: usage of a type with a destructor in a non destructible context |
23:04:19 | BlaXpirit_ | oh, you mean like that |
23:05:57 | Araq | ok, that's definitely a bug |
23:06:00 | BlaXpirit_ | :P |
23:06:43 | BlaXpirit_ | All I can dream about is that the "destructible context" is gone |
23:06:43 | flaviu | BlaXpirit_: You can have a space after the semicolon now! |
23:07:26 | Araq | BlaXpirit_: I think it's just too limiting but the idea itself is good |
23:07:44 | Araq | we just need to find more contexts that should be allowed |
23:08:07 | BlaXpirit_ | Araq, umm another thing |
23:08:15 | BlaXpirit_ | you can indeed create an array with existing object |
23:08:29 | BlaXpirit_ | but it gets destroyed anyway |
23:09:07 | BlaXpirit_ | Araq, https://bpaste.net/show/7b4743e13a05 - the presence of the destructor causes SIGSEGV |
23:09:10 | BlaXpirit_ | without it it works |
23:09:36 | BlaXpirit_ | at this point this is probably asking too much |
23:10:50 | Araq | hmm well somebody should try this feature when it at least works as I imagined it to work ... |
23:11:06 | BlaXpirit_ | what do you mean? |
23:11:28 | Araq | that it's not obvious for anybody whether the design is unusable |
23:11:32 | Araq | or just the implementation |
23:11:37 | BlaXpirit_ | there are plenty of simple enough examples with that library of mine |
23:11:46 | BlaXpirit_ | it works until complex structures come into play |
23:12:03 | * | johnsoft quit (Ping timeout: 245 seconds) |
23:12:15 | * | johnsoft joined #nim |
23:13:22 | Araq | well since it's experimental anyway |
23:13:35 | Araq | what I can do tonight is to make that error a warning |
23:13:51 | Araq | then you can use it and shoot yourself in the foot as much as you want |
23:14:06 | Araq | ;-) |
23:14:07 | BlaXpirit_ | you mean remove destructible context? |
23:14:18 | Araq | not removing it |
23:14:26 | Araq | but the error will just be a warning |
23:14:32 | BlaXpirit_ | very interesting |
23:14:49 | BlaXpirit_ | thank you |
23:18:09 | Araq | oh I can also fix the @[obj] bug :P |
23:18:19 | Araq | it's obvious now that I look at the code |
23:22:38 | * | milosn quit (Ping timeout: 272 seconds) |
23:23:26 | * | milosn joined #nim |
23:23:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:24:40 | Araq | BlaXpirit_: there you go, but I tested nothing |
23:28:40 | BlaXpirit_ | i remembered my first encounter with destructible context - now I changed it to "wrong", indeed get a warning, and everything still works |
23:29:09 | BlaXpirit_ | ah no |
23:29:12 | BlaXpirit_ | memory is leaking |
23:29:39 | BlaXpirit_ | Araq, reassigning causes memory leak :> |
23:29:47 | BlaXpirit_ | i mean, causes destructor not to be called |
23:30:57 | Araq | good, that's exactly what you want, RIGHT?! |
23:31:25 | BlaXpirit_ | no, I want everything to just work |
23:31:52 | BlaXpirit_ | but I suppose this is better, because I can probably call the destructor manually |
23:32:20 | BlaXpirit_ | yup :) |
23:32:44 | Araq | you have your own way of showing gratitude |
23:33:08 | * | flaviu quit (Read error: Connection reset by peer) |
23:33:08 | * | Mimbus quit (Read error: Connection reset by peer) |
23:33:15 | BlaXpirit_ | i did say "thank you" 15 min ago |
23:35:22 | Araq | that's not enough, you have to give your Araq statue a peanut |
23:35:43 | Araq | (you have an Araq statue that you worship, right?!) |
23:35:46 | * | BlaXpirit_ shrugs |
23:36:47 | * | flaviu joined #nim |
23:38:03 | * | EXetoC quit (Quit: WeeChat 1.0.1) |
23:38:39 | def- | Araq: Can you say something about the top question here?: https://news.ycombinator.com/item?id=8934582 |
23:40:48 | Araq | well pcwalton's answer is very good |
23:41:13 | Araq | I simply disagree that via Curry-Howard, qualifies as "automated proof technology" |
23:41:32 | Araq | but the terms are not well defined |
23:41:34 | * | EXetoC joined #nim |
23:42:42 | * | Mimbus joined #nim |
23:44:13 | Araq | either you do flow dependent typing or you don't |
23:44:46 | Araq | if you don't do it, it's not "automated proof technology" ;-) |
23:46:11 | Araq | well ... hard to explain |
23:46:47 | Araq | but look at the example |
23:47:06 | Araq | how would a *type* system look like that allows inc i, 2 but not inc i |
23:47:14 | Araq | in that particular context |
23:48:38 | def- | define a type for even numbers? |
23:49:18 | Araq | that's not the point. the example doesn't care about even vs odd |
23:53:36 | Araq | def-: I'm answering |
23:54:59 | * | akiradeveloper joined #nim |
23:56:07 | Araq | akiradeveloper: you can use the effect system for that |
23:59:14 | akiradeveloper | I understand effect system is propagation of tag in compile time. Am I right? |