00:11:50 | FromDiscord | <treeform> but its not |
00:21:00 | * | krux02 joined #nim |
00:22:55 | FromGitter | <rayman22201> I haven't actually tested any of this, but looking through the code of threadPool, it starts with min(minThreadPoolSize, numCPUs) but it will try a "smart" algorithm for creating new threads based on on some hueristics ⏎ @see: https://github.com/nim-lang/Nim/blob/master/lib/pure/concurrency/threadpool.nim#L469 ⏎ and https://github.com/nim-lang/Nim/blob/ecbbefcc83c3e2b95b3f9 |
00:22:55 | FromGitter | ... abcad17424820c10997/lib/pure/concurrency/cpuload.nim#L31 |
00:23:21 | FromDiscord | <treeform> I see. |
00:24:45 | * | krux02_ joined #nim |
00:25:00 | * | krux02_ quit (Client Quit) |
00:26:16 | * | icebattle quit (Quit: leaving) |
00:37:45 | FromGitter | <Varriount> A thread pool is for a series of short running tasks |
00:37:54 | FromGitter | <Varriount> Not infinite running ones |
00:40:34 | * | vivus joined #nim |
00:55:46 | * | dddddd quit (Remote host closed the connection) |
01:50:08 | * | amosbird quit (Remote host closed the connection) |
01:50:34 | * | amosbird joined #nim |
02:16:47 | FromGitter | <gogolxdong> I don't remember the name of iterate on object fields |
02:17:56 | FromGitter | <gogolxdong> further more I need to extract the pragma part ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b5fc6d312f1be713769497c] |
02:24:02 | FromGitter | <Varriount> @gogolxdong `fields` procedure. |
02:27:02 | FromGitter | <gogolxdong> thanks for reminding , how to extract pragma part? |
02:27:35 | * | stefanos82 quit (Quit: Quitting for now...) |
02:40:36 | FromGitter | <gogolxdong> can I add custom macro as pragma right after object like proc? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b5fcc2395988830b08c9442] |
02:41:17 | FromGitter | <gogolxdong> Error: attempting to call undeclared routine: 'soap' |
02:44:28 | FromGitter | <Varriount> You can use getType and getTypeImpl |
02:55:13 | FromGitter | <gogolxdong> great, what we need. |
02:55:13 | * | vivus quit (Quit: Leaving) |
02:58:40 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b5fd05f33154658457edd52] |
02:58:59 | FromGitter | <gogolxdong> pragma part doesn't show up. |
03:22:11 | * | endragor joined #nim |
03:50:34 | * | Jesin joined #nim |
04:02:21 | * | endragor_ joined #nim |
04:02:26 | * | endragor quit (Read error: Connection reset by peer) |
04:07:40 | * | byte512_ joined #nim |
04:08:01 | * | byte512 quit (Ping timeout: 248 seconds) |
04:12:35 | * | brainproxy quit (Ping timeout: 240 seconds) |
04:22:18 | * | dorelix quit (Quit: Leaving) |
04:40:17 | * | brainproxy joined #nim |
04:52:28 | * | derlafff quit (Quit: No Ping reply in 180 seconds.) |
04:53:34 | * | derlafff joined #nim |
05:13:34 | * | brainproxy quit (Ping timeout: 265 seconds) |
05:25:06 | * | nsf joined #nim |
05:41:33 | * | brainproxy joined #nim |
05:50:34 | * | Vladar joined #nim |
05:59:29 | * | krux02 quit (Remote host closed the connection) |
06:14:27 | * | brainproxy quit (Ping timeout: 240 seconds) |
06:16:56 | * | Jesin quit (Ping timeout: 268 seconds) |
06:47:32 | * | brainproxy joined #nim |
06:53:22 | * | Jesin joined #nim |
07:03:19 | leorize | hi, how long should threads/tmanyjoin test run? |
07:14:07 | FromGitter | <gogolxdong> How to get the pragma part of each type field? |
07:18:50 | * | Jesin quit (Quit: Leaving) |
07:20:41 | * | brainproxy quit (Ping timeout: 276 seconds) |
07:21:30 | FromGitter | <mratsim> I think there was an issue regardigng that. getTypeImpl didn’t give it iirc |
07:22:46 | FromGitter | <mratsim> ah no: https://github.com/nim-lang/Nim/issues/7451 it’s not at the field level |
07:22:56 | FromGitter | <mratsim> —> symbol.getImpl @gogolxdong |
07:27:09 | * | yglukhov[i] joined #nim |
07:44:12 | FromGitter | <gogolxdong> yes, but it has been deprecated, should find alternative solution. |
07:50:02 | * | brainproxy joined #nim |
07:51:22 | FromGitter | <gogolxdong> it's getImpl. |
08:02:54 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b6017ae17c942036b85901d] |
08:04:07 | * | gmpreussner_ joined #nim |
08:04:22 | * | gmpreussner quit (Ping timeout: 245 seconds) |
08:22:42 | * | brainproxy quit (Ping timeout: 244 seconds) |
08:24:08 | * | krux02 joined #nim |
08:27:04 | * | Vladar quit (Read error: Connection reset by peer) |
08:28:16 | * | Vladar joined #nim |
08:28:16 | * | brainproxy joined #nim |
08:33:34 | * | brainproxy quit (Ping timeout: 260 seconds) |
08:34:16 | * | dddddd joined #nim |
08:51:26 | FromGitter | <Bennyelg> executing sql commands using `.` not working on db_sqlite |
08:51:32 | FromGitter | <Bennyelg> should I point it as a bug ? |
08:51:58 | FromGitter | <Bennyelg> `conn.exec(sql".schema tableX")` returns error |
08:53:37 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b60239017c942036b85b2ca] |
08:55:20 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b6023f833154658457fa818] |
08:55:38 | FromGitter | <gogolxdong> ```objExtend = check newIdentNode(n.params[i][1].strVal)``` |
08:58:26 | FromGitter | <gogolxdong> the object type we need is fetched from field pragma , and to get the field pragma recursively until it's not object type ,this hints `Error: node has no type` |
08:59:50 | FromGitter | <gogolxdong> all objects have been generated in another file and exported. |
09:06:46 | FromGitter | <gogolxdong> PropertyFilterSpec is ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ how to look up and get the field of it from n.params[i][1].strVal ? [https://gitter.im/nim-lang/Nim?at=5b6026a6f52b276ced551fa9] |
09:20:34 | FromGitter | <gogolxdong> it works like jump to definition . |
09:24:46 | * | BitPuffin joined #nim |
09:37:58 | * | brainproxy joined #nim |
09:42:06 | * | Vladar quit (Quit: Leaving) |
09:47:04 | FromGitter | <gogolxdong> echo lineInfo n.params[i][1] shows it's the parameter in `proc RetrievePropertiesEx` |
09:51:05 | FromGitter | <gogolxdong> Should I do as nimsuggest if need to fetch fields of an object fetched from object pragma field? |
09:51:40 | * | Vladar joined #nim |
09:56:24 | * | zama quit (Ping timeout: 260 seconds) |
09:57:16 | * | zama joined #nim |
10:09:52 | * | noonien joined #nim |
10:10:30 | * | zama_ joined #nim |
10:10:57 | * | brainproxy quit (Ping timeout: 240 seconds) |
10:11:45 | * | zama quit (Remote host closed the connection) |
10:21:03 | * | zama_ quit (Changing host) |
10:21:03 | * | zama_ joined #nim |
10:21:13 | * | zama_ is now known as zama |
10:29:10 | krux02 | https://images-na.ssl-images-amazon.com/images/I/61s3ZfT35HL.jpg |
10:33:37 | * | wildlander quit (Quit: Konversation terminated!) |
10:34:44 | * | wildlander joined #nim |
10:38:43 | * | brainproxy joined #nim |
11:12:02 | * | brainproxy quit (Ping timeout: 256 seconds) |
11:19:47 | zacharycarter[m] | I remember that movie krux02 |
11:19:53 | FromGitter | <data-man> @Bennyelg: ```.schema```, ```.tables```, ```.indexes``` and ```.databases``` aren't sqlite's commands. These are the sqlite shell commands. |
11:20:28 | FromGitter | <Bennyelg> so If I want to change sqlite to be .mode csv |
11:20:35 | FromGitter | <Bennyelg> how I can implement it via nim directly |
11:25:35 | Araq | you parse the csv and pump it into sql via an insert command |
11:26:08 | FromGitter | <Bennyelg> :D |
11:26:29 | FromGitter | <data-man> @Bennyelg: There is https://www.sqlite.org/csv.html extension. Maybe can be usefull for you. |
11:26:34 | FromGitter | <Bennyelg> bad Idea I guess if sqlite provide this ability already i guess |
11:27:27 | FromGitter | <mratsim> I used this 2 months ago to convert several GBs of CSV to sqlite - https://github.com/simonw/csvs-to-sqlite |
11:33:52 | FromGitter | <Bennyelg> :/ |
11:34:00 | Araq | mratsim: well it's not clear if a tool suffices or if that feature needs to be part of his project |
11:38:50 | * | brainproxy joined #nim |
11:38:51 | * | Vladar quit (Quit: Leaving) |
11:59:11 | * | Vladar joined #nim |
12:06:38 | * | mgdelacroix quit (Quit: Connection closed for inactivity) |
12:09:50 | * | Vladar quit (Quit: Leaving) |
12:10:38 | * | bjz joined #nim |
12:11:16 | * | bjz quit (Client Quit) |
12:11:44 | * | brainproxy quit (Ping timeout: 260 seconds) |
12:22:06 | zacharycarter[m] | https://grain-lang.org/ |
12:23:38 | Araq | yay, more functional languages |
12:23:51 | zacharycarter[m] | yeah - that was my first thought |
12:24:26 | zacharycarter[m] | although it's written in OCaml so surprise |
12:24:30 | zacharycarter[m] | no surprise* |
12:24:50 | zacharycarter[m] | seems like functional OCaml is all the rage with hipster web devs these days |
12:25:50 | zacharycarter[m] | if I could figure out how to handle gc refing closures passed to add and removeevent handlers - I could make progress on my nim wasm web project |
12:25:52 | zacharycarter[m] | but I have no idea what to do there |
12:26:24 | Araq | the 'w' part of 'wasm' is a lie ;-) |
12:26:58 | FromGitter | <Bennyelg> Question; I want to use cligen but I want for some argument to be typed without showing the content (specially for passwords) |
12:27:02 | zacharycarter[m] | isn't wasm basically an open flash? |
12:27:27 | zacharycarter[m] | or java applet? |
12:27:33 | FromGitter | <Bennyelg> eg: --use_tags=true --username=timor --password=**** |
12:27:51 | Araq | as they are still figuring out how to access the web technologies with their everything-is-now-an-array-of-words-again ideas |
12:29:10 | Araq | Bennyelg, that's not how things work, you need to read passwords from stdin, not from the command line arguments |
12:29:55 | FromGitter | <Bennyelg> yeah you are right |
12:30:20 | * | NimBot joined #nim |
12:32:56 | FromGitter | <gogolxdong> GET http://bafang.cloud/index.html 400 (Bad Request) any idea? |
12:37:32 | FromGitter | <gogolxdong> GET http://bafang.cloud/favicon.ico 400 (Bad Request) |
12:38:12 | Araq | don't DOS bafang? |
12:38:19 | FromGitter | <Bennyelg> anyway to --help on cligen from inside the nim code? (in case none of the options are selected) |
12:40:28 | Araq | dunno but there is terminal.readPasswordFromStdin for reading passwords |
12:40:44 | FromGitter | <Bennyelg> thanks |
12:42:43 | * | brainproxy joined #nim |
12:47:32 | FromGitter | <gogolxdong> use ip address no error from console, but still 400 Bad Request Jester 0.4.0 |
12:53:19 | dom96 | https://github.com/dom96/jester/issues/152 |
12:53:27 | dom96 | It's effectively a 404 |
12:57:16 | FromGitter | <gogolxdong> what to do then? |
12:57:49 | dom96 | `get "/index.html"`? |
12:58:37 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b605cfd17c942036b867c34] |
13:01:02 | livcd | do we have something like a go-git laying around ? |
13:04:02 | FromGitter | <gogolxdong> @dom96 what to do then? |
13:04:22 | FromGitter | <gogolxdong> it used to work in the afternoon. |
13:04:57 | * | stefanos82 joined #nim |
13:05:16 | FromGitter | <gogolxdong> we added a favicon.ico , and it became so. |
13:09:18 | dom96 | gogolxdong: did you upgrade Jester? |
13:10:01 | FromGitter | <gogolxdong> How to upgrade jester? |
13:12:13 | FromGitter | <gogolxdong> nimble install jester and overwrite? |
13:12:21 | FromGitter | <gogolxdong> I used so. |
13:12:34 | FromGitter | <gogolxdong> it's the latest. |
13:12:56 | dom96 | I'm asking if you did this |
13:13:03 | dom96 | Because that's likely what caused your program to break |
13:13:37 | livcd | hmm i guess we do not |
13:15:49 | FromGitter | <gogolxdong> @dom96, it's the latest, it used to work serveral hours ago. |
13:15:58 | * | brainproxy quit (Ping timeout: 264 seconds) |
13:16:40 | dom96 | Did you restart it during those hours? |
13:16:45 | dom96 | Did you change anything? |
13:16:47 | dom96 | Did you recompile it? |
13:19:24 | FromGitter | <gogolxdong> added a favicon.ico , didn't change server file. |
13:21:11 | dom96 | So does removing fix it? |
13:22:33 | FromGitter | <gogolxdong> this is the strange thing , we checkout to previous commit which has no favicon.ico , but still the same. |
13:24:01 | dom96 | Try downgrading to Jester 0.2.1 |
13:24:10 | dom96 | `nimble install [email protected]` |
13:25:29 | FromGitter | <gogolxdong> doesn't work. |
13:27:11 | dom96 | Recompiled and restarted? |
13:28:52 | FromGitter | <gogolxdong> sure. |
13:29:18 | dom96 | Then why is this showing 0.4.0? http://bafang.cloud/index.html |
13:29:48 | FromGitter | <gogolxdong> it's the DNS cache |
13:30:11 | dom96 | What does DNS have to do with this? |
13:30:19 | dom96 | Have you update the IP that your domain points at? |
13:30:23 | dom96 | *updated |
13:31:42 | FromGitter | <gogolxdong> I tried ip address, it's 0.4.0 , but I have installed using nimble install [email protected] |
13:32:46 | FromGitter | <gogolxdong> 1) 251.109.118 |
13:34:09 | FromGitter | <gogolxdong> how to check which jester version compiled? |
13:34:52 | FromGitter | <gogolxdong> there is jester-0.2.1 and jester-0.4.0 under ~/.nimble/pkgs/ |
13:38:45 | FromGitter | <generative99> Is there no alias for bitwise and/or just for readability? |
13:38:57 | FromGitter | <generative99> to differentiate from logical and/or |
13:39:36 | FromGitter | <gogolxdong> there is too much compile error of jester-0.2.1 |
13:43:28 | dom96 | Does your program have a .nimble file? |
13:43:41 | dom96 | if so you can add `requires "jester 0.2.1"` in there |
13:43:49 | dom96 | then running `nimble c program.nim` will use jester 0.2.1 |
13:44:00 | dom96 | `nim c` will use whatever latest version you have installed |
13:44:09 | dom96 | so you can also remove 0.4.1: nimble remove [email protected] |
13:44:16 | dom96 | or sorry, 0.4.0 |
13:44:19 | * | brainproxy joined #nim |
13:49:53 | Araq | yay, 800MB instead of 400MB for bootstrapping due to a bugfix :-/ |
13:53:16 | * | geocar quit (Quit: Connection closed for inactivity) |
13:55:31 | FromGitter | <mratsim> @generative99 you can use templates to create your own aliases. |
14:00:05 | * | endragor_ quit (Remote host closed the connection) |
14:00:51 | stefanos82 | Araq: LOL! |
14:01:43 | stefanos82 | for some reason Araq this image came to my mind when you said this https://i.kym-cdn.com/entries/icons/original/000/006/306/FlipTable.jpg |
14:01:45 | * | Vladar joined #nim |
14:02:15 | Araq | lol, that's hilarious |
14:02:44 | stefanos82 | I know, I love it :D |
14:04:59 | stefanos82 | by the way Araq, there's an issue with GCC's migration from SVN to Git and Eric S. Raymond is thinking to migrate his Python app to Golang and I have sent him an email suggesting to check Nim instead. I hope he replies back with some positive feedback. |
14:09:42 | Araq | will be interesting to see what he thinks |
14:12:45 | * | endragor joined #nim |
14:13:10 | dom96 | indeed |
14:13:12 | FromGitter | <mratsim> ounds liek Mercurial issues, except that they moved from Python to Rust: https://www.mercurial-scm.org/wiki/OxidationPlan |
14:13:18 | FromGitter | <mratsim> sounds like* |
14:14:10 | dom96 | 771 responses on our survey :) |
14:14:14 | FromGitter | <mratsim> unless it’s an April Fools? Current Status (last updated April 1, 2018) |
14:14:35 | Araq | "A compiler which compiles C++ to C does full syntax and semantic checking on the program, and just happens to use C code as a way of generating object code. Such a compiler is not merely some kind of fancy macro processor. (And please don’t email me claiming these are preprocessors — they are not — they are full compilers.)" |
14:14:38 | FromGitter | <mratsim> but iirc Mercurial mentionned their Python slowness issue several times on HN |
14:14:48 | Araq | replace "Preprocessor" with "transpiler" :-) |
14:17:19 | * | endragor quit (Ping timeout: 265 seconds) |
14:17:38 | FromDiscord | <awr> wrt what people normally think of when they think of transpilers (not nim), is it expected that the transpiled contents be human-readable? |
14:17:44 | * | brainproxy quit (Ping timeout: 260 seconds) |
14:18:04 | FromDiscord | <awr> the only transpiled language i can think of off the top of my head is coffeescript |
14:18:07 | Araq | no, that would be a source to source translator |
14:19:11 | FromDiscord | <awr> i thought that was synonymous with transpilation |
14:19:16 | FromDiscord | <awr> wiki seems to think so |
14:19:20 | FromDiscord | <awr> https://en.wikipedia.org/wiki/Source-to-source_compiler |
14:20:50 | Araq | everybody, including wiki, has problems with words that make no sense. |
14:25:53 | * | brainproxy joined #nim |
14:27:00 | FromDiscord | <awr> the terminology what is and isn't a transpiler is a little confusing |
14:27:45 | * | cryptocat1094 joined #nim |
14:28:24 | Araq | yes, but now I know, a transpiler is a preprocessor. |
14:28:41 | Araq | it's just that word fell out of fashion. |
14:28:56 | FromDiscord | <awr> on one end you have stuff like coffeescript that act as a preprocessor + some magic and on the other end you have stuff like nim and emscripten whose output language happens to be originally intended for human reading and writing but is used more like an IR language and a portability mechanism if anything |
14:29:13 | FromGitter | <gogolxdong> migrated to Go web framework, it works. |
14:31:45 | leorize | Anyone have any idea how to debug tcompilerapi test? |
14:32:05 | Araq | leorize, what about it? it should be green |
14:32:11 | leorize | I can't compile the file without using testament |
14:32:22 | dom96 | gogolxdong: did you try what I suggested? |
14:32:38 | leorize | Araq: I'm porting Nim to Haiku so I'm trying to fix tests that aren't working |
14:32:59 | leorize | got "cannot find Nim's standard library" :/ |
14:35:52 | Araq | ah :-) |
14:40:19 | FromGitter | <gogolxdong> until found 0.2.1 has many compile error. |
14:40:58 | FromGitter | <gogolxdong> didn't have enough time,will check later. |
15:03:37 | leorize | Araq: is it possible to make testament build a binary with debuginfo? |
15:04:26 | Araq | sure but if 'nim c -r tests/tcompilerapi' fails, you can as well just add debug info there. but |
15:05:27 | stefanos82 | the question is leorize, which GCC are you pointing at your nim? Haiku comes with 2 separate versions; a fork of GCC2 for their kernel build and GCC7 for the rest of the stuff |
15:05:40 | Araq | the code to read is in compiler/nimeval.nim, proc findNimStdLib |
15:05:57 | Araq | probably 'findExe' is wrong on Haiku |
15:06:11 | leorize | Araq: using nim c -r got "cannot open file: std/os" |
15:06:28 | leorize | and somehow testament magically able to build it :/ |
15:06:37 | leorize | stefanos82: I'm running gcc7 |
15:06:45 | stefanos82 | very nice |
15:10:16 | leorize | Araq: got the test passed :D |
15:10:32 | leorize | looks like the test was designed with the assumption that nim is installed? |
15:11:08 | leorize | I added the folder w nim executable to PATH and it worked :) |
15:13:20 | Araq | well 'findExe' uses your PATH |
15:13:34 | Araq | how else could it find it, I mean it's an example program |
15:13:52 | Araq | you can write your own findNimStdLib() |
15:14:52 | leorize | I thought the test was supposed to run before Nim is installed? |
15:15:28 | * | nsf quit (Quit: WeeChat 2.2) |
15:15:34 | Araq | really? do we want people to wait for one hour before installation can start? |
15:15:42 | leorize | it's a small fix to the build script anw, so it's all fine :P |
15:15:59 | Araq | well PRs are always welcome |
15:16:32 | leorize | our build system isolate the build in chroot, so the compiler is not installed yet at that point |
15:16:53 | leorize | it's mainly for regression testing, not something for the user to wait |
15:17:24 | leorize | thanks to Nim I found a few bugs in Haiku :D |
15:23:31 | FromGitter | <Varriount> leorize: Like? |
15:24:03 | leorize | mainly bugs in our impl of posix functions |
15:28:09 | zacharycarter[m] | what does projectpath equate to in a nim.cfg file? |
15:39:07 | zacharycarter[m] | nm I got it figured out |
15:46:44 | zacharycarter[m] | or maybe not :/ |
16:01:31 | zacharycarter[m] | hrm - how can I have relative imports using path: in a nim.cfg file in both a src and test directory? |
16:01:53 | zacharycarter[m] | the src one seems to work file - but when I try to run tests, the cfg in the src directory doesn't get regarded |
16:05:00 | * | Ven`` joined #nim |
16:05:29 | zacharycarter[m] | nm that wasn't my problem |
16:15:05 | * | Trustable joined #nim |
16:46:03 | * | Vladar quit (Remote host closed the connection) |
16:51:25 | bozaloshtsh | Is there a way to declare every proc with a pragma without adding it to each definition? |
16:51:51 | FromGitter | <Quelklef> a macro |
16:52:26 | bozaloshtsh | I'm trying to use this with a codebase that has several files and tons of procs: https://github.com/yglukhov/coverage |
16:52:56 | FromGitter | <Quelklef> a macro |
16:53:04 | FromGitter | <Quelklef> what pragma are you trying to add? |
16:53:24 | * | icebattle joined #nim |
16:53:41 | bozaloshtsh | cov |
16:53:53 | bozaloshtsh | to enable coverage on everything |
16:54:01 | FromGitter | <Quelklef> Ah |
16:54:21 | FromGitter | <Quelklef> A macro |
16:54:38 | bozaloshtsh | so just put cov: at the top of each file? |
16:54:44 | FromGitter | <Quelklef> no |
16:55:01 | bozaloshtsh | ah then explain more please what is meant by "a macro" here |
16:55:07 | FromGitter | <Quelklef> Write a macro that adds the cov pramga to each proc decl |
16:55:19 | bozaloshtsh | oh like sed |
16:55:24 | FromGitter | <Quelklef> ..? |
16:55:40 | bozaloshtsh | you mean literally modify the code with regexp to add the pragma? |
16:55:45 | FromGitter | <Quelklef> No |
16:55:47 | FromGitter | <Quelklef> Uh |
16:55:51 | FromGitter | <Quelklef> Nim's macros are really powerful |
16:56:08 | FromGitter | <Quelklef> And work on a level more abstract than sourcecode |
16:56:18 | bozaloshtsh | right, but how am I supposed to make a macro that modifies all procs |
16:56:40 | FromGitter | <Quelklef> Well you'd write a macro that'd take in a `stmtList` and modify all procs in that |
16:56:45 | FromGitter | <Quelklef> and then in your file |
16:56:49 | FromGitter | <Quelklef> you'd do |
16:57:14 | FromGitter | <Quelklef> ```# to this ⏎ import X ⏎ import myCovWrapper ⏎ myCovWrapper: ⏎ code``` [https://gitter.im/nim-lang/Nim?at=5b6094ea17c942036b87c82e] |
16:57:54 | bozaloshtsh | actually I'm pretty sure the cov pragma is also a macro |
16:57:58 | bozaloshtsh | so I could just do cov: my code |
16:58:05 | FromGitter | <Quelklef> No |
16:58:10 | FromGitter | <Quelklef> Well, maybe. Probably not |
16:58:20 | bozaloshtsh | pretty sure that's how nim-defined pragmas work |
16:58:23 | FromGitter | <Quelklef> `cov` probably is a macro, but it probably works on proc definitons |
16:58:27 | FromGitter | <Quelklef> no, it's not |
16:58:45 | FromGitter | <Quelklef> `proc X() {.someMacro.} =` gets the singular proc definition |
16:58:45 | bozaloshtsh | macro: proc def is not the same as proc def {.macro.} ? |
16:58:53 | bozaloshtsh | ahh so can't do multiple procs in one shot |
16:58:56 | FromGitter | <Quelklef> right |
16:59:36 | bozaloshtsh | in any case, this might let me get coverage without messing with my source: https://hookrace.net/blog/nim-code-coverage/ |
16:59:52 | bozaloshtsh | thanks |
17:00:00 | FromGitter | <Quelklef> Looks like it |
17:00:30 | FromGitter | <Quelklef> Sure. By the way, take a look at Nim's macro system. It's really nice and absolutely worth learning |
17:02:29 | bozaloshtsh | I've read a bunch of macro code modifying the AST but honestly templates have been enough for me so far |
17:20:49 | * | krux02_ joined #nim |
17:23:27 | * | krux02 quit (Ping timeout: 240 seconds) |
17:31:11 | xomachine[m] | I might be mistaken, but is not a 'push' pragma made exactly for applying another pragmas to multiple entities? @bozaloshtsh |
17:32:48 | FromGitter | <Bennyelg> @dom96 771 THIS IS fantastic I thought 100 will be the number |
17:38:21 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:44:05 | FromGitter | <Varriount> zacharycarter: I got an A for my Nim Command Shell! 😄 |
17:56:34 | * | wildlander quit (Quit: Konversation terminated!) |
17:59:23 | FromGitter | <Bennyelg> nice one! |
18:08:04 | FromGitter | <Varriount> @Bennyelg The hardest part was implementing control flow commands |
18:08:19 | FromGitter | <Bennyelg> git link ? |
18:09:00 | FromGitter | <Varriount> https://github.com/Varriount/commandant/ |
18:14:30 | FromGitter | <Bennyelg> looks amaizing |
18:14:50 | FromGitter | <Bennyelg> I almost forgot that you are a brilliant kid |
18:19:12 | stefanos82 | @Varriount: can you add a couple of screenshots? It makes it even more appealing to the eye |
18:19:48 | stefanos82 | be back later folks |
18:19:48 | * | stefanos82 quit (Quit: Quitting for now...) |
18:20:41 | FromGitter | <rayman22201> @Varriount super cool! great job! |
18:21:18 | FromGitter | <Bennyelg> just compile it |
18:21:22 | FromGitter | <Bennyelg> and see, it's pretty nice |
18:21:35 | FromGitter | <Bennyelg> @Varriount nice task :P auto completion |
18:27:54 | FromGitter | <Bennyelg> next* |
18:32:24 | * | ng0 joined #nim |
18:32:32 | * | Vladar joined #nim |
18:40:58 | FromGitter | <kayabaNerve> @Varriount A? High school or college? |
18:49:05 | FromGitter | <krux02> @Varriount do you know fish shell? |
18:50:11 | FromGitter | <xmonader> How do i map this to nim? ``` ⏎ int (*fn)(void *) ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5b60af62c83d1230b13c9eac] |
18:50:35 | FromGitter | <krux02> it is a function pointer returning int and accepting a void * |
18:50:49 | FromGitter | <krux02> (pointer) -> int |
18:53:53 | FromGitter | <Varriount> @kayabaNerve College |
18:56:02 | FromGitter | <xmonader> @krux02 thanks it worked |
18:59:18 | FromGitter | <kayabaNerve> Congrats |
18:59:55 | FromGitter | <kayabaNerve> proc myProc(a: pointer): ptr cint {...} |
19:08:18 | FromGitter | <krux02> @kayabaNerve the function returns a normal cint not a ptr to cint. The * is bound to fn making it a function pointer. |
19:08:52 | FromGitter | <kayabaNerve> Oh; misread it. |
19:08:58 | FromGitter | <kayabaNerve> Sorry. |
19:09:17 | FromGitter | <kayabaNerve> Nim doesn't have function pointers; just functions. |
19:09:51 | FromGitter | <kayabaNerve> (proc (a: pointer): cint) |
19:09:53 | FromGitter | <kayabaNerve> ? |
19:10:31 | FromGitter | <kayabaNerve> ptr proc (a: pointer): cint maybe... no idea. Would have to try a few. Hopefully this helps enough to get you there. Sorry. |
19:12:18 | * | nsf joined #nim |
19:15:49 | FromGitter | <Bennyelg> echoing without new line ? |
19:18:34 | Araq | (proc (a: pointer): cint) is it. |
19:18:44 | Araq | echoing without newline, stdout.write |
19:19:28 | Araq | or stderr.write, you can ponder about this question forever, sometimes a choice is just a design bug |
19:19:54 | FromGitter | <Bennyelg> Idid something like write(stdout, "message") |
19:38:48 | * | CcxWrk quit (Remote host closed the connection) |
19:40:51 | * | CcxWrk joined #nim |
19:47:10 | * | jjido joined #nim |
20:04:07 | * | Trustable quit (Remote host closed the connection) |
20:08:59 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
20:17:37 | * | noonien quit (Quit: Connection closed for inactivity) |
20:26:05 | * | yglukhov[i] joined #nim |
20:29:34 | * | Ven`` joined #nim |
20:31:55 | FromGitter | <xmonader> What am I doing wrong here? ⏎ ⏎ ``` var child_stack = alloc(1024*1024) ⏎ var stack_top = child_stack.addr + (1024*1024)``` [https://gitter.im/nim-lang/Nim?at=5b60c73b12f1be71376cd968] |
20:38:36 | jjido | Is stack_top supposed to be a pointer or just a number to use as bound? |
20:40:16 | FromGitter | <xmonader> @jjido cstring pointer |
20:41:01 | FromGitter | <xmonader> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b60c95d966e803950337c9e] |
20:45:53 | FromGitter | <imdaveho> hi, I searched google and the forums, but couldnt find a good reference around how to best code/what needs to be considered with writing something with--gc:none. Since nim primitives assume the gc, is there anything out there that documents how to best manually manage memory in that case? for all user specified objects on the heap, that's a bit more clear... |
20:48:23 | FromGitter | <xmonader> ```code paste, see link``` ⏎ ⏎ still clone fails with -1 [https://gitter.im/nim-lang/Nim?at=5b60cb1744812258444889ee] |
20:52:03 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:55:37 | * | nsf quit (Quit: WeeChat 2.2) |
20:58:56 | * | Ven`` joined #nim |
20:59:31 | * | echotangoecho joined #nim |
21:01:21 | * | Vladar quit (Quit: Leaving) |
21:02:57 | cryptocat1094 | htop /quit later |
21:03:23 | * | cryptocat1094 quit (Quit: later) |
21:07:05 | * | icebattle quit (Ping timeout: 240 seconds) |
21:09:19 | * | yglukhov[i] quit (Remote host closed the connection) |
21:09:51 | * | yglukhov[i] joined #nim |
21:13:57 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
21:20:06 | * | BitPuffin quit (Remote host closed the connection) |
21:23:37 | * | jjido quit (Remote host closed the connection) |
21:28:45 | * | ng0 quit (Remote host closed the connection) |
21:30:50 | * | ng0 joined #nim |
21:32:08 | * | Ven` joined #nim |
21:35:46 | * | Ven`` quit (Ping timeout: 264 seconds) |
21:43:49 | FromGitter | <xmonader> ok this is annoying ... i copied the code from osproc and I still get -1 as result of clone? |
21:44:44 | FromGitter | <xmonader> oh damn! the problem was with the value of CLONE_NEWUTS... |
21:49:19 | FromGitter | <xmonader> @Araq the linux module doesn't have clone_newuts and when i use it it fails the clone syscall ... is it a bug? |
21:52:42 | * | echotangoecho quit (Quit: Lost terminal) |
22:05:05 | * | xet7 joined #nim |
22:05:56 | * | xet7 quit (Client Quit) |
22:10:16 | * | Sentreen quit (Quit: WeeChat 1.6) |
22:11:26 | * | Sentreen joined #nim |
22:31:39 | * | krux02__ joined #nim |
22:32:24 | * | krux02_ quit (Ping timeout: 260 seconds) |
22:53:39 | * | yglukhov[i] joined #nim |
22:57:57 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
23:02:27 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:04:33 | * | Sentreen quit (Ping timeout: 248 seconds) |
23:06:35 | * | Sentreen joined #nim |
23:19:53 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:23:36 | * | erratic quit (Ping timeout: 256 seconds) |
23:27:11 | FromGitter | <kayabaNerve> Posted a Nim bounty on Gitcoin :D Interested to see if anyone tries it or if I need to go elsewhere for the Nim-crowd |
23:31:44 | Araq | xmonader: no idea, sorry. |
23:43:07 | FromGitter | <xmonader> oh no :( |