<< 16-02-2019 >>

00:07:00*stefanos82 quit (Remote host closed the connection)
00:07:11Araq(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:12FromDiscord_<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:13FromDiscord_<exelotl> currently if I use --os:standalone --gc:regions I get "Error: system module needs: echoBinSafe"
00:13:34FromDiscord_<exelotl> so I can't really test whether the unicode tables are optimised away in that case
00:14:57FromDiscord_<Generic> why doesn't the unicode table end up in cartridge ROM?
00:15:14FromDiscord_<Generic> afaik it goes up to 32 MB
00:16:06FromDiscord_<Generic> I mean it would be still better if would just disappear if not actually used
00:16:31FromDiscord_<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:12FromDiscord_<exelotl> (that is, when I try to use something other than gc:none which would allow me to import the unicode module)
00:23:03FromDiscord_<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:59FromDiscord_<Generic> hm, I find it quite fascinating how Nim scales for so many platforms
00:26:02FromDiscord_<Generic> though that also means that there are quite a lot of voices to be heard
00:26:13Araqwell if you use --os:standalone we don't know how to implement 'echo', that's kinda fair
00:26:54FromDiscord_<exelotl> yeah but I never called echo, this happens for an empty program
00:27:25*krux02 quit (Ping timeout: 250 seconds)
00:28:50FromDiscord_<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:16Araqmaybe --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:57Jessica2432http://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:25smitopWhy doesn't `
02:09:25smitopvar textureNum: GLuint = 0
02:09:25smitopglGenTexture(1, addr textureNum)
02:09:25smitop` 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:44FromGitter<Varriount> smitop: Perhaps another part of the program is erroring?
08:24:04*Vladar joined #nim
08:30:32AraqloadExtensions() missing?
08:40:15*zyklon joined #nim
08:40:19zyklono/
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:24Araq\o
09:09:15FromGitter<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:51Araqtcompilerapi is the name of the test iirc
09:15:43FromGitter<mratsim> ah it's to interpret/compile other nim files. you cannot cross the NimNode-->PNode boundary it seems.
09:25:51FromGitter<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:33Araqit 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:37FromGitter<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:10enowanybody got some documentations on hwo to use flow variables
10:20:44leorizethe Flow[T] from threadpool?
10:24:01enowyeah
10:24:21leorizehttp://nim-lang.github.io/Nim/threadpool
10:24:29leorizeevery possible operation can be found there
10:25:33FromGitter<mratsim> also: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L39-L50
10:26:23FromGitter<mratsim> and if you want to use raw threads directly: https://github.com/yglukhov/nimx/blob/master/nimx/private/worker_queue.nim
10:28:24enowis it possible / meaningful to implement your own flowvar utilizinginterfaces
10:28:49enowsay 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:57FromGitter<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:13FromGitter<mratsim> I'm not sure what you mean by accessing another process.
11:12:31FromGitter<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:53FromGitter<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:23FromGitter<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:45FromGitter<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:47FromGitter<kaushalmodi> I am hearing about "sink T" a lot
14:47:52FromGitter<kaushalmodi> what is it?
14:48:24FromGitter<kaushalmodi> Is that a CS concept, pointers to where I can learn the prereqs?
14:48:27FromGitter<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:41leorizearnetheduck, 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:03FromDiscord<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:15FromDiscord<treeform> Using vcc
17:03:56FromDiscord<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:57FromDiscord<exelotl> could you do it with --passC:"my option" ?
17:06:03FromDiscord<treeform> hmm it looks liked --opt:speed helped
17:08:19FromDiscord<treeform> hmm I did --passC:O2 that was slow
17:08:37FromDiscord<treeform> I think its the nim stack traces and bounds checks that are making the code slow
17:08:40FromDiscord<treeform> not the generated C
17:08:48FromDiscord<treeform> --opt:speed might be turning them off?
17:09:04FromDiscord<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:44leorizetreeform: couldn't you just -d:release --stacktrace:on?
17:17:50leorizesee --fullhelp for more flags
17:18:20leorize@treeform (in case discord bot don't understand IRC pings)
17:22:11*Tyresc joined #nim
17:22:34FromDiscord<exelotl> haha it's actually @treeform
17:34:01FromDiscord<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:34stefantalpalaruHi. Is it possible to pass arbitrary arguments to .nims scripts? Besides the task name, in something like: "nim task_name script.nims".
18:00:38stefantalpalaruI see paramStr() and paramCount() here: https://nim-lang.org/docs/nimscript.html
18:09:49*rnrwashere joined #nim
18:10:22stefantalpalaruThose 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:38stefantalpalaruAnother 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:08stefantalpalaru"-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:03kobi7hi guys, what am I doing wrong here? https://gist.github.com/kobi2187/a6f8886ebac291648f685fcaf215c6b8
20:15:27leorizekobi7: so what's the problem?
20:16:11kobi7when I run it, I get Error: unhandled exception: index 0 not in 0 .. -1 [IndexError]
20:17:01kobi7in line that has readbytes
20:18:06leorizeyou haven't allocated your seq yet
20:19:04leorizealso, 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:12leorizekobi7: newSeq[byte] filesize + 1
20:20:20*zachk joined #nim
20:20:20leorize^ 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:40kobi7thank you leorize !
20:23:47*zachk joined #nim
20:24:06kobi7I thought seq grows on its own
20:24:23leorizeyes, only if the code excepts seq
20:24:30kobi7wasn't @[] enough?
20:24:34leorizethe proc you were using expected an array
20:25:01kobi7expected var openarray
20:25:01leorizea pre-allocated one
20:25:12leorizeyea, those aren't seq
20:25:18leorizeseq just happen to fit there
20:25:31kobi7oh, i thought it was the interface, that both seq and array fulfill
20:26:00leorizeyea, it was
20:26:11kobi7btw, 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:28leorizebecause 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:07kobi7hmm 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:45kobi7the error msg was not very good. i couldn't figure out myself how to do it, and there were no examples.
20:29:05kobi7maybe it's standard practice for c/c++ guys
20:29:17kobi7I just come from a different background
20:29:46*zachk quit (Max SendQ exceeded)
20:29:58leorizethe best way to get the hang of these is to just read the source
20:30:04leorizethey aren't too complicated
20:30:09leorizebut 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:01kobi7thanks for the help leorize, it really did help me progress further, so thanks again
20:37:06kobi7see 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