00:04:37 | * | CcxWrk joined #nim |
00:10:24 | * | yglukhov joined #nim |
00:14:54 | * | yglukhov quit (Ping timeout: 252 seconds) |
00:19:12 | * | CcxWrk quit (Ping timeout: 260 seconds) |
00:20:26 | * | CcxWrk joined #nim |
00:38:50 | * | fredrik92 quit (Quit: Client disconnecting) |
01:00:48 | * | dmi0 joined #nim |
01:01:36 | dmi0 | hello, is there a way to complie nim code from within a nim proc? can somebody point out the documentation available |
01:07:43 | * | krux02 quit (Remote host closed the connection) |
01:18:11 | * | HakanD joined #nim |
01:18:28 | * | ent1 quit (Read error: Connection reset by peer) |
01:18:39 | * | enthus1ast quit (Read error: Connection reset by peer) |
01:22:52 | * | HakanD quit (Ping timeout: 258 seconds) |
01:27:17 | * | chemist69 joined #nim |
01:30:54 | * | chemist69_ quit (Ping timeout: 268 seconds) |
02:12:00 | * | yglukhov joined #nim |
02:12:49 | * | Demon_Fox quit (Quit: Leaving) |
02:16:24 | * | yglukhov quit (Ping timeout: 250 seconds) |
02:19:05 | * | HakanD joined #nim |
02:22:31 | * | brson quit (Quit: leaving) |
02:22:53 | * | rusua joined #nim |
02:24:05 | * | HakanD quit (Ping timeout: 248 seconds) |
02:24:52 | * | pregressive quit (Remote host closed the connection) |
02:25:27 | * | pregressive joined #nim |
02:30:02 | * | pregressive quit (Ping timeout: 258 seconds) |
03:21:05 | * | HakanD joined #nim |
03:25:36 | * | HakanD quit (Ping timeout: 268 seconds) |
03:39:00 | * | kulelu88 quit (Quit: Leaving) |
04:07:26 | * | MyMind joined #nim |
04:13:26 | * | yglukhov joined #nim |
04:14:27 | ftsf_ | dmi0, i don't know how but i suspect it is possible since nim is written in nim, i guess you can import the compiler somehow |
04:19:15 | * | yglukhov quit (Ping timeout: 268 seconds) |
04:21:53 | * | HakanD joined #nim |
04:26:29 | * | HakanD quit (Ping timeout: 258 seconds) |
04:34:50 | * | xet7 quit (Quit: Leaving) |
05:00:47 | * | PMunch quit (Quit: leaving) |
05:22:36 | * | HakanD joined #nim |
05:23:03 | * | gokr joined #nim |
05:27:04 | * | HakanD quit (Ping timeout: 250 seconds) |
05:27:07 | * | ARCADIVS quit (Quit: ARCADIVS) |
05:28:37 | * | JeffCanJam4a20 joined #nim |
05:33:08 | * | chemist69 quit (Ping timeout: 250 seconds) |
05:37:22 | * | chemist69 joined #nim |
05:49:41 | * | jh32 joined #nim |
06:11:28 | * | JeffCanJam4a20 quit (Quit: soundcloud.com/wacastle <-- me) |
06:13:51 | * | yaiyan is now known as Yaiyan |
06:16:15 | * | yglukhov joined #nim |
06:20:39 | * | yglukhov quit (Ping timeout: 252 seconds) |
06:21:00 | * | HakanD joined #nim |
06:30:48 | * | nsf joined #nim |
06:34:35 | * | HakanD quit (Quit: Be back later ...) |
06:35:08 | * | HakanD joined #nim |
06:39:32 | * | HakanD quit (Ping timeout: 260 seconds) |
06:52:26 | * | MyMind quit (Ping timeout: 250 seconds) |
06:52:35 | * | HakanD joined #nim |
06:57:15 | * | Trustable joined #nim |
07:02:49 | * | ftsf_ quit (Quit: :q!) |
07:12:05 | * | vqrs quit (Ping timeout: 258 seconds) |
07:13:44 | * | vqrs joined #nim |
07:43:33 | * | desophos quit (Read error: Connection reset by peer) |
07:43:37 | flyx | dmi0: it would be far easier to just call the `nim` command in a shell from within your nim code. |
07:46:02 | gokr | Araq: Here? |
07:46:18 | * | Andris_zbx joined #nim |
07:52:53 | * | brechtm joined #nim |
07:53:33 | * | bjz joined #nim |
07:58:52 | FromGitter | <dom96> You won't be able to import the compiler at compile-time. What flyx suggested is the only way: staticExec("nim c file.nim") |
07:59:46 | flyx | dom96: well to be fair, he didn't ask about compile time. |
08:00:20 | FromGitter | <dom96> oh, I misread. |
08:06:15 | Araq | dmi0: you can import compiler/nimeval.nim |
08:06:24 | * | so joined #nim |
08:06:28 | Araq | which contains proc execute*(program: string) |
08:06:52 | Araq | for more flexible stuff, you need to dig into the compiler's API, nimble does the same thing |
08:07:01 | Araq | so read nimble's source code for good examples |
08:09:11 | * | yglukhov joined #nim |
08:15:29 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:16:39 | * | HakanD_ joined #nim |
08:20:00 | * | HakanD quit (Ping timeout: 252 seconds) |
08:20:00 | * | HakanD_ quit (Read error: Connection reset by peer) |
08:26:10 | * | HakanD_ joined #nim |
08:27:02 | * | filcuc joined #nim |
08:29:23 | * | lg_ joined #nim |
08:31:00 | * | brechtm_ joined #nim |
08:31:52 | * | bjz joined #nim |
08:34:16 | * | brechtm quit (Ping timeout: 250 seconds) |
08:35:33 | * | brechtm_ quit (Ping timeout: 260 seconds) |
08:52:42 | cheatfate | Araq, why people so angry and rape your compiler in so perverted ways https://github.com/nim-lang/Nim/issues/4891? |
08:54:19 | cheatfate | i thought variables could not be initialized with block statement |
08:55:17 | Araq | cheatfate: looks rather simple to fix though :-) |
08:56:10 | cheatfate | Araq, so it this legal? |
08:56:26 | cheatfate | it = is |
08:57:46 | Araq | why wouldn't it? |
08:58:35 | cheatfate | The block statement is a means to group statements to a (named) block. Inside the block, the break statement is allowed to leave the block immediately. A break statement can contain a name of a surrounding block to specify which block is to leave. |
08:59:13 | cheatfate | what value will be assigned to variable if `break` happens inside of block |
08:59:25 | cheatfate | ? |
09:01:00 | * | yglukhov_ joined #nim |
09:02:21 | * | Gonzih quit (Quit: WeeChat 1.5) |
09:04:05 | * | Gonzih joined #nim |
09:04:08 | * | Gonzih quit (Client Quit) |
09:04:29 | * | yglukhov quit (Ping timeout: 258 seconds) |
09:04:40 | * | Gonzih joined #nim |
09:07:11 | * | HakanD_ quit (Quit: Be back later ...) |
09:07:38 | Araq | the default value? |
09:07:43 | * | yglukhov_ quit (Remote host closed the connection) |
09:07:46 | * | HakanD_ joined #nim |
09:12:36 | cheatfate | Araq, it looks like hardly undocumented feature |
09:12:47 | * | HakanD_ quit (Ping timeout: 268 seconds) |
09:16:59 | * | so quit (*.net *.split) |
09:17:00 | * | corecode quit (*.net *.split) |
09:17:00 | * | Arcanum_za quit (*.net *.split) |
09:17:00 | * | huonw quit (*.net *.split) |
09:17:00 | * | filcuc quit (*.net *.split) |
09:17:01 | * | bjz quit (*.net *.split) |
09:17:01 | * | jh32 quit (*.net *.split) |
09:17:01 | * | lyro quit (*.net *.split) |
09:17:01 | * | nim-buildbot_ quit (*.net *.split) |
09:17:01 | * | kunev_ quit (*.net *.split) |
09:17:01 | * | Sentreen quit (*.net *.split) |
09:17:02 | * | ZMatt2 quit (*.net *.split) |
09:17:02 | * | lenstr quit (*.net *.split) |
09:17:02 | * | jackv quit (*.net *.split) |
09:17:03 | * | Andris_zbx quit (*.net *.split) |
09:17:03 | * | chemist69 quit (*.net *.split) |
09:17:03 | * | gokr quit (*.net *.split) |
09:17:03 | * | rusua quit (*.net *.split) |
09:17:03 | * | zielmicha[m] quit (*.net *.split) |
09:17:03 | * | TheManiac quit (*.net *.split) |
09:17:03 | * | FromGitter quit (*.net *.split) |
09:17:03 | * | daekano quit (*.net *.split) |
09:17:03 | * | der quit (*.net *.split) |
09:17:03 | * | cyraxjoe quit (*.net *.split) |
09:17:03 | * | gangstacat quit (*.net *.split) |
09:17:03 | * | NhanH quit (*.net *.split) |
09:17:03 | * | BratwurstMitSenf quit (*.net *.split) |
09:17:03 | * | FuntDobra quit (*.net *.split) |
09:17:04 | * | zielmicha_ quit (*.net *.split) |
09:17:04 | * | zxtx quit (*.net *.split) |
09:17:04 | * | gsingh93 quit (*.net *.split) |
09:17:04 | * | Sembei quit (*.net *.split) |
09:17:05 | * | jtremback__ quit (*.net *.split) |
09:17:05 | * | SunDwarf quit (*.net *.split) |
09:17:05 | * | tstm1 quit (*.net *.split) |
09:17:05 | * | avsej quit (*.net *.split) |
09:17:05 | * | Amun_Ra quit (*.net *.split) |
09:17:05 | * | Amrykid quit (*.net *.split) |
09:17:06 | * | dmi0 quit (*.net *.split) |
09:17:06 | * | hohlerde quit (*.net *.split) |
09:17:06 | * | cheatfate quit (*.net *.split) |
09:17:06 | * | Jesin quit (*.net *.split) |
09:17:06 | * | Yaiyan quit (*.net *.split) |
09:17:07 | * | regtools quit (*.net *.split) |
09:17:07 | * | qwertfisch quit (*.net *.split) |
09:17:07 | * | astocko quit (*.net *.split) |
09:17:07 | * | reactormonk quit (*.net *.split) |
09:17:08 | * | r4vi quit (*.net *.split) |
09:17:08 | * | EastByte_ quit (*.net *.split) |
09:17:08 | * | boop quit (*.net *.split) |
09:17:08 | * | dyce quit (*.net *.split) |
09:17:08 | * | jivank quit (*.net *.split) |
09:17:08 | * | joebo quit (*.net *.split) |
09:17:08 | * | michael_campbell quit (*.net *.split) |
09:17:08 | * | Trustable quit (*.net *.split) |
09:17:08 | * | CcxWrk quit (*.net *.split) |
09:17:09 | * | zidane_g_ quit (*.net *.split) |
09:17:09 | * | rektide quit (*.net *.split) |
09:17:09 | * | mal`` quit (*.net *.split) |
09:17:09 | * | literal quit (*.net *.split) |
09:17:09 | * | aedigix quit (*.net *.split) |
09:17:09 | * | niv quit (*.net *.split) |
09:17:10 | * | JStoker quit (*.net *.split) |
09:17:10 | * | nicanaca0 quit (*.net *.split) |
09:17:10 | * | kier quit (*.net *.split) |
09:17:10 | * | RushPL quit (*.net *.split) |
09:17:10 | * | Xe quit (*.net *.split) |
09:17:10 | * | fold4 quit (*.net *.split) |
09:19:49 | * | dyce joined #nim |
09:20:37 | * | jonafato quit (Ping timeout: 260 seconds) |
09:39:28 | * | r4vi joined #nim |
09:39:40 | * | zidane_g_ joined #nim |
09:44:18 | * | chemist69 joined #nim |
10:03:02 | * | bjz joined #nim |
10:06:58 | * | filcuc joined #nim |
10:07:54 | * | Arrrr joined #nim |
10:07:54 | * | NhanH joined #nim |
10:07:54 | * | qwertfisch joined #nim |
10:07:54 | * | Sembei joined #nim |
10:07:54 | * | Trustable joined #nim |
10:07:54 | * | CcxWrk joined #nim |
10:07:54 | * | rektide joined #nim |
10:07:54 | * | mal`` joined #nim |
10:07:54 | * | literal joined #nim |
10:07:54 | * | aedigix joined #nim |
10:07:54 | * | niv joined #nim |
10:07:54 | * | JStoker joined #nim |
10:07:54 | * | nicanaca0 joined #nim |
10:07:54 | * | kier joined #nim |
10:07:54 | * | RushPL joined #nim |
10:07:54 | * | fold4 joined #nim |
10:09:03 | * | so joined #nim |
10:09:39 | * | Xe joined #nim |
10:09:40 | * | dmi0 joined #nim |
10:09:40 | * | hohlerde joined #nim |
10:09:40 | * | Jesin joined #nim |
10:09:40 | * | Yaiyan joined #nim |
10:09:40 | * | regtools joined #nim |
10:09:40 | * | astocko joined #nim |
10:09:40 | * | reactormonk joined #nim |
10:09:40 | * | EastByte_ joined #nim |
10:09:40 | * | boop joined #nim |
10:09:40 | * | joebo joined #nim |
10:09:40 | * | jivank joined #nim |
10:09:40 | * | michael_campbell joined #nim |
10:10:04 | * | corecode joined #nim |
10:10:04 | * | Arcanum_za joined #nim |
10:10:04 | * | huonw joined #nim |
10:10:21 | * | corecode quit (*.net *.split) |
10:10:21 | * | Arcanum_za quit (*.net *.split) |
10:10:21 | * | huonw quit (*.net *.split) |
10:10:22 | * | Xe quit (*.net *.split) |
10:10:22 | * | dmi0 quit (*.net *.split) |
10:10:22 | * | hohlerde quit (*.net *.split) |
10:10:22 | * | Jesin quit (*.net *.split) |
10:10:23 | * | Yaiyan quit (*.net *.split) |
10:10:23 | * | regtools quit (*.net *.split) |
10:10:23 | * | astocko quit (*.net *.split) |
10:10:23 | * | reactormonk quit (*.net *.split) |
10:10:24 | * | EastByte_ quit (*.net *.split) |
10:10:24 | * | boop quit (*.net *.split) |
10:10:24 | * | jivank quit (*.net *.split) |
10:10:24 | * | joebo quit (*.net *.split) |
10:10:24 | * | michael_campbell quit (*.net *.split) |
10:10:24 | * | so quit (*.net *.split) |
10:10:24 | * | Arrrr quit (*.net *.split) |
10:10:24 | * | NhanH quit (*.net *.split) |
10:10:24 | * | qwertfisch quit (*.net *.split) |
10:10:25 | * | Sembei quit (*.net *.split) |
10:10:25 | * | Trustable quit (*.net *.split) |
10:10:25 | * | CcxWrk quit (*.net *.split) |
10:10:25 | * | rektide quit (*.net *.split) |
10:10:25 | * | mal`` quit (*.net *.split) |
10:10:26 | * | literal quit (*.net *.split) |
10:10:26 | * | aedigix quit (*.net *.split) |
10:10:26 | * | niv quit (*.net *.split) |
10:10:26 | * | JStoker quit (*.net *.split) |
10:10:26 | * | nicanaca0 quit (*.net *.split) |
10:10:26 | * | kier quit (*.net *.split) |
10:10:26 | * | RushPL quit (*.net *.split) |
10:10:27 | * | fold4 quit (*.net *.split) |
10:10:27 | * | filcuc quit (*.net *.split) |
10:12:20 | * | zidane_g_ quit (Ping timeout: 258 seconds) |
10:13:51 | * | Xe- joined #nim |
10:22:17 | * | yglukhov joined #nim |
10:26:36 | * | so joined #nim |
10:26:56 | * | NhanH joined #nim |
10:26:56 | * | zidane_g_ joined #nim |
10:26:56 | * | Arrrr joined #nim |
10:26:56 | * | qwertfisch joined #nim |
10:26:56 | * | Sembei joined #nim |
10:26:56 | * | Trustable joined #nim |
10:26:56 | * | CcxWrk joined #nim |
10:26:56 | * | rektide joined #nim |
10:26:56 | * | mal`` joined #nim |
10:26:56 | * | literal joined #nim |
10:26:56 | * | aedigix joined #nim |
10:26:56 | * | niv joined #nim |
10:26:56 | * | JStoker joined #nim |
10:26:56 | * | nicanaca0 joined #nim |
10:26:56 | * | kier joined #nim |
10:26:56 | * | RushPL joined #nim |
10:26:56 | * | fold4 joined #nim |
10:27:09 | * | corecode joined #nim |
10:27:09 | * | Arcanum_za joined #nim |
10:27:09 | * | huonw joined #nim |
10:27:16 | * | filcuc joined #nim |
10:27:19 | * | zidane_g_ quit (Max SendQ exceeded) |
10:27:50 | * | dmi0 joined #nim |
10:27:50 | * | hohlerde joined #nim |
10:27:50 | * | Jesin joined #nim |
10:27:50 | * | Yaiyan joined #nim |
10:27:50 | * | regtools joined #nim |
10:27:50 | * | astocko joined #nim |
10:27:50 | * | reactormonk joined #nim |
10:27:50 | * | EastByte_ joined #nim |
10:27:50 | * | boop joined #nim |
10:27:50 | * | joebo joined #nim |
10:27:50 | * | jivank joined #nim |
10:27:50 | * | michael_campbell joined #nim |
10:28:05 | * | MyMind joined #nim |
10:28:05 | * | jonafato joined #nim |
10:28:05 | * | jh32 joined #nim |
10:28:05 | * | lyro joined #nim |
10:28:05 | * | kunev_ joined #nim |
10:28:05 | * | Sentreen joined #nim |
10:28:05 | * | ZMatt2 joined #nim |
10:28:05 | * | lenstr joined #nim |
10:28:05 | * | jackv joined #nim |
10:28:25 | * | pafmaf joined #nim |
10:28:25 | * | HakanD_ joined #nim |
10:28:25 | * | Andris_zbx joined #nim |
10:28:25 | * | gokr joined #nim |
10:28:25 | * | rusua joined #nim |
10:28:25 | * | zielmicha[m] joined #nim |
10:28:25 | * | TheManiac joined #nim |
10:28:25 | * | FromGitter joined #nim |
10:28:25 | * | daekano joined #nim |
10:28:25 | * | der joined #nim |
10:28:25 | * | cyraxjoe joined #nim |
10:28:25 | * | BratwurstMitSenf joined #nim |
10:28:25 | * | FuntDobra joined #nim |
10:28:25 | * | zielmicha_ joined #nim |
10:28:25 | * | zxtx joined #nim |
10:28:25 | * | gsingh93 joined #nim |
10:28:25 | * | jtremback__ joined #nim |
10:28:25 | * | SunDwarf joined #nim |
10:28:25 | * | tstm1 joined #nim |
10:28:25 | * | avsej joined #nim |
10:28:25 | * | Amun_Ra joined #nim |
10:28:25 | * | Amrykid joined #nim |
10:28:38 | * | ZMatt2 quit (Max SendQ exceeded) |
10:28:39 | * | MyMind quit (Max SendQ exceeded) |
10:29:26 | * | Xe- quit (Changing host) |
10:29:26 | * | Xe- joined #nim |
10:30:06 | * | MyMind joined #nim |
10:31:02 | * | NhanH quit (Ping timeout: 258 seconds) |
10:31:56 | * | jh32 quit (Ping timeout: 260 seconds) |
10:32:35 | * | rusua quit (Ping timeout: 257 seconds) |
10:32:37 | * | Sembei is now known as Guest6880 |
10:32:50 | * | fredrik92 joined #nim |
10:32:50 | * | cheatfate joined #nim |
10:32:51 | * | ZMatt2 joined #nim |
10:33:03 | * | gangstacat joined #nim |
10:33:14 | * | brechtm joined #nim |
10:34:44 | * | zidane_g_ joined #nim |
10:34:59 | * | Gonzih quit (Quit: WeeChat 1.6) |
10:35:10 | * | r4vi quit (Changing host) |
10:35:10 | * | r4vi joined #nim |
10:35:39 | * | qwertfisch quit (Changing host) |
10:35:40 | * | qwertfisch joined #nim |
10:37:41 | * | zidane_g_ quit (Changing host) |
10:37:41 | * | zidane_g_ joined #nim |
10:41:17 | * | Xe- is now known as Xe |
10:41:58 | * | Arrrr quit (Quit: WeeChat 1.5) |
10:42:53 | * | MyMind is now known as Guest84069 |
10:47:29 | * | rusua joined #nim |
10:48:05 | * | dmi0 quit (Ping timeout: 260 seconds) |
10:53:45 | * | NhanH joined #nim |
10:57:20 | * | elrood joined #nim |
11:02:01 | * | Snircle joined #nim |
11:02:18 | * | Gonzih joined #nim |
11:10:43 | * | HakanD__ joined #nim |
11:14:36 | * | HakanD_ quit (Ping timeout: 250 seconds) |
11:17:54 | * | Demon_Fox joined #nim |
11:24:56 | * | enthus1ast joined #nim |
11:31:03 | * | arnetheduck joined #nim |
11:57:31 | * | brechtm_ joined #nim |
12:00:32 | * | brechtm quit (Ping timeout: 250 seconds) |
12:02:13 | * | yglukhov_ joined #nim |
12:05:48 | * | yglukhov quit (Ping timeout: 258 seconds) |
12:11:05 | * | enthus1ast quit (Ping timeout: 258 seconds) |
12:13:11 | * | enthus1ast joined #nim |
12:13:12 | FromGitter | <BontaVlad> Hi everybody. How can I read the last 26 bytes from a binary file stream, in Python I would do fs.seek(-26). |
12:16:08 | flyx | BontaVlad: setFilePos(f, getFileSize(f) - 26) |
12:16:43 | flyx | BontaVlad: or directly readBytes/readChars, they take a start pos |
12:30:15 | * | kunev_ is now known as kunev |
12:39:46 | FromGitter | <BontaVlad> Great, thx a lot flyx |
12:45:05 | * | dmi0 joined #nim |
12:52:54 | * | yglukhov_ quit (Remote host closed the connection) |
12:54:02 | * | brechtm joined #nim |
12:54:15 | * | yglukhov joined #nim |
12:55:03 | FromGitter | <ephja> how would you mock functions? |
12:56:05 | FromGitter | <ephja> possibly without modifying the module in question |
12:57:25 | FromGitter | <ephja> the concept of mocking seems to apply to classes most of the time |
12:57:51 | * | brechtm_ quit (Ping timeout: 258 seconds) |
13:01:26 | Araq | you don't "mock" stuff. you have a clean separation between code and data and thus can create test data to test your code. |
13:02:09 | Araq | mocking is a design smell. |
13:02:37 | FromGitter | <ephja> ok |
13:02:45 | FromGitter | <ephja> I need to write more non-trivial software |
13:04:53 | * | HakanD__ quit (Quit: Be back later ...) |
13:05:20 | * | HakanD__ joined #nim |
13:06:46 | FromGitter | <ephja> > I need to write more non-trivial software |
13:07:06 | FromGitter | <ephja> just testing. gitter has some neat features |
13:16:00 | * | yglukhov quit (Remote host closed the connection) |
13:16:59 | * | dmi0 quit (Ping timeout: 268 seconds) |
13:24:38 | chemist69 | can the parameters from a varargs list be made modifiable by the procedure? |
13:24:46 | chemist69 | like this: proc newTree(trees: var varargs[Tree]) |
13:24:59 | chemist69 | but that does not work |
13:25:19 | FromGitter | <ephja> f# is a nice language. .NET relies a lot on polymorphism though, but maybe the runtime overhead can be optimized away in some cases |
13:29:23 | flyx | chemist69: maybe varargs[var Tree]? but I am not sure that would work either |
13:29:46 | FromGitter | <ephja> I don't think so |
13:30:04 | Araq | chemist69: use a macro for this. |
13:30:07 | chemist69 | no, it doesn't |
13:30:17 | chemist69 | Araq: ok |
13:31:44 | chemist69 | I like this: where in other languages the answer would simply be `no`, in Nim it is: `use a macro for this.` :-) |
13:38:36 | FromGitter | <ephja> I enjoy the functional aspects of F#, but I would still rather use Nim because of the metaprogramming features and for a few other reasons |
13:38:43 | * | Snircle quit (Read error: Network is unreachable) |
13:39:19 | * | Snircle joined #nim |
13:40:06 | * | beatmox quit (Ping timeout: 258 seconds) |
13:40:06 | * | euantor quit (Ping timeout: 258 seconds) |
13:40:23 | * | beatmox joined #nim |
13:40:27 | * | euantor joined #nim |
13:48:53 | * | enthus1ast quit (Ping timeout: 248 seconds) |
13:52:44 | * | enthus1ast joined #nim |
13:53:30 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:53:41 | * | Demon_Fox quit (Ping timeout: 248 seconds) |
13:58:05 | * | Demon_Fox joined #nim |
14:04:10 | FromGitter | <ephja> enum pattern matching in f# is lacking in some ways if I'm not mistaken |
14:09:13 | Araq | there are Nimble packages to give Nim better pattern matching via macros. |
14:10:10 | Araq | I still consider this design superior as real pattern matching requires unification and that is hard to builtin into a language |
14:13:55 | * | dmi0 joined #nim |
14:31:13 | * | yglukhov joined #nim |
14:35:00 | * | dmi0 quit (Ping timeout: 260 seconds) |
14:43:46 | * | krux02 joined #nim |
14:46:05 | * | HakanD__ quit (Quit: Be back later ...) |
14:46:28 | * | Trustable_2 joined #nim |
14:47:52 | * | Trustable quit (Ping timeout: 258 seconds) |
14:54:48 | * | planhths joined #nim |
14:56:54 | FromGitter | <ephja> I was just referring to the lacking exhaustiveness in f# (requires a wildcard pattern which will account both for unspecified enumerators and "invalid" values) |
14:57:05 | FromGitter | <ephja> but I'll take a look at those libs in any case |
15:02:09 | FromGitter | <ephja> oh right, I used "patty" at some point. I can't find any other relevant libs |
15:15:44 | euantor | Am I right in thinking that there's no way to import a costant from a header file (but you can import a variable or a proc in its place)? |
15:16:18 | euantor | Basically, I want to import `GUID_DEVINTERFACE_COMPORT` from `ntddser.h` on Windows |
15:16:26 | euantor | (found here: https://sourceforge.net/u/earnie/winapi/winapi/ci/master/tree/include/ddk/ntddser.h#l38) |
15:16:40 | euantor | (or here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff545821(v=vs.85).aspx) |
15:17:47 | euantor | This is my current approach https://www.irccloud.com/pastebin/id0Uqfge/ |
15:18:31 | euantor | Though D1 seems to be an `i64` to me, but it's of type `i32 in winlean... |
15:21:34 | * | yglukhov_ joined #nim |
15:24:21 | * | yglukhov quit (Ping timeout: 248 seconds) |
15:25:42 | * | yglukhov_ quit (Ping timeout: 252 seconds) |
15:37:35 | * | desophos joined #nim |
15:41:23 | Araq | euantor: that is correct, no const imports |
15:41:40 | euantor | Thanks Araq |
15:41:58 | euantor | Trying to use `SetupDiGetClassDevs`, it's a right pain to use |
15:44:26 | * | HakanD__ joined #nim |
15:49:17 | UNIcodeX | Is there a way that I could parallelize this calculation, such that it makes use of as many cores as the machine has available? https://bpaste.net/show/20a88735d144 |
15:49:58 | * | Andris_zbx quit (Remote host closed the connection) |
15:56:59 | * | pie_ joined #nim |
16:01:01 | * | enthus1ast quit (Ping timeout: 268 seconds) |
16:02:38 | * | pie_ quit (Changing host) |
16:02:38 | * | pie_ joined #nim |
16:12:00 | * | kulelu88 joined #nim |
16:19:32 | * | Guest84069 quit (Ping timeout: 260 seconds) |
16:22:52 | * | HakanD__ quit (Ping timeout: 260 seconds) |
16:27:24 | * | yglukhov joined #nim |
16:28:05 | * | kulelu88 quit (Quit: Leaving) |
16:28:32 | * | yglukhov quit (Read error: Connection reset by peer) |
16:31:16 | * | libman joined #nim |
16:33:19 | * | kulelu88 joined #nim |
16:34:29 | * | filcuc quit (Read error: Connection reset by peer) |
16:42:59 | * | ARCADIVS joined #nim |
16:43:43 | * | HakanD joined #nim |
16:45:37 | * | brechtm quit (Remote host closed the connection) |
16:54:17 | dom96 | Any Googlers here? |
16:59:19 | * | yglukhov joined #nim |
17:03:45 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:10:19 | euantor | As in people who work there? |
17:16:13 | * | planhths quit (Quit: Konversation terminated!) |
17:18:27 | * | libman theories that a very high percentage of programmers have at least one friend who works at Google. |
17:18:57 | libman | *theoriZes |
17:22:37 | Araq | libman: #? braces parsing mode coming soon, enjoy :P |
17:23:28 | * | libman very strongly prefers Pythonic syntax. I was talking purely about marketing. |
17:24:39 | dom96 | euantor: yes |
17:25:23 | libman | Chameleon "skins" for Nim that make it look like Swift, D, or a softer gentler Python (implicit var, automatic type conversion, etc), all parsed to the same AST as Nim. |
17:27:50 | federico3 | dom96: why? You wanted to show them http://www.gwan.com/blog/20160405.html ? :) |
17:36:36 | Araq | automatic type conversions? like what? |
17:36:48 | Araq | python doesn't convert int to strings either |
17:41:32 | dom96 | I think that these "skins" will be seen as a disadvantage by many programmers unfortunately. |
17:48:10 | * | Matthias247 joined #nim |
17:51:20 | * | irrequietus joined #nim |
17:57:29 | Araq | dom96: yeah, I wanna do a poll about it |
17:57:55 | dom96 | cool |
17:58:04 | Araq | though actually "seen as disadvantage by many programmers" is a good argument for it... |
17:58:17 | * | Salewski joined #nim |
17:59:59 | Salewski | Araq, do we get an END keyword as in Ruby too? Or only curly braces? |
18:00:24 | Araq | only curlies and they are mandatory, not optional |
18:00:34 | * | pie_ quit (Remote host closed the connection) |
18:02:46 | Salewski | But end keyword is not so ugly as braces, and Ruby people may like it. |
18:04:56 | Salewski | But of course, in early days there was a Python variant available with an end keyword, but not many people used that. |
18:05:18 | Araq | Salewski: that would be the 'endx' skin, not the 'braces' skin |
18:06:29 | Araq | UNIcodeX: yes and it's not hard, but see https://www.wolframalpha.com/input/?i=sum+x+from+0+to+(100000000-1)++sin(x) |
18:06:51 | Salewski | Yes. For me current indentation is fine. Jehan once said that he would favor an end keyword. |
18:07:08 | Araq | I wouldn't trust the CPU's floating point to give any meaningful result for this |
18:07:56 | UNIcodeX | Araq, thanks. i'm just trying to learn Nim, so I'm trying to jump into semi-practical examples to get an idea of the type of speedup one could expect. |
18:08:14 | * | yglukhov joined #nim |
18:10:13 | Araq | UNIcodeX: see tests/parallel/tpi.nim for how to do these things |
18:10:45 | Araq | proc piU shows spawn + flow vars |
18:11:08 | Araq | piS shows the parallel statement with spawn |
18:12:07 | UNIcodeX | Araq, thanks |
18:12:13 | Salewski | Araq, does it make sense to call GC_fullCollect when ever we wait for user input? For example in chess, when computer has done its move and is waiting for human player? |
18:12:46 | Salewski | So CPU is idle |
18:14:45 | * | stisa joined #nim |
18:15:05 | Araq | you can give hints like this but GC_step is better than GC_fullCollect |
18:15:24 | Araq | and idle CPUs are good, saves energy |
18:16:47 | Salewski | OK, I will consider GC_step. Thanks. |
18:18:10 | Salewski | Bye. |
18:18:14 | * | Salewski left #nim (#nim) |
18:20:23 | * | fredrik92 quit (Read error: Connection reset by peer) |
18:22:37 | FromGitter | <ephja> people find it more difficult to read code without {...} for example even with experience? |
18:27:49 | FromGitter | <ephja> will code on websites end up having a particular syntax other than the default one? |
18:28:50 | * | btbytes joined #nim |
18:30:58 | * | dddddd joined #nim |
18:31:02 | * | nsf quit (Quit: WeeChat 1.5) |
18:31:16 | Araq | ephja: I know no such studies. |
18:31:40 | Araq | personally I have spent years with the braces and they never stopped being unnecessary and annoying for me |
18:32:55 | baabelfish | I would also love to see some ((()()))()()))) action in nim :P |
18:32:56 | Araq | all they do is take up screen space |
18:33:09 | baabelfish | </joke> |
18:40:56 | * | irrequietus quit (Ping timeout: 260 seconds) |
18:43:25 | * | pregressive joined #nim |
18:53:54 | * | yglukhov quit (Remote host closed the connection) |
19:02:24 | * | irrequietus joined #nim |
19:02:53 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:04:40 | UNIcodeX | Araq, I'm not sure I did it correctly. https://bpaste.net/show/ccf1959442d0 |
19:05:16 | UNIcodeX | i got those headings backwards.... |
19:05:23 | * | fredrik92 joined #nim |
19:05:36 | UNIcodeX | the regular returns in < 20 seconds. the threaded is still running. |
19:07:01 | libman | I agree that braces are useless, but more syntax "skins" => more users => more contribs => more sushi. |
19:07:50 | UNIcodeX | I hate braces as well... Unfortunately cannot escape it as i must deal with JS. |
19:09:43 | FromGitter | <ephja> I wouldn't mind being able to render indentation with an arbitrary amount of spaces |
19:10:02 | FromGitter | <ephja> I can't parse certain long 2-space indent blocks very well |
19:11:54 | Araq | UNIcodeX: it's stupid code ;-) |
19:12:10 | UNIcodeX | thanks.... |
19:12:40 | UNIcodeX | perhaps a tip on how to make it not stupid? or are you just saying the exercise is stupid? |
19:14:25 | libman | Everything is relative. I bet I can write code so stupid it will automatically elevate UNIcodeX's code to "excellent". :P |
19:14:56 | UNIcodeX | it's almost a straight rip from the documentation... |
19:15:57 | Araq | just a sec |
19:21:05 | * | yglukhov joined #nim |
19:22:12 | Araq | UNIcodeX: now. your implementation completely ignores the overhead of 'spawn' |
19:22:27 | Araq | a 'sin' call is cheap, it's a CPU instruction in fact. |
19:22:42 | Araq | you need to do lots an lots of sin calls on the same core |
19:22:53 | Araq | and then sum the results |
19:23:18 | Araq | when you have N cpus, spawn N*2 calls (rule of thumb) |
19:23:28 | Araq | and sum the N*2 results |
19:23:35 | UNIcodeX | so the multi-threaded code will never be as fast as the single threaded code, due to sin() being cheap to run? |
19:23:59 | Araq | no, you'll get a speedup of N, when you do it right |
19:24:45 | UNIcodeX | how do i spawn N*2 calls?? |
19:26:28 | Araq | cpuinfo.nim has countProcessors() |
19:26:32 | Araq | that's your N |
19:27:17 | FromGitter | <mbarkhau> Hi there, is it appropriate to ask nub questions here? |
19:27:19 | Araq | you need to split the range 0..x into N disjoint ranges |
19:28:20 | Araq | mbarkhau: yes if you don't mind sometimes mildly unfriendly replies from me |
19:28:39 | FromGitter | <mbarkhau> fair enough |
19:28:53 | FromGitter | <mbarkhau> is there a way to do compile time assertions ? |
19:29:17 | FromGitter | <mbarkhau> as a form of very light weight unit test |
19:29:57 | UNIcodeX | mbarkhau, Araq can be grumpy ^^, but knows his stuff. :) |
19:30:36 | FromGitter | <mbarkhau> I think I can handle it |
19:30:40 | Araq | mbarkhau: that's mostly just |
19:30:41 | Araq | static: |
19:30:46 | Araq | assert(x == y) |
19:32:43 | flyx | a static assertion is not a unit test. unit tests exist because there are too few static assertions. |
19:32:47 | FromGitter | <mbarkhau> awesome, works! |
19:40:35 | * | btbytes joined #nim |
20:05:37 | * | FreezerburnV quit (Quit: Leaving) |
20:09:58 | * | pie_ joined #nim |
20:10:02 | * | tinAndi joined #nim |
20:22:14 | FromGitter | <mbarkhau> hmm, I can't figure out what this error message means: https://glot.io/snippets/ejc487edgn |
20:22:26 | FromGitter | <mbarkhau> `Error: conversion from 2 to [0..1] is invalid` |
20:24:55 | cheatfate | mbarkhau: nim's bool accept only 0 or 1, not compatible with c way |
20:25:06 | FromGitter | <mbarkhau> ahhhh |
20:25:52 | * | tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]) |
20:27:51 | FromGitter | <mbarkhau> is there a section in the docs somewhere on truthiness |
20:27:57 | FromGitter | <mbarkhau> ? |
20:29:22 | * | tinAndi joined #nim |
20:29:45 | libman | mbarkhau: you'll need an Epistemology 101 textbook. Then read Karl Popper. |
20:30:10 | * | dmi0 joined #nim |
20:31:16 | FromGitter | <aboisvert> there are no automatic conversions to boolean, AFAIK |
20:31:17 | FromGitter | <aboisvert> http://nim-lang.org/docs/manual.html#type-relations-convertible-relation |
20:32:11 | FromGitter | <aboisvert> so `truthiness` is not a thing in Nim, there is only bool |
20:32:40 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:32:46 | FromGitter | <mbarkhau> ok, fair enough |
20:35:56 | * | bjz joined #nim |
20:36:55 | * | btbytes joined #nim |
20:48:28 | FromGitter | <mbarkhau> was there once a {.pure.} pragma ? |
20:49:16 | FromGitter | <mbarkhau> presumably replaced by {.noSideEffect.}? |
20:52:32 | FromGitter | <mbarkhau> hmm, nope it seems not: http://nim-lang.org/docs/manual.html#pragmas-pure-pragma |
20:57:52 | * | gokr quit (Ping timeout: 250 seconds) |
20:59:02 | FromGitter | <mbarkhau> interesting: It is a static error to mark a proc/iterator to have no side effect if the compiler cannot verify this. |
21:00:36 | FromGitter | <mbarkhau> what's the point then of setting the pragma, if the compiler can determine for itself that a proc has no side effects? |
21:02:03 | FromGitter | <mbarkhau> hmm, I guess to make sure you aren't kidding yourself when you break one of the rules |
21:02:15 | Araq | exactly |
21:02:39 | Araq | plus for .importc'ed procs .noSideEffect is not checked, it's assumed the annotation is correct |
21:03:16 | FromGitter | <mbarkhau> ok then I say +1 for this: Future directions: `func` may become a keyword and syntactic sugar for a proc with no side effects |
21:04:30 | Araq | everybody loves this idea, but 'func' could also mean "everything readonly", for instance |
21:05:03 | Araq | which we also can infer |
21:06:10 | FromGitter | <mbarkhau> but there's no `readOnly` pragma is there? |
21:06:28 | FromGitter | <mbarkhau> maybe I misunderstand |
21:06:44 | Araq | it's spelt 'writes: []' |
21:07:29 | Araq | but it's not documented |
21:07:35 | Araq | and not yet in Nim |
21:10:43 | FromGitter | <mbarkhau> I see, well I'm sure you know what you're doing |
21:15:17 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:25:24 | FromGitter | <mbarkhau> any chance of adopting this?: https://glot.io/new/nim |
21:25:32 | FromGitter | <mbarkhau> arg sorry |
21:25:43 | FromGitter | <mbarkhau> https://glot.io/snippets/ejc60fiax8 |
21:25:46 | FromGitter | <mbarkhau> there we go |
21:26:18 | FromGitter | <mbarkhau> for ye old pythonistas |
21:26:19 | Araq | it's strutils.repeat or something |
21:26:46 | Araq | I don't like it since it doesn't default to the space |
21:26:54 | * | pafmaf quit (Ping timeout: 250 seconds) |
21:27:02 | Araq | which is the only use case I care about |
21:31:08 | Araq | mbarkhau, btw it's 0..<num |
21:31:24 | FromGitter | <mbarkhau> yeah, I noticed |
21:34:21 | FromGitter | <mbarkhau> I think half-open intervals as python does it is better though |
21:34:46 | Araq | yeah, I've heard that before. It's not better, it's broken. |
21:34:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:34:57 | FromGitter | <mbarkhau> i think in coffeescript you can get them with 0...num |
21:35:34 | Araq | it assumes there actually is an upper bound that exists and that you don't care about. Not true for enums. |
21:39:11 | FromGitter | <mbarkhau> I would say the fact that your doing 1..n and 0..n-1 so often in strutils is an indication that there may be something to the argument |
21:40:23 | FromGitter | <gokr> Just a heads up - this has been discussed at length earlier. I don't really recall all the arguments. |
21:41:57 | FromGitter | <mbarkhau> was the option of having a seperate range operator discussed? |
21:42:33 | FromGitter | <gokr> Don't recall |
21:42:48 | FromGitter | <mbarkhau> .. (two dots) open ⏎ ... (three dots) half open |
21:43:23 | FromGitter | <mbarkhau> as here: http://coffeescript.org/#slices |
21:44:09 | FromGitter | <mbarkhau> half open is also the behaviour of the javascript slice function |
21:44:36 | * | HakanD quit (Quit: Be back later ...) |
21:45:12 | * | HakanD joined #nim |
21:45:24 | FromGitter | <mbarkhau> also interesting: https://news.ycombinator.com/item?id=6601515 |
21:46:40 | * | pafmaf joined #nim |
21:47:39 | * | Trustable_2 quit (Remote host closed the connection) |
21:49:25 | * | HakanD quit (Ping timeout: 248 seconds) |
21:49:27 | * | gangstacat quit (Quit: Ĝis) |
21:51:10 | * | pafmaf quit (Ping timeout: 250 seconds) |
21:54:56 | FromGitter | <mbarkhau> well, I will say one thing, it's nice that it can be overridden: https://glot.io/snippets/ejc6pzhdd4 |
22:14:05 | * | nimmerstill joined #nim |
22:15:26 | FromGitter | <mbarkhau> ahh, is the `..<` operator equivalent? |
22:17:55 | * | elrood quit (Quit: Leaving) |
22:18:15 | FromGitter | <mbarkhau> `echo <8 == 7` |
22:18:21 | FromGitter | <mbarkhau> fascinating |
22:19:12 | FromGitter | <mbarkhau> then I guess I'll use that |
22:20:53 | * | btbytes joined #nim |
22:21:07 | * | btbytes quit (Client Quit) |
22:22:33 | * | btbytes joined #nim |
22:28:13 | * | nsf joined #nim |
22:31:43 | * | dmi0 quit (Remote host closed the connection) |
22:35:17 | * | zama quit (Ping timeout: 248 seconds) |
22:37:40 | * | tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]) |
22:40:34 | * | stisa quit (Quit: Leaving) |
22:41:41 | * | nimmerstill quit (Ping timeout: 248 seconds) |
22:43:17 | * | zama joined #nim |
22:45:44 | * | HakanD joined #nim |
22:47:04 | * | ARCADIVS quit (Ping timeout: 250 seconds) |
22:48:44 | * | PMunch joined #nim |
22:48:53 | * | btbytes quit (Read error: Connection reset by peer) |
22:50:06 | * | HakanD quit (Ping timeout: 258 seconds) |
22:53:42 | * | pafmaf joined #nim |
22:55:15 | * | ARCADIVS joined #nim |
22:58:24 | * | pregressive quit (Remote host closed the connection) |
22:58:57 | * | pregressive joined #nim |
23:00:31 | * | pie_ quit (Quit: Leaving) |
23:02:43 | * | mitai joined #nim |
23:03:18 | * | pregressive quit (Ping timeout: 252 seconds) |
23:14:20 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:17:08 | * | irrequietus quit () |
23:21:08 | * | fredrik92 quit (Read error: Connection reset by peer) |
23:25:31 | * | dmi0 joined #nim |
23:46:35 | * | HakanD joined #nim |
23:49:43 | * | yglukhov quit (Remote host closed the connection) |
23:51:09 | * | HakanD quit (Ping timeout: 260 seconds) |