00:00:25 | Jehan` | It's essentially a portable assembly language, and a flawed one even for that purpose. |
00:00:33 | * | anthgur joined #nim |
00:01:42 | Araq | I disagree somewhat. |
00:02:52 | Araq | It's often said that "C is a portable assembler" but in reality it just stopped evolving quite early. So you get structured control flow and a register allocator and not much more. |
00:03:33 | Araq | but it never was designed as a "portable assembler" the first announcements mention it's a "high level language" |
00:07:01 | Araq | a portable assembler wouldn't have bit fields or structured control flow nor a pletora of operator precedence rules. |
00:07:03 | ldlework | Context isn't static though |
00:07:11 | ldlework | wrong channel actually |
00:07:24 | Araq | ldlework: no it fits ;-) |
00:09:40 | Araq | Jehan`: https://gist.github.com/Araq/8022f703001bf59e5ed2 |
00:10:13 | * | vasher_ joined #nim |
00:10:18 | Araq | if I change it to pinToCpu(a[0], 0); pinToCpu(a[1], 0); the 0s and 1s don't flip as quickly |
00:10:20 | Jehan` | Araq: What about that? |
00:10:37 | Araq | and so I conclude pinToCpu works. :D |
00:10:50 | Araq | highly scientific test |
00:10:51 | Jehan` | And I agree that it wasn't designed as a portable assembler, but it never lived up to being a high-level language. |
00:11:02 | Jehan` | Heh. :) |
00:11:57 | Jehan` | Try to check in `top` whether it's eating 100% or 200% CPU if you replace the echo with something CPU-bound. |
00:12:32 | Araq | yeah I thought of that but this machine is already too hot :-) |
00:13:55 | Araq | but yeah that works |
00:14:07 | Araq | 60% cpu vs 30% |
00:22:40 | * | zaquest is now known as zaquest_ |
00:22:50 | * | zaquest_ is now known as zaquest |
00:26:33 | * | gokr quit (Quit: Leaving.) |
00:29:12 | * | vendethiel joined #nim |
00:32:44 | Jehan` | Where in posix.nim would I put popen() and pclose()? Or should they go in a separate module? |
00:33:13 | Araq | just somewhere in posix.nim is fine |
00:33:49 | Jehan` | Okay. |
00:33:51 | apense | this is going to make several people vomit: in re commits d46407c and 54a374a (which disabled vcc-specific code and allowed "#" directives in the header pragma), should I go ahead and rewrite the disabled code to have proc rand_s(val: var cuint) {.importc: "rand_s", |
00:33:51 | apense | header: "<stdlib.h> #define _CRT_RAND_S".}? |
00:34:38 | Araq | the correct syntax is: |
00:35:01 | Araq | header: "#define _CRT_RAND_S\n#include <stdlib.h>" |
00:35:31 | Araq | but since other stuff might include stdlib already I don't think this works |
00:36:03 | Araq | the generated code can end up as: |
00:36:11 | Araq | #include <stdlib.h> |
00:36:17 | Araq | #define _CRT_RAND_S |
00:36:22 | Araq | #include <stdlib.h> |
00:36:42 | apense | would {.passC ....} work better? any option seems very ugly. I think you're right, as the "#define" needs to be *before* any "#include <stdlib.h>" anyway |
00:37:09 | Araq | well we can fix the codegen so that includes starting with # come first |
00:37:52 | Araq | but we can also just add the #define to nimbase.h |
00:38:29 | apense | do you want me to make a PR with those changes? can I edit nimbase.h directly or is it generated? |
00:38:31 | Jehan` | Araq: It's just a bit ugly, because it depends on File. But it's POSIX functionality, so that's where it belongs. |
00:39:47 | Araq | apense: it's not generated, but why does this concern you so much? who cares if rand() is limited to 16 bits? |
00:40:06 | Araq | Jehan`: yeah, it's fine in posix.nim |
00:43:50 | * | Jesin quit (Quit: Leaving) |
00:44:51 | apense | Araq, it started concerning me mainly when I was working with cryptographic functions. it's not actually the size that bothers me so much (although it does a little). it's more that `rand` is not as secure as `rand_s`. Really, it's because it's not as secure as `rand_s` |
00:45:15 | apense | I'll try to find a source if you're interested, but it seemed like a better idea to default to the more secure version |
00:45:36 | apense | for what it's worth, i think it's actually only 15 bits (0 to 32767) |
00:45:37 | Araq | can't we just use our own random number generator? |
00:45:44 | apense | we can |
00:45:49 | apense | i think julia does that |
00:45:56 | Araq | so let's do that instead |
00:46:22 | Araq | actually |
00:46:28 | apense | should I open an issue on that? |
00:46:38 | Araq | just .deprecate it, we'll move it from math into some other module |
00:46:54 | Araq | no, there is already an issue for that |
00:47:08 | apense | deprecate all the random functions under windows? |
00:47:22 | apense | or will we move all random ones elsewhere for all OSes? |
00:48:29 | * | Jehan` quit (Quit: Leaving) |
00:49:56 | Araq | the latter |
00:50:21 | * | vendethiel quit (Ping timeout: 246 seconds) |
01:14:42 | * | vendethiel joined #nim |
01:15:24 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:22:52 | * | yglukhov joined #nim |
01:27:15 | * | dddddd quit (Ping timeout: 264 seconds) |
01:27:18 | * | yglukhov quit (Ping timeout: 256 seconds) |
01:38:27 | * | Kingsquee quit (Read error: Connection reset by peer) |
01:38:44 | * | Kingsquee joined #nim |
01:48:51 | * | Demos joined #nim |
01:50:41 | * | pregressive joined #nim |
01:53:02 | * | Demos quit (Ping timeout: 246 seconds) |
01:59:49 | * | vendethiel quit (Ping timeout: 255 seconds) |
02:07:30 | * | vendethiel joined #nim |
02:16:59 | * | FedeOmoto quit (Ping timeout: 252 seconds) |
02:28:22 | * | vendethiel quit (Ping timeout: 276 seconds) |
02:29:11 | * | EXetoC quit (Ping timeout: 250 seconds) |
02:33:57 | * | gyeates quit (Ping timeout: 250 seconds) |
02:48:53 | * | Kingsquee quit (Ping timeout: 252 seconds) |
02:49:23 | * | Demos joined #nim |
02:52:44 | * | Jesin joined #nim |
02:54:09 | * | Demos quit (Ping timeout: 256 seconds) |
03:02:03 | * | brson joined #nim |
03:07:36 | * | gyeates joined #nim |
03:12:08 | * | gyeates quit (Ping timeout: 246 seconds) |
03:28:35 | * | darkf joined #nim |
04:04:29 | * | ozra quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
04:48:55 | * | vasher_ quit (Quit: Connection closed for inactivity) |
04:54:55 | * | brson quit (Quit: leaving) |
05:18:07 | * | vendethiel joined #nim |
05:24:00 | * | vendethiel quit (Read error: Connection timed out) |
05:24:10 | * | vendethiel joined #nim |
05:40:00 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:56:55 | * | Kingsquee joined #nim |
06:09:45 | * | vendethiel quit (Ping timeout: 250 seconds) |
06:14:25 | * | vendethiel joined #nim |
06:20:20 | * | Jesin quit (Quit: Leaving) |
06:28:13 | * | jubalh joined #nim |
06:36:35 | * | vendethiel quit (Ping timeout: 252 seconds) |
06:38:01 | * | vendethiel joined #nim |
06:39:21 | * | gyeates joined #nim |
06:50:10 | * | gyeates quit (Ping timeout: 272 seconds) |
06:56:15 | * | Ven joined #nim |
06:57:34 | * | dtscode quit (Quit: ZNC - 1.6.0 - http://znc.in) |
06:57:50 | * | dtscode joined #nim |
07:00:30 | * | vendethiel quit (Ping timeout: 256 seconds) |
07:06:07 | * | Trustable joined #nim |
07:08:26 | * | johnsoft quit (Ping timeout: 256 seconds) |
07:08:47 | * | johnsoft joined #nim |
07:08:54 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:12:24 | * | wan quit (Ping timeout: 256 seconds) |
07:16:33 | * | vendethiel joined #nim |
07:17:24 | * | Ven joined #nim |
07:25:00 | * | jszymanski joined #nim |
07:25:34 | * | wan joined #nim |
07:26:56 | * | xificurC quit (Ping timeout: 244 seconds) |
07:28:15 | * | jszymanski quit (Client Quit) |
07:30:42 | * | xificurC joined #nim |
07:37:45 | * | vendethiel quit (Ping timeout: 246 seconds) |
07:43:15 | * | jszymanski joined #nim |
07:49:57 | * | xificurC quit (Ping timeout: 256 seconds) |
07:57:00 | * | OnO joined #nim |
08:10:46 | * | yglukhov joined #nim |
08:30:47 | * | jaco60 joined #nim |
08:34:12 | * | milosn quit (Quit: leaving) |
08:36:03 | * | yglukhov_ joined #nim |
08:37:40 | * | MatrixBridge2401 quit (Read error: Connection reset by peer) |
08:37:40 | * | MatrixBridge quit (Remote host closed the connection) |
08:38:03 | * | MatrixBridge joined #nim |
08:38:45 | * | yglukhov quit (Ping timeout: 244 seconds) |
08:40:47 | * | yglukhov_ quit (Remote host closed the connection) |
08:41:21 | * | yglukhov_ joined #nim |
08:49:49 | * | JehanII joined #nim |
09:04:04 | * | JehanII is now known as Jehan` |
09:14:59 | * | scoeri quit (Ping timeout: 252 seconds) |
09:26:17 | * | vasher_ joined #nim |
09:30:54 | * | Demon_Fox joined #nim |
09:41:28 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:46:49 | * | Demon_Fox quit (Quit: Leaving) |
09:47:18 | * | Demon_Fox joined #nim |
09:48:38 | * | Demon_Fox quit (Client Quit) |
09:49:02 | * | Demon_Fox joined #nim |
09:54:38 | * | Kingsquee quit (Quit: Konversation terminated!) |
10:02:57 | * | xificurC joined #nim |
10:05:19 | * | yglukhov_ quit (Ping timeout: 276 seconds) |
10:05:53 | * | yglukhov_ joined #nim |
10:11:12 | * | jaco60 quit (Remote host closed the connection) |
10:14:06 | * | jaco60 joined #nim |
10:22:37 | * | yglukhov_ quit (Quit: Lingo: www.lingoirc.com) |
10:24:58 | * | Demon_Fox quit (Quit: Leaving) |
10:32:40 | * | gokr joined #nim |
10:44:10 | * | lesshaste joined #nim |
10:44:11 | lesshaste | hi all |
10:44:31 | * | johnsoft quit (Ping timeout: 255 seconds) |
10:45:12 | * | johnsoft joined #nim |
10:53:03 | * | Ven joined #nim |
10:54:55 | * | dddddd joined #nim |
10:56:05 | * | Ven_ joined #nim |
10:56:06 | * | yglukhov joined #nim |
10:57:53 | def- | hi lesshaste |
10:58:23 | * | Ven quit (Ping timeout: 248 seconds) |
10:58:34 | * | yglukhov_ joined #nim |
10:59:46 | * | Ven_ quit (Read error: No route to host) |
11:02:42 | * | yglukhov quit (Ping timeout: 265 seconds) |
11:04:02 | * | EXetoC joined #nim |
11:07:33 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
11:08:21 | * | gmpreussner|work joined #nim |
11:19:52 | * | arnetheduck joined #nim |
11:19:57 | * | Ven joined #nim |
11:31:27 | * | dalarmmst quit (Ping timeout: 248 seconds) |
11:38:48 | * | vasher_ quit (Quit: Connection closed for inactivity) |
11:44:42 | * | dalarmmst joined #nim |
11:45:07 | * | xcombelle joined #nim |
11:47:06 | r-ku | wasnt there a pragma which would add c/cpp file to compilation? |
11:49:27 | def- | r-ku: {.compile: "foo.c".} |
11:49:51 | r-ku | thanks |
11:55:59 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:20:43 | * | thaless joined #nim |
12:43:46 | * | BitPuffin|osx joined #nim |
12:47:03 | * | yglukhov_ quit (Quit: Be back later ...) |
12:52:12 | * | yglukhov_ joined #nim |
13:00:40 | * | woadwarrior joined #nim |
13:02:29 | * | Demon_Fox joined #nim |
13:06:44 | * | Jehan` quit (Quit: Leaving) |
13:14:32 | * | pregressive quit (Read error: Connection reset by peer) |
13:15:27 | * | ozra joined #nim |
13:19:12 | * | doxavore joined #nim |
13:24:59 | * | wuehlmaus quit (Quit: Lost terminal) |
13:26:26 | * | yglukhov_ quit (Quit: Be back later ...) |
13:26:56 | * | Demos joined #nim |
13:27:14 | * | doxavore quit (Quit: I said good day, sir.) |
13:34:40 | * | doxavore joined #nim |
13:40:35 | * | milosn joined #nim |
13:45:32 | Araq | def-: I'm pushing a fix for https://github.com/nim-lang/Nim/issues/2429 can you ensure the XML wikipedia test still works? |
13:45:46 | * | boopsiesisaway is now known as boopsies |
13:46:22 | def- | Araq: ok |
13:47:36 | * | EXetoC quit (Quit: WeeChat 1.2) |
13:48:44 | * | anthgur joined #nim |
13:55:19 | * | woadwarrior quit (Quit: Textual IRC Client: www.textualapp.com) |
14:02:21 | * | anthgur quit (Remote host closed the connection) |
14:05:32 | * | pregressive joined #nim |
14:07:19 | * | pregressive quit (Read error: Connection reset by peer) |
14:07:38 | * | pregressive joined #nim |
14:35:07 | * | wuehlmaus joined #nim |
14:36:16 | * | dalarmmst quit (Ping timeout: 255 seconds) |
14:36:22 | * | Jehan` joined #nim |
14:37:16 | Jehan` | Araq: I'm currently trying to make cross-compiling work for Cygwin. Do you want a patch when I'm done? |
14:37:31 | * | themagician_d joined #nim |
14:37:44 | * | Pisuke joined #nim |
14:39:07 | Jehan` | Right now it's just so that the compiler compiles cleanly and that basic libraries work. I'm not yet planning on dealing with all the OS-specific stuff. |
14:39:29 | Araq | updated platform.nim ? |
14:40:10 | * | cyraxjoe_ joined #nim |
14:41:14 | Jehan` | Araq: Yeah, osCygwin and all that. |
14:41:18 | * | AckZ_ joined #nim |
14:41:29 | * | tmku_ joined #nim |
14:41:32 | Jehan` | Also condsyms.nim |
14:41:36 | * | dv-_ joined #nim |
14:41:47 | def- | Araq: we have a testcase for that? I just ran the wiki2text program with a big dump. the output looks fine and runs fast |
14:41:52 | * | wuehlmau1 joined #nim |
14:41:57 | * | milosn_ joined #nim |
14:42:10 | Jehan` | The basic version works, but I'm trying to see what it breaks. |
14:42:24 | Araq | def-: we did run a couple of tests too, but the test suite is still lacking for these old libs |
14:42:29 | Jehan` | The problem is that Cygwin is an OS emulator that tries to be windows and posix at the same time. |
14:42:52 | * | Rush joined #nim |
14:43:02 | Jehan` | I have the compiler and some basic tests working, but really need to go beyond that. |
14:43:07 | Araq | I still wonder how they emulate fork() |
14:43:21 | Jehan` | Poorly. :) |
14:43:29 | Jehan` | It's one of the major pain points. |
14:44:13 | Araq | the Mill guys filled yet another patent when they figured out how fork could work on their new architecture |
14:44:27 | * | FedeOmoto joined #nim |
14:45:21 | * | r-ku- joined #nim |
14:45:44 | Jehan` | There's a lot of actual copying involved. |
14:46:35 | * | wuehlmaus quit (*.net *.split) |
14:46:35 | * | milosn quit (*.net *.split) |
14:46:35 | * | wan quit (*.net *.split) |
14:46:35 | * | MyMind quit (*.net *.split) |
14:46:35 | * | themagician quit (*.net *.split) |
14:46:35 | * | thotypous quit (*.net *.split) |
14:46:36 | * | strcmp1 quit (*.net *.split) |
14:46:36 | * | ChrisMAN quit (*.net *.split) |
14:46:36 | * | r-ku quit (*.net *.split) |
14:46:36 | * | tmku quit (*.net *.split) |
14:46:36 | * | polde quit (*.net *.split) |
14:46:36 | * | cyraxjoe quit (*.net *.split) |
14:46:37 | * | pmbauer quit (*.net *.split) |
14:46:37 | * | mtj_ quit (*.net *.split) |
14:46:37 | * | DecoPerson quit (*.net *.split) |
14:46:37 | * | TylerE quit (*.net *.split) |
14:46:37 | * | AckZ quit (*.net *.split) |
14:46:38 | * | joebo quit (*.net *.split) |
14:46:38 | * | cazov quit (*.net *.split) |
14:46:39 | * | RushPL quit (*.net *.split) |
14:46:39 | * | dv- quit (*.net *.split) |
14:46:39 | * | tstm quit (*.net *.split) |
14:46:53 | * | r-ku- is now known as r-ku |
14:47:15 | * | cazov joined #nim |
14:48:01 | * | yglukhov_ joined #nim |
14:49:19 | * | AckZ_ is now known as AckZ |
14:50:29 | Demos | fork being fast is pretty critical to being unix tho |
14:52:46 | * | wan joined #nim |
14:52:47 | * | Demos quit (Remote host closed the connection) |
14:53:01 | * | joebo joined #nim |
14:53:03 | * | strcmp1 joined #nim |
14:53:12 | * | thotypous joined #nim |
14:53:17 | * | mtj_ joined #nim |
14:53:40 | * | tstm joined #nim |
14:53:42 | * | ChrisMAN joined #nim |
14:54:21 | * | polde joined #nim |
14:55:01 | * | Demos joined #nim |
14:58:04 | * | pmbauer joined #nim |
14:58:49 | * | TylerE joined #nim |
14:58:59 | * | jubalh quit (Quit: Leaving) |
15:00:20 | * | boopsies is now known as boopsiesisaway |
15:02:06 | * | boopsiesisaway is now known as boopsies |
15:02:47 | * | Demos quit (Remote host closed the connection) |
15:03:24 | * | DecoPerson joined #nim |
15:05:10 | OnO | Araq: for some reason you change strictSymEquality=true for opcEqNimrodNode broke comparing bindSym to getType sym |
15:05:29 | OnO | macro testComp(sym: typedesc[Obj]): expr = newLit(sym.getType[1] == bindSym"Obj") -> testComp(Obj) returns false |
15:06:15 | * | Demos_ joined #nim |
15:07:31 | * | vendethiel joined #nim |
15:07:38 | Araq | want to fix it? |
15:08:29 | * | Demos_ quit (Remote host closed the connection) |
15:12:03 | * | Demos joined #nim |
15:12:17 | OnO | I dunno, but is comparing nkSym nodewise will always fail? |
15:13:08 | Araq | well the old way was clearly wrong |
15:13:16 | Araq | now it fails for some other reason |
15:13:24 | Araq | not hard to debug |
15:13:27 | Araq | output the IDs |
15:13:31 | Araq | edit ast.nim |
15:13:36 | Araq | proc newSym |
15:13:51 | Araq | if result.id == victim: writeStackTrace() |
15:14:13 | OnO | oook |
15:14:16 | OnO | good hint |
15:14:17 | OnO | will do |
15:15:06 | Araq | the IDs are really sweet for debugging. too bad nobody uses them ;-) |
15:19:38 | * | rgv151 quit (Read error: Connection reset by peer) |
15:22:38 | OnO | even sym.getType[1] == sym.getType[1] return false |
15:23:14 | * | dalarmmst joined #nim |
15:24:05 | OnO | it creates new sym node on rawExecute->opMapTypeToAst->mapTypeToAst->mapTypeToAst->atomicTypeX->newSym |
15:24:48 | OnO | opMapTypeToAst is called in opcNGetType |
15:25:49 | OnO | so far it is really cryptic |
15:30:23 | Araq | vmdeps.atomicTypeX returns a new sym so that people cannot mess with the compiler's internal types |
15:30:30 | * | vendethiel quit (Ping timeout: 256 seconds) |
15:30:47 | Araq | but I guess it needs to use t.sym instead if available |
15:31:47 | * | thaless quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:32:28 | Araq | also atomicType("char") etc cannot work this way then |
15:32:45 | * | thaless joined #nim |
15:33:45 | Araq | the types API was designed for introspection, not type equality testing |
15:33:53 | * | Demos quit (Remote host closed the connection) |
15:35:14 | * | Demos joined #nim |
15:38:04 | * | Demos quit (Remote host closed the connection) |
15:39:32 | * | Demos joined #nim |
15:41:12 | OnO | can we somehow bind the original type to this new atomic type and use that for introspection... or maybe we can lock some nimNodes such as types from being modified in macros? |
15:45:03 | Araq | magicsys.getSysSym("bool") is a start |
15:45:19 | * | Demos quit (Remote host closed the connection) |
15:47:03 | * | Demos joined #nim |
15:47:05 | * | arnetheduck quit (Ping timeout: 256 seconds) |
15:49:32 | * | gyeates joined #nim |
15:50:11 | * | Demos quit (Remote host closed the connection) |
15:50:20 | OnO | ok, but what approach is better? |
15:50:49 | OnO | returning original symbols, but preventing modification on symbols created outside of a macro? |
15:51:20 | * | Demos joined #nim |
15:51:45 | * | milosn_ is now known as milosn |
15:54:01 | * | cyraxjoe_ is now known as cyraxjoe |
15:56:18 | * | Demos quit (Remote host closed the connection) |
15:57:27 | * | darkf quit (Quit: Leaving) |
16:01:19 | Araq | well I dunno yet. equality for types is hard |
16:01:37 | Araq | and that we map types to NimNodes doesn't help |
16:04:48 | Jehan` | Incidentally, is there a way to construct a type's AST (for purposes of code generation) from the (different) AST you get via getType()? |
16:05:16 | Araq | yeah and fowl has some code to help with that |
16:07:28 | * | yglukhov_ quit (Ping timeout: 264 seconds) |
16:10:13 | * | Ven joined #nim |
16:10:28 | OnO | how would that help with comparing types? |
16:17:22 | Jehan` | It wouldn't, it's just something I'm interested in for unrelated reasons. |
16:19:57 | * | Ven quit (Ping timeout: 246 seconds) |
16:28:32 | * | lesshaste quit (Quit: Leaving) |
16:32:02 | * | Ven joined #nim |
16:35:43 | * | judofyr joined #nim |
16:37:51 | * | elbow_jason joined #nim |
16:39:23 | * | milosn quit (Ping timeout: 250 seconds) |
16:41:52 | * | dv-_ quit (Changing host) |
16:41:52 | * | dv-_ joined #nim |
16:42:21 | * | dv-_ is now known as dv- |
16:43:26 | * | milosn joined #nim |
16:56:50 | OnO | can there be 2 symbols with same name and same owner? |
16:57:33 | OnO | is owner for TSym is in fact a scope of the symbol? |
17:05:13 | * | gyeates quit (Ping timeout: 276 seconds) |
17:05:56 | * | vendethiel joined #nim |
17:09:18 | * | doxavore quit (Quit: I said good day, sir.) |
17:09:28 | * | solidsnack joined #nim |
17:11:40 | * | pregressive quit (Remote host closed the connection) |
17:17:58 | * | gyeates joined #nim |
17:26:31 | * | xificurC quit (Quit: WeeChat 1.2) |
17:27:07 | * | xificurC joined #nim |
17:32:18 | * | pregressive joined #nim |
17:33:14 | * | thaless quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:37:30 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:43:21 | Araq | OnO: surely that is allowed. overloading. |
17:44:17 | OnO | yes, that was a stupid question |
17:44:40 | OnO | but it TSym represents a type then sym.typ.sym == sym ? |
17:45:32 | Araq | I don't think so. type Alias = int |
17:45:57 | Araq | not sure what the current implementation does for that though |
17:46:57 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
17:46:58 | * | gmpreussner|work joined #nim |
17:47:05 | * | heinrich5991 quit (Excess Flood) |
17:47:07 | * | renatolm joined #nim |
17:47:22 | * | heinrich5991 joined #nim |
17:47:53 | * | renatolm left #nim (#nim) |
17:47:57 | OnO | ok then, maybe for TSym made of atomic type we should just compare .typ ? |
17:47:58 | * | Demon_Fox quit (Ping timeout: 244 seconds) |
17:48:50 | * | Demon_Fox joined #nim |
17:48:53 | * | doxavore joined #nim |
17:48:58 | Araq | AST comparison should compare symbols, not types |
17:49:39 | Araq | maybe you want a new builtin macros.sameType(a,b) instead of basing this all on the == for NimNode |
17:50:47 | Araq | eventually we need compareType(a, b): enum Subtype, Equal, Convertible, Unequal |
17:54:17 | * | milosn quit (Remote host closed the connection) |
17:56:01 | * | milosn joined #nim |
17:56:13 | * | Demos joined #nim |
17:56:22 | OnO | okay, you are right, we need sameType macro |
17:56:49 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
17:57:36 | * | solidsnack joined #nim |
17:58:22 | * | solidsnack quit (Max SendQ exceeded) |
18:00:59 | * | Demos quit (Remote host closed the connection) |
18:03:51 | * | Demos joined #nim |
18:03:54 | * | Ven quit (Ping timeout: 252 seconds) |
18:06:35 | * | FedeOmoto quit (Ping timeout: 265 seconds) |
18:16:39 | * | FedeOmoto joined #nim |
18:17:07 | OnO | https://github.com/nim-lang/Nim/pull/3036 |
18:25:37 | * | jszymanski quit (Ping timeout: 264 seconds) |
18:26:01 | * | tmku_ is now known as tmku |
18:26:20 | * | jszymanski joined #nim |
18:28:46 | * | elbow_jason quit (Quit: Leaving) |
18:41:32 | * | nande joined #nim |
18:46:35 | * | Matthias247 joined #nim |
18:59:05 | * | wuehlmau1 is now known as wuehlmaus |
19:03:16 | * | xcombelle quit (Remote host closed the connection) |
19:05:49 | * | judofyr quit (Remote host closed the connection) |
19:06:22 | * | rgv151 joined #nim |
19:07:37 | * | jszymanski quit (Ping timeout: 264 seconds) |
19:08:38 | rgv151 | hi dom96, i wonder why this proc is not exported https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpclient.nim#L362 |
19:09:11 | * | jszymanski joined #nim |
19:13:57 | * | BitPuffin|osx joined #nim |
19:21:58 | * | pregressive quit (Remote host closed the connection) |
19:25:01 | * | [CBR]Unspoken1 quit (Ping timeout: 264 seconds) |
19:27:30 | * | jubalh joined #nim |
19:36:36 | * | pregressive joined #nim |
19:37:20 | dom96 | rgv151: I didn't write that code specifically |
19:37:24 | dom96 | What do you need that proc for? |
19:38:37 | rgv151 | i want to make an async post request with mutilpart data |
19:40:16 | dom96 | We need to implement an async `post` then. |
19:40:58 | rgv151 | yup, i think so |
19:50:36 | * | jubalh quit (Ping timeout: 252 seconds) |
19:56:26 | rgv151 | I implemented it, going to make a PR now |
19:57:40 | dom96 | awesome thanks! |
19:58:26 | rgv151 | you are welcome |
20:09:06 | rgv151 | PR'ed |
20:11:23 | dom96 | merged :) |
20:11:33 | rgv151 | thank you |
20:16:28 | dtscode | Is it better to make feature requests in here or on github? |
20:16:47 | Demos | Probably make them on the forum |
20:16:48 | Demos | idk |
20:21:36 | Araq | dtscode: most people (mis)use the bug tracker for that |
20:21:59 | dtscode | Araq: So I should do it there? |
20:22:21 | Araq | no tell me now, you made me curious |
20:24:09 | dtscode | Its not a major one. I was just wondering if it was possible to add default: as an alias for else: specifically for cases |
20:24:30 | dtscode | cause as a c/++ programmer I keep writing default and wondering why errors about not covering every case pop up |
20:25:38 | * | EXetoC joined #nim |
20:25:40 | EXetoC | :o |
20:25:41 | fowl | Damnit dts |
20:25:48 | fowl | You're just like everybody else |
20:25:51 | Araq | hrm, tough one, cannot see that working out |
20:26:14 | Araq | would require yet another keyword for an issue that goes away when you write more nim code |
20:26:37 | fowl | "Hey i just came from X language, can we add features from X to nim to make it easier for me to write nim" |
20:26:53 | Araq | EXetoC: hahaha, people use your mongo wrapper. don't hide |
20:27:15 | EXetoC | just clone java, but change the name |
20:27:44 | * | rgv151 quit (Ping timeout: 246 seconds) |
20:27:49 | EXetoC | Araq: I just never have any motivation |
20:27:56 | gokr | dtscode: Come on... ;) |
20:28:10 | Araq | EXetoC: but now you do :-) |
20:28:29 | dtscode | but see, most languages use default over else |
20:28:54 | gokr | But who wants to program in "most languages"? :) |
20:29:08 | dtscode | eh fair enough |
20:29:49 | federico3 | stupid question: can "default" be implemented using a template or a macro based on "else"? |
20:30:22 | gokr | But generally - an alias? I would actually supporting a change more than "adding an alias". Aliases for these things are IMHO just hurtful. |
20:30:30 | fowl | No because a bare else is not valid syntax |
20:30:46 | gokr | And ... why do we want to make our own little dialects like this? |
20:30:55 | dtscode | says the guy writing ni |
20:31:04 | gokr | That's not a Nim dialect. |
20:31:07 | Araq | Nim got its syntax from Delphi and Python. Or perhaps Modula 3 and python. python got its from Modula 3 too so ... it's more consistent than most people realize. or maybe I'm nuts. |
20:31:08 | EXetoC | make it awesome, and don't compromise |
20:31:10 | gokr | Thats a different language. |
20:31:16 | EXetoC | that's my philosophy :p |
20:31:36 | gokr | dtscode: And generally, ni is a stupid name btw. |
20:31:46 | dtscode | of course "D |
20:31:55 | Araq | federico3: you can have a 'match' macro that uses 'default' |
20:32:08 | gokr | But my point being, everyone is used to different little things. |
20:32:31 | gokr | So you can't win that game so to speaj. |
20:32:33 | gokr | speak. |
20:33:09 | gokr | What one can do however is improve compilation errors etc to try to help people understand what the heck they just did wrong. |
20:33:37 | gokr | I have a few things i keep doing wrong too. And some of them annoyingly takes a bit of time to discover, every time. |
20:37:10 | Araq | actually in my original design the #! syntax was a core feature allowing mutliple syntaxes to co-exist peacefully so that everybody can use his prefered syntax. The whole "comments are part of the AST" idea comes from that. But meh since it requires extensive editor support anyway, it can just live entirely in the editor. |
20:37:32 | pigmej | reactormonk: pign |
20:37:33 | pigmej | ping |
20:37:43 | EXetoC | Araq: not really |
20:38:22 | EXetoC | if only I could make all problems go away so that I could just focus on them libs for a while. oh well |
20:39:27 | reactormonk | pigmej, IRC is async you know, just write and I'll answer in due time |
20:40:01 | pigmej | reactormonk: yeah yeah sure, but I will be off in next hour or so and then I would need to read backlog ;P |
20:40:02 | Araq | gokr: make a list of these things please |
20:40:11 | pigmej | reactormonk: how we want to test thing-at-point for example? |
20:40:13 | gokr | yeah, I should |
20:40:21 | pigmej | I checked the tests directory and... no clue at all |
20:40:37 | reactormonk | pigmej, err. |
20:41:18 | gokr | Araq: Does the comments exist in the AST? So ... macros can take Nim comments and generate say... Smalltalk comments? (thinking of SqueakNim) |
20:41:28 | * | vendethiel- joined #nim |
20:41:52 | reactormonk | pigmej, I guess just test nim-thing-at-point--format-minibuffer - close enough, if at all |
20:42:12 | reactormonk | pigmej, I actually think it's not worth testing here. |
20:42:28 | pigmej | yeah that's why I asked, because... bad tests are worse than nothing, |
20:42:38 | reactormonk | Better spend your time testing nimsuggest if you feel like it |
20:42:45 | Araq | gokr: doc comments, yes. |
20:42:49 | EXetoC | why couldn't comment remain in the AST while having some rules be changed? |
20:42:55 | EXetoC | ok |
20:42:58 | EXetoC | fair enough |
20:43:07 | gokr | Araq: nice |
20:43:22 | pigmej | reactormonk: yeah, and we have to improve docs ;) |
20:43:35 | * | vendethiel quit (Ping timeout: 252 seconds) |
20:47:07 | * | EXetoC left #nim ("WeeChat 1.2") |
20:54:26 | * | Jesin joined #nim |
21:05:07 | * | Kingsquee joined #nim |
21:10:41 | FedeOmoto | can someone please tell me what I'm doing wrong?: |
21:10:49 | FedeOmoto | type |
21:10:49 | FedeOmoto | Data[T] = ref object of RootObj |
21:10:49 | FedeOmoto | data: T |
21:10:49 | FedeOmoto | Type = ref object of RootObj |
21:10:49 | FedeOmoto | SubType[T] = ref object of Type |
21:10:50 | FedeOmoto | data: Data[T] |
21:10:54 | FedeOmoto | SubSubType = ref object of SubType |
21:10:56 | FedeOmoto | SubSubSubType = ref object of SubSubType |
21:11:06 | FedeOmoto | when I compile that code snippet I get a SIGSEGV |
21:11:44 | FedeOmoto | the last line produces the SIGSEGV, if it's removed, it compiles ok |
21:11:45 | Xe | what platform? |
21:11:58 | FedeOmoto | linux x86_64 |
21:12:14 | Xe | i'm seeing that too |
21:12:21 | Xe | might be worthwhile to open a github issue |
21:12:25 | Xe | nim 0.11.2 |
21:12:36 | FedeOmoto | 0.11.2 here too |
21:13:23 | Araq | fixed on devel :P |
21:13:32 | Araq | well just kidding. I don't know |
21:13:54 | ozra | FedeOmoto: Does it work if you explicitly add [T] in the inheritance? |
21:15:38 | ozra | SubSubType[T] = ref object of SubType[T] ... |
21:15:41 | Xe | ozra: added [T] in the inheritance chain |
21:15:46 | Xe | it still segfaults |
21:15:50 | ozra | Ok |
21:16:39 | Xe | https://github.com/nim-lang/Nim/issues/3038 |
21:19:42 | * | strcmp1 quit (Ping timeout: 252 seconds) |
21:21:58 | * | strcmp1 joined #nim |
21:23:40 | FedeOmoto | ozra: what Xe said :P |
21:24:00 | Xe | FedeOmoto: can you confirm on the github ticket that you are also affected? |
21:25:41 | FedeOmoto | Xe: done, and thx for opening the issue! |
21:30:30 | Araq | ozra: want to work on lamdalifting (LL) instead? |
21:30:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:30:47 | Araq | I heard it's way harder than generic inheritance |
21:40:14 | * | pregressive quit (Ping timeout: 252 seconds) |
21:45:25 | * | nodejs joined #nim |
21:46:21 | nodejs | is there something missing in this code? it won't compile: |
21:46:23 | nodejs | proc ctof*(cel: float): float = result = (9/5) * cel + 32 |
21:47:12 | Demos | what's the error? |
21:47:45 | nodejs | expected int int |
21:48:24 | nodejs | should it compile correctly? |
21:48:57 | * | jszymanski quit (Quit: computer sleeps...) |
21:51:11 | FedeOmoto | nodejs: It compiles fine with 0.11.2 on Linux 64bit |
21:52:21 | nodejs | must be a problem with my computer/compiler |
21:52:23 | FedeOmoto | BTW, you can just write: proc ctof*(cel: float): float = (9/5) * cel + 32 |
21:52:30 | nodejs | thanks! |
21:52:34 | FedeOmoto | np |
21:52:55 | nodejs | does it also work when you call it? |
21:53:01 | FedeOmoto | yep |
21:53:17 | nodejs | great |
21:54:25 | FedeOmoto | [fomoto@terminus compiler]$ cat d.nim |
21:54:25 | FedeOmoto | proc ctof*(cel: float): float = (9/5) * cel + 32 |
21:54:25 | FedeOmoto | echo ctof(1.4) |
21:54:25 | FedeOmoto | [fomoto@terminus compiler]$ nim --verbosity: 0 -r c d |
21:54:25 | FedeOmoto | 34.52 |
21:55:29 | nodejs | hrm |
21:59:54 | * | FedeOmoto quit (Quit: Leaving) |
22:00:55 | * | nodejs quit (Quit: Page closed) |
22:03:31 | * | doxavore quit (Quit: I said good day, sir.) |
22:07:14 | * | pregressive joined #nim |
22:10:24 | * | Varriount|Mobile joined #nim |
22:11:33 | * | pipeep quit (Ping timeout: 256 seconds) |
22:11:49 | * | pregressive quit (Ping timeout: 264 seconds) |
22:12:18 | * | pipeep joined #nim |
22:20:56 | * | strcmp2 joined #nim |
22:23:05 | * | strcmp1 quit (Ping timeout: 264 seconds) |
22:26:37 | * | vasher_ joined #nim |
22:32:06 | * | elbow_jason joined #nim |
22:35:32 | ozra | Araq: More complicated? Would be delighted! Not ;-) |
22:39:10 | Varriount|Mobile | Araq: Hey, should it be possible to use 'addr' as a procedure name? |
22:39:36 | Varriount|Mobile | ozra: Thanks for all the help with the highlighting for NimLime |
22:41:39 | * | Guest80548 joined #nim |
22:42:44 | ozra | Varriount: np! |
22:43:58 | Varriount|Mobile | Araq: Whether it's intended or not, I've written up a seq-based wide string type which overloads addr() to mimic current WideString behavior. |
22:46:15 | fowl | You can overload addr? |
22:48:31 | * | Trustable quit (Remote host closed the connection) |
22:49:37 | * | Demos quit (Remote host closed the connection) |
22:49:59 | * | Demos joined #nim |
22:51:58 | * | Demos quit (Remote host closed the connection) |
22:53:53 | * | xdc left #nim (#nim) |
23:11:30 | * | elbow_jason quit (Quit: Leaving) |
23:20:31 | * | Varriount|Mobile quit (Ping timeout: 246 seconds) |
23:47:30 | * | boopsies is now known as boopsiesisaway |