00:07:00 | * | stefanos82 quit (Remote host closed the connection) |
00:07:11 | Araq | (btw I don't mind helper programs that generate code, can be easier to maintain. And sometimes Nim's VM is just too slow) |
00:12:12 | FromDiscord_ | <exelotl> yeah in the end I think this is not a bad approach, by going through C I get finer control over how the data is stored (e.g. mark it as const so that it goes into the .rodata section of the elf) and can easily get pointers to it |
00:13:13 | FromDiscord_ | <exelotl> currently if I use --os:standalone --gc:regions I get "Error: system module needs: echoBinSafe" |
00:13:34 | FromDiscord_ | <exelotl> so I can't really test whether the unicode tables are optimised away in that case |
00:14:57 | FromDiscord_ | <Generic> why doesn't the unicode table end up in cartridge ROM? |
00:15:14 | FromDiscord_ | <Generic> afaik it goes up to 32 MB |
00:16:06 | FromDiscord_ | <Generic> I mean it would be still better if would just disappear if not actually used |
00:16:31 | FromDiscord_ | <exelotl> that's never really been a problem because I can't import the unicode module anyway. It's more that the system module generates a lot of runtime type info that I don't want. |
00:20:12 | FromDiscord_ | <exelotl> (that is, when I try to use something other than gc:none which would allow me to import the unicode module) |
00:23:03 | FromDiscord_ | <exelotl> but yeah it's not a big problem because I'm getting by fine with gc:none, I just wanted to voice my concern that whatever replaces it needs to be equally light when it comes to runtime stuff generated when building the system module. |
00:24:47 | * | krux02_ joined #nim |
00:24:59 | FromDiscord_ | <Generic> hm, I find it quite fascinating how Nim scales for so many platforms |
00:26:02 | FromDiscord_ | <Generic> though that also means that there are quite a lot of voices to be heard |
00:26:13 | Araq | well if you use --os:standalone we don't know how to implement 'echo', that's kinda fair |
00:26:54 | FromDiscord_ | <exelotl> yeah but I never called echo, this happens for an empty program |
00:27:25 | * | krux02 quit (Ping timeout: 250 seconds) |
00:28:50 | FromDiscord_ | <Generic> fail faster, imho it's better than the C approach, e.g. an unresolved function prototype only yields an error if it's called |
00:32:16 | Araq | maybe --gc:regions uses echo :P |
00:40:16 | * | rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
00:42:08 | * | rockcavera joined #nim |
00:46:31 | * | kapil____ quit (Quit: Connection closed for inactivity) |
00:56:14 | * | zachk quit (Quit: Leaving) |
01:04:34 | * | ng0 quit (Remote host closed the connection) |
01:05:37 | * | ng0 joined #nim |
01:21:25 | * | ryukoposting quit (Quit: WeeChat 1.6) |
01:26:13 | * | Cthalupa quit (Ping timeout: 246 seconds) |
01:27:59 | * | Cthalupa joined #nim |
01:36:01 | * | rnrwashere quit (Remote host closed the connection) |
01:36:41 | * | rnrwashere joined #nim |
01:41:27 | * | rnrwashere quit (Ping timeout: 268 seconds) |
01:52:21 | * | abm quit (Ping timeout: 246 seconds) |
01:52:55 | * | Jessica2432 joined #nim |
01:52:57 | Jessica2432 | http://www.urlbeat.net/AcQV4 |
01:53:01 | * | Jessica2432 quit (Client Quit) |
01:57:33 | * | vlad1777d quit (Remote host closed the connection) |
02:00:04 | * | vlad1777d joined #nim |
02:02:41 | * | rnrwashere joined #nim |
02:04:39 | * | rnrwashere quit (Remote host closed the connection) |
02:06:56 | * | smitop joined #nim |
02:09:25 | smitop | Why doesn't ` |
02:09:25 | smitop | var textureNum: GLuint = 0 |
02:09:25 | smitop | glGenTexture(1, addr textureNum) |
02:09:25 | smitop | ` work? I get a "Illegal storage access" error |
02:12:28 | * | fanta7531 quit (Quit: fanta7531) |
02:16:35 | * | Ven`` joined #nim |
02:19:36 | * | vlad1777d quit (Remote host closed the connection) |
02:23:28 | * | Ven`` quit (Ping timeout: 268 seconds) |
02:24:15 | * | vlad1777d joined #nim |
02:38:06 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
02:39:18 | * | shpx joined #nim |
03:02:29 | * | banc quit (Quit: Bye) |
03:07:16 | * | rnrwashere joined #nim |
03:12:55 | * | Jesin quit (Quit: Leaving) |
03:19:02 | * | oculux quit (Read error: Connection reset by peer) |
03:19:11 | * | Jesin joined #nim |
03:19:59 | * | oculux joined #nim |
03:23:15 | * | banc joined #nim |
03:24:56 | * | shpx quit (Quit: shpx) |
03:28:50 | * | shpx joined #nim |
03:30:10 | * | shpx quit (Client Quit) |
03:41:56 | * | shpx joined #nim |
03:46:18 | * | dddddd quit (Remote host closed the connection) |
04:01:19 | * | rnrwashere quit (Remote host closed the connection) |
04:22:59 | * | rnrwashere joined #nim |
04:38:26 | * | shpx quit (Ping timeout: 268 seconds) |
04:41:13 | * | ptdel quit (Remote host closed the connection) |
05:16:31 | * | smitop quit (Quit: Connection closed for inactivity) |
05:37:35 | * | Snircle_ joined #nim |
05:38:15 | * | ikan-keli_2 joined #nim |
05:38:35 | * | FromDiscord joined #nim |
05:38:44 | * | bobby joined #nim |
05:39:22 | * | kaliy quit (Ping timeout: 250 seconds) |
05:39:39 | * | ng0 quit (Ping timeout: 256 seconds) |
05:39:48 | * | dorelix quit (Ping timeout: 258 seconds) |
05:40:52 | * | mr_yogurt_ joined #nim |
05:41:03 | * | zama_ joined #nim |
05:41:09 | * | Cthalupa quit (Ping timeout: 255 seconds) |
05:41:09 | * | banc quit (Ping timeout: 255 seconds) |
05:41:10 | * | Jesin quit (Ping timeout: 255 seconds) |
05:41:18 | * | mr_yogurt quit (Ping timeout: 246 seconds) |
05:41:19 | * | ikan-keli_ quit (Ping timeout: 246 seconds) |
05:41:19 | * | so quit (Ping timeout: 246 seconds) |
05:41:19 | * | zama quit (Ping timeout: 246 seconds) |
05:41:20 | * | FromDiscord_ quit (Ping timeout: 246 seconds) |
05:41:20 | * | Snircle quit (Ping timeout: 246 seconds) |
05:41:20 | * | Bob- quit (Ping timeout: 246 seconds) |
05:42:20 | * | banc joined #nim |
05:43:30 | * | so joined #nim |
05:43:39 | * | kaliy joined #nim |
05:48:05 | * | Cthalupa joined #nim |
05:48:49 | * | dorelix joined #nim |
05:50:12 | * | zama_ quit (Changing host) |
05:50:13 | * | zama_ joined #nim |
05:50:15 | * | zama_ is now known as zama |
05:51:09 | * | Jesin joined #nim |
05:52:57 | * | ng0 joined #nim |
06:01:18 | * | abeaumont quit (Ping timeout: 245 seconds) |
06:01:31 | * | abeaumont joined #nim |
06:15:00 | * | nsf joined #nim |
06:49:20 | * | narimiran joined #nim |
07:01:35 | * | nsf quit (Quit: WeeChat 2.3) |
07:09:26 | * | Trustable joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:58 | * | Cthalupa quit (Ping timeout: 250 seconds) |
08:05:01 | * | gmpreussner joined #nim |
08:06:45 | * | Cthalupa joined #nim |
08:22:44 | FromGitter | <Varriount> smitop: Perhaps another part of the program is erroring? |
08:24:04 | * | Vladar joined #nim |
08:30:32 | Araq | loadExtensions() missing? |
08:40:15 | * | zyklon joined #nim |
08:40:19 | zyklon | o/ |
08:44:57 | * | rnrwashere quit (Remote host closed the connection) |
08:50:24 | * | oprypin joined #nim |
08:55:39 | * | cyraxjoe quit (Read error: Connection reset by peer) |
08:56:47 | * | cyraxjoe joined #nim |
09:02:24 | Araq | \o |
09:09:15 | FromGitter | <mratsim> How do you use the compiler as a library? I need hash tables and hash sets functionality on ref object (representing my custom AST) at compile-time (and also at run-time but I can cast to pointer here). It seems like everything is in compiler/ast and compiler/astalgo. |
09:12:51 | Araq | tcompilerapi is the name of the test iirc |
09:15:43 | FromGitter | <mratsim> ah it's to interpret/compile other nim files. you cannot cross the NimNode-->PNode boundary it seems. |
09:25:51 | FromGitter | <mratsim> looking into mEqRef magic, seems like rkNodeAddress would give me a unique Id for ref objects in the VM. |
09:41:18 | * | vlad1777d quit (Ping timeout: 268 seconds) |
09:41:33 | Araq | it seemed possible to unify NimNode and PNode the last time I thought about it but I don't remember the details and it seems very dangerous |
09:51:37 | FromGitter | <mratsim> Opened a RFCs, I think this would be enough: https://github.com/nim-lang/RFCs/issues/131 |
09:58:13 | * | Senketsu quit (Quit: WeeChat 2.3) |
09:58:28 | * | lritter joined #nim |
09:59:33 | * | Senketsu joined #nim |
10:20:10 | enow | anybody got some documentations on hwo to use flow variables |
10:20:44 | leorize | the Flow[T] from threadpool? |
10:24:01 | enow | yeah |
10:24:21 | leorize | http://nim-lang.github.io/Nim/threadpool |
10:24:29 | leorize | every possible operation can be found there |
10:25:33 | FromGitter | <mratsim> also: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L39-L50 |
10:26:23 | FromGitter | <mratsim> and if you want to use raw threads directly: https://github.com/yglukhov/nimx/blob/master/nimx/private/worker_queue.nim |
10:28:24 | enow | is it possible / meaningful to implement your own flowvar utilizinginterfaces |
10:28:49 | enow | say if I have a time consuming CPU based process and I want to have the other end of the code access it as if it where standard IO |
10:35:48 | * | aguspiza joined #nim |
10:47:34 | * | Serenitor joined #nim |
10:52:22 | * | rnrwashere joined #nim |
10:55:28 | * | fanta7531 joined #nim |
10:56:04 | * | Trustable quit (Remote host closed the connection) |
10:56:51 | * | rnrwashere quit (Ping timeout: 250 seconds) |
10:59:06 | * | nsf joined #nim |
11:05:40 | * | stefanos82 joined #nim |
11:09:27 | * | Serenitor quit (Quit: Leaving) |
11:10:57 | FromGitter | <mratsim> there are no interfaces but you can implement them yourself, you can check Nim implementation as reference: https://github.com/nim-lang/Nim/blob/master/lib/pure/concurrency/threadpool.nim#L96 |
11:12:13 | FromGitter | <mratsim> I'm not sure what you mean by accessing another process. |
11:12:31 | FromGitter | <mratsim> You need some kind of inter process communication like Sockets |
11:12:57 | * | Vladar quit (Remote host closed the connection) |
11:13:21 | * | Vladar joined #nim |
11:14:53 | FromGitter | <mratsim> if by process you mean threads, you can also use shared memory parallelism, by sending a pointer to a memory, or use Nim channels to communicate through messages |
11:16:23 | FromGitter | <mratsim> also if your task is not CPU-intensive but IO intensive (network, read/write from disk), async is more suited for this. |
11:19:35 | * | fanta7531 quit (Quit: fanta7531) |
11:59:10 | * | quipa joined #nim |
12:06:15 | * | quipa quit (Ping timeout: 246 seconds) |
12:16:31 | * | quipa joined #nim |
12:18:12 | * | neceve joined #nim |
12:21:12 | * | Cthalupa quit (Ping timeout: 255 seconds) |
12:22:21 | * | aguspiza quit (Ping timeout: 246 seconds) |
12:23:45 | * | Cthalupa joined #nim |
12:33:57 | * | dddddd joined #nim |
12:34:45 | * | kungtotte joined #nim |
12:39:57 | * | krux02_ quit (Remote host closed the connection) |
12:45:33 | * | smitop joined #nim |
13:28:03 | * | quipa_ joined #nim |
13:28:39 | * | quipa quit (Read error: Connection reset by peer) |
13:29:29 | * | vlad1777d joined #nim |
13:35:37 | * | quipa_ quit (Ping timeout: 246 seconds) |
13:44:45 | FromGitter | <arnetheduck> what's the best place to read up on `sink T`? |
14:02:57 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
14:22:19 | * | abm joined #nim |
14:23:05 | * | abm quit (Client Quit) |
14:25:14 | * | vlad1777d quit (Remote host closed the connection) |
14:26:46 | * | vlad1777d joined #nim |
14:32:08 | * | Cthalupa quit (Ping timeout: 255 seconds) |
14:34:30 | * | Cthalupa joined #nim |
14:44:43 | * | sealmove joined #nim |
14:47:47 | FromGitter | <kaushalmodi> I am hearing about "sink T" a lot |
14:47:52 | FromGitter | <kaushalmodi> what is it? |
14:48:24 | FromGitter | <kaushalmodi> Is that a CS concept, pointers to where I can learn the prereqs? |
14:48:27 | FromGitter | <kaushalmodi> just curious |
14:50:36 | * | narimiran quit (Ping timeout: 255 seconds) |
14:50:47 | * | narimiran joined #nim |
14:55:24 | * | natrys joined #nim |
15:26:51 | * | azuri5 joined #nim |
15:34:42 | * | natrys quit (Ping timeout: 255 seconds) |
15:39:18 | * | natrys joined #nim |
15:39:25 | * | natrys quit (Client Quit) |
15:48:34 | * | nsf quit (Quit: WeeChat 2.3) |
15:58:05 | * | vlad1777d quit (Ping timeout: 268 seconds) |
16:14:41 | leorize | arnetheduck, kaushalmodi: https://github.com/nim-lang/Nim/wiki/Destructors#sink-parameters |
16:15:15 | * | aguspiza joined #nim |
16:38:42 | * | avanderneut joined #nim |
16:38:47 | * | Cthalupa quit (Ping timeout: 268 seconds) |
16:40:48 | * | Cthalupa joined #nim |
16:52:43 | * | smitop quit (Quit: Connection closed for inactivity) |
17:01:03 | FromDiscord | <treeform> Is it possible to compile tell the C compiler to compile in release mode, while keeping nim not in release mode (so that asserts and stack traces still work)? |
17:01:15 | FromDiscord | <treeform> Using vcc |
17:03:56 | FromDiscord | <treeform> Basically my code is slow when not in release mode, but its hard to develop in release mode because no stack traces. |
17:04:57 | FromDiscord | <exelotl> could you do it with --passC:"my option" ? |
17:06:03 | FromDiscord | <treeform> hmm it looks liked --opt:speed helped |
17:08:19 | FromDiscord | <treeform> hmm I did --passC:O2 that was slow |
17:08:37 | FromDiscord | <treeform> I think its the nim stack traces and bounds checks that are making the code slow |
17:08:40 | FromDiscord | <treeform> not the generated C |
17:08:48 | FromDiscord | <treeform> --opt:speed might be turning them off? |
17:09:04 | FromDiscord | <treeform> just like -d:release |
17:11:35 | * | noeontheend joined #nim |
17:14:58 | * | natrys joined #nim |
17:17:28 | * | neceve quit (Ping timeout: 259 seconds) |
17:17:44 | leorize | treeform: couldn't you just -d:release --stacktrace:on? |
17:17:50 | leorize | see --fullhelp for more flags |
17:18:20 | leorize | @treeform (in case discord bot don't understand IRC pings) |
17:22:11 | * | Tyresc joined #nim |
17:22:34 | FromDiscord | <exelotl> haha it's actually @treeform |
17:34:01 | FromDiscord | <treeform> Ha, I'll try it! |
17:37:45 | * | nsf joined #nim |
17:43:05 | * | fanta7531 joined #nim |
17:55:40 | * | stefantalpalaru joined #nim |
17:55:50 | * | nsf quit (Quit: WeeChat 2.3) |
17:57:55 | * | fanta7531 is now known as fanta7531|away |
17:58:34 | stefantalpalaru | Hi. Is it possible to pass arbitrary arguments to .nims scripts? Besides the task name, in something like: "nim task_name script.nims". |
18:00:38 | stefantalpalaru | I see paramStr() and paramCount() here: https://nim-lang.org/docs/nimscript.html |
18:09:49 | * | rnrwashere joined #nim |
18:10:22 | stefantalpalaru | Those work, but '-r' needs to be the first param, the task name the second and all others need to be valid compiler arguments: "nim -r task_name -d:foo=bar script.nims" - now paramStr(3) is "-d:foo=bar" |
18:42:38 | stefantalpalaru | Another problem is that those parameters also apply to the compiler. |
18:43:09 | * | lritter quit (Ping timeout: 246 seconds) |
18:55:50 | * | noeontheend quit (Ping timeout: 255 seconds) |
18:57:08 | stefantalpalaru | "-r" is not actually required - just a misleading error message from params not understood by the compiler |
19:04:57 | * | natrys quit (Quit: natrys) |
19:10:32 | * | fanta7531|away quit (Quit: fanta7531|away) |
19:54:15 | * | leorize quit (Ping timeout: 252 seconds) |
19:54:36 | * | leorize joined #nim |
20:00:30 | * | zachk joined #nim |
20:07:22 | * | fanta7531 joined #nim |
20:07:54 | * | fanta7531 quit (Client Quit) |
20:07:57 | * | kobi7 joined #nim |
20:11:03 | kobi7 | hi guys, what am I doing wrong here? https://gist.github.com/kobi2187/a6f8886ebac291648f685fcaf215c6b8 |
20:15:27 | leorize | kobi7: so what's the problem? |
20:16:11 | kobi7 | when I run it, I get Error: unhandled exception: index 0 not in 0 .. -1 [IndexError] |
20:17:01 | kobi7 | in line that has readbytes |
20:18:06 | leorize | you haven't allocated your seq yet |
20:19:04 | leorize | also, this code will fail for empty file, so please watch out for that |
20:19:50 | * | noeontheend joined #nim |
20:19:52 | * | zachk quit (Read error: Connection reset by peer) |
20:20:05 | * | rnrwashere quit (Remote host closed the connection) |
20:20:12 | leorize | kobi7: newSeq[byte] filesize + 1 |
20:20:20 | * | zachk joined #nim |
20:20:20 | leorize | ^ use that to initialize the seq and everything should work |
20:20:41 | * | rnrwashere joined #nim |
20:23:22 | * | zachk quit (Read error: Connection reset by peer) |
20:23:24 | * | rnrwashere quit (Remote host closed the connection) |
20:23:37 | * | rnrwashere joined #nim |
20:23:40 | kobi7 | thank you leorize ! |
20:23:47 | * | zachk joined #nim |
20:24:06 | kobi7 | I thought seq grows on its own |
20:24:23 | leorize | yes, only if the code excepts seq |
20:24:30 | kobi7 | wasn't @[] enough? |
20:24:34 | leorize | the proc you were using expected an array |
20:25:01 | kobi7 | expected var openarray |
20:25:01 | leorize | a pre-allocated one |
20:25:12 | leorize | yea, those aren't seq |
20:25:18 | leorize | seq just happen to fit there |
20:25:31 | kobi7 | oh, i thought it was the interface, that both seq and array fulfill |
20:26:00 | leorize | yea, it was |
20:26:11 | kobi7 | btw, why filesize +1 ? and yes, i know I hadn't handled exceptions, it was simplified to make the point |
20:26:22 | * | zachk quit (Read error: Connection reset by peer) |
20:26:28 | leorize | because it'll crash for empty file :P |
20:26:48 | * | enow quit (Remote host closed the connection) |
20:26:49 | * | zachk joined #nim |
20:26:58 | * | zachk quit (Changing host) |
20:26:58 | * | zachk joined #nim |
20:27:52 | * | zachk quit (Read error: Connection reset by peer) |
20:28:07 | kobi7 | hmm I think it should just return the empty array/seq, as that's what the file had if it was empty |
20:28:19 | * | zachk joined #nim |
20:28:42 | * | zachk quit (Changing host) |
20:28:42 | * | zachk joined #nim |
20:28:45 | kobi7 | the error msg was not very good. i couldn't figure out myself how to do it, and there were no examples. |
20:29:05 | kobi7 | maybe it's standard practice for c/c++ guys |
20:29:17 | kobi7 | I just come from a different background |
20:29:46 | * | zachk quit (Max SendQ exceeded) |
20:29:58 | leorize | the best way to get the hang of these is to just read the source |
20:30:04 | leorize | they aren't too complicated |
20:30:09 | leorize | but yea, the docs should be improved |
20:30:21 | * | zachk joined #nim |
20:31:46 | * | zachk quit (Max SendQ exceeded) |
20:32:21 | * | zachk joined #nim |
20:33:22 | * | zachk quit (Remote host closed the connection) |
20:34:09 | * | zachk joined #nim |
20:34:52 | * | zachk quit (Read error: Connection reset by peer) |
20:35:22 | * | zachk joined #nim |
20:36:22 | * | zachk quit (Remote host closed the connection) |
20:36:55 | * | zachk joined #nim |
20:37:01 | kobi7 | thanks for the help leorize, it really did help me progress further, so thanks again |
20:37:06 | kobi7 | see you for now, |
20:37:18 | * | kobi7 quit (Quit: Leaving) |
20:37:52 | * | zachk quit (Read error: Connection reset by peer) |
20:44:09 | * | stefantalpalaru quit (Quit: stefantalpalaru) |
20:45:55 | * | rockcavera quit (Remote host closed the connection) |
20:57:05 | * | rnrwashere quit (Remote host closed the connection) |
20:58:51 | * | rnrwashere joined #nim |
21:25:06 | * | narimiran quit (Ping timeout: 258 seconds) |
21:44:03 | * | fanta7531 joined #nim |
22:00:23 | * | stefanos82 quit (Remote host closed the connection) |
22:05:52 | * | Vladar quit (Remote host closed the connection) |
22:38:08 | * | dorelix quit (Ping timeout: 250 seconds) |
22:48:54 | * | fanta7531 quit (Quit: fanta7531) |
22:48:55 | * | dorelix joined #nim |
22:59:34 | * | arecaceae joined #nim |
22:59:53 | * | azuri5 quit (Read error: Connection reset by peer) |
23:13:54 | * | NimBot joined #nim |
23:20:41 | * | Senketsu quit (Quit: WeeChat 2.3) |
23:20:57 | * | Senketsu joined #nim |
23:24:29 | * | aguspiza quit (Ping timeout: 244 seconds) |
23:26:51 | * | Senketsu quit (Quit: WeeChat 2.3) |
23:34:41 | * | Senketsu joined #nim |
23:43:58 | * | Senketsu quit (Quit: WeeChat 2.3) |
23:44:16 | * | Senketsu joined #nim |
23:44:56 | * | Senketsu quit (Client Quit) |
23:50:13 | * | Senketsu joined #nim |