<< 26-11-2017 >>

00:01:45Araq"refactoring" includes more things than field renames
00:03:39Araq"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:12FromGitter<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:19dom96"refactoring" includes many things
00:36:25dom96but one thing is better than nothing...
00:36:39dom96and identifier renames are the most basic and common operation
00:49:53FromGitter<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:56FromGitter<brentp> https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15JgRT5iM742gJkw5LtmQ/edit
01:16:48Araqdom96, I can rename with nimgrep, renaming is easy enough
01:17:33AraqI 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:51mr_yogurtVarriount: 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:19skrylarsemi-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:57GitDisc<treeform> I run into this problem too
04:23:04GitDisc<treeform> I set up github site for my docs
04:23:08GitDisc<treeform> but it feels like a huge pain
04:23:47GitDisc<treeform> https://treeform.github.io/chrono/ for https://github.com/treeform/chrono
04:23:59GitDisc<treeform> I think It could be set up better some how.
04:25:01GitDisc<treeform> I though maybe this site: https://nimble.directory/ could be the solution but no...
04:26:00FromGitter<brentp> if you have html, you can just put it into a docs/ directory and flip a switch in github settings.
04:26:03GitDisc<treeform> I always wish that nim doc would produce markdown not HTML, so that I can just stick it in github readme
04:26:20GitDisc<treeform> oh really I did not know that?
04:26:32FromGitter<brentp> aye
04:26:53FromGitter<brentp> https://github.com/brentp/nim-lapper
04:27:05FromGitter<brentp> https://brentp.github.io/nim-lapper/index.html
04:27:43GitDisc<treeform> hmm were is the switch I don't see it?
04:27:55GitDisc<treeform> what is this ".nojekyll" file?
04:28:27FromGitter<brentp> under main settings page, the option will appear once you have a `docs/` directory
04:28:38FromGitter<brentp> I don't think that's needed, but it used to be
04:28:58GitDisc<treeform> I see. I will try this.
04:30:42*dddddd quit (Remote host closed the connection)
04:38:59skrylarergh. dislike embedded things that lack levers and switches
04:41:10skrylarThe "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:55FromGitter<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:47skrylarqqtop: that's just a connection string
06:26:12skrylareither attach_database and the string, or execute "attach database <etc>" as dsql
06:28:46skrylaroh. 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:37skrylarqqtop: i may not actually be able to use this db myself though :(
07:22:02skrylarthere 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:01skrylari 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:16skrylareh. 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:28FromGitter<qqtop> Hmm, maybe you can try to install flamerobin from http://www.flamerobin.org/ to get some more insight .
07:57:38skrylarmaybe.
07:57:47skrylarpackages for debian are a lot.. harder to deal with than arch.
07:58:07skrylarin arch you just go get the flamerobin file from AUR and build it. debian seems to use *several* config files
08:02:51skrylarweird.
08:03:39skrylari 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:30skrylarah. i think i know what this is
08:08:29skrylarsome memory corruption with xsqldas
08:16:28skrylarqqtop: 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:59FromGitter<codenoid> hi araq
08:23:28FromGitter<mratsim> @treeform You may be able to use pandoc to convert HTML or rst to markdown.
08:27:00FromGitter<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:15skrylarmratsim: pandoc isn't much good at things that aren't going from its flavor of markdown
08:29:35skrylarit might read the rst files, but it's definitely going to lose almost all the structuring
08:41:13*claudiuinberlin joined #nim
08:45:58skrylarOh 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:53FromGitter<mratsim> a pandoc or a zotero? :P
09:31:39skrylara zotero but meh
09:31:57skrylarpoking around with that weird zettelkasten program again
09:33:09FromGitter<mratsim> @dom96 @Araq We can’t see the OP here: https://forum.nim-lang.org/t/3362
09:38:20FromGitter<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:23FromGitter<ephja> does nimsuggest leak with the new GC too?
11:28:14FromGitter<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:31miranhmmm, i often experience suggestions stop working in vscode. any remedy for that?
11:51:07couven92settings nim.projects in the .vscode/settings.json sometimes works for me
11:51:53mirancouven92: what do you do with that setting?
11:52:10couven92you specify the nimsuggest project
11:52:16Araqwow, pushed code at 3am and travis is still green
11:52:28couven92Araq, good job! :D
11:53:16couven92what is next? drunk commits? :P
11:53:27mirancouven92: 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:40Araqthe nimsuggest tests are red fwiw, need to fix the regressions
12:00:59Araqlesson learned, if it's not in the CI, it bitrots
12:01:24couven92well that is the whole point of CI isnt't it? :P
12:01:41Araqsure.
12:01:53Araqso ... shiny new feature that everybody wants to use
12:01:59couven92I saw a commented tester r nimsuggest (-ish) in travis.yml
12:02:09Araq'runnableExamples' sections
12:02:16couven92yeah!
12:02:54Araqmratsim should use it already in his flatten PR
12:03:34couven92runnableexamples meaning in as a rst-section in nim docs?
12:03:48couven92(as we talked about some days ago?)
12:04:17AraqrunnableExamples are tested when you generate the documentation
12:04:25Araqand also are part of the documentation
12:04:25couven92ah, cool!
12:05:13Araqno more duplications of tests and examples
12:05:22Araqand less code in doc comment
12:05:38AraqI really like it
12:09:50dom96awesome
12:10:20couven92so, that means I should modify my unicode PR as well?
12:11:07Araqprobably
12:12:42FromGitter<ephja> miran: it mostly breaks because I kill it manually since firefox and other applications get killed otherwise
12:12:54FromGitter<ephja> and when working on files that are meant to be included
12:18:17*Serenitor joined #nim
12:19:42Araqephja: include files work once you setup the project properly
12:20:19FromGitter<ephja> got it
12:21:47*SenasOzys quit (Ping timeout: 260 seconds)
12:27:06Araqephja: it leaks with every GC since it's a logical leak
12:27:26*NimBot joined #nim
12:27:51Araqmodule gets patched, other things point to the old version
12:29:21Araqrich hickey styled programming ;-)
12:29:57*dddddd joined #nim
12:30:38FromGitter<ephja> oh
12:31:48nivError: internal error: inconsistent environment type :(
12:32:42couven92omg, it's only one o'clock here and it's already dark outside! :O Winter is coming! :D
12:32:54nivwe've got slight snow flurries here
12:34:01couven92niv, aww! We got some snow yesterday, but it all rained away yesterday evening :'(
12:34:17Araqnow I want do to
12:34:24Araq.. code-block:: nim
12:34:40Araq :testAs: foo.nim
12:34:50Araqso that the tutorials are checked automatically
12:35:09Araqany better names? anything existing in the RST spec?
12:36:57FromGitter<ephja> confirmed to work for included files
12:37:02*marenz__ joined #nim
12:39:58Araqmeh, I'll go with :exec: "nim c foo.nim"
12:40:16Araqthis way it works for JS examples too and is not tied to Nim at all
12:40:20couven92but that is pretty dirty! :(
12:40:45Araqwhat's the alternative? I need 'nim js -d:nodejs -r ' for some examples
12:41:55FromGitter<ephja> almost at 3 GB when using it on the compiler source. I wonder if it has started to leak much yet
12:42:14AraqSphinx has nothing like that as far as I can tell so I'm free to pick a name for this feature
12:47:08dom96couven92: oh man, I get sad because it gets dark here at 4pm, at 1pm it must be really depressing :\
12:47:25couven92nah, it's cozy! :D
12:47:53dom96:)
12:48:57couven92we 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:27dom96Araq: :filename: foo.nim\n:test: nim c $filename
12:53:20*SenasOzys joined #nim
12:53:22Araqdom96, but it might not be in a file, it can be extracted from the ..code-block
12:53:54dom96okay, but you already have an :include: directive no?
12:54:03Araqyeah
12:54:09dom96yeah, so :include: can imply :filename:
12:54:10dom96sorted
12:54:25AraqI don't understand
12:54:32Araq.. code-block:: nim
12:54:47dom96You specify :filename: when you don't have an :include:
12:54:49dom96but you want to test it
12:54:51Araq :test: "nim c if_example"
12:55:01*Serenitor quit (Quit: Leaving)
12:55:05Araq if true: echo "in this tutorial we show the if statement"
12:55:09dom96if you have :include: then you don't need the :filename:
12:55:34dom96parsing the nim command isn't a good idea
12:55:45AraqI don't parse it
12:55:53AraqI run it when building the documenation
12:56:05dom96so how do you know where to save the file?
12:56:20dom96you need to extract the 'if_example', no?
12:56:20Araqoh good point, lol
12:56:38dom96lol
12:57:03Araqhmm but that gets verbose, more stupid lines full of colons
12:58:25Araqmaybe the name will always be $nimcache/snippet.nim
12:59:15dom96it's not that verbose
12:59:18Araqcauses problems for parallelism
12:59:57Araqit should be $nimcache/$this_rst_file_snippet_$id.nim
13:07:20Araqdom96, I will go with your suggestion but if :filename: is not set, something sane name will be generated
13:07:33dom96sounds good
13:14:18dom96Araq: I don't suppose we could also get a setStackTraceEntries proc? :)
13:14:42Araqadd it, should be easy
13:16:38dom96on the other hand, maybe it's safer if I leave the original stack trace
13:17:57Araqit stopped raining, see you later
13:26:35*ipjk joined #nim
13:36:18skrylari'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:59skrylaruse 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:37dom96sounds like you're having fun :)
13:58:45skrylardom96, well my reference manager borked and i'm having to figure out what to replace it with
13:59:00skrylarthis somehow lead to me discovering some 1995 era database system people loved and then it died
14:00:06skrylarfrom 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:23skrylarwhich i am admittedly a proponent of. small businesses making their own dbs is productive
14:03:05dom96ugh, Visual Studio Code is being a real bitch with its stupid auto indentation
14:03:28dom96When I press Tab I really don't want you to indent by 20 spaces -.-
14:03:48miranyou can turn off (stupid) auto indentation
14:04:26skrylarM-: (slap 'dom96)
14:04:36dom96Hopefully editor.autoIndent is the setting
14:05:06dom96Pressing tab still indents by a stupid amount
14:05:19dom96by 30 spaces
14:05:20dom96like wwt
14:05:22dom96*wtf
14:05:23skrylaradmittedly 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:48skrylarmostly because significant whitespace is ambiguous and theres no real way to know a line isn't supposed to be that way :|
14:06:20dom96I'm happy with no auto indent for precisely this reason
14:06:49skrylari use a simple heuristic: inherit the previous line's indentation unless that line ends in = or :
14:07:18dom96This plugin must be doing something stupid
14:07:57mirandom96: "by 30 spaces" -> you can also set (per workspace or global) how much should tab indent
14:08:41dom96I don't think that's what i'm looking for
14:08:46dom96My indentation isn't set to 30 spaces...
14:11:59dom96https://github.com/pragmagic/vscode-nim/issues/67#issuecomment-347011262
14:12:00FromGitter<ephja> yes it has some issues. it indents incorrectly when lines are inserted as well. someone reported it I think
14:12:24dom96I'm honestly thinking about creating my own Nim plugin for VS Code at this poj t
14:12:26dom96*point
14:12:38*ShalokShalom joined #nim
14:12:56FromGitter<ephja> aligning arguments like that is annoying when it's not done automatically :p
14:14:02dom96I don't mind doing it. I do mind when the editor moves my cursor to the middle of the screen though
14:14:24dom96the only way to get it to where I want is by manually pressing backspace or using my mouse
14:14:47dom96The tab key should do one thing, and only one thing, indent my damn code by 2 spaces!
14:15:10FromGitter<ephja> is it so bad that you don't want to patch it? :p
14:15:48dom96I'm in the middle of something, context switching to fix my editor is pretty bad.
14:15:58dom96I will probably do it later though
14:16:24FromGitter<ephja> ok
14:16:50*xkapastel joined #nim
14:21:18dom96I 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:16FromGitter<ephja> it indents to the same level as the previous line for me
14:23:59dom96for the code I posted in that issue?
14:25:22FromGitter<ephja> yes
14:25:51miran"The tab key should do one thing, and only one thing, indent my damn code by 2 spaces!" --> i disagree
14:26:08mirani want tab to indent to correct amount of spaces
14:26:28miranif the line above is indented 6 spaces, tab should indent 6 spaces
14:27:55FromGitter<ephja> it should be configurable since there are different conventions
14:28:31dom96yeah, and then it undoubtedly detects the indentation wrong and does exactly what it's doing now: indenting to 30 freaking spaces
14:29:01dom96Pressing tab 3 times isn't hard
14:29:08dom96pressing backspace 30 times is
14:30:43FromGitter<ephja> I wonder in what ways our setups differ then
14:30:46miranpressing space 2 times isn't hard :P
14:33:18federico3don't you configure you editors to indente and dedent with one keypress only?!
14:33:27*couven92 quit (Ping timeout: 240 seconds)
14:33:39FromGitter<ephja> nvm. same thing happens for me
14:33:39miranyup, ctrl+[ and ctrl+] in vscode
14:33:47FromGitter<ephja> does it try to align with the arguments?
14:33:54federico3that's 2 keypresses
14:34:16FromGitter<ephja> and then inserts two additional spaces?
14:34:35dom96federico3: Tab/Shift+Tab?
14:34:36miranfederico3: one hand each, i can live with that, find that less than two keypresses with the same hand
14:35:55federico3dom96: I rarely need to indent because the editor detects ":" on the previous line but Tab would do. Backspace or << dedents
14:37:19federico3essentially the editor virtually hides the number of tabs or spaces really used for indentation from me
14:43:29FromGitter<ephja> why are you trying to indent there again?
15:05:07*JappleAck joined #nim
15:13:26FromGitter<mratsim> There is a rainbow indent plugin for VScode that displays indent as rainbows (by gokr iirc)
15:18:12dom96Well I decided to go for the more noisy but also more detailed async tracebacks
15:18:24dom96Hopefully we can improve them even more in the future, but for it should be an improvement in any case
15:18:32dom96https://github.com/nim-lang/Nim/pull/6809/files#diff-4be59bb7bb57e13063da3051f1d83719R6
15:23:38*astronavt quit (Remote host closed the connection)
15:28:32FromGitter<nitely> long stack traces? great!!
15:29:14FromGitter<mratsim> Another programming lang, from Nigeria: http://www.nairaland.com/3557200/astro-programming-language-0.2-indefinite
15:31:02FromGitter<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:51dom96node doesn't have stack traces?
15:37:59dom96how do you find your errors then?
15:38:04*MJCaley joined #nim
15:39:54FromGitter<ephja> o_O
15:42:32FromGitter<nitely> it does, but you only get the last stack trace, the one where the exception raised...
15:42:49FromGitter<nitely> it does not record stack traces through async jumps
15:44:35dom96ahh
15:45:03FromGitter<nitely> many times that's completely useless
15:45:48dom96Nim gives you a stack trace for every time the exception is re-raised now as well :)
15:46:06dom96the async stack trace is my attempt to clean that up a bit
15:46:29FromGitter<ephja> was information missing before? might have been fixed if that ever was the case
15:46:35*astronavt joined #nim
15:47:40FromGitter<nitely> ah! so it has both things! awesome!
15:48:40*miran_ joined #nim
15:48:43FromGitter<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:24federico3dom96: can #5000 be flagged important somehow? We are generating code that will break when users update their libraries
15:51:20FromGitter<nitely> I'm glad Nim's is getting that right as well
15:55:10dom96federico3: sure
15:59:48cremhttps://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:22cremKeeping eye on SDL surface leaks takes much energy, I want destructors. :(
16:02:24cremhm, 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:37cremHow 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:06skrylarthat's the safer option
16:05:32skrylari 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:48skrylaralthough 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:18skrylarone reason pascal/fpc was more enjoyable than C is.. well, it just has a leak checker that does that.
16:11:21cremI'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:29FromGitter<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:53cremyes, that's what i read
16:52:10cremI can do ref[ptr X], that's useful! (just found out reading forum)
16:58:47*zolk3ri joined #nim
17:00:53FromGitter<nitely> There are a few places where finalizers are used in the stdlib
17:00:59skrylari worry about those bits of c++0xnever
17:01:22skrylarpeople are already starting to argue that C++ has 'inherited' enough from nonC++ that nobody should use anything else
17:01:40FromGitter<nitely> You have to provide the finalizer each time... so yo cn create a proc newMyObject(...) that will do that
17:01:48FromGitter<nitely> *you can
17:08:08*vivus joined #nim
17:09:49*alph joined #nim
17:14:22*alph quit (Client Quit)
17:18:21FromGitter<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:08FromGitter<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:21cremBut 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:25FromGitter<mratsim> Yes, just use new with the finalizer, see my whole file
18:30:41FromGitter<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:58laasIs there an equivalent to rust's `Iterator::next`?
18:31:15laashttps://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.next
18:32:48laas"Advances the iterator and returns the next value."
18:33:00laasSo what I'm asking is: is there a way to use an iterator outside of for-loops?
18:33:12FromGitter<mratsim> You have to create your own template if you want to use it inline
18:34:01FromGitter<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:45dom96laas: only with closure iterators
18:40:56dom96https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators
18:43:59laasthanks
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:56FromGitter<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:52laasVarriount: 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:31FromGitter<Quelklef> Hi, I have a question about types and some code that looks like either a bug or a misunderstanding of mine,
21:11:34FromGitter<Quelklef> is here a good place to ask?
21:12:13*rbrt joined #nim
21:14:26Araqyes
21:14:38FromGitter<Quelklef> Ok, great
21:14:52FromGitter<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:11Araqgenerics are checked at instantiation time, no bug here
21:20:16dom96^^
21:20:48dom96That's why you're only getting a compile-time error when you call f with a B()
21:21:00FromGitter<Quelklef> Ah
21:21:35FromGitter<Quelklef> So it'
21:22:36FromGitter<Quelklef> Thanks fellas
21:23:25*rbrt quit (Quit: Oíche mhaith)
21:24:05FromGitter<Quelklef> Is there any reason it's done at instantiation time rather than when the type is defined?
21:24:16FromGitter<Quelklef> seems counter-intuitive to me but I'm no expert like you guys
21:25:06*mal`` quit (Quit: Leaving)
21:26:15FromGitter<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:29FromGitter<mratsim> iirc templates are one of the top reason for C++ huge compilation time, so that may be it.
21:27:45FromGitter<mratsim> templates/generics*
21:28:03*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:28:57FromGitter<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:18FromGitter<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:23FromGitter<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:04skrylari should investigate a blas library
22:01:14FromGitter<mratsim> If you do a sparse blas library that would be really helpful: https://github.com/mratsim/Arraymancer/issues/28
22:01:33skrylararen't blas libraries super effort
22:01:37skrylarwith like superoptimizers and things
22:02:34FromGitter<mratsim> nop, just hand optimized assembler
22:02:59FromGitter<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:34skrylari'll open a tab
22:03:37FromGitter<mratsim> My implementation in Nim, using restrict, assume_aligned, macro loop unrolling: https://github.com/mratsim/Arraymancer/tree/master/src/tensor/fallback
22:03:44skrylarmy notebook for technical persuits is sorta.. broken atm
22:03:47FromGitter<mratsim> And OpenMP
22:05:23FromGitter<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:24skrylari remember reading about one of those. they used a genetic optimizer to do the tunings
22:07:13FromGitter<mratsim> I gave you the wrong page for the course: http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/index.html
22:07:32FromGitter<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:14skrylarshould 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:11FromGitter<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:27dom96bah, 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:50skrylardom96, simple. steal cobra from go.
23:03:23*skrylar quit (Remote host closed the connection)
23:04:49FromGitter<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:03FromGitter<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)