00:01:45 | Araq | "refactoring" includes more things than field renames |
00:03:39 | Araq | "inline this proc", "extract proc from this snippet" |
00:04:05 | * | Serenit0r quit (Quit: Leaving) |
00:17:40 | * | endragor joined #nim |
00:21:57 | * | endragor quit (Ping timeout: 240 seconds) |
00:22:12 | FromGitter | <brentp> indeed. nim makes this much easier than something like python where a problem won't manifest until run-time, but I had good success (over)relying on tools in go. perhaps I haven't acquired the same facility with nim yet. |
00:36:19 | dom96 | "refactoring" includes many things |
00:36:25 | dom96 | but one thing is better than nothing... |
00:36:39 | dom96 | and identifier renames are the most basic and common operation |
00:49:53 | FromGitter | <brentp> yes, most of the stuff I'm thinking of is naming-related, but also if you know all callers of a given function, then you can easily refactor its arguments. I'm thinking of the utility that IIUC is provided by go-guru in vim-go. |
00:49:56 | FromGitter | <brentp> https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15JgRT5iM742gJkw5LtmQ/edit |
01:16:48 | Araq | dom96, I can rename with nimgrep, renaming is easy enough |
01:17:33 | Araq | I mean, sure it's not ideal, but if your refactoring tool can only rename, it's not interesting |
01:38:40 | * | vivus quit (Quit: Leaving) |
02:02:00 | * | MJCaley quit (Quit: MJCaley) |
02:06:58 | * | chemist69 quit (Ping timeout: 264 seconds) |
02:09:00 | * | MJCaley joined #nim |
02:09:11 | * | couven92 quit (Quit: Client Disconnecting) |
02:19:24 | * | MJCaley quit (Quit: MJCaley) |
02:20:38 | * | chemist69 joined #nim |
02:43:32 | * | mr_yogurt joined #nim |
02:43:54 | * | Amrykid2 joined #nim |
02:44:16 | * | Amrykid2 quit (Read error: Connection reset by peer) |
02:44:20 | * | astronav_ joined #nim |
02:44:51 | mr_yogurt | Varriount: looks like the ascii \127s (DELs) were being inserted by sublime (something with ctrl-backspace), not your plugin |
03:02:06 | * | ipjk_ joined #nim |
03:04:48 | * | ipjk quit (Ping timeout: 240 seconds) |
03:14:23 | * | yglukhov joined #nim |
03:23:13 | * | ipjk_ quit (Ping timeout: 248 seconds) |
03:29:04 | * | pwntus quit (Ping timeout: 248 seconds) |
03:32:31 | * | pwntus joined #nim |
03:36:35 | * | vlad1777d quit (Ping timeout: 255 seconds) |
03:46:30 | * | marenz__ joined #nim |
03:48:33 | * | rbrt joined #nim |
03:50:19 | * | marenz_ quit (Ping timeout: 250 seconds) |
03:54:43 | * | skrylar joined #nim |
03:55:19 | skrylar | semi-serious question time. should i bother with trying to set up github sites for the docs to this wrapper (and other libs, eventually) or rig some doc-to-markdown jiggery and cram it in the wiki |
04:17:37 | * | tefter joined #nim |
04:18:20 | * | astronav_ quit (Remote host closed the connection) |
04:22:57 | GitDisc | <treeform> I run into this problem too |
04:23:04 | GitDisc | <treeform> I set up github site for my docs |
04:23:08 | GitDisc | <treeform> but it feels like a huge pain |
04:23:47 | GitDisc | <treeform> https://treeform.github.io/chrono/ for https://github.com/treeform/chrono |
04:23:59 | GitDisc | <treeform> I think It could be set up better some how. |
04:25:01 | GitDisc | <treeform> I though maybe this site: https://nimble.directory/ could be the solution but no... |
04:26:00 | FromGitter | <brentp> if you have html, you can just put it into a docs/ directory and flip a switch in github settings. |
04:26:03 | GitDisc | <treeform> I always wish that nim doc would produce markdown not HTML, so that I can just stick it in github readme |
04:26:20 | GitDisc | <treeform> oh really I did not know that? |
04:26:32 | FromGitter | <brentp> aye |
04:26:53 | FromGitter | <brentp> https://github.com/brentp/nim-lapper |
04:27:05 | FromGitter | <brentp> https://brentp.github.io/nim-lapper/index.html |
04:27:43 | GitDisc | <treeform> hmm were is the switch I don't see it? |
04:27:55 | GitDisc | <treeform> what is this ".nojekyll" file? |
04:28:27 | FromGitter | <brentp> under main settings page, the option will appear once you have a `docs/` directory |
04:28:38 | FromGitter | <brentp> I don't think that's needed, but it used to be |
04:28:58 | GitDisc | <treeform> I see. I will try this. |
04:30:42 | * | dddddd quit (Remote host closed the connection) |
04:38:59 | skrylar | ergh. dislike embedded things that lack levers and switches |
04:41:10 | skrylar | The "embedded" firebird on Deb/Sid goes through a central install, with a plugin for embedded connections, so it still require installing the server package and having central confs (including the ability to say, turn off embedded plugins and bork software) |
05:01:12 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:01:58 | * | rauss quit (Quit: WeeChat 1.9.1) |
05:02:42 | * | jsgrant_ quit (Ping timeout: 240 seconds) |
05:03:35 | * | rauss joined #nim |
05:08:10 | * | mr_yogurt quit (Ping timeout: 260 seconds) |
05:10:34 | * | jsgrant_ joined #nim |
05:32:16 | * | yglukhov quit (Remote host closed the connection) |
05:34:16 | * | yglukhov joined #nim |
05:38:42 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:47:17 | * | rbrt quit (Quit: Oíche mhaith) |
05:48:21 | * | rbrt joined #nim |
05:49:24 | * | JappleAck joined #nim |
05:58:55 | FromGitter | <qqtop> @skrylar confirming ex03.nim worked . How would I connect to an existing db ? E.g. isocountry3.fdb in https://github.com/qqtop/NimFirebird/tree/master/Examples |
06:04:14 | * | rbrt quit (Quit: Oíche mhaith) |
06:07:16 | * | miran joined #nim |
06:07:18 | * | marenz__ quit (Ping timeout: 268 seconds) |
06:25:47 | skrylar | qqtop: that's just a connection string |
06:26:12 | skrylar | either attach_database and the string, or execute "attach database <etc>" as dsql |
06:28:46 | skrylar | oh. that used to be in ex02 but it was lost in a rewrite. bleh |
06:56:01 | * | SenasOzys_ quit (Ping timeout: 268 seconds) |
06:57:05 | * | jsgrant_ quit (Ping timeout: 248 seconds) |
07:00:51 | * | jsgrant joined #nim |
07:03:21 | * | jsgrant quit (Remote host closed the connection) |
07:03:49 | * | jsgrant joined #nim |
07:04:18 | * | SenasOzys_ joined #nim |
07:07:48 | * | SenasOzys_ quit (Remote host closed the connection) |
07:10:07 | * | SenasOzys joined #nim |
07:12:33 | * | jsgrant quit (Ping timeout: 248 seconds) |
07:18:20 | * | Trustable joined #nim |
07:21:37 | skrylar | qqtop: i may not actually be able to use this db myself though :( |
07:22:02 | skrylar | there seems to be a lot of things that aren't exposed in API; ex. the debian install wants to deal with lockfiles in a permissioned directory, and i can't seem to ask it not to |
07:23:01 | skrylar | i can deal with it personally (or for ex. server installs) but it's a major blocker for embedding in userland software |
07:31:51 | * | nsf joined #nim |
07:36:16 | skrylar | eh. ah well. its not like you get in the debian repos every day anyhow |
07:46:26 | * | earenndil quit (Quit: ZNC 1.6.3+deb1 - http://znc.in) |
07:47:11 | * | earenndil joined #nim |
07:49:15 | * | miran quit (Quit: Konversation terminated!) |
07:51:28 | FromGitter | <qqtop> Hmm, maybe you can try to install flamerobin from http://www.flamerobin.org/ to get some more insight . |
07:57:38 | skrylar | maybe. |
07:57:47 | skrylar | packages for debian are a lot.. harder to deal with than arch. |
07:58:07 | skrylar | in arch you just go get the flamerobin file from AUR and build it. debian seems to use *several* config files |
08:02:51 | skrylar | weird. |
08:03:39 | skrylar | i put in a firebird.conf next to the examples, it was supposed to force use of Engine12. It works, but then I get messed up results like this: -4294967294: seagull |
08:04:08 | * | miran joined #nim |
08:05:08 | * | Trustable quit (Remote host closed the connection) |
08:05:30 | skrylar | ah. i think i know what this is |
08:08:29 | skrylar | some memory corruption with xsqldas |
08:16:28 | skrylar | qqtop: well that was a whoops. 64 bit type in a 32-bit field. didn't crash because there was enough space, it just didn't write to all of it sometimes :x |
08:16:59 | FromGitter | <codenoid> hi araq |
08:23:28 | FromGitter | <mratsim> @treeform You may be able to use pandoc to convert HTML or rst to markdown. |
08:27:00 | FromGitter | <mratsim> @brentp for renaming VScode has a very good search/replace across repo with result preview. In my case it was more like breaking core functionality (how copy works) and not spending weeks finding obscure side-effects I relied on. |
08:29:15 | skrylar | mratsim: pandoc isn't much good at things that aren't going from its flavor of markdown |
08:29:35 | skrylar | it might read the rst files, but it's definitely going to lose almost all the structuring |
08:41:13 | * | claudiuinberlin joined #nim |
08:45:58 | skrylar | Oh joy. Zotero isn't running :X |
08:51:12 | * | SenasOzys quit (Ping timeout: 260 seconds) |
08:54:31 | * | SenasOzys joined #nim |
09:18:57 | * | JappleAck quit (Ping timeout: 248 seconds) |
09:27:13 | * | skrylar bothers mratsim to write a new one in nim :p |
09:30:53 | FromGitter | <mratsim> a pandoc or a zotero? :P |
09:31:39 | skrylar | a zotero but meh |
09:31:57 | skrylar | poking around with that weird zettelkasten program again |
09:33:09 | FromGitter | <mratsim> @dom96 @Araq We can’t see the OP here: https://forum.nim-lang.org/t/3362 |
09:38:20 | FromGitter | <mratsim> and this one too: https://forum.nim-lang.org/t/3367 |
10:01:42 | * | rauss quit (Read error: Connection reset by peer) |
10:02:28 | * | chemist69 quit (Ping timeout: 240 seconds) |
10:03:30 | * | rauss joined #nim |
10:12:46 | * | Vladar joined #nim |
10:16:26 | * | chemist69 joined #nim |
10:49:30 | * | xkapastel quit (Quit: Connection closed for inactivity) |
11:02:23 | * | Snircle joined #nim |
11:26:23 | FromGitter | <ephja> does nimsuggest leak with the new GC too? |
11:28:14 | FromGitter | <ephja> I wonder if the vscode plugin is unable to handle the case when nimsuggest is terminated by the user |
11:31:08 | * | vlad1777d joined #nim |
11:47:23 | * | couven92 joined #nim |
11:50:31 | miran | hmmm, i often experience suggestions stop working in vscode. any remedy for that? |
11:51:07 | couven92 | settings nim.projects in the .vscode/settings.json sometimes works for me |
11:51:53 | miran | couven92: what do you do with that setting? |
11:52:10 | couven92 | you specify the nimsuggest project |
11:52:16 | Araq | wow, pushed code at 3am and travis is still green |
11:52:28 | couven92 | Araq, good job! :D |
11:53:16 | couven92 | what is next? drunk commits? :P |
11:53:27 | miran | couven92: i'll see if that helps. suggestion-stop happens randomly, and it is not the same for all files in a working folder - for one file there are no suggestions, for other it works normally.... |
12:00:40 | Araq | the nimsuggest tests are red fwiw, need to fix the regressions |
12:00:59 | Araq | lesson learned, if it's not in the CI, it bitrots |
12:01:24 | couven92 | well that is the whole point of CI isnt't it? :P |
12:01:41 | Araq | sure. |
12:01:53 | Araq | so ... shiny new feature that everybody wants to use |
12:01:59 | couven92 | I saw a commented tester r nimsuggest (-ish) in travis.yml |
12:02:09 | Araq | 'runnableExamples' sections |
12:02:16 | couven92 | yeah! |
12:02:54 | Araq | mratsim should use it already in his flatten PR |
12:03:34 | couven92 | runnableexamples meaning in as a rst-section in nim docs? |
12:03:48 | couven92 | (as we talked about some days ago?) |
12:04:17 | Araq | runnableExamples are tested when you generate the documentation |
12:04:25 | Araq | and also are part of the documentation |
12:04:25 | couven92 | ah, cool! |
12:05:13 | Araq | no more duplications of tests and examples |
12:05:22 | Araq | and less code in doc comment |
12:05:38 | Araq | I really like it |
12:09:50 | dom96 | awesome |
12:10:20 | couven92 | so, that means I should modify my unicode PR as well? |
12:11:07 | Araq | probably |
12:12:42 | FromGitter | <ephja> miran: it mostly breaks because I kill it manually since firefox and other applications get killed otherwise |
12:12:54 | FromGitter | <ephja> and when working on files that are meant to be included |
12:18:17 | * | Serenitor joined #nim |
12:19:42 | Araq | ephja: include files work once you setup the project properly |
12:20:19 | FromGitter | <ephja> got it |
12:21:47 | * | SenasOzys quit (Ping timeout: 260 seconds) |
12:27:06 | Araq | ephja: it leaks with every GC since it's a logical leak |
12:27:26 | * | NimBot joined #nim |
12:27:51 | Araq | module gets patched, other things point to the old version |
12:29:21 | Araq | rich hickey styled programming ;-) |
12:29:57 | * | dddddd joined #nim |
12:30:38 | FromGitter | <ephja> oh |
12:31:48 | niv | Error: internal error: inconsistent environment type :( |
12:32:42 | couven92 | omg, it's only one o'clock here and it's already dark outside! :O Winter is coming! :D |
12:32:54 | niv | we've got slight snow flurries here |
12:34:01 | couven92 | niv, aww! We got some snow yesterday, but it all rained away yesterday evening :'( |
12:34:17 | Araq | now I want do to |
12:34:24 | Araq | .. code-block:: nim |
12:34:40 | Araq | :testAs: foo.nim |
12:34:50 | Araq | so that the tutorials are checked automatically |
12:35:09 | Araq | any better names? anything existing in the RST spec? |
12:36:57 | FromGitter | <ephja> confirmed to work for included files |
12:37:02 | * | marenz__ joined #nim |
12:39:58 | Araq | meh, I'll go with :exec: "nim c foo.nim" |
12:40:16 | Araq | this way it works for JS examples too and is not tied to Nim at all |
12:40:20 | couven92 | but that is pretty dirty! :( |
12:40:45 | Araq | what's the alternative? I need 'nim js -d:nodejs -r ' for some examples |
12:41:55 | FromGitter | <ephja> almost at 3 GB when using it on the compiler source. I wonder if it has started to leak much yet |
12:42:14 | Araq | Sphinx has nothing like that as far as I can tell so I'm free to pick a name for this feature |
12:47:08 | dom96 | couven92: oh man, I get sad because it gets dark here at 4pm, at 1pm it must be really depressing :\ |
12:47:25 | couven92 | nah, it's cozy! :D |
12:47:53 | dom96 | :) |
12:48:57 | couven92 | we had the last day where the sun goes above the horizon on monday last week... So I have been experiencing a slight day-night-arythmia, but I am adapting :D |
12:49:27 | dom96 | Araq: :filename: foo.nim\n:test: nim c $filename |
12:53:20 | * | SenasOzys joined #nim |
12:53:22 | Araq | dom96, but it might not be in a file, it can be extracted from the ..code-block |
12:53:54 | dom96 | okay, but you already have an :include: directive no? |
12:54:03 | Araq | yeah |
12:54:09 | dom96 | yeah, so :include: can imply :filename: |
12:54:10 | dom96 | sorted |
12:54:25 | Araq | I don't understand |
12:54:32 | Araq | .. code-block:: nim |
12:54:47 | dom96 | You specify :filename: when you don't have an :include: |
12:54:49 | dom96 | but you want to test it |
12:54:51 | Araq | :test: "nim c if_example" |
12:55:01 | * | Serenitor quit (Quit: Leaving) |
12:55:05 | Araq | if true: echo "in this tutorial we show the if statement" |
12:55:09 | dom96 | if you have :include: then you don't need the :filename: |
12:55:34 | dom96 | parsing the nim command isn't a good idea |
12:55:45 | Araq | I don't parse it |
12:55:53 | Araq | I run it when building the documenation |
12:56:05 | dom96 | so how do you know where to save the file? |
12:56:20 | dom96 | you need to extract the 'if_example', no? |
12:56:20 | Araq | oh good point, lol |
12:56:38 | dom96 | lol |
12:57:03 | Araq | hmm but that gets verbose, more stupid lines full of colons |
12:58:25 | Araq | maybe the name will always be $nimcache/snippet.nim |
12:59:15 | dom96 | it's not that verbose |
12:59:18 | Araq | causes problems for parallelism |
12:59:57 | Araq | it should be $nimcache/$this_rst_file_snippet_$id.nim |
13:07:20 | Araq | dom96, I will go with your suggestion but if :filename: is not set, something sane name will be generated |
13:07:33 | dom96 | sounds good |
13:14:18 | dom96 | Araq: I don't suppose we could also get a setStackTraceEntries proc? :) |
13:14:42 | Araq | add it, should be easy |
13:16:38 | dom96 | on the other hand, maybe it's safer if I leave the original stack trace |
13:17:57 | Araq | it stopped raining, see you later |
13:26:35 | * | ipjk joined #nim |
13:36:18 | skrylar | i'm just going to guess that full text searching is. hard. |
13:39:24 | * | astronav_ joined #nim |
13:43:51 | * | vlad1777d quit (Remote host closed the connection) |
13:44:44 | * | astronav_ is now known as astronavt_ |
13:45:28 | * | vlad1777d joined #nim |
13:49:36 | * | PMunch joined #nim |
13:51:59 | skrylar | use a bag of words to eliminate nodes that don't contain any parts of a search phrase and then grep the remaining candidates? hm |
13:52:37 | dom96 | sounds like you're having fun :) |
13:58:45 | skrylar | dom96, well my reference manager borked and i'm having to figure out what to replace it with |
13:59:00 | skrylar | this somehow lead to me discovering some 1995 era database system people loved and then it died |
14:00:06 | skrylar | from what i can tell it was basically a nosql centered around full-text search with a macro language bolted on so herpderps could make their own index card catalogues |
14:00:23 | skrylar | which i am admittedly a proponent of. small businesses making their own dbs is productive |
14:03:05 | dom96 | ugh, Visual Studio Code is being a real bitch with its stupid auto indentation |
14:03:28 | dom96 | When I press Tab I really don't want you to indent by 20 spaces -.- |
14:03:48 | miran | you can turn off (stupid) auto indentation |
14:04:26 | skrylar | M-: (slap 'dom96) |
14:04:36 | dom96 | Hopefully editor.autoIndent is the setting |
14:05:06 | dom96 | Pressing tab still indents by a stupid amount |
14:05:19 | dom96 | by 30 spaces |
14:05:20 | dom96 | like wwt |
14:05:22 | dom96 | *wtf |
14:05:23 | skrylar | admittedly i deal with derpy autoindent too. using an old mode i wrote when we were still nimrods and it often does silly things like reindenting things i dont want moved :< |
14:05:48 | skrylar | mostly because significant whitespace is ambiguous and theres no real way to know a line isn't supposed to be that way :| |
14:06:20 | dom96 | I'm happy with no auto indent for precisely this reason |
14:06:49 | skrylar | i use a simple heuristic: inherit the previous line's indentation unless that line ends in = or : |
14:07:18 | dom96 | This plugin must be doing something stupid |
14:07:57 | miran | dom96: "by 30 spaces" -> you can also set (per workspace or global) how much should tab indent |
14:08:41 | dom96 | I don't think that's what i'm looking for |
14:08:46 | dom96 | My indentation isn't set to 30 spaces... |
14:11:59 | dom96 | https://github.com/pragmagic/vscode-nim/issues/67#issuecomment-347011262 |
14:12:00 | FromGitter | <ephja> yes it has some issues. it indents incorrectly when lines are inserted as well. someone reported it I think |
14:12:24 | dom96 | I'm honestly thinking about creating my own Nim plugin for VS Code at this poj t |
14:12:26 | dom96 | *point |
14:12:38 | * | ShalokShalom joined #nim |
14:12:56 | FromGitter | <ephja> aligning arguments like that is annoying when it's not done automatically :p |
14:14:02 | dom96 | I don't mind doing it. I do mind when the editor moves my cursor to the middle of the screen though |
14:14:24 | dom96 | the only way to get it to where I want is by manually pressing backspace or using my mouse |
14:14:47 | dom96 | The tab key should do one thing, and only one thing, indent my damn code by 2 spaces! |
14:15:10 | FromGitter | <ephja> is it so bad that you don't want to patch it? :p |
14:15:48 | dom96 | I'm in the middle of something, context switching to fix my editor is pretty bad. |
14:15:58 | dom96 | I will probably do it later though |
14:16:24 | FromGitter | <ephja> ok |
14:16:50 | * | xkapastel joined #nim |
14:21:18 | dom96 | I don't even know what to look for. I feel like I may as well go through whatever tutorial VS code has and create a brand new plugin. |
14:22:16 | * | astronavt_ is now known as astronavt |
14:22:16 | FromGitter | <ephja> it indents to the same level as the previous line for me |
14:23:59 | dom96 | for the code I posted in that issue? |
14:25:22 | FromGitter | <ephja> yes |
14:25:51 | miran | "The tab key should do one thing, and only one thing, indent my damn code by 2 spaces!" --> i disagree |
14:26:08 | miran | i want tab to indent to correct amount of spaces |
14:26:28 | miran | if the line above is indented 6 spaces, tab should indent 6 spaces |
14:27:55 | FromGitter | <ephja> it should be configurable since there are different conventions |
14:28:31 | dom96 | yeah, and then it undoubtedly detects the indentation wrong and does exactly what it's doing now: indenting to 30 freaking spaces |
14:29:01 | dom96 | Pressing tab 3 times isn't hard |
14:29:08 | dom96 | pressing backspace 30 times is |
14:30:43 | FromGitter | <ephja> I wonder in what ways our setups differ then |
14:30:46 | miran | pressing space 2 times isn't hard :P |
14:33:18 | federico3 | don't you configure you editors to indente and dedent with one keypress only?! |
14:33:27 | * | couven92 quit (Ping timeout: 240 seconds) |
14:33:39 | FromGitter | <ephja> nvm. same thing happens for me |
14:33:39 | miran | yup, ctrl+[ and ctrl+] in vscode |
14:33:47 | FromGitter | <ephja> does it try to align with the arguments? |
14:33:54 | federico3 | that's 2 keypresses |
14:34:16 | FromGitter | <ephja> and then inserts two additional spaces? |
14:34:35 | dom96 | federico3: Tab/Shift+Tab? |
14:34:36 | miran | federico3: one hand each, i can live with that, find that less than two keypresses with the same hand |
14:35:55 | federico3 | dom96: I rarely need to indent because the editor detects ":" on the previous line but Tab would do. Backspace or << dedents |
14:37:19 | federico3 | essentially the editor virtually hides the number of tabs or spaces really used for indentation from me |
14:43:29 | FromGitter | <ephja> why are you trying to indent there again? |
15:05:07 | * | JappleAck joined #nim |
15:13:26 | FromGitter | <mratsim> There is a rainbow indent plugin for VScode that displays indent as rainbows (by gokr iirc) |
15:18:12 | dom96 | Well I decided to go for the more noisy but also more detailed async tracebacks |
15:18:24 | dom96 | Hopefully we can improve them even more in the future, but for it should be an improvement in any case |
15:18:32 | dom96 | https://github.com/nim-lang/Nim/pull/6809/files#diff-4be59bb7bb57e13063da3051f1d83719R6 |
15:23:38 | * | astronavt quit (Remote host closed the connection) |
15:28:32 | FromGitter | <nitely> long stack traces? great!! |
15:29:14 | FromGitter | <mratsim> Another programming lang, from Nigeria: http://www.nairaland.com/3557200/astro-programming-language-0.2-indefinite |
15:31:02 | FromGitter | <nitely> It's been like five years and node.js still does not has those, despite the many requests. |
15:35:38 | * | PMunch quit (Quit: leaving) |
15:37:51 | dom96 | node doesn't have stack traces? |
15:37:59 | dom96 | how do you find your errors then? |
15:38:04 | * | MJCaley joined #nim |
15:39:54 | FromGitter | <ephja> o_O |
15:42:32 | FromGitter | <nitely> it does, but you only get the last stack trace, the one where the exception raised... |
15:42:49 | FromGitter | <nitely> it does not record stack traces through async jumps |
15:44:35 | dom96 | ahh |
15:45:03 | FromGitter | <nitely> many times that's completely useless |
15:45:48 | dom96 | Nim gives you a stack trace for every time the exception is re-raised now as well :) |
15:46:06 | dom96 | the async stack trace is my attempt to clean that up a bit |
15:46:29 | FromGitter | <ephja> was information missing before? might have been fixed if that ever was the case |
15:46:35 | * | astronavt joined #nim |
15:47:40 | FromGitter | <nitely> ah! so it has both things! awesome! |
15:48:40 | * | miran_ joined #nim |
15:48:43 | FromGitter | <nitely> stack traces is one of the few things I think python got right |
15:48:49 | * | miran quit (Ping timeout: 268 seconds) |
15:48:52 | * | miran_ is now known as miran |
15:50:24 | federico3 | dom96: can #5000 be flagged important somehow? We are generating code that will break when users update their libraries |
15:51:20 | FromGitter | <nitely> I'm glad Nim's is getting that right as well |
15:55:10 | dom96 | federico3: sure |
15:59:48 | crem | https://nim-lang.org/docs/manual.html#type-bound-operations-destructors says "will be automatically invoked for every local stack variable v that goes out of scope". Does it mean it's not called for GCd ref objects? |
16:00:22 | crem | Keeping eye on SDL surface leaks takes much energy, I want destructors. :( |
16:02:24 | crem | hm, there is some finalizer param for new.. Will be possible to wrap ptr Surface into ref. One extra level of indirection, but at least less headache about leaks. |
16:04:37 | crem | How does finalizer work? It says "for each object of type T the finalizer will be called". But I provide it per object, not per type, not sure if I have to provide it just once. |
16:05:06 | skrylar | that's the safer option |
16:05:32 | skrylar | i think it sets the finalizer for the type to the value of that parameter, but since there's no expectation of a single "definitive `new'" call, well |
16:06:48 | skrylar | although if you're already doing silly things with the types, it ought to be possible to do what the nicer leak checkers do; embed the call frame in a debug variable, then test against a list of all items that were allocd and not freed, and it tells you who is making the leaky buckets :) |
16:07:18 | skrylar | one reason pascal/fpc was more enjoyable than C is.. well, it just has a leak checker that does that. |
16:11:21 | crem | I'm fine with C++'s RAII, especially after proper unique_ptrs appeared. |
16:15:36 | * | couven92 joined #nim |
16:16:08 | * | MJCaley quit (Quit: MJCaley) |
16:19:53 | * | Shoozza quit (*.net *.split) |
16:27:37 | * | yglukhov joined #nim |
16:28:32 | * | yglukhov quit (Client Quit) |
16:38:30 | * | miran quit (Changing host) |
16:38:30 | * | miran joined #nim |
16:42:08 | * | rbrt joined #nim |
16:46:24 | * | Trustable joined #nim |
16:48:29 | FromGitter | <nitely> "Be aware that destructors are not called for objects allocated with new. This may change in future versions of language, but for now the finalizer parameter to new has to be used." |
16:48:47 | * | couven92 quit (Remote host closed the connection) |
16:49:13 | * | couven92 joined #nim |
16:49:53 | crem | yes, that's what i read |
16:52:10 | crem | I can do ref[ptr X], that's useful! (just found out reading forum) |
16:58:47 | * | zolk3ri joined #nim |
17:00:53 | FromGitter | <nitely> There are a few places where finalizers are used in the stdlib |
17:00:59 | skrylar | i worry about those bits of c++0xnever |
17:01:22 | skrylar | people are already starting to argue that C++ has 'inherited' enough from nonC++ that nobody should use anything else |
17:01:40 | FromGitter | <nitely> You have to provide the finalizer each time... so yo cn create a proc newMyObject(...) that will do that |
17:01:48 | FromGitter | <nitely> *you can |
17:08:08 | * | vivus joined #nim |
17:09:49 | * | alph joined #nim |
17:14:22 | * | alph quit (Client Quit) |
17:18:21 | FromGitter | <mratsim> @crem you can avoid the extra indirection by not using the ref part: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/fallback/blas_l3_gemm_data_structure.nim#L19-L20 |
17:19:08 | FromGitter | <mratsim> I have a ref[ptr T] field that is used only to keep the GC/finalizer happy, and a ptr UncheckedArray[T] for everyday use without the ref indirection |
17:27:54 | * | couven92 quit (Ping timeout: 246 seconds) |
17:29:23 | * | rbrt quit (Quit: Oíche mhaith) |
17:35:21 | * | astronavt quit (Remote host closed the connection) |
17:43:21 | crem | But can I have finalizer/destructor/whatever then? |
17:46:35 | * | sz0 joined #nim |
18:19:57 | * | MJCaley joined #nim |
18:27:34 | * | laas joined #nim |
18:29:25 | FromGitter | <mratsim> Yes, just use new with the finalizer, see my whole file |
18:30:41 | FromGitter | <mratsim> Either you use the ptr in a stack object and you need destructors, or you use the pointer in a ref object, or keep a ref in a stack object and you can use finalisers. |
18:30:58 | laas | Is there an equivalent to rust's `Iterator::next`? |
18:31:15 | laas | https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.next |
18:32:48 | laas | "Advances the iterator and returns the next value." |
18:33:00 | laas | So what I'm asking is: is there a way to use an iterator outside of for-loops? |
18:33:12 | FromGitter | <mratsim> You have to create your own template if you want to use it inline |
18:34:01 | FromGitter | <mratsim> Example: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/private/p_accessors.nim#L115 |
18:35:05 | * | Amrykid2 joined #nim |
18:35:25 | * | astronavt joined #nim |
18:40:45 | dom96 | laas: only with closure iterators |
18:40:56 | dom96 | https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators |
18:43:59 | laas | thanks |
18:45:48 | * | Shoozza joined #nim |
18:47:02 | * | craigger quit (Ping timeout: 268 seconds) |
18:48:08 | * | craigger joined #nim |
18:52:31 | * | craigger quit (Ping timeout: 240 seconds) |
18:53:21 | * | craigger joined #nim |
18:59:38 | * | kunev quit (Quit: е те!) |
19:04:20 | * | kunev joined #nim |
19:11:56 | FromGitter | <Varriount> laas: Creating anything in particular? |
19:17:41 | * | miran quit (Quit: Konversation terminated!) |
19:17:53 | * | zolk3ri quit (Ping timeout: 248 seconds) |
19:42:47 | * | ipjk quit (Quit: Leaving) |
19:54:21 | * | PMunch joined #nim |
20:10:33 | * | MJCaley quit (Quit: MJCaley) |
20:19:22 | * | zolk3ri joined #nim |
20:19:52 | laas | Varriount: a parser for something |
20:26:38 | * | arecaceae quit (Remote host closed the connection) |
20:26:57 | * | arecaceae joined #nim |
20:28:36 | * | Trustable quit (Remote host closed the connection) |
20:41:42 | * | rbrt joined #nim |
20:46:50 | * | SenasOzys quit (Remote host closed the connection) |
20:59:04 | * | rbrt quit (Quit: Oíche mhaith) |
21:01:29 | * | JappleAck quit (Quit: Leaving) |
21:11:31 | FromGitter | <Quelklef> Hi, I have a question about types and some code that looks like either a bug or a misunderstanding of mine, |
21:11:34 | FromGitter | <Quelklef> is here a good place to ask? |
21:12:13 | * | rbrt joined #nim |
21:14:26 | Araq | yes |
21:14:38 | FromGitter | <Quelklef> Ok, great |
21:14:52 | FromGitter | <Quelklef> I think it's explained best here: https://gist.github.com/Quelklef/e186afa1198711b7fff6c7eda84e7326 |
21:15:46 | * | couven92 joined #nim |
21:16:32 | * | laas quit (Quit: WeeChat 1.9.1) |
21:20:11 | Araq | generics are checked at instantiation time, no bug here |
21:20:16 | dom96 | ^^ |
21:20:48 | dom96 | That's why you're only getting a compile-time error when you call f with a B() |
21:21:00 | FromGitter | <Quelklef> Ah |
21:21:35 | FromGitter | <Quelklef> So it' |
21:22:36 | FromGitter | <Quelklef> Thanks fellas |
21:23:25 | * | rbrt quit (Quit: Oíche mhaith) |
21:24:05 | FromGitter | <Quelklef> Is there any reason it's done at instantiation time rather than when the type is defined? |
21:24:16 | FromGitter | <Quelklef> seems counter-intuitive to me but I'm no expert like you guys |
21:25:06 | * | mal`` quit (Quit: Leaving) |
21:26:15 | FromGitter | <mratsim> It’s still compile-time checking, I’m pretty sure it’s a trade-off between keeping the compiler/codegen logic simple for a slight inconvenience —> If you don’t use a generic you don’t pay for its check. |
21:27:29 | FromGitter | <mratsim> iirc templates are one of the top reason for C++ huge compilation time, so that may be it. |
21:27:45 | FromGitter | <mratsim> templates/generics* |
21:28:03 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:28:57 | FromGitter | <Quelklef> Oh, that's interesting. So the user of some API will only have to deal with the overhead for what they actually use |
21:29:18 | FromGitter | <Quelklef> I was thinking more in terms of writing some kind of framework, where it'd be nice to have the checking done before instantiation, but that makes sense |
21:30:23 | FromGitter | <Quelklef> actually seems a lot smarter to do it this way. Every new thing I learn about this language impresses me :P |
21:32:00 | * | mal`` joined #nim |
21:33:30 | * | mal`` quit (Remote host closed the connection) |
21:38:27 | * | mal`` joined #nim |
21:39:02 | * | Jesin joined #nim |
21:50:25 | * | claudiuinberlin joined #nim |
21:55:04 | skrylar | i should investigate a blas library |
22:01:14 | FromGitter | <mratsim> If you do a sparse blas library that would be really helpful: https://github.com/mratsim/Arraymancer/issues/28 |
22:01:33 | skrylar | aren't blas libraries super effort |
22:01:37 | skrylar | with like superoptimizers and things |
22:02:34 | FromGitter | <mratsim> nop, just hand optimized assembler |
22:02:59 | FromGitter | <mratsim> Here is a BLAS course in C to get 80-90% of MKL speed: http://apfel.mathematik.uni-ulm.de/~lehn/ulmBLAS/ |
22:03:34 | skrylar | i'll open a tab |
22:03:37 | FromGitter | <mratsim> My implementation in Nim, using restrict, assume_aligned, macro loop unrolling: https://github.com/mratsim/Arraymancer/tree/master/src/tensor/fallback |
22:03:44 | skrylar | my notebook for technical persuits is sorta.. broken atm |
22:03:47 | FromGitter | <mratsim> And OpenMP |
22:05:23 | FromGitter | <mratsim> The hardest thing is tuning the temporary array size so that they fit in registers, L1, L2 and L3 cache (you’ll see in the course). |
22:06:24 | skrylar | i remember reading about one of those. they used a genetic optimizer to do the tunings |
22:07:13 | FromGitter | <mratsim> I gave you the wrong page for the course: http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/index.html |
22:07:32 | FromGitter | <mratsim> Ah yeah that’s ATLAS, but it takes 4 weeks to tune …. |
22:13:09 | * | zolk3ri quit (Remote host closed the connection) |
22:23:14 | skrylar | should probably find something better to do. spent quite a while pondering reducing search text to tokens and running pattern finders on token streams |
22:35:11 | FromGitter | <mratsim> wrap spaCy in Nim ;) |
22:36:09 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:41:17 | * | Vladar quit (Quit: Leaving) |
22:42:27 | dom96 | bah, this parseopt vs parseopt2 and nre vs. re mess is annoying. Now I have to look into the differences in detail to decide what should stay in the stdlib :\ |
22:44:24 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:50:07 | * | Ven joined #nim |
22:50:31 | * | Ven is now known as Guest21319 |
23:02:50 | skrylar | dom96, simple. steal cobra from go. |
23:03:23 | * | skrylar quit (Remote host closed the connection) |
23:04:49 | FromGitter | <mratsim> There isn't enough serpents in the world: Python, anaconda, viper and cobra are all taken by a programming language or programming utility. |
23:20:56 | * | hichhock joined #nim |
23:27:20 | * | rbrt joined #nim |
23:27:54 | * | rbrt quit (Remote host closed the connection) |
23:28:21 | * | hichhock quit (Remote host closed the connection) |
23:28:30 | * | rbrt joined #nim |
23:29:07 | * | rbrt quit (Remote host closed the connection) |
23:33:03 | FromGitter | <ephja> Snek |
23:33:52 | * | rbrt joined #nim |
23:34:30 | * | rbrt quit (Remote host closed the connection) |
23:35:07 | * | rbrt joined #nim |
23:35:40 | * | rbrt quit (Remote host closed the connection) |
23:36:27 | * | rbrt joined #nim |
23:37:04 | * | rbrt quit (Remote host closed the connection) |
23:37:48 | * | rbrt joined #nim |
23:38:24 | * | rbrt quit (Remote host closed the connection) |
23:39:14 | * | rbrt joined #nim |
23:39:46 | * | rbrt quit (Remote host closed the connection) |
23:40:24 | * | rbrt joined #nim |
23:41:00 | * | rbrt quit (Remote host closed the connection) |
23:41:47 | * | rbrt joined #nim |
23:42:18 | * | Jesin quit (Quit: Leaving) |
23:42:52 | * | rbrt quit (Remote host closed the connection) |
23:43:27 | * | rbrt joined #nim |
23:44:00 | * | PMunch quit (Remote host closed the connection) |
23:44:33 | * | rbrt quit (Remote host closed the connection) |
23:45:12 | * | rbrt joined #nim |
23:45:49 | * | rbrt quit (Remote host closed the connection) |
23:46:27 | * | rbrt joined #nim |
23:47:01 | * | rbrt quit (Remote host closed the connection) |
23:48:04 | * | rbrt joined #nim |
23:48:38 | * | rbrt quit (Remote host closed the connection) |
23:49:41 | * | rbrt joined #nim |
23:49:56 | * | rbrt quit (Client Quit) |
23:50:32 | * | rbrt joined #nim |
23:51:09 | * | rbrt quit (Remote host closed the connection) |
23:51:47 | * | rbrt joined #nim |
23:51:47 | * | rbrt quit (Client Quit) |
23:52:57 | * | rbrt joined #nim |
23:53:28 | * | rbrt quit (Remote host closed the connection) |
23:54:03 | * | rbrt joined #nim |
23:54:41 | * | rbrt quit (Remote host closed the connection) |
23:55:16 | * | rbrt joined #nim |
23:55:16 | * | rbrt quit (Client Quit) |
23:56:21 | * | rbrt joined #nim |
23:56:59 | * | rbrt quit (Remote host closed the connection) |
23:58:55 | * | rbrt joined #nim |
23:59:27 | * | rbrt quit (Remote host closed the connection) |