00:01:21 | * | Matthias247 joined #nim |
00:06:50 | * | pregressive quit (Ping timeout: 276 seconds) |
00:07:23 | * | pregressive joined #nim |
00:20:57 | * | boop is now known as boopisaway |
00:25:29 | * | Demon_Fox quit (Quit: Leaving) |
00:30:46 | * | brson quit (Quit: leaving) |
00:31:56 | * | Demon_Fox joined #nim |
00:38:13 | * | pregressive quit (Ping timeout: 264 seconds) |
00:38:46 | * | pregressive joined #nim |
00:40:39 | taotetek | Araq: ah duh - so I'll need to do an equivalent of a copyMem, but in a way that doesn't depend on copyMem |
00:42:09 | * | jd joined #nim |
00:42:23 | Araq | 'add' for strings? character copying for loops? |
00:42:33 | Araq | a couple of things to choose from |
00:43:11 | taotetek | Araq: yup - just reading through the sysstr lib at the moment |
00:44:06 | * | pregressive quit (Ping timeout: 265 seconds) |
00:44:39 | * | pregressive joined #nim |
00:46:37 | * | elbow quit (Ping timeout: 250 seconds) |
00:49:29 | * | pregressive quit (Ping timeout: 256 seconds) |
00:55:55 | * | pregressive joined #nim |
01:02:00 | * | elbow joined #nim |
01:02:43 | * | Matthias247 quit (Quit: Matthias247) |
01:07:13 | * | flaviu joined #nim |
01:08:59 | * | pregressive quit (Remote host closed the connection) |
01:23:15 | * | jaco60 quit (Ping timeout: 265 seconds) |
01:23:39 | * | Jehan` quit (Quit: Leaving) |
01:26:02 | vikaton | > [ case () of { _ | x `mod` 3 == 0 && x `mod` 5 == 0 -> "FizzBuzz" | x `mod` 3 == 0 -> "Fizz" | x `mod` 5 == 0 -> "Buzz" | otherwise -> show x } | x <- [1..50]] |
01:26:11 | vikaton | lol |
01:26:15 | vikaton | embarassing :/ |
01:26:53 | flaviu | not even Nim code. |
01:26:54 | flaviu | tsk, tsk. |
01:35:09 | * | TEttinger joined #nim |
01:45:20 | vikaton | wouldnt be as embarassing if it was Nim code |
01:55:33 | * | pregressive joined #nim |
01:58:46 | * | anthony joined #nim |
01:59:09 | * | anthony is now known as Guest15891 |
02:03:27 | * | Guest15891 quit (Client Quit) |
02:09:28 | * | pregressive quit () |
02:15:07 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:27:33 | * | kumul quit (Quit: Leaving) |
02:33:17 | * | brson joined #nim |
02:35:29 | * | ehaliewicz joined #nim |
02:40:43 | * | brson quit (Quit: leaving) |
02:40:50 | * | brson joined #nim |
02:41:15 | * | Kingsquee quit (Read error: Connection reset by peer) |
02:41:53 | * | Kingsquee joined #nim |
02:46:12 | * | brson quit (Quit: leaving) |
02:46:19 | * | brson joined #nim |
02:51:23 | * | yglukhov joined #nim |
02:55:38 | * | yglukhov quit (Ping timeout: 246 seconds) |
03:02:18 | * | saml_ joined #nim |
03:03:49 | * | ob_ quit (Quit: Connection closed for inactivity) |
03:10:00 | * | enquora quit (Quit: enquora) |
03:20:45 | * | darkf joined #nim |
03:26:59 | * | Jesin quit (Quit: Leaving) |
03:27:22 | * | Jesin joined #nim |
03:43:53 | * | dddddd quit (Ping timeout: 265 seconds) |
03:46:09 | * | jd is now known as apense |
03:50:59 | * | apense is now known as apense_ |
03:52:05 | * | bjz joined #nim |
03:52:07 | * | apense_ is now known as apense |
03:56:03 | * | woadwarrior joined #nim |
03:57:02 | * | apense left #nim ("Leaving") |
03:58:12 | * | apense joined #nim |
03:59:44 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
04:04:24 | * | saml_ quit (Quit: Leaving) |
04:08:40 | * | brson quit (Remote host closed the connection) |
04:13:07 | * | dtscode is now known as bulbasaur |
04:17:07 | * | arunah joined #nim |
04:19:49 | * | bulbasaur is now known as charmander |
04:30:20 | * | bjz joined #nim |
04:37:34 | Xe | vikaton: is that ocaml or haskell? |
04:37:57 | Xe | ah |
04:38:00 | Xe | ahskell |
04:38:02 | Xe | haskell* |
04:39:06 | * | avsej quit (Remote host closed the connection) |
04:55:12 | * | avsej joined #nim |
04:55:12 | * | avsej quit (Changing host) |
04:55:12 | * | avsej joined #nim |
05:00:14 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:13:38 | * | skyfex____ quit (Ping timeout: 276 seconds) |
05:27:19 | * | elbow_jason joined #nim |
05:39:50 | * | bjz quit (Read error: Connection reset by peer) |
05:40:28 | * | bjz joined #nim |
05:44:49 | * | ehaliewi` joined #nim |
05:45:07 | * | bjz quit (Read error: Connection reset by peer) |
05:45:29 | * | milosn quit (Ping timeout: 252 seconds) |
05:45:44 | * | bjz joined #nim |
05:46:58 | * | ehaliewicz quit (Ping timeout: 276 seconds) |
05:53:18 | * | milosn joined #nim |
05:54:10 | * | bjz quit (Read error: Connection reset by peer) |
05:54:53 | * | bjz joined #nim |
06:18:27 | wb | does the "type X = ref object" notation completely replace the "type X {.byref.} =" notation or do we need to do both as in "type X {.byref.} = ref object"? |
06:19:29 | * | cyraxjoe_ joined #nim |
06:20:07 | * | cyraxjoe quit (Ping timeout: 276 seconds) |
06:20:23 | * | bjz quit (Read error: Connection reset by peer) |
06:21:08 | * | bjz joined #nim |
06:26:03 | fowl | wb: byref and bycopy don't apply to ref/ptr/var |
06:26:52 | wb | I see. Thanks |
06:27:36 | fowl | Byref means it will always pass the object type by reference (thats just by address in c, its not the same as a ref ty which is garbage collected |
06:30:36 | * | jszymanski joined #nim |
06:54:59 | * | xificurC quit (Quit: WeeChat 1.2) |
06:57:39 | * | xificurC joined #nim |
07:14:19 | * | johnsoft joined #nim |
07:17:30 | * | charmander is now known as agent_black |
07:18:14 | * | milosn_ joined #nim |
07:18:20 | * | milosn quit (Read error: Connection reset by peer) |
07:18:59 | * | milosn_ is now known as milosn |
07:41:27 | * | def- quit (Ping timeout: 256 seconds) |
08:01:43 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:03:31 | * | HaCk3D quit (Ping timeout: 265 seconds) |
08:04:38 | * | kashyap_ joined #nim |
08:05:49 | kashyap_ | Hi, could someone please point me to good examples that use nim's concurrency/parallelism features .... it could just be projects on git |
08:14:40 | Araq | kashyap_: well there are a couple of tests in tests/parallel, some of which resemble realworld code |
08:18:08 | * | Arrrr joined #nim |
08:20:20 | Araq | kashyap_: and then there is also the whole async stuff |
08:21:56 | Araq | and then there is still Nim's old || iterator which generates OpenMP |
08:24:48 | * | HaCk3D joined #nim |
08:31:33 | kashyap_ | thanks Araq |
08:32:28 | * | synthmeat quit (Quit: The way to get started is to quit talking and begin doing.) |
08:32:44 | * | synthmeat joined #nim |
08:34:38 | kashyap_ | For CSP style programming - do we use spawn/channel? |
08:35:57 | Araq | for channels you should currently use TThread[T] instead |
08:36:04 | * | fractionuser joined #nim |
08:36:05 | * | fractionuser left #nim (#nim) |
08:36:28 | kashyap_ | TThread? |
08:36:54 | Araq | the old threading stuff |
08:37:10 | kashyap_ | oh okay |
08:37:32 | * | yglukhov joined #nim |
08:37:33 | Araq | http://nim-lang.org/docs/threads.html |
08:37:47 | Araq | http://nim-lang.org/docs/channels.html |
08:38:10 | kashyap_ | got it ... I'll go over |
08:38:59 | kashyap_ | just an update ... I've started using nim for my job :) ... ofcourse my boss does not know about it .. he just sees the reports I create |
08:39:22 | Araq | ah cool. |
08:41:26 | * | thepreacher joined #nim |
08:46:03 | * | Miko___ joined #nim |
08:49:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:52:26 | * | elbow_jason quit (Read error: No route to host) |
08:53:21 | * | elbow_jason joined #nim |
08:54:55 | * | bjz joined #nim |
08:57:35 | * | bjz quit (Client Quit) |
09:00:01 | * | Demon_Fox quit (Quit: Leaving) |
09:01:15 | * | def- joined #nim |
09:05:52 | * | rgv151 quit (Ping timeout: 276 seconds) |
09:11:02 | * | rgv151 joined #nim |
09:14:13 | * | thepreacher quit (Remote host closed the connection) |
09:15:32 | * | thepreacher joined #nim |
09:17:13 | * | wb quit (Ping timeout: 264 seconds) |
09:20:22 | * | thepreacher quit (Ping timeout: 255 seconds) |
09:23:31 | * | thepreacher joined #nim |
09:25:07 | * | Demon_Fox joined #nim |
09:28:10 | * | thepreacher quit (Ping timeout: 244 seconds) |
09:34:41 | * | bjz joined #nim |
09:36:04 | * | ehaliewi` quit (Ping timeout: 245 seconds) |
09:42:39 | * | agent_black is now known as dtscode |
09:43:58 | * | dtscode is now known as agent_dtscode |
09:44:09 | HaCk3D | Araq: hi, r u here? |
09:44:28 | HaCk3D | i have some questions on https://github.com/nim-lang/Nim/issues/2573 |
09:47:10 | * | filcuc joined #nim |
09:51:19 | * | mramberg joined #nim |
09:53:18 | * | Matthias247 joined #nim |
09:53:51 | * | bjz quit (Ping timeout: 264 seconds) |
09:54:32 | * | milosn quit (Read error: Connection reset by peer) |
09:58:59 | * | milosn joined #nim |
10:15:30 | * | thepreacher joined #nim |
10:16:06 | * | gokr joined #nim |
10:16:31 | * | Demon_Fox quit (Quit: Leaving) |
10:17:46 | * | filcuc quit (Ping timeout: 244 seconds) |
10:19:58 | * | thepreacher quit (Ping timeout: 256 seconds) |
10:25:27 | * | filcuc joined #nim |
10:54:09 | * | boopisaway is now known as boop |
11:02:08 | * | wb joined #nim |
11:03:25 | * | filcuc quit (Ping timeout: 255 seconds) |
11:08:54 | * | thepreacher joined #nim |
11:21:07 | * | Trustable joined #nim |
11:45:04 | * | dalarmmst quit (Ping timeout: 272 seconds) |
11:45:48 | * | JinShil quit (Quit: Konversation terminated!) |
11:49:30 | * | jaco60 joined #nim |
11:55:29 | Araq | HaCk3D: pong |
11:56:11 | * | thepreacher quit (Remote host closed the connection) |
11:59:54 | * | thepreacher joined #nim |
12:03:20 | taotetek | anyone know how to detect if code is running in a macro or not? |
12:04:05 | taotetek | I thought if defined(NimrodVM) might do the trick but that doesn't appear to be working |
12:05:53 | * | BitPuffin|osx joined #nim |
12:08:22 | dom96 | NimVM perhaps? |
12:09:45 | taotetek | don't see NimVM defined anywhere in the Nim source |
12:10:56 | taotetek | I do see targetOS exported from /lib/systems/platforms.nim |
12:11:12 | taotetek | with elif defined(nimrodVM): OsPlatform.nimVM |
12:12:19 | taotetek | dom96: I have a patch of lexbase that works in macros :) just need to figure out how to have it conditionally run only when in a macro and run the original logic when not |
12:15:02 | * | kumul joined #nim |
12:15:29 | dom96 | nimrodVM should work then |
12:15:42 | dom96 | unless the standard library code is wrong |
12:15:43 | dom96 | heh |
12:15:56 | taotetek | yeah - giving it another shot just in case I missed something / did somethig wrong the first time I tried it. |
12:17:13 | Araq | er ... no. indeed the 'defined' cannot work |
12:17:36 | pigmej | hey everyone :) |
12:17:43 | taotetek | Araq: aha. |
12:17:50 | Araq | hrm I think you need to hack something with 'when compiles' |
12:18:23 | Araq | though hrm ... tricky |
12:18:32 | taotetek | doh :) |
12:19:16 | Araq | just make it work at compile-time, I'll come up with a test that works |
12:19:16 | * | filcuc joined #nim |
12:20:00 | taotetek | Araq: ok - for now, I'll keep working on the code I'm writing against my fork |
12:20:47 | taotetek | Araq: when you have a test I can use for the conditional, I'll add that and send a PR back to nim-lang/Nim - sound good? |
12:25:01 | * | johnsoft quit (Ping timeout: 264 seconds) |
12:25:43 | * | johnsoft joined #nim |
12:28:48 | ozra | While using different code for the same thing is "dangerous", I do think BigInts could benefit a lot from `if-vm: use-native-solution elif-rt: use-GMP-solution` |
12:28:53 | * | gokr_ joined #nim |
12:33:20 | * | kumul quit (Quit: Leaving) |
12:33:54 | * | dddddd joined #nim |
12:35:47 | Araq | taotetek: yup, sounds good. |
12:36:06 | Araq | in fact, I think I'll special case 'when defined(nimvm)' in the compiler |
12:36:25 | vikaton | Xe, Haskell |
12:37:15 | yglukhov | Hello Araq, I've been thinking about the unhandled exceptions problem. Whether it's a good thing to handle unhandled exceptions. And actually see no good reason to do it. Why do you want to handle them? |
12:38:04 | taotetek | Araq: sounds great |
12:40:29 | Araq | yglukhov: cause Nim can produce a good strack trace and JS can't |
12:41:18 | yglukhov | Araq, I think I know how to handle them, but this adds complexity in both logic and performance. Is it really worth it? |
12:42:20 | yglukhov | Every time we throw an ecxeption we will have to check through all the stack of handlers to see if one of them catches them. And then again, we can not see through non-nim code. |
12:43:16 | * | Kingsquee quit (Quit: Konversation terminated!) |
12:43:27 | yglukhov | And a promitive workaround for user is just to place a try-catch at the top level, and he should be fine. |
12:43:32 | yglukhov | *primitive |
12:43:42 | yglukhov | super-easy, super-fast =) |
12:44:16 | Araq | hrm? so emit this top level try-catch |
12:44:55 | * | rgv151 quit (Ping timeout: 276 seconds) |
12:45:08 | yglukhov | Yeah, just emit it. But the question is... what is top-level? main()? exportc functions? |
12:45:22 | yglukhov | You may never know. |
12:46:14 | yglukhov | Only the user of your code will know |
12:46:50 | Araq | ah yeah well |
12:47:02 | Araq | actually you're in control of the generated code, so you could know |
12:47:13 | Araq | you can put it into a 'main' function |
12:47:24 | Araq | but fine, as I said C++ target has the same problem |
12:48:39 | Araq | yglukhov: saw my LL gist? |
12:49:02 | Araq | https://gist.github.com/Araq/7f1eaacb68a5c49f73bc |
12:49:04 | Araq | bbl |
12:49:13 | yglukhov | I saw you posted it, havent gone through it completely yet |
12:52:27 | * | gokr_ quit (Remote host closed the connection) |
12:52:41 | * | gokr_ joined #nim |
12:52:54 | * | rgv151 joined #nim |
12:54:43 | * | thepreacher quit (Remote host closed the connection) |
13:27:48 | * | thepreacher joined #nim |
13:31:45 | pigmej | reactormonk_: ping |
13:41:56 | * | Miko___ quit (Ping timeout: 276 seconds) |
13:42:27 | * | jszymanski quit (Ping timeout: 264 seconds) |
13:44:07 | * | jszymanski joined #nim |
13:45:14 | * | rgv151 quit (Ping timeout: 246 seconds) |
13:46:38 | * | enquora joined #nim |
13:54:10 | * | rgv151 joined #nim |
14:01:22 | * | Ven joined #nim |
14:07:47 | * | kumul joined #nim |
14:13:14 | * | thepreacher quit (Remote host closed the connection) |
14:19:55 | * | Miko___ joined #nim |
14:21:54 | * | TEttinger quit (Ping timeout: 265 seconds) |
14:32:51 | * | thepreacher joined #nim |
14:33:16 | * | darkf quit (Quit: Leaving) |
14:35:29 | vikaton | Lol |
14:35:41 | vikaton | empty nim file == 9227 lines compiled |
14:40:02 | dom96 | yeah, system.nim |
14:40:15 | avsej | is there echo equivalent without new line? I found write(stdout, ...) only |
14:40:34 | dom96 | nope. stdout.write is the way to do it |
14:41:41 | avsej | ok |
14:54:13 | * | S_Walker joined #nim |
14:54:24 | * | S_Walker left #nim (#nim) |
14:54:28 | * | S_Walker joined #nim |
14:56:20 | * | dalarmmst joined #nim |
14:57:48 | * | rgv151 quit (Ping timeout: 244 seconds) |
15:00:56 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:01:46 | * | thepreacher quit (Remote host closed the connection) |
15:07:49 | * | rgv151 joined #nim |
15:07:55 | * | thepreacher joined #nim |
15:08:52 | * | ehaliewi` joined #nim |
15:13:17 | * | ehaliewi` quit (Ping timeout: 250 seconds) |
15:14:35 | * | banister joined #nim |
15:14:41 | * | banister quit (Max SendQ exceeded) |
15:15:20 | * | dalarmmst quit (Ping timeout: 272 seconds) |
15:18:23 | * | Matthias247 quit (Read error: Connection reset by peer) |
15:21:30 | * | banister joined #nim |
15:21:33 | * | banister quit (Max SendQ exceeded) |
15:22:12 | reactormonk_ | pigmej, pong |
15:22:32 | * | rgv151 quit (Quit: Leaving...) |
15:23:02 | pigmej | reactormonk_: hey |
15:23:12 | pigmej | How we can now run nimsuggest from epc? |
15:24:12 | reactormonk_ | pigmej, still the same? |
15:24:24 | pigmej | nothing changed I supposte? |
15:24:25 | reactormonk_ | ah, you want PWD set? |
15:24:26 | pigmej | suppose* ? |
15:24:35 | pigmej | yeah for now I just made some 'custom' script |
15:24:39 | pigmej | that cd + exec |
15:24:58 | pigmej | but well, it's ugly, BUT maybe it's ok to stay with it during this temporary situation I think ? |
15:25:08 | reactormonk_ | nope |
15:25:16 | reactormonk_ | because other people gotta use it too |
15:25:33 | reactormonk_ | so how exactly does the compiler find the stdlib? |
15:25:42 | reactormonk_ | via nim.cfg or something? |
15:27:19 | pigmej | No idea at all |
15:27:22 | BitR | well is cd + exec even enough? don't you need to be in the same directory as the source too? |
15:27:35 | reactormonk_ | BitR, nah, that's handled by the file you pass |
15:27:41 | pigmej | BitR: cd does the trict |
15:27:42 | pigmej | trick |
15:27:50 | pigmej | BitR: I replied you on github though :) |
15:28:01 | pigmej | reactormonk_: BitR is having the same issue that I once had |
15:28:06 | reactormonk_ | BitR, you should pass the main project file though, otherwise it won't work |
15:28:07 | BitR | pigmej: same ;) |
15:28:15 | pigmej | but I can't reproduce it now ;D |
15:28:18 | reactormonk_ | pigmej, but script is ugly as fuck. Please at least do it in emacs. |
15:28:34 | pigmej | reactormonk_: I know that it's ugly and terrible |
15:28:35 | BitR | well I can reproduce it with my Dockerfile every single time |
15:28:49 | pigmej | BitR: that's cool, could you create separate issue for it / |
15:28:49 | pigmej | ? |
15:28:59 | pigmej | I had it like once in friday evening |
15:29:02 | pigmej | and now it's gone ;D |
15:29:07 | BitR | yeah sure, but isn't it still just the same issue? |
15:29:11 | pigmej | no |
15:29:34 | BitR | so issue 4 would be the nimsuggest binary path then |
15:29:37 | pigmej | it's other, it searches project file in current directory regardles it's full path |
15:30:58 | * | gokr_ quit (Ping timeout: 240 seconds) |
15:31:23 | pigmej | BitR: check with relative path it will work somehow... |
15:31:40 | BitR | pigmej: I have, as I wrote in the github issue |
15:31:55 | reactormonk_ | pigmej, (defcustom nim-stdlib-path ...) |
15:32:08 | pigmej | reactormonk_: that's not a solution |
15:32:13 | pigmej | it's stdlib |
15:32:25 | pigmej | I mean, there are at least 2 issues |
15:32:37 | pigmej | #1 path to stdlib (which SHOULD be handled automaticaly tbh) |
15:32:43 | reactormonk_ | pigmej, so what? If it's nil, nimsuggest can handle it. |
15:32:45 | pigmej | #2 path to project file, it sometimes fails) |
15:32:51 | pigmej | reactormonk_: ah ok |
15:33:09 | pigmej | BitR: weird, |
15:33:25 | reactormonk_ | now I only need to find a piece of code which lets met test if nimsuggest can find stdlib - anyone got an idea? |
15:33:28 | * | reactormonk_ is now known as reactormonk |
15:33:37 | pigmej | BitR: what about bin/nimsuggest instead ? |
15:33:47 | pigmej | reactormonk: probably Araq knows ;P |
15:33:51 | reactormonk | pigmej, btw, restage against master |
15:34:00 | BitR | pigmej: then it can't find the stdlib |
15:34:14 | pigmej | BitR: huh ? |
15:34:44 | pigmej | BitR: bin/nimsuggest *should* work |
15:34:49 | BitR | Error: unhandled exception: cannot open: lib/system/inclrtl.nim [IOError] |
15:35:05 | pigmej | ee |
15:35:05 | BitR | you just move the path problem to the stdlib then |
15:35:12 | reactormonk | ah fuck it |
15:35:17 | pigmej | BitR: not quite |
15:35:24 | pigmej | cd nim |
15:35:27 | pigmej | ls bin |
15:35:31 | pigmej | is there nim and nimsuggest ? |
15:35:34 | BitR | yep |
15:35:34 | pigmej | are* |
15:35:45 | pigmej | so bin/nimsuggest --stdin /tmp/test.nim |
15:35:59 | pigmej | *should* work, and it should not crash with lib/system things |
15:36:05 | BitR | Error: unhandled exception: cannot open: test.nim [IOError] |
15:36:19 | BitR | when using bin/nimsuggest |
15:36:24 | pigmej | ok, so it's now the same as original at least |
15:37:01 | pigmej | that's weird |
15:37:20 | reactormonk | wtf... git's bugging me |
15:38:27 | HaCk3D | guys, im working on this issue: https://github.com/nim-lang/Nim/issues/1985 |
15:38:27 | HaCk3D | pcDir, pcFile are enums, but i cannot find them, could any1 help? |
15:39:00 | reactormonk | pigmej, there we go. let's go to master. |
15:39:09 | BitR | the ones in lib/pure/os.nim? |
15:39:13 | HaCk3D | + |
15:39:23 | ozra | imo nim and nimsuggest should find out their 'real path' and look for lib explictly in "../lib". IF it's installed in unix style (which is not supported atm, but probably should be), if it is in /usr/local/bin, it should find lib in /usr/local/lib/nim/, if it's in /usr/opt/bin/ it should look in /usr/opt/lib/ .. and so on. |
15:39:34 | fowl | HaCk3D: PC is for pathcomponent, they're in is.nim |
15:39:48 | HaCk3D | oh, thnx a lot |
15:39:58 | fowl | Thats an enum used with walkfiles |
15:40:09 | ozra | on windows I'm not sure about the idiomatic ways of pathing.. |
15:40:13 | fowl | Os.Nim |
15:40:19 | pigmej | reactormonk: ok, but wait maybe I will first finish my epc branch? |
15:40:20 | HaCk3D | im on archlinux |
15:40:30 | reactormonk | pigmej, just continue on master. |
15:41:17 | reactormonk | it works more than before, that's something |
15:41:29 | pigmej | well yeah |
15:41:51 | ozra | right now it's possible ro use a freshly compiled nim from a dir, but it doesn't look at "../lib/", it may use another nim-versions lib instead - which is confusing to say the least |
15:42:13 | HaCk3D | fowl: cant find it -_- |
15:42:25 | BitR | HaCk3D: it's in lib/pure/os.nim |
15:42:51 | fowl | HaCk3D: http://nim-lang.org/docs/os.html#PathComponent |
15:43:00 | * | ddl_smurf joined #nim |
15:43:50 | reactormonk | pigmej, hm. he more or less copy&pasted the code from python for the syntax hl |
15:44:18 | HaCk3D | oh, my fault, just forgot to uncheck "whole word" search in ST |
15:44:28 | pigmej | reactormonk: ? |
15:44:31 | HaCk3D | cat os.nim | grep pc |
15:44:34 | HaCk3D | helped me |
15:44:39 | HaCk3D | thnx u guys 2 |
15:44:46 | reactormonk | pigmej, """ foo " """ doesn't wrok as it shoul |
15:44:53 | BitR | HaCk3D: You can also use grep pcDir . -R |
15:45:02 | BitR | it'll search recursively through the current dir |
15:45:02 | pigmej | yeah, same for indentation sometimes |
15:45:03 | pigmej | etc |
15:46:00 | reactormonk | pigmej, I'd actually be happy to offload some stuff like indentation to nimsuggest :-) |
15:46:08 | reactormonk | because we know more there. |
15:46:13 | * | Pisuke joined #nim |
15:46:37 | pigmej | yeah BUT I would prefer nimsuggest to return hints |
15:46:46 | pigmej | like 'line 15 invalid indentation' |
15:46:48 | pigmej | or something |
15:46:53 | HaCk3D | how to use nim grep btw? |
15:47:00 | HaCk3D | whats it? |
15:47:05 | reactormonk | HaCk3D, exactly like normal grep |
15:47:23 | HaCk3D | on the source of nim, yeah? |
15:47:31 | * | MyMind quit (Ping timeout: 265 seconds) |
15:47:33 | reactormonk | pigmej, that too, but you could ask nimsuggest "what would be valid identation levels for the next line" |
15:47:47 | BitR | btw are you guys aware that type procs aren't found by nimsuggest? will add an issue later if not :) |
15:48:08 | reactormonk | BitR, if it's not in the repo, it's not an issue. |
15:48:44 | BitR | fair |
15:49:03 | * | zaquest quit (Read error: Connection reset by peer) |
15:49:42 | BitR | could just be an issue with the old nimsuggest in 0.11.2, as I haven't tested much on the devel on due to the path issues |
15:50:08 | BitR | anyways, will check later |
15:50:08 | reactormonk | pigmej, btw, do you know if it's possible to convert nim-call-epc into a sync call? |
15:50:18 | pigmej | no idea |
15:50:30 | pigmej | I have somewhere sync call version |
15:50:34 | pigmej | but ... probably in office ;-) |
15:51:56 | * | thepreacher quit (Remote host closed the connection) |
15:51:57 | * | yglukhov quit (Quit: Be back later ...) |
15:52:48 | reactormonk | BitR, https://github.com/nim-lang/nimsuggest/issues/9 ? |
15:52:54 | reactormonk | pigmej, get unison |
15:53:08 | * | zaquest joined #nim |
15:53:54 | pigmej | reactormonk: vpn :) |
15:54:07 | reactormonk | pigmej, works |
15:56:29 | * | kumul quit (Ping timeout: 246 seconds) |
15:58:56 | BitR | reactormonk: can't tell from the code, but the problem I've seen is the inability to get proc suggestions from custom types defined in the same .nim file |
15:59:20 | BitR | say you define a type and then further down in the nim file add a proc, where the first argument is of that type, then nimsuggest won't pick it up |
15:59:24 | pigmej | reactormonk: do we want to completion on '.' ? |
16:00:27 | reactormonk | pigmej, sure |
16:00:40 | reactormonk | BitR, hm. |
16:01:02 | BitR | I'll add it as an issue with full details later in case it's not the same issue |
16:03:03 | reactormonk | pigmej, https://github.com/nim-lang/nim-mode/pull/27 |
16:03:12 | reactormonk | could you test it? |
16:03:40 | pigmej | sure, I will just finish my cleanup :) |
16:04:15 | reactormonk | Araq, could you tell me how nim finds the stdlib? |
16:04:26 | reactormonk | Also, how I could test if I have the stdlib within the compiler |
16:05:19 | reactormonk | ah, options.libpath |
16:06:22 | * | thepreacher joined #nim |
16:06:38 | * | johnsoft quit (Ping timeout: 246 seconds) |
16:07:04 | * | johnsoft joined #nim |
16:11:32 | reactormonk | pigmej, from what I can read if you set lib:"/path/to/nim/lib" in nimsuggest.nim.cfg it should work |
16:12:24 | pigmej | reactormonk: isn't it done when nimble builds ? |
16:12:32 | reactormonk | pigmej, yes, but not afterwards |
16:12:52 | * | Miko_____ joined #nim |
16:13:55 | reactormonk | pigmej, Hint: used config file '/home/tass/dev/nim/nimsuggest/nimsuggest.nim.cfg' [Conf] |
16:14:10 | reactormonk | so nimble build needs to set lib there too |
16:16:53 | * | Miko___ quit (Ping timeout: 252 seconds) |
16:17:21 | ozra | reactormonk: pigmej - Sorry for repeating myself, but: Imo nim and nimsuggest _should_ find out their 'real path' and look for lib to use explictly in "../lib/". On the other hand _iff_ it's installed in unix style (which is not supported atm, but probably should be in unixy OSes): if it is in /usr/local/bin, it should find lib in /usr/local/lib/nim/, if it's in /usr/opt/bin/ it should look in /usr/opt/lib/nim/ .. and so on. |
16:17:49 | reactormonk | ozra, and windows? |
16:18:28 | pigmej | ozra: what when nimsuggest is installed from nimble? |
16:18:46 | reactormonk | ... which is the default for now |
16:18:54 | ozra | As I mentioned earlier, I don't know windows idiomatic pathing - there it should obviously follow that. Currently the first mentioned is the most important - looking in "../lib/" - since right now a nim can use completely wrong version libs.. |
16:19:42 | * | thepreacher quit () |
16:19:43 | ozra | pigmej: reactormonk: I was just considering what libs each binary should use, not how they end up where they are... |
16:20:19 | reactormonk | pigmej, I think the best way would be findExe("nim") and then find nim.nim.cfg and make sure the stdlib is annotated in there |
16:20:58 | * | kas joined #nim |
16:21:23 | HaCk3D | hmm, some strange behavior here |
16:21:48 | HaCk3D | readdir from posix.nim |
16:21:52 | HaCk3D | returns a Dirent |
16:22:00 | HaCk3D | with a type (int8) |
16:22:22 | HaCk3D | but as for dir symlinks, and file symlinks its 10 |
16:22:57 | HaCk3D | 10 = pcLinkToFile |
16:23:54 | reactormonk | HaCk3D, nim just warps readdir here, nothing special |
16:24:24 | * | victoroak joined #nim |
16:24:25 | reactormonk | pigmej, I think for that one we gotta poke Araq if we can have config/nim.cfg for nimsuggest |
16:24:41 | pigmej | reactormonk: three is already cfg |
16:24:44 | HaCk3D | reactormonk: i know, but why it returns a 10? |
16:24:52 | HaCk3D | both for a dir and file |
16:25:08 | reactormonk | HaCk3D, because a symlink is the same, no matter if it's a dir or a file |
16:25:10 | pigmej | reactormonk: https://github.com/nim-lang/nimsuggest/blob/master/nimsuggest.nim.cfg |
16:25:27 | dom96 | reactormonk: Didn't you see my message on github? |
16:25:36 | reactormonk | pigmej, yes, but how do we get the correct stdlib in there? I don't think we want the nimble compiler, we want the correc tone |
16:25:48 | reactormonk | dom96, yes, but it'll break as soon as someone starts moving stuff around |
16:26:06 | dom96 | reactormonk: and you think the compiler won't? |
16:26:25 | reactormonk | dom96, hm. How's the debian package structured? |
16:26:42 | dom96 | I dunno. |
16:26:47 | dom96 | You just need to cover the common cases. |
16:27:03 | reactormonk | debian/ubuntu is a common case |
16:27:12 | dom96 | Yes. |
16:27:20 | dom96 | You need to cover it. |
16:27:30 | dom96 | But moving the standard lib to god knows where is not a common case. |
16:28:00 | reactormonk | I'd prefer to just ask the nim compiler where the stdlib is via either config/nim.cfg or similar |
16:28:01 | dom96 | in any case |
16:28:03 | HaCk3D | I can make a workaround for the dir symlinks, but should I? |
16:28:05 | dom96 | i'm trying to fix it now |
16:28:16 | HaCk3D | already made* |
16:28:28 | reactormonk | HaCk3D, a symlink to a file is no different than a symlink to a dir. |
16:28:52 | reactormonk | dom96, oh right, it's done via symlinks. That's why the compiler follows symlinks to find the library path ;-) |
16:29:10 | HaCk3D | https://github.com/nim-lang/Nim/issues/1985 |
16:29:39 | HaCk3D | why not to make it return right? |
16:29:50 | HaCk3D | as pcLinkToDir |
16:30:04 | reactormonk | HaCk3D, the correct way is to ignore the symlink and just resolve the target file |
16:30:27 | reactormonk | not sure what should happen with a loop though |
16:31:31 | reactormonk | HaCk3D, I'd take find as how it should work |
16:31:51 | HaCk3D | if x.d_type == DT_LNK: |
16:31:51 | HaCk3D | if dirExists("./" & y): k = pcLinkToDir |
16:31:51 | HaCk3D | else: k = succ(k) |
16:31:51 | HaCk3D | yield (k, y) |
16:32:00 | HaCk3D | ive made this |
16:32:06 | HaCk3D | but is an awful |
16:32:14 | HaCk3D | way |
16:32:29 | reactormonk | HaCk3D, man find - check the three options. I'd ignore -H and resolve passed symlinks anyway. |
16:32:58 | reactormonk | for now a single optional boolean argument should do - make it by default NOT follow symlinks. |
16:33:57 | reactormonk | basically symlinkTransparent = false # default |
16:34:21 | HaCk3D | for the walkDir? |
16:34:24 | reactormonk | yup |
16:34:26 | HaCk3D | k |
16:34:34 | HaCk3D | ill try to do it later |
16:34:35 | HaCk3D | thnx |
16:34:42 | reactormonk | hope that helped |
16:35:04 | HaCk3D | but, what for the type return? |
16:35:15 | HaCk3D | should i stay it as it is? |
16:35:19 | HaCk3D | let* |
16:35:23 | reactormonk | Yup |
16:35:27 | HaCk3D | k :D |
16:35:52 | reactormonk | make sure it works on windows too, should be a bit easier there because they don't have symlinks to dirs IIRC |
16:36:25 | HaCk3D | btw, sry for my bad english |
16:36:33 | HaCk3D | i dont have a lot of experience |
16:36:50 | reactormonk | dom96, from what I see nimsuggest will need config/nim.cfg anyway for all the subpaths in stdlib? |
16:37:01 | reactormonk | HaCk3D, you get your point across, that's plenty |
16:37:18 | HaCk3D | oh, lol |
16:37:23 | HaCk3D | i dont understand :) |
16:37:34 | dom96 | reactormonk: yes, we need to make sure it finds that too. |
16:37:54 | reactormonk | dom96, do you know how to specify the $lib mentioned in there? |
16:38:06 | reactormonk | HaCk3D, you can make yourself understood. |
16:38:16 | dom96 | reactormonk: yes. |
16:38:27 | fowl | HaCk3D: you are speaking fine |
16:38:36 | HaCk3D | fowl: thnx |
16:38:36 | reactormonk | fowl, fuck, I'm too fancy. |
16:39:08 | HaCk3D | guys do u use an GUI irc? |
16:39:23 | HaCk3D | i wanna switch to the terminal one |
16:39:31 | fowl | I use Hexchat |
16:39:32 | HaCk3D | but cannot find any cute |
16:39:38 | Arrrr | weechat maybe |
16:39:56 | HaCk3D | a friend of mine uses it (weechat) |
16:40:04 | reactormonk | dom96, could you add some code that tests if the stdlib was found? For some better error messages. |
16:40:09 | HaCk3D | he says it not so good |
16:40:24 | Arrrr | Could be, for me is "good enough" |
16:40:28 | * | Jesin quit (Quit: Leaving) |
16:40:31 | dom96 | reactormonk: It already says "Error: cannot open 'c:\users\dominik\.nimble\pkgs\lib\system.nim'" |
16:41:27 | reactormonk | dom96, good enough. |
16:42:30 | * | HaCk3D left #nim (#nim) |
16:46:09 | pigmej | reactormonk: ok I cleaned my stuff now a bit, |
16:46:12 | pigmej | (finally) |
16:46:32 | reactormonk | pigmej, perfect |
16:48:26 | pigmej | so.. another pull request I suppose, then I cleanup ac things and then merge against master ? |
16:51:03 | reactormonk | sounds about right |
16:52:57 | * | fowl quit (Excess Flood) |
16:54:06 | * | HaCk3D joined #nim |
16:54:20 | HaCk3D | btw, last question |
16:54:40 | HaCk3D | if I want to delete all symlinks to files, what should i do? :) |
16:55:12 | * | fowl joined #nim |
16:56:31 | HaCk3D | for kind, path in walkDir("."): if kind == pcLinkToFile: #delete |
16:56:40 | HaCk3D | but this woudnt work |
16:56:45 | HaCk3D | coz of type |
16:56:57 | fowl | type? |
16:57:04 | HaCk3D | type of file |
16:57:07 | HaCk3D | in kind |
16:57:13 | HaCk3D | returned from iter |
16:57:37 | fowl | you can delete symlinks |
16:57:47 | HaCk3D | walkDir returns pcLinkToFile both from symlink file and dir |
16:58:12 | fowl | arent you fixing that |
16:58:18 | HaCk3D | ive alredy fixed |
16:58:21 | HaCk3D | but monk said |
16:58:27 | HaCk3D | that i sout levae it |
16:58:29 | HaCk3D | lol |
16:59:01 | HaCk3D | should leave* |
16:59:23 | HaCk3D | k then, ill send pull reauest |
16:59:33 | HaCk3D | and will see what Araq will say |
17:00:32 | pigmej | reactormonk: merge or rebase all in one? |
17:00:47 | reactormonk | pigmej, merge is usually clean enough |
17:01:17 | reactormonk | I rebase on pull, but if you're working on your feature branch, just merge it in |
17:02:09 | pigmej | hmm |
17:02:24 | pigmej | I probably finished (?) the epc branch |
17:02:41 | pigmej | there are still some things missing but no more need for epc branch |
17:03:32 | reactormonk | yup |
17:07:55 | pigmej | https://github.com/nim-lang/nim-mode/pull/28 |
17:07:56 | pigmej | :) |
17:09:40 | pigmej | brb |
17:22:14 | * | ddl_smurf quit (Quit: ddl_smurf) |
17:30:08 | HaCk3D | how should i commit fix for #1985 |
17:30:16 | HaCk3D | add a new branch? |
17:30:53 | * | Strikecarl joined #nim |
17:32:21 | reactormonk | HaCk3D, sure, business as usualy with PR. |
17:32:53 | reactormonk | HaCk3D, make a branch on your fork, push it to github (on your fork), make PR from github |
17:37:23 | reactormonk | Araq, https://github.com/nim-lang/Nim/pull/2851 needs more comment |
17:39:06 | HaCk3D | reactormonk: k, thnx |
17:43:18 | * | banister joined #nim |
17:43:21 | * | banister quit (Max SendQ exceeded) |
17:46:39 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:49:21 | * | Ven joined #nim |
17:50:13 | * | johnsoft quit (Ping timeout: 264 seconds) |
17:50:33 | * | johnsoft joined #nim |
17:52:00 | dom96 | reactormonk: update nimble, nimble uninstall compiler, nimble install nimsuggest |
17:52:14 | dom96 | Nimsuggest should now work |
17:53:32 | * | gokr_ joined #nim |
18:00:33 | * | banister joined #nim |
18:03:03 | * | ehaliewi` joined #nim |
18:04:04 | HaCk3D | done |
18:04:05 | HaCk3D | https://github.com/nim-lang/Nim/pull/2923 |
18:04:17 | BitR | dom96: Tried a clean install of nim, nimble (inside Docker, so nothing installed before then) and I get the normal library not found error: cannot open: lib/nim/system/inclrtl.nim |
18:04:27 | BitR | do you still need to move nimsuggest to the compiler's bin directory? |
18:04:43 | dom96 | BitR: nope |
18:04:45 | dom96 | Should work. |
18:05:16 | * | HaCk3D left #nim (#nim) |
18:05:26 | BitR | even after copying it next to the compiler I still get the lib error |
18:05:37 | dom96 | Where is your nim compiler? |
18:05:39 | BitR | I'm supposed to use nim-lang/nim#devel right? |
18:05:45 | BitR | inside /nim/bin |
18:05:45 | dom96 | yes |
18:06:04 | dom96 | and then you've added /nim/bin to your PATH right? |
18:06:22 | BitR | yep |
18:06:31 | * | gokr_ quit (Remote host closed the connection) |
18:06:46 | * | gokr_ joined #nim |
18:06:50 | dom96 | Can you compile things with Nim? |
18:07:00 | BitR | I can build my test file yes |
18:07:11 | BitR | built nimble with "nim c" as well |
18:07:37 | * | kumul joined #nim |
18:07:48 | dom96 | can you give me a paste of exactly what you've done? |
18:07:50 | dom96 | and the output? |
18:08:05 | BitR | Do you have docker? |
18:08:21 | reactormonk | dom96, how do I update nimble? nimble install nimble? |
18:08:37 | BitR | I built it all with this Dockerfile: https://gist.github.com/BitR/1ab859b62fd79d1c40a4 |
18:08:45 | dom96 | reactormonk: nimble install nimble@#head (this won't work on Windows though) |
18:09:16 | dom96 | BitR: On Windows currently. |
18:09:20 | dom96 | So, nope. |
18:09:36 | reactormonk | dom96, nimble install compiler && nimble install nimsuggest => nimsuggest.nim(329, 5) Error: undeclared identifier: 'gPrefixDir' |
18:10:25 | dom96 | reactormonk: why are you installing the dependency manually? |
18:10:29 | dom96 | Nimble should do that for you. |
18:10:35 | dom96 | But that shouldn't matter |
18:10:45 | onionhammer | hum |
18:10:54 | reactormonk | dom96, because I can't uninstall compiler, I hit install to get the newest dependency |
18:11:08 | dom96 | reactormonk: Why? |
18:11:21 | reactormonk | dom96, because nimble tells me about dependencies |
18:11:29 | dom96 | then uninstall the dependencies |
18:11:33 | * | filcuc_ joined #nim |
18:11:41 | * | filcuc quit (Read error: Connection reset by peer) |
18:11:48 | reactormonk | no cascade flag? |
18:11:55 | * | dalarmmst joined #nim |
18:12:17 | dom96 | no |
18:12:18 | * | kashyap_ quit (Quit: Page closed) |
18:12:28 | reactormonk | dom96, http://pastie.org/10240150 |
18:12:32 | * | HaCk3D joined #nim |
18:12:59 | dom96 | BitR: Don't install it. |
18:13:06 | onionhammer | hum, cant koch boot on windows w/ latest csources/etc |
18:13:16 | onionhammer | e:\development\github\nim\lib\pure\times.nim(445, 17) |
18:13:27 | dom96 | and don't copy nimsuggest anywhere |
18:14:07 | * | kumool joined #nim |
18:14:43 | dom96 | reactormonk: I dunno what happened there, but just remove c2nim, nimsuggest and the compiler packages manually |
18:15:35 | reactormonk | dom96, you sure you don't want an image of my .nimble and see what went wrong? |
18:15:57 | dom96 | reactormonk: You can archive it and send it to me if you want. |
18:16:30 | * | HaCk3D quit (Read error: Connection reset by peer) |
18:16:54 | BitR | dom96: Ok, so without installing it I still get the lib problem. Nim is in /nim/bin, nimsuggest in /root/.nimble/bin/nimsuggest |
18:17:31 | reactormonk | dom96, http://reactormonk.org/nimble.tar.gz |
18:17:37 | * | kumul quit (Ping timeout: 240 seconds) |
18:18:02 | * | filcuc_ quit (Remote host closed the connection) |
18:18:46 | reactormonk | dom96, successfully installed. |
18:18:51 | * | HaCk3D joined #nim |
18:19:10 | * | filcuc joined #nim |
18:19:39 | dom96 | reactormonk: It's hard for me to tell what happened. Have you removed c2nim manually? |
18:19:57 | HaCk3D | reactormonk, whats wrong with the commit? |
18:19:59 | reactormonk | dom96, nah, I just rm-rf'd .nimble |
18:20:07 | reactormonk | HaCk3D, check the commits to be merged |
18:20:13 | dom96 | reactormonk: I mean, before all this. |
18:20:38 | dom96 | reactormonk: It's either that, or you executed nimble uninstall c2nim, but somehow nimble didn't remove it from its reverse dependencies db. |
18:20:40 | HaCk3D | wtf |
18:20:44 | HaCk3D | 33 commits |
18:20:54 | HaCk3D | how to fix it? |
18:21:10 | reactormonk | see comment |
18:21:30 | dom96 | BitR: Can you try doing it outside of docker? |
18:21:38 | BitR | sure |
18:21:49 | reactormonk | dom96, got it? then I'll rm it |
18:21:59 | HaCk3D | what does cherry-pick means? |
18:22:15 | dom96 | reactormonk: yes, I got it. |
18:22:28 | dom96 | Like I said though, it doesn't help much. |
18:22:47 | reactormonk | ok |
18:22:56 | reactormonk | want command history too? |
18:23:12 | reactormonk | hmm, not too much in there |
18:23:28 | reactormonk | HaCk3D, google it, git got lots of documentation |
18:24:51 | dom96 | I would need a reproducible set of commands. |
18:25:13 | dom96 | If you can show me that when you install c2nim, then uninstall it that Nimble still thinks that it is installed then I will know that it's a bug. |
18:25:25 | dom96 | but anyway |
18:25:28 | dom96 | does nimsuggest work? |
18:26:09 | reactormonk | Error: unhandled exception: cannot open: lib/system/inclrtl.nim [IOError] |
18:26:11 | reactormonk | nope |
18:26:32 | reactormonk | Just touch /tmp/test.nim |
18:26:36 | reactormonk | nimsuggest /tmp/test.nim |
18:27:06 | dom96 | looks like a linux-specific error to me |
18:27:18 | dom96 | since it works for me on Windows |
18:28:07 | * | Arrrr quit (Ping timeout: 276 seconds) |
18:30:11 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:30:27 | reactormonk | Apparently the fix doesn't work as well :-/ |
18:32:09 | reactormonk | btw, what's the splitPath.head? What does that one do differently on windows/linux? |
18:33:17 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
18:33:23 | dom96 | shouldn't do anything different |
18:35:17 | taotetek | dom96: ended up getting stumped on making the calls I need from lexbase working in a macro, blah. hopefully figure it out eventually. |
18:37:17 | reactormonk | hm |
18:38:57 | HaCk3D | nice, i think i got it out |
18:39:12 | HaCk3D | ive pulled master branch instead of devel |
18:39:14 | HaCk3D | -_- |
18:39:56 | reactormonk | HaCk3D, :-) |
18:40:21 | reactormonk | dom96, any documentation on how to create tests? |
18:40:26 | HaCk3D | can i build smth 4 android with nim? |
18:40:49 | dom96 | reactormonk: tests for what? |
18:42:11 | reactormonk | dom96, the nim compiler |
18:42:20 | reactormonk | HaCk3D, as long as it runs c + glibc |
18:42:25 | dom96 | don't think so |
18:43:04 | dom96 | why did you reopen #6? |
18:43:10 | reactormonk | because it doesn't work. |
18:43:15 | reactormonk | ... on my machine. |
18:45:47 | reactormonk | dom96, could you sneak in an "echo(gPrefixDir)" somewhere in windows? |
18:46:46 | dom96 | what's your prefix dir? |
18:46:53 | reactormonk | /home/tass/dev/nim/nim |
18:46:55 | * | kas quit (Ping timeout: 255 seconds) |
18:47:05 | reactormonk | which is where my git repo for nim is. |
18:47:10 | dom96 | that sounds correct |
18:47:30 | dom96 | this seems like a different problem |
18:47:57 | HaCk3D | https://github.com/nim-lang/Nim/pull/2925 |
18:48:02 | HaCk3D | finally |
18:48:24 | * | afiskon joined #nim |
18:48:58 | dom96 | HaCk3D: nice! |
18:49:16 | afiskon | Hello. Could someone please explain me what is considered a nilable type in Nim? Onply ref's and pointers, or something else too? |
18:49:30 | reactormonk | afiskon, everything unless you annotate it with not nil |
18:49:41 | dom96 | not everything. |
18:49:46 | dom96 | Value types cannot be nil. |
18:49:58 | dom96 | so yes, only refs and pointers. |
18:50:19 | reactormonk | How about seqs? |
18:50:38 | afiskon | I know that strings could be nil too. |
18:51:03 | reactormonk | dom96, just checking, did it not work for you beforehand? |
18:51:24 | dom96 | reactormonk: nimsuggest? it didn't |
18:51:29 | reactormonk | kk |
18:51:31 | dom96 | I just reproduced this issue on Linux |
18:52:29 | * | kas joined #nim |
18:52:59 | reactormonk | can confirm, it's correct path for nim. |
18:53:06 | reactormonk | Apparently a different issue, yup. |
18:54:26 | * | yglukhov joined #nim |
18:55:02 | HaCk3D | only Araq can pull? |
18:55:04 | * | Quickerz joined #nim |
18:55:21 | HaCk3D | dom96, thnx btw :D |
18:55:29 | HaCk3D | my first pull reqest here |
18:55:51 | dom96 | not just Araq |
18:56:37 | * | Quickerz quit (Client Quit) |
18:57:14 | * | Arrrr joined #nim |
18:59:32 | pigmej | reactormonk: so what are "our" next steps ? |
19:00:36 | reactormonk | pigmej, fix #6 |
19:00:46 | reactormonk | I gotta go for a few hours though :-/ |
19:01:03 | reactormonk | but I can tell you that gPrefixDir gets set correctly |
19:01:05 | pigmej | reactormonk: have fun I suppose ;-) |
19:01:59 | dom96 | i'm trying to fix it |
19:02:03 | reactormonk | ok |
19:02:46 | reactormonk | pigmej, I think auto-indentation is slightly borked - there's a few issues about it |
19:03:02 | * | afiskon quit (Ping timeout: 276 seconds) |
19:03:30 | * | afiskon joined #nim |
19:05:51 | * | Matthias247 joined #nim |
19:08:32 | BitR | dom96: Alright, finally got it tested outside of docker, still get the same issue as inside docker |
19:09:22 | BitR | nimsuggest can't find the standard library |
19:09:23 | dom96 | BitR: Thanks for testing. I just reproduced it too :) |
19:09:30 | BitR | cool beans |
19:16:43 | HaCk3D | when my pull request can be added? aprox |
19:18:07 | dom96 | HaCk3D: why so impatient? |
19:18:17 | * | ehaliewi` quit (Ping timeout: 240 seconds) |
19:20:19 | HaCk3D | dom96, hah, sry |
19:20:32 | HaCk3D | just wanna see it on the devel branch |
19:20:37 | HaCk3D | k, will w8 |
19:21:26 | dom96 | BitR: try it now |
19:25:22 | dom96 | HaCk3D: Merged :) |
19:27:31 | HaCk3D | wooow :) |
19:27:32 | HaCk3D | nice |
19:27:33 | HaCk3D | thnx |
19:28:32 | * | landgraf quit (Ping timeout: 244 seconds) |
19:29:59 | dom96 | bbl |
19:30:06 | HaCk3D | how can i help more? |
19:30:21 | dom96 | https://github.com/nim-lang/Nim/issues |
19:30:27 | dom96 | https://github.com/nim-lang/Nim/labels/Easy |
19:30:33 | dom96 | bbl |
19:31:49 | HaCk3D | why "kill nim i" isnt closed? |
19:32:03 | HaCk3D | i think repl should stay in nim |
19:32:12 | HaCk3D | its pretty awsome |
19:32:17 | HaCk3D | and useful |
19:35:32 | fowl | Its not that useful |
19:35:39 | afiskon | noone dares to kill REPL! |
19:36:52 | * | eratron joined #nim |
19:37:21 | BitR | dom96: it runs! |
19:37:35 | BitR | even while installed from nimble, without moving it |
19:41:16 | * | eratron left #nim ("WeeChat 1.1.1") |
19:56:10 | * | afiskon quit (Quit: Leaving) |
19:59:21 | vikaton | im not quite sure how to use c2nim :/ |
19:59:28 | * | Mat4 joined #nim |
19:59:48 | vikaton | for instance, using c2nim on this: https://github.com/xurdm/Etherpad |
20:00:35 | Mat4 | hello, have someone here tried functional programming in Nim ? |
20:01:55 | * | gokr_ quit (Read error: Connection reset by peer) |
20:05:13 | HaCk3D | Mat4 yeah |
20:05:25 | HaCk3D | a lot of procs are in sequtils |
20:05:37 | HaCk3D | map/each are built-in |
20:06:28 | * | yglukhov quit (Quit: Be back later ...) |
20:09:34 | dom96 | BitR: great :) |
20:10:15 | dom96 | vikaton: read this? http://nim-lang.org/docs/c2nim.html |
20:11:56 | Mat4 | I've found out recursions does not work for generic parameters |
20:12:37 | Mat4 | if I declare some functions for each type instead it works |
20:16:37 | Mat4 | as long as I name the functions different: |
20:17:05 | Mat4 | proc berannAsmFill (bundle : tCodeBundle, slots : tBaseImm): tCodeBundle = |
20:17:05 | Mat4 | if slots > 0: result = berannAsmFill (bundle shr 4, slots - 1) |
20:17:05 | Mat4 | else: result = bundle shr 4 |
20:17:05 | Mat4 | |
20:17:05 | Mat4 | >>proc berannAsmFill (bundle : tDataBundle, slots : tBaseImm): tDataBundle = |
20:17:08 | Mat4 | if slots > 0: result = berannAsmFill (bundle shr 4, slots - 1) |
20:17:10 | Mat4 | else: result = bundle shr 4 |
20:17:41 | Mat4 | << redefinition of 'berannAsmFill' |
20:18:34 | HaCk3D | u can use new type such as |
20:19:02 | HaCk3D | type: Bundle |
20:19:03 | HaCk3D | tCodeBundle or tDataBundle |
20:19:34 | HaCk3D | this should work |
20:20:31 | * | Arrrr quit (Quit: WeeChat 1.2) |
20:20:41 | HaCk3D | type Bundle = (tCodeBundle or tDataBundle) |
20:20:55 | HaCk3D | this is correct i think |
20:21:11 | HaCk3D | bb all |
20:21:14 | * | HaCk3D left #nim (#nim) |
20:22:35 | Mat4 | thnaks, I try it |
20:22:39 | Mat4 | thanks |
20:24:43 | Mat4 | anyhow; Is this a bug or a feature ? |
20:26:13 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
20:28:55 | Mat4 | HaCk3D's change lead to following error: type mismatch: got (tCodeBundle or tDataBundle) but expected 'tCodeBundle or tDataBundle' |
20:29:07 | Mat4 | whatever this means |
20:33:24 | Araq | Mat4: report it properly please |
20:41:26 | Mat4 | sorry, where should report it again ? |
20:44:56 | Araq | https://github.com/nim-lang |
20:46:28 | * | jszymanski quit (Quit: computer sleeps...) |
20:56:58 | * | kas quit (Ping timeout: 255 seconds) |
20:59:25 | * | perturbation joined #nim |
21:04:35 | * | filcuc quit (Ping timeout: 265 seconds) |
21:07:05 | ozra | This has come up some times now, the natural way for me to name files are the same as identifiers and urls - dashes: "the-magic-types.nim". This is not allowed by nim!? |
21:08:05 | Heartmender | apparently not |
21:08:29 | Heartmender | underscores aren't that much of a shift IMO |
21:08:55 | vikaton | still dont exaclt know how |
21:09:00 | vikaton | we need a video tutorial |
21:09:29 | ozra | I'll add on my todo to PR... |
21:17:12 | Mat4 | Araq: done |
21:19:45 | Araq | ozra: I fixed the subInt64 regression but it still fails with: |
21:19:56 | Araq | times.nim(445, 17) Error: number 116444736000000000'i64 out of valid range |
21:20:00 | Araq | how come? |
21:21:06 | ozra | I don't know - it's in parseRawInt. It counts up till it passes 32 bit, then it fails, even though it accumulates on a BiggestInt var. |
21:21:41 | ozra | It's on 32bit machine, right? (So it's not a new/different thing) |
21:22:19 | ozra | And the var reports low/high to be 64 bit range. |
21:22:26 | ozra | when echo'ing... |
21:23:06 | ozra | so ruddy mysterious :-/ |
21:36:48 | Mat4 | interesting. I stumbled upon the same problem when programming in Vala last week. The GLib dependent 'ulong' type is declared with 64 bit depth but can only hold 32 bit values |
21:37:10 | * | victoroak quit (Ping timeout: 252 seconds) |
21:38:17 | Araq | Vala is still a thing? interesting. |
21:41:03 | Mat4 | Most of the GUI for Elementary OS is written in Vala as I know for example |
21:41:24 | Mat4 | and there exist some projects which uses Vala as alternative for C# |
21:42:02 | Mat4 | and Net (in my opinion the main reason for choosing this programming language) |
21:42:15 | ozra | Kind of heavy basing it all off of GObjs though... |
21:42:57 | ozra | But of c. that is the point of Vala, so... |
21:51:59 | * | fowl quit (Excess Flood) |
21:53:42 | * | fowl joined #nim |
21:55:26 | * | Kingsquee joined #nim |
21:58:00 | * | perturbation quit (Quit: Leaving) |
22:06:05 | * | Miko_____ quit (Ping timeout: 246 seconds) |
22:07:09 | * | askatasuna left #nim ("WeeChat 1.2") |
22:09:08 | * | Mat4 quit (Quit: Verlassend) |
22:14:31 | Araq | ugh, this sucks |
22:14:53 | Araq | getting it to work is not hard |
22:15:36 | Araq | but we like that 0.11.2 can continue to build devel |
22:16:09 | ozra | Araq: Did you figure out the mystery? |
22:16:24 | Araq | sure |
22:16:46 | * | dsadsad joined #nim |
22:17:04 | ozra | neat - I hit a brick wall once I came to that spot where the var magically seemed something else :-/ What was it, if it's quick to explain? |
22:17:27 | Araq | the compiler generates mulInt instead of mulInt64 |
22:17:38 | ozra | Aha, it was that trail. |
22:17:46 | Araq | and this is nasty to fix since system.nim now defines it wrongly |
22:18:03 | Araq | wrong for the old version of the compiler that is |
22:18:11 | ozra | Scheisse :-/ |
22:18:18 | dom96 | Is it seriously that important? |
22:18:31 | dom96 | We're still pre-1.0, worrying about this stuff is unproductive. |
22:18:40 | ozra | on 32bit plats.. |
22:18:51 | Araq | dom96: I don't like to rebuild the C sources |
22:19:04 | ozra | dom96: You're right.. Some bumps in the road are expected... |
22:19:18 | Araq | 0.11.2 needs to be able to build 0.11.4. |
22:19:24 | dsadsad | reactormonk : so hows is it going with units of measures? |
22:19:45 | dsadsad | the new f# version just got even more powerfull with it, you can now do stuff like: [<Measure>] type Jones = cm Hz^(1/2) / W |
22:20:09 | Araq | dsadsad: yup, I'm aware. F# kicks ass. :-) |
22:20:23 | dsadsad | indeed, somewhat of a pragmatic haskell |
22:20:32 | dsadsad | or ocaml whatever |
22:20:39 | dsadsad | im really impressed with it |
22:20:46 | Araq | Ocaml's influence is much greater |
22:21:42 | dsadsad | indeed, its nice to be able to use the .net or c# object stuff if you really need to |
22:21:52 | dsadsad | while being functional first |
22:22:02 | * | Trustable quit (Remote host closed the connection) |
22:22:47 | dsadsad | the Type providers are crazy nice for type safe sql with 100% autogenerated types from existing SQL database |
22:23:48 | Araq | dsadsad: tell OnO about it ;-) he still thinks the database model should be generated from Nim's type definitions |
22:23:57 | dsadsad | lol |
22:31:37 | dsadsad | I think F# is probably going to increase in popularity with it going 100% open source as well as .net, plus with xamarin for native GUI look on android/ios/windows phone |
22:31:58 | dsadsad | i hope it can eat Scala's meal |
22:40:45 | * | brson joined #nim |
22:42:03 | * | Demos joined #nim |
22:49:09 | * | NimBot joined #nim |
22:51:10 | * | Jehan` joined #nim |
22:52:20 | flaviu | Can't the database model be generated from Nim's type definitions? |
22:52:31 | flaviu | I mean, it doesn't seem hard to implement... |
22:54:37 | * | Demos joined #nim |
22:55:26 | Jehan` | It should also be possible to generate both types and database schemas from a DSL. |
22:55:56 | Jehan` | I tend to think that plain old code generation as a metaprogramming technique is fairly undervalued. |
22:55:57 | * | boop is now known as boopisaway |
22:56:19 | * | boopisaway is now known as boop |
22:56:44 | ozra | Jehan`: flaviu +1 on that |
22:57:08 | flaviu | ozra: I said it was possible, not that I approve of it :) |
22:57:38 | flaviu | I've been using an ORM at work, and I still think that it would be better to just manually do the SQL. |
22:57:50 | ozra | I build db's + types like that in LS in iojs. works like a charm - so why not? |
22:57:53 | Jehan` | I suspect it may have lost its appeal because it's difficult to integrate with some IDE-based approaches. |
22:58:48 | ozra | flaviu: dsl'ish obj confs.. that is |
23:01:15 | Araq | ozra: why not? because it doesn't work when you already have a database and lots of data for the model |
23:02:08 | Jehan` | In that case, I'd do it the opposite way? Extract the schema from the database and generate types from that? |
23:02:17 | ozra | Araq: Ah, that was another thing. I used these dsl defs as source for building both the types and the db... |
23:02:59 | Araq | also data tends to live longer than applications so it's wiser to build applications around the data model rather than "generating" a shitty data model from the application's needs |
23:03:01 | ozra | Jehan`: yeah. which ever exists first.. |
23:03:38 | Araq | Jehan`: yeah, that's what my personal ORM would do |
23:04:05 | ozra | Araq: that was the point of generating all from one uniform def: change of lang? No prob: re-generate. |
23:05:05 | Araq | "uniform def"? does that mean "create table + create index" instructions? if so, why not simply use SQL? |
23:05:42 | Jehan` | Araq: SQL representation may be lossy. |
23:06:28 | ozra | because they created data types too, and basic ui-setups. It sounds crazy. But holy shit it was efficient an simple to slap up new functionality for customers. Yihaa. Less testing, less repetition, less risk of errors. |
23:08:12 | Jehan` | Being able to generate code pretty easily with Nim plus some build tools is actually something I like about the language. The only annoyance is the indentation-based syntax, which can make things a bit more tedious at times than I like. |
23:09:21 | flaviu | Jehan`: Nothing a good library can't fix :) |
23:09:23 | ozra | Jehan`: what about the indent syn. - when generating code by strings? |
23:09:38 | Araq | Jehan`: I liked to have #! braces or #! lisp parsing modes for that |
23:10:08 | Jehan` | flaviu: Well, I do have a small library for it, but sometimes it can still get a bit fiddly. |
23:10:15 | Jehan` | Araq: Heh. :) |
23:10:29 | flaviu | Araq: How about an out-of-tree preprocessor? |
23:10:36 | ozra | Looove options, hehe :) |
23:10:46 | Jehan` | I'd still like to be able to understand the generated code. :) |
23:12:46 | Jehan` | Raw AST dumps, aka Lisp syntax, isn't really my thing. :) |
23:12:52 | * | kumool quit (Ping timeout: 255 seconds) |
23:16:47 | Araq | you can get used to it :P |
23:17:21 | Araq | the generated C code was not indented properly for quite some time |
23:17:34 | Araq | well it still isn't in some cases |
23:21:44 | * | renesac joined #nim |
23:22:55 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:28:23 | Araq | Jehan`: btw I *still* like to read a proposal from you of how to improve shared state and threading ;-) |
23:29:11 | Jehan` | Araq: Heh. Okay, I guess I won't get around doing an actual full write-up for it. :) |
23:29:12 | vikaton | Araq: did FP make u smarter ? |
23:29:43 | Araq | vikaton: IQ tests made me smarter |
23:30:01 | vikaton | is that a no |
23:31:23 | vikaton | Araq: sometimes I don't understand your deep answers and it demoralizes me :( |
23:31:37 | Araq | lol yeah, "deep" answers |
23:33:16 | flaviu | vikaton: Well, I was a plebeian coding in Java like everyone else. But then I discovered The Functional Programming and I've gotten at least 5x smarter. |
23:34:24 | vikaton | flaviu: w0w, thats cool |
23:34:47 | vikaton | Araq, all your answers have some sort of moral to them |
23:34:55 | vikaton | deep deep inside the, |
23:34:57 | vikaton | them* |
23:34:59 | * | vikaton deeeeep |
23:37:53 | Jehan` | Oh, I love this quote; I hadn't known it: "Concurrent programs wait faster" -- Hoare |
23:44:16 | * | Jehan` quit (Quit: Leaving) |
23:49:02 | * | Jesin joined #nim |
23:49:48 | * | Demon_Fox joined #nim |
23:57:28 | vikaton | heh |
23:57:52 | * | brson quit (Quit: leaving) |