<< 27-02-2020 >>

00:00:26*marmotini_ quit (Ping timeout: 240 seconds)
00:05:27stefantalpalaru"can be setup" -> "can be set up"
00:06:42*Hideki_ joined #nim
00:06:42stefantalpalaru"saavy" -> "savvy"
00:09:43stefantalpalaru"build.sh" and "build.bat" are in csources. In the top-level Nim dir we have "build_all.sh" and "build_all.bat".
00:09:52shashlickNeat thanks, ya definitely needs some fluff and color but this is first draft
00:11:01shashlickWant to make sure the content is correct
00:15:02stefantalpalaruAn OS without an official package manager is a scam. Don't fall for it.
00:15:48leorizesome people dislike a package manager
00:16:52FromDiscord<exelotl> I just have a junction which I point to whichever nim version I want to use currently lol
00:26:09*Hideki_ quit (Remote host closed the connection)
00:28:08*Hideki_ joined #nim
00:28:52*Hideki_ quit (Remote host closed the connection)
00:29:05*Hideki_ joined #nim
00:29:10*Hideki_ quit (Remote host closed the connection)
00:36:57*luis__ quit (Quit: luis__)
00:42:47*leorize quit (Quit: WeeChat 2.6)
00:54:18*dwdv quit (Ping timeout: 258 seconds)
01:04:22*NimBot joined #nim
01:05:54*krux02 quit (Remote host closed the connection)
01:07:43*opal quit (Ping timeout: 240 seconds)
01:11:48*Hideki_ joined #nim
01:12:11*opal joined #nim
01:23:28*kitech1 quit (Ping timeout: 260 seconds)
01:23:56dadada_this is worth checking out: whichever nim version I want to use currently lol
01:24:24*kitech1 joined #nim
01:24:41dadada_sorry, copy past error due to mouse misuse by me ... the last part was what exelotl said an hour earlier
01:24:52dadada_what I wanted to write was this:
01:25:05dadada_this is worth checking out: https://wasmtime.dev/
01:25:40clyybberlol
01:26:23*kitech1 quit (Client Quit)
01:26:24dadada_https://www.youtube.com/watch?time_continue=307&v=Qn_4F3foB3Q&feature=emb_logo
01:26:43*Hideki_ quit (Ping timeout: 260 seconds)
01:26:59dadada_there's rust/go/python support, so there shouldn't be a significant reason why there couldn't be nim support for it
01:27:41dadada_and it would mean, that modules written with support for wasmtime in any of these languages, can be used in all the languages that support it
01:27:52dadada_or have support for it
01:28:10*kitech1 joined #nim
01:28:51dadada_it's basically my dream come true of all proglangs being able to relatively easily share modules(and thus code) with each other
01:29:55*kitech1 quit (Client Quit)
01:32:19*dddddd quit (Ping timeout: 260 seconds)
01:35:59*kitech1 joined #nim
02:02:29*endragor joined #nim
02:08:29*chemist69 quit (Ping timeout: 272 seconds)
02:09:55*chemist69 joined #nim
02:25:38*theelous3 joined #nim
02:28:53*marmotini_ joined #nim
02:33:27*marmotini_ quit (Ping timeout: 260 seconds)
02:46:01*clyybber quit (Quit: WeeChat 2.7.1)
02:46:03disruptekLEORIZE
02:46:07disruptekyou have been summoned.
02:54:38leorize[m]what?
02:54:48disruptekyour syntax highlighting is broken on stream.
02:56:15leorize[m]lol
02:56:28leorize[m]wait
03:00:32*LER0ever joined #nim
03:15:28disruptekit's no biggie, dude.
03:15:34disruptekthanks for stopping by.
03:20:04*muffindrake quit (Ping timeout: 248 seconds)
03:22:14*muffindrake joined #nim
03:32:43*dadada_ quit (Ping timeout: 260 seconds)
03:34:08*dadada joined #nim
03:34:32*dadada is now known as Guest59306
03:39:00*lbart quit (Ping timeout: 265 seconds)
03:46:03*opal quit (Ping timeout: 240 seconds)
03:46:51*opal joined #nim
03:48:12*rockcavera quit (Remote host closed the connection)
03:58:08*lbart joined #nim
04:13:46*ikan-keli_ quit (Ping timeout: 240 seconds)
04:13:56*ikan-keli_ joined #nim
04:19:46*uvegbot quit (Ping timeout: 240 seconds)
04:23:22*uvegbot joined #nim
04:26:41rayman22201boop
04:32:55*hax-scramper quit (Ping timeout: 260 seconds)
04:36:41*Hideki_ joined #nim
04:36:47*hax-scramper joined #nim
04:41:14*Hideki_ quit (Ping timeout: 258 seconds)
04:48:31*nsf joined #nim
05:04:04*nixfreak quit (Ping timeout: 265 seconds)
05:16:41*marmotini_ joined #nim
05:18:12*hax-scramper quit (Read error: Connection reset by peer)
05:18:30*hax-scramper joined #nim
05:25:15*hax-scramper quit (Read error: Connection reset by peer)
05:25:59*hax-scramper joined #nim
05:26:26*xet7 quit (Excess Flood)
05:27:08*xet7 joined #nim
05:38:30ZevvboopBot?
05:45:21disruptekzevv is a blue function person, too.
05:45:46disruptekborn to blue.
05:48:16Zevvonly my pointers are blue sometimes
05:49:23Zevv"Ins Blaue hinein"
05:49:56disruptekwho wants to write me a new irc client?
05:50:24disruptekzevv come talk on the stream.
05:51:14disruptekzevv, are you sick?
05:58:30*leorize joined #nim
06:02:44opalim trying to write myself one
06:03:00disruptekare you?
06:03:02disruptekwhere is it?
06:12:07leorize!eval echo "~motd is \n~motd"
06:12:10NimBot~motd is ↡~motd
06:24:57*narimiran joined #nim
06:42:31disruptek~choosenim
06:42:32disbotchoosenim: 11https://github.com/dom96/choosenim/releases/tag/v0.5.1 -- disruptek
06:58:20disruptek!code regex
06:58:22disbothttps://github.com/nim-lang/Nim/blob/6900da314ccd8c3f97dbeb340858b870bccadc89/lib/impure/nre.nim -- 11lib/impure/nre.nim 7& 20 more...
07:01:00rayman22201It's 2am for you @disruptek! don't you need sleep lol?
07:02:03disruptekAMAZON
07:02:25disruptek!code AWS_SECRET
07:02:26disbotno results 😒
07:02:36disruptek!code 8675309
07:02:37disbotno results 😒
07:02:45disruptek!code SECRET
07:02:46disbothttps://github.com/nim-lang/Nim/blob/9ea55eccbbc61c6e7429c094b6ced41ce5535aeb/tests/compilerapi/myscript.nim -- 11tests/compilerapi/myscript.nim 7& 5 more...
07:03:55disruptekrayman22201: for what?
07:06:21*LER0ever quit (Ping timeout: 265 seconds)
07:07:35*LER0ever joined #nim
07:08:52*chemist69 quit (Ping timeout: 252 seconds)
07:09:57*chemist69 joined #nim
07:10:11*Guest59306 quit (Ping timeout: 260 seconds)
07:13:15*hax-scramper quit (Ping timeout: 240 seconds)
07:14:23*LER0ever quit (Ping timeout: 260 seconds)
07:15:10*hax-scramper joined #nim
07:16:18*dwdv joined #nim
07:17:11*marmotini_ quit (Remote host closed the connection)
07:18:10*hax-scramper quit (Read error: Connection reset by peer)
07:18:22*hax-scramper joined #nim
07:19:33*LER0ever joined #nim
07:24:47*dadada joined #nim
07:25:11*dadada is now known as Guest5453
07:27:32*hax-scramper quit (Read error: Connection reset by peer)
07:27:45*hax-scramper joined #nim
07:27:51*solitudesf joined #nim
07:33:25*Guest5453 quit (Ping timeout: 265 seconds)
07:34:32*hax-scramper quit (Read error: Connection reset by peer)
07:34:45*hax-scramper joined #nim
07:34:58*dadada_ joined #nim
07:38:20*solitudesf quit (Ping timeout: 258 seconds)
07:46:45disruptek~bentley is https://imgur.com/gallery/yEXiWWG
07:46:46disbotbentley: 11https://imgur.com/gallery/yEXiWWG
07:46:46disbotbentley: 11a good boy
07:48:52*dadada_ quit (Ping timeout: 255 seconds)
07:50:11*dadada_ joined #nim
07:54:04disruptek!repo nim
07:54:06disbothttps://github.com/nim-lang/Nim -- 9Nim: 11Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 8951⭐ 971🍴 7& 29 more...
07:54:09disruptek!repos nim
07:54:11disbothttps://github.com/nim-lang/Nim -- 9Nim: 11Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 8951⭐ 971🍴
07:54:11disbothttps://github.com/nim-lang/nimble -- 9nimble: 11Package manager for the Nim programming language. 15 648⭐ 120🍴
07:54:11disbothttps://github.com/dom96/jester -- 9jester: 11A sinatra-like web framework for Nim. 15 907⭐ 94🍴 7& 27 more...
07:55:27disruptek!repos nitter
07:55:28disbothttps://github.com/zedeus/nitter -- 9nitter: 11Alternative Twitter front-end 15 747⭐ 22🍴
07:57:17*fanta1 joined #nim
07:58:43*clemens3 quit (Ping timeout: 260 seconds)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:03:58*PMunch joined #nim
08:04:01*dadada_ quit (Ping timeout: 258 seconds)
08:04:58*dadada joined #nim
08:05:11*gmpreussner joined #nim
08:05:22*dadada is now known as Guest84828
08:11:38PMunchWhat is the difference between an expr and a stmt in the AST?
08:14:53livcddoes choosenim work like rvm ? it can manage the nim installations ?
08:15:05livcdeg. you choose devel and it adds the devel to your $PATH ?
08:15:24narimiranisn't that its main purpose?
08:17:29PMunchYup
08:17:37PMunchThat is pretty much all it does :P
08:17:43PMunchWell, it also updates
08:18:59*Guest84828 quit (Ping timeout: 272 seconds)
08:19:58*dadada_ joined #nim
08:21:54shashlickChoosenim does not fiddle with path, it creates shims that point to the right Nim version
08:25:58*solitudesf joined #nim
08:26:32*hax-scramper quit (Read error: Connection reset by peer)
08:26:45*hax-scramper joined #nim
08:31:25*hax-scramper quit (Ping timeout: 265 seconds)
08:33:40AraqPMunch: an expr returns a value, a stmt doesn't
08:33:43*dadada_ quit (Ping timeout: 260 seconds)
08:33:56PMunchAha
08:35:06*dadada_ joined #nim
08:37:18PMunchWhat happens if you create an nnkIfStmt with nnkElifExpr children?
08:37:24PMunchOr the other way around?
08:38:10*Hideki_ joined #nim
08:40:17*hax-scramper joined #nim
08:41:42Araqwho knows :-)
08:41:51PMunchHmm, a nnkIfStmt still seems to returns a value..
08:42:07PMunchAnd mixing the different kinds doesn't seem to have any weird effects
08:42:27*Hideki_ quit (Ping timeout: 240 seconds)
08:43:00*floppydh joined #nim
08:48:52*dadada_ quit (Ping timeout: 258 seconds)
08:50:01*dadada_ joined #nim
08:50:55*alexander92 joined #nim
08:51:18alexander92oh good morning!
08:51:33alexander92guys, irc and gitter are not synced again
08:51:47alexander92i see different histories on both going a day back
08:55:17*fanta1 quit (Quit: fanta1)
09:02:16*luis__ joined #nim
09:02:17*luis__ quit (Remote host closed the connection)
09:03:32*marmotini_ joined #nim
09:03:48*dadada_ quit (Ping timeout: 265 seconds)
09:04:30PMunchUhm, am I blind? http://ix.io/2cNA
09:04:34PMunchThat should work right?
09:04:56*dadada joined #nim
09:05:20*dadada is now known as Guest75321
09:05:34*marmotini_ quit (Read error: Connection reset by peer)
09:05:38*marmotin_ joined #nim
09:05:52PMunchFully qualifying it like so: result = newTree(NimNodeKind.nnkExceptBranch) just leads to Error: cannot generate VM code for nnkExceptBranch
09:05:57*marmotin_ quit (Remote host closed the connection)
09:06:25*marmotini_ joined #nim
09:06:41*marmotini_ quit (Remote host closed the connection)
09:06:47*marmotini_ joined #nim
09:12:09PMunchNVM, I'm an idiot..
09:12:17PMunchI had a proc named nnkExceptBranch -_-
09:12:41PMunchThat error message could be improved though..
09:14:05PMunchMinimal example, should I report this? https://play.nim-lang.org/#ix=2cNG
09:15:31*marmotini_ quit (Remote host closed the connection)
09:15:52alexander92you're not an idiot
09:15:57alexander92what are you working on
09:15:57*marmotini_ joined #nim
09:19:02*lritter joined #nim
09:19:16*Guest75321 quit (Ping timeout: 265 seconds)
09:19:58*dadada_ joined #nim
09:20:40*marmotini_ quit (Ping timeout: 255 seconds)
09:21:35PMunchDamn it, GitHub says that my browser is doing something unexpected when I try to submit the issue..
09:21:45PMunchI'm working on an improvement to the macros module
09:22:04PMunchOr rather a new module that should hopefully make macros easier to write :)
09:25:29PMunchHmm, apparently my browser was doing something. Submitting from Chromium worked: https://github.com/nim-lang/Nim/issues/13518
09:25:31disbotβž₯ Improve error message on name collision ; snippet at 12https://play.nim-lang.org/#ix=2cNL
09:25:56*marmotini_ joined #nim
09:29:01FromDiscord<Rika> what modules make macros easier to read?
09:30:09PMunchThe one I'm writing now :)
09:30:20PMunchIt does both
09:31:23*marmotini_ quit (Remote host closed the connection)
09:31:49*marmotini_ joined #nim
09:31:52*marmotini_ quit (Remote host closed the connection)
09:31:59*marmotini_ joined #nim
09:33:43FromDiscord<Rika> other than yours πŸ˜›
09:33:55*dadada_ quit (Ping timeout: 260 seconds)
09:34:38PMunchNone that I know of, which is why I'm writing my own :P
09:34:54PMunchThe biggest boost in readability for macros came with "quote do" IMO
09:34:57*dadada_ joined #nim
09:36:00PMunchBut it's not perfect, still need to create a lot of identifiers outside the quote block most of the time. And it's not capable of building a tree properly
09:36:17PMunchWell, not building in one piece at a time
09:37:20PMunchFor example you can't do "result.add(quote do: of 100: something)" to add an `of` to a `case` block.
09:38:09FromDiscord<Rika> also add "template-like ident creation" to your package
09:38:27PMunch"template-like ident creation"?
09:38:40FromDiscord<Rika> like \`anIdentNode =` to make a setter proc from a getter proc name
09:39:03FromDiscord<Rika> i dont remember what it's called one moment
09:39:23FromDiscord<Rika> https://nim-lang.org/docs/manual.html#templates-identifier-construction
09:41:00PMunchAh yes, that is what I was talking about when I said you still need to create identifiers manually for quote
09:41:53PMunchI mean the package so far is just easier node creation and modification
09:42:03FromDiscord<Rika> thats already a win in my book
09:42:07PMunchJust basic Nim stuff
09:42:33PMunchBut I want to create a more powerful "quote" as well.. Although the original is written with magic, so it might be difficult..
09:42:39FromDiscord<Rika> so many `newNimNode` and `add` calls i swear
09:42:55PMunchMhm, that's what I'm trying to get rid of
09:43:21FromDiscord<Rika> is it public now?
09:44:14PMunchNot quite yet
09:44:29alexander92hmm
09:45:09PMunchAnother thing I want to get rid of: impls[0][6][2][1][1].add
09:45:21PMunchThat's an example from my protobuf package..
09:45:26alexander92i attempted to fix the newTree thing like that but its much less general https://github.com/alehander92/breeze
09:45:34alexander92very interested to see that
09:45:36*hax-scramper quit (Read error: Connection reset by peer)
09:45:59alexander92PMunch, for [0][6][2] i think pattern matching is reasonable solution
09:46:08*hax-scramper joined #nim
09:46:30*hax-scramper quit (Read error: Connection reset by peer)
09:46:34alexander92or just reasonable getter names similar to the nkProcDef ones
09:46:50*hax-scramper joined #nim
09:47:07alexander92e.g. i didnt know for a long time that i can do e.g. `.pragma` etc
09:47:16PMunchalexander92, that's similar to what I'm doing, just without a DSL.
09:47:17alexander92`.name` etc
09:47:42PMunchAnd yeah for the indexes thing that's basically what I'm doing
09:47:48PMunchJust writing accessors for pretty much everything
09:49:01*dadada_ quit (Ping timeout: 255 seconds)
09:50:02*dadada_ joined #nim
09:50:43PMunchJust to whet your appetite a bit, this is an example of what it looks like now: http://ix.io/2cNR/nim
09:51:43PMunchI'm not thrilled about the upper case procedure names to create nodes, but it does kinda match how you create objects, and it avoids colliding with various names in Nim
09:52:33PMunchAnd here is the signature for CaseStmt: proc CaseStmt*(cond: NimNode, branches: varargs[NimNode]): NimNode
09:52:54PMunchAs you can see the `cond` and `branches` arguments to that matches the accessor names
09:53:09alexander92yeah this makes sense
09:53:19alexander92this is a more general problem i think with trees
09:53:21PMunch(and it checks that the branches are valid NimNode kinds)
09:53:26alexander92often its easier to have `children` seq
09:53:30PMunchYeah, trees are a pain to work with
09:53:34alexander92but to also have names for each one
09:53:44alexander92to be able to both use many tree/functional/loop methods on them
09:53:52alexander92but also to access them reasonably
09:53:53PMunchOh for sure, I understand why NimNodes are designed that way, but they are terrible to work with
09:54:15alexander92maybe we can make it for both
09:54:36PMunchJust look at the code for protobuf, the amount of [0][6][2][1][1] is crazy
09:54:46PMunchMakes it really hard to read
09:55:06alexander92like in general a case object with children seq can have a way to signify name alternatives for many enum cases without changing the layout
09:55:36alexander92but maybe just defining getters/setters is enough
09:56:30PMunchThat's pretty much exactly what I'm doing
09:57:01PMunchHere is an example for the "body" setter: http://ix.io/2cNT/nim
09:57:32PMunchAs you can see depending on the node it will set the correct element, and if it isn't a valid node for "body" it will throw an error
09:58:59*abm joined #nim
09:59:44FromDiscord<Rika> ahhhh, how do i use a DELIMITER or a BEGIN END on db_mysql?
09:59:55PMunchAnd for example `branches` that returns multiple nodes instead returns a special "Slice" object that implements `[]` and `[]=` to do bound checking and works on the actual node object: http://ix.io/2cNU/nim
10:02:51*hax-scramper quit (Ping timeout: 260 seconds)
10:03:02*hax-scramper joined #nim
10:03:39*dadada_ quit (Ping timeout: 240 seconds)
10:04:04PMunchI also want to create a "reverse quote" thing. Kinda like what ast_pattern_matching does, just without the special syntax
10:04:57*dadada joined #nim
10:05:03PMunchSo many times I just want to check if my input is following a certain pattern that I set for it, and then extract certain elements. But exhaustive checking is a pain to write..
10:05:21*dadada is now known as Guest71354
10:05:24PMunchSo many macros are left with some weird undefined behaviour if you do strange things with them
10:07:03*solitudesf quit (Ping timeout: 260 seconds)
10:11:59*marmotini_ quit (Remote host closed the connection)
10:12:26*marmotini_ joined #nim
10:13:35Araqdoesn't match my experience
10:14:00PMunchWhich part?
10:14:02Araqit's hardly "Undefined behaviour", it's "bad error messages"
10:14:21Araqwhich was mitigated by --expandMacro for version 1
10:15:32PMunchWell it depends, a DSL where some part isn't properly checked can end up removing code for example
10:15:52Araqmacros have their downsides but so far no other viable design allows us a smallish core language which supports tensordsl, lexer and parser generators, jester, ormin, karax, you-name-it
10:16:12PMunchSo in the DSL it looks like you're adding something, but that node gets dropped by the macro, and the macro doesn't check that there shouldn't be a node there, so it doesn't complain
10:16:30Araq"dropped"?
10:16:49PMunchOh don't get me wrong, I love macros :) I just want to make them a bit easier to create and maintain
10:16:50*marmotini_ quit (Ping timeout: 240 seconds)
10:16:55Araqcan't remember a macro that dropped anything in practice
10:17:09AraqI mean
10:17:19Araqit can drop stuff if that's what it really needs to do
10:18:09Araqbut sure, improve macros, I don't mind :-)
10:18:37AraqI'm also waiting for dadada's RFC
10:18:43*Guest71354 quit (Ping timeout: 255 seconds)
10:18:44PMunchWell, take a macro that reads a procedure and does something to it. It might not check that you haven't put anything in the pragmas field, and it's not copying those over, so now you have a macro that silently removes pragmas by accident
10:19:02PMunchThis will likely be it's own package for now though
10:19:08FromDiscord<Rika> still struggling with the BEGIN END statements on db_mysql, does anyone mind helping?
10:19:55AraqPMunch, well yeah, but --expandMacro does show this problem
10:19:58*dadada_ joined #nim
10:20:54PMunchOh yeah, for sure
10:21:00PMunchBut it might still be confusing
10:21:21PMunchBy the way, would it be possible to have --expandMacro print out the macro even when it has an error?
10:22:11PMunchI tend to throw in the good 'ol `echo result.repr` at the end of my macros anyways because expandMacro doesn't work if it returns an invalid AST
10:30:37*hax-scramper quit (Read error: Connection reset by peer)
10:31:03*hax-scramper joined #nim
10:34:07*dadada_ quit (Ping timeout: 260 seconds)
10:34:57*dadada_ joined #nim
10:35:43FromDiscord<exelotl> Oh yeah my project also has macros that assume free reign over the pragmas section
10:37:06FromDiscord<exelotl> I guess I should just check for existing pragmas and give an error message... But yeah such checking becomes tedious and it's hard to know you haven't forgotten to check something
10:37:28FromDiscord<exelotl> So yeah I definitely feel you pmunch
10:38:39*clemens3 joined #nim
10:39:42*Hideki_ joined #nim
10:40:20alexander92PMunch i am not sure why not just improving pattern matching
10:40:36alexander92better than having several incompatible matching-like things
10:43:00FromDiscord<Rika> is there a library for interpreting strings as mathematical equations or something?
10:43:32*marmotini_ joined #nim
10:43:46*Hideki_ quit (Ping timeout: 240 seconds)
10:44:16FromDiscord<Rika> nevermind
10:47:12*Hideki_ joined #nim
10:48:26*dadada_ quit (Ping timeout: 240 seconds)
10:49:58*dadada_ joined #nim
10:59:58*fanta1 joined #nim
11:03:43*dadada_ quit (Ping timeout: 255 seconds)
11:04:59*dadada joined #nim
11:05:22*dadada is now known as Guest35427
11:18:27*Guest35427 quit (Ping timeout: 240 seconds)
11:19:58*dadada_ joined #nim
11:25:09m4r35n357is there an equivalent for floats of ** in Python (I know ^ isn't it!), or do I use eg. x * x for square? Struggling to find definitions in the manual of operators on floats . . .
11:28:39*marmotini_ quit (Remote host closed the connection)
11:28:47*marmotini_ joined #nim
11:31:59*my_dude joined #nim
11:34:12alexander92Rika i think there was
11:34:13alexander92actually
11:34:29*tribly quit (Quit: WeeChat 2.7.1)
11:34:36alexander92something like parse expr
11:41:09*tribly joined #nim
11:44:33*fanta1 quit (Quit: fanta1)
11:45:49FromDiscord<Rika> alexander92 i already found it
11:45:57FromDiscord<Rika> and i need them at runtime so xd
11:46:11FromDiscord<Rika> m4r35n357 what do you mean "floats of **"
11:47:43FromDiscord<Rika> m4r35n357 there's the pow() function
11:49:15*Hideki_ quit (Ping timeout: 272 seconds)
11:52:43*opal quit (Ping timeout: 240 seconds)
11:55:55*opal joined #nim
11:59:12m4r35n357FromDiscord, in Python, x**2 = x * x, in some languages, x^2 = x * x. Does nim have an equivalent of X**2 or X^2 ? HTH explain better . . .
11:59:22alexander92eeh ! https://github.com/Yardanico/nim-mathexpr
11:59:30alexander92maybe this ? by Yardanico
12:00:01m4r35n357I know there is a power function, that is something different again
12:01:05*krux02 joined #nim
12:02:58FromDiscord<Rika> alexander92, yes thats the library i found
12:03:10FromDiscord<Rika> m4r35n357, i fail to see the difference
12:03:27FromDiscord<Rika> between x.pow 2 and what you describe as x ** 2
12:04:08FromDiscord<Rika> or do you want compile-time optimization, because i think GCC handles that already
12:07:18m4r35n357FromDiscord, forget it, then, I can't put it any clearer . . . .
12:07:53m4r35n357OK pow is a float function, ** and ^ can be integer operations
12:08:33m4r35n357shorthand for x * x, see, I can only repeat myself now
12:09:06m4r35n357I'll just use x * x . . .
12:10:25m4r35n357OK another way, pow(x, a) is a two argument function, sqr(x) is a single argument
12:10:57narimiranyeah, use x*x and call it a day
12:11:02m4r35n357yep
12:11:12m4r35n357quicker than all this typing ;)
12:12:13narimiranm4r35n357: btw, when your python translation is in some semi-ready state, share a code with us :)
12:12:28m4r35n357it is ready I think
12:12:49narimiranm4r35n357: then https://play.nim-lang.org/ is ready for your share :)
12:13:05m4r35n357I have a small module doing automatic differentiation recurrences, and a test client
12:13:23m4r35n357not all tested, but it si ported from working code in two languages . . .
12:14:07m4r35n357The Python and c originals are here: https://github.com/m4r35n357/ODE-Playground
12:14:17m4r35n357I'll have a look at the playgroind . .
12:14:32m4r35n357that sounded weird ;)
12:17:26m4r35n357narimiran, I think I am incompatible with https://play.nim-lang.org/
12:18:04narimiranyou might not be able to run it, but you can still use it as a code-share site
12:18:22m4r35n357My current code is in two files. I tried putting the previous single-file version up, but couldn't see any place to put command line parameters . . . am I missing something?
12:18:30narimiran(oh, it is not one file, i see now)
12:18:51FromDiscord<Rika> playground doesnt allow for any input
12:18:51m4r35n357https://play.nim-lang.org/#ix=2cOd
12:19:33*Guest11 joined #nim
12:19:46m4r35n357that is the single file version, compile/run with: nim compile --run test.nim 16 10 .01 10 -15.8 -17.48 35.64 10 28 8 3
12:19:58narimiranwhat i immediately see (other than "i come from python and use 4 spaces" :P) is: you can use `float` instead of `float64` if you want, those two are the same
12:20:14m4r35n357putting two file version up next, same command line
12:20:20narimiran`for k in 0..n-1` --> `for k in 0 ..< n`
12:21:23narimiranbtw, do you know about `-d:release`? i don't see it in your command there, and you might want to compare execution speeds at some point
12:21:46m4r35n357module: https://play.nim-lang.org/#ix=2cOe
12:21:53FromDiscord<Rika> ~~i await the day that --gc:arc or orc become default~~
12:22:33m4r35n357client: https://play.nim-lang.org/#ix=2cOf
12:23:05m4r35n357narimiran, I have done some preliminary comparisons to c (Python is nowhere!)
12:23:12m4r35n357but not in release mode yet
12:23:20m4r35n357only just got it all written ;)
12:24:15m4r35n357narimiran, yep looks like about a million ways to do the looping ranges ;) not decided yet!
12:24:43narimiranit is easy to decide `foo .. bar-1` is ugly :D
12:25:37*marmotini_ quit (Remote host closed the connection)
12:25:37m4r35n357ugly but obvious!
12:26:03*marmotini_ joined #nim
12:26:09Araqmost obvious is ..< esp if you come from Python with it's exclusive ranges
12:26:14Araq*its
12:27:09m4r35n357yep, million ways in Python too ;)
12:28:06m4r35n357OK speed test . . .
12:28:34m4r35n357time -p ./test 16 10 .01 1000000 -15.8 -17.48 35.64 10 28 8 3 >/tmp/data -- real 5.43
12:28:37*Guest11 quit (Remote host closed the connection)
12:28:39m4r35n357that was nim
12:29:00FromDiscord<Rika> how about C?
12:29:04m4r35n357time -p ./tsm-lorenz-dbg 16 10 .01 1000000 -15.8 -17.48 35.64 10 28 8 3 >/tmp/data -- c with MPFR
12:29:15FromDiscord<Rika> where's the time?
12:29:33m4r35n357OK pardon that was c with long double precision (80 bits)
12:29:39m4r35n357oops
12:30:03m4r35n357OK that was 3.87 for c with long double (accelerated)
12:30:18FromDiscord<Rika> considering nim doesnt have any optimizations i dont think...
12:30:21m4r35n357so, 5.43 for nim, 3.87 for c
12:30:26FromDiscord<Rika> rather, accelerated ops
12:30:29m4r35n357so not too shabby for nim
12:30:30narimirandid you use `-d:release` for nim?
12:30:36m4r35n357yes
12:30:44narimiranif you did, now you try also `-d:release -d:danger` and report back :)
12:30:47*marmotini_ quit (Ping timeout: 260 seconds)
12:31:02FromDiscord<Rika> danger is dangerous tho ofc so tread with caution?
12:31:02PMunchalexander92, well the reason I want to do it differently is just because I remember using ast_pattern_match and while it worked great I just didn't like the way it was set up. Might just be me though..
12:31:17m4r35n35714.39 for debug mode
12:31:30narimiran@Rika it is the same amount of "danger" as release build in earlier nim versions
12:31:34FromDiscord<Rika> debug is really slow really
12:31:47m4r35n357the code is a simple and similar as i can make it, so I think it is certainly a fair comparison for my application
12:31:54FromDiscord<Rika> narimiran, i always thought it was dangerous to the point of "can crash a pc when theres a fault"
12:32:39FromDiscord<Rika> m4r35n357, try including d:danger to disable some (?) checks on runtime
12:33:02m4r35n357FromDiscord, so nim unaccelerated is nearly as fast as c, are you sure?
12:33:15FromDiscord<Rika> hmm? i didnt claim that?
12:33:22m4r35n357danger as well as release
12:33:48FromDiscord<Rika> how's the time?
12:33:58FromDiscord<Rika> still ~2x slow?
12:34:16narimiran1.4x is not 2x
12:34:30m4r35n357nim compile -d:release -d:danger test.nim -- real 5.22
12:34:48FromDiscord<Rika> narimiran, i'm bad at estimating sorry
12:34:52m4r35n357hardly much quicker than just release
12:34:53narimiranoh, i expected a bit bigger difference
12:35:17narimiranm4r35n357: now let me tell you the best optimizing trick in nim
12:35:33*Cadey is now known as Xena
12:35:42narimiranit is only two words, and it works miraculously, are you ready?
12:35:43m4r35n357OK . . . .
12:35:43*Xena is now known as Cadance
12:35:49narimiran"ping @mratsim"
12:35:50*Cadance is now known as JohnMadden
12:35:56*JohnMadden is now known as shadowh511
12:35:59*shadowh511 is now known as Cadey
12:36:11FromDiscord<Rika> you just did tho
12:36:17m4r35n357is that like Beetlejuice three times?
12:36:19narimiranyep
12:36:23PMunchHaha :P
12:36:41narimiranit is the best optimizer ever, it usually gives my programs at least 2x boost
12:36:42m4r35n357well I'll run if I need to and leave you guys to pick up the pieces . .
12:36:55m4r35n357ping @mratsim
12:36:57PMunchYou can try the different gc's as well with --gc:<gcname>. For certain jobs some of them are considerably faster than others
12:37:05FromDiscord<Rika> HAHAHAHA the madman actually did it
12:37:08m4r35n357sounds like a FORTRAN routine ;)
12:37:33m4r35n357I can leave anytime . . . ;)
12:39:10m4r35n357PMunch, I don't do a lot of allocation, my arrays are all preallocated and last the lifetime of the program. So I don't see much work for the GC
12:39:23*my_dude quit (Quit: ZZZzzz…)
12:39:58FromDiscord<Rika> you're using sequences so theyre resizable
12:41:03FromDiscord<Rika> hmm
12:41:05m4r35n357FromDiscord, I am only using them to allow me to use variable array parameters. If there is a better way I am all ears!
12:41:07FromDiscord<Rika> i read the c implementation now
12:41:42narimiranm4r35n357: FromDiscord is a bot, user you want to mention is: Rika
12:41:43m4r35n357FromDiscord, on GitHub? that is MPFR code,
12:42:02FromDiscord<Rika> yeah, the taylor_smthsmth code
12:42:10FromDiscord<Rika> and the tsm_lorentz code
12:42:12m4r35n357Rika I can push the long double branch of you want
12:42:40FromDiscord<Rika> size really isnt known on compiletime no?
12:42:42m4r35n357Rika pull the double branch
12:43:01m4r35n357Rika size is a command line parameter
12:43:28m4r35n357the MPFR version can easily handle hundredth-order Taylos series ;)
12:43:39m4r35n357Taylor i MEAN
12:44:25FromDiscord<Rika> hmm, other nim peoplel, you think --gc:arc can handle this in the state it's in right now?
12:44:37narimiranone way to find out.... ;)
12:45:12FromDiscord<Rika> okay m4r35n357, so try compiling and using nim's devel branch then add `--gc:arc` to the parameters in compiling
12:45:31FromDiscord<Rika> --gc:arc needs devel no?
12:45:37narimiranyep
12:46:30m4r35n357Rika I am using a binary tarball for the latest nim, not set up for source building yet
12:46:41FromDiscord<Rika> uh
12:46:46narimiranm4r35n357: what does `nim -v` output for you?
12:46:50FromDiscord<Rika> do you have choosenim?
12:48:04m4r35n357Rika /opt/Nim/nim-1.0.6/bin/nim -v -- Nim Compiler Version 1.0.6 [Linux: amd64] -- Compiled at 2020-01-23
12:48:06*rockcavera joined #nim
12:48:17narimiranah, no `arc` for you
12:48:54m4r35n357well I can look into the source build, but it might not be quick . . . .
12:49:23FromDiscord<Rika> it takes me like a few minutes on a server cpu (only on one core though)
12:49:32m4r35n357OK let me see . . .
12:49:48*endragor quit (Remote host closed the connection)
12:50:08FromDiscord<Rika> it takes 30 minutes running on github actions lol
12:52:56m4r35n357building . . .
12:53:25m4r35n357wonder if it builds on ARM . . .
12:54:34FromDiscord<Rika> oh arm.
12:54:37FromDiscord<Rika> ._.
12:54:52FromDiscord<Rika> no clue, thanks for testing πŸ˜‰
12:55:11*tane joined #nim
12:55:16PMunchm4r35n357, I would really reccomend using choosenim
12:55:29PMunchThen you could just do "choosenim devel" and it would install it for you
12:55:49PMunchAnd when you want to go back just "choosenim stable"
12:55:54alexander92building it is very quick still
12:56:00PMunchAnd when a new version drops "choosenim update stable"
12:56:04alexander92but yeah
12:57:26*marmotini_ joined #nim
12:57:46m4r35n357PMunch, I like to control my own computer where possible ;) I still have the Ubuntu 18.04 nim (0.17.2)
12:58:21PMunchAs do I, but using a tools still leave you in control :)
12:58:39PMunchUgh, those should just be removed..
12:58:46m4r35n357all in good time, I am currently building nim and making lunch!
13:01:42m4r35n357OK built
13:02:03m4r35n357Nim Compiler Version 1.1.1 [Linux: amd64]
13:02:32m4r35n357on devel branch
13:04:26*uvegbot quit (Ping timeout: 240 seconds)
13:04:40FromDiscord<Rika> that's correct
13:06:35*m4r35n357 wonders if float80 would be a possibility . . . ?
13:10:27FromDiscord<Rika> prolly, nim does compile to c after all
13:13:09m4r35n357Rika /opt/Nim/Nim/bin/nim compile -d:release -d:danger -gc:arc test.nim -- command line(1, 2) Error: 'on' or 'off' expected, but 'arc' found
13:13:56narimiran--gc:arc, two of -'s
13:14:14*a_b_m joined #nim
13:14:15m4r35n357ok
13:14:50alexander92m4r usually it should be much faster to build if you already has a recent build in the same repo
13:14:55m4r35n357real 5.39, as I expected
13:15:07alexander92so keep one "development repo" there i guess
13:15:16m4r35n357there is probably nothing to collect
13:15:18narimiranstill waiting for mratsim's optimizations ;)
13:17:14FromDiscord<Rika> hmm interesting so it's not the GC
13:17:55*abm quit (Ping timeout: 260 seconds)
13:18:02m4r35n357Rika are you decsribing a problem? I think nim is in the ballpark all things considered
13:18:44FromDiscord<Rika> no i'm not
13:18:55*uvegbot joined #nim
13:18:56FromDiscord<Rika> i'm thinking of what else would be a bottleneck in your code
13:19:11FromDiscord<Rika> i really think its just some sort of math optimization or something
13:20:01*a_b_m quit (Quit: Leaving)
13:20:36m4r35n357Rika I don't think there is one, what is it in those figures that worriew you?
13:20:47FromDiscord<Rika> i dont know honestly
13:20:56PMunchWe're just used to seeing Nim closer to C in speed
13:21:07FromDiscord<Rika> i was expecting better
13:21:09m4r35n357OK
13:21:09FromDiscord<Rika> yeah
13:21:12PMunchEspecially when the GC is not involved
13:21:18m4r35n357I was impressed!
13:21:32FromDiscord<Rika> it probably is impressive compared to other languages
13:21:39m4r35n357I guess it is the compiled c that is the unknown (for me)
13:21:57PMunchI guess we're just spoilt :P
13:21:58FromDiscord<Rika> nim has a nimcache that you can look into and see the source c files
13:22:12FromDiscord<Rika> i dont know where it's stored in linux
13:22:28FromDiscord<Rika> but its in the user home directory in windows so i presume its also there for linux
13:22:35m4r35n357Rika I've looked already, not going there!
13:22:49m4r35n357Rikas the nimcache has moved but I can still find it!
13:22:51FromDiscord<Rika> XD
13:23:05FromDiscord<Rika> "nope, the code here looks like black magic to me"
13:23:38FromDiscord<Rika> wait, what if you try this very stupid idea
13:23:43FromDiscord<Rika> "--gc:none"
13:23:47FromDiscord<Rika> HAHAHA
13:24:45m4r35n357real 5.30 - 1% improvement
13:25:08PMunchAre you using any particular C flags?
13:25:31PMunchOr just "gcc test.c -o test"
13:27:08FromDiscord<Rika> o 3 and lto 9 πŸ˜›
13:27:10m4r35n357-03 -DNDEBUG for the (stripped) dynamic and static builds (see build file in project of curious)
13:31:09m4r35n357my c is stuffed with asserts, so it is only fair to lose them!
13:40:42m4r35n357If you want something to worry about ;)
13:40:54m4r35n357time -p ./tsm-lorenz-static 16 10 .01 1000000 -15.8 -17.48 35.64 10 28 8 3 >/tmp/data -- real 2.94
13:41:23m4r35n357the debug build is unoptimized (-O0)
13:44:44m4r35n357OK I just noticed the release c is much shorter, I'll dare a quick look . . .
13:46:36FromDiscord<Rika> heh
13:46:44m4r35n357nah, can't work with that ;)
13:48:47m4r35n357I wonder, in c all my parameters are pointers (to support array access), but in nim I only used var for things I was actually going to mutate. Maybe copying the other arrays/sequences is responsible? I can put some more vars in and see . . .
13:51:36m4r35n357real 5.25 -- small improvement, not really convincing
13:59:39m4r35n357If anyone needs cheering up: time -p ./tsm.py lorenz 16 10 .01 1000000 -15.8 -17.48 35.64 10 28 8 3 >/tmp/data -- real 47.09
13:59:54m4r35n357nearly 10 times slower
14:00:27m4r35n357and the nim code is shorter
14:01:20Araqdon't use 'var T' for speed please
14:01:33Araquse it for mutability where required
14:01:57m4r35n357Araq, don't panic, it was only for testing ;)
14:02:13m4r35n357and it didn't make much difference anyway
14:02:15Araqthe language doesn't work well when you try to outsmart it and the compiler's job is to make idiomatic Nim fast. And we're getting there, slowly.
14:08:45FromDiscord<clyybber> m4r35n357: Maybe its the echo
14:08:52FromDiscord<clyybber> I assume you are using printf in C?
14:09:13FromDiscord<clyybber> You can do `import system/ansi_c` and use `c_printf` instead of echo to test
14:11:10m4r35n357clyybber OK I'll try. Incidentally I am writing to a ramdisk so that shouldn't influence the results too much
14:11:43*clyybber joined #nim
14:11:53narimiranm4r35n357: are these the expected results for (the single file version) your file http://ix.io/2cOA ?
14:13:42narimiranbecause that is what i get when i run with these args: "16 10 .01 10 -15.8 -17.48 35.64 10 28 8 3", and on my machine it takes less than 1ms!
14:14:01m4r35n357clyybber can you confirm the import? Error: undeclared identifier: 'printf'
14:14:04FromDiscord<clyybber> narimiran: I think you are missing a few zeros :p
14:14:07PMunchm4r35n357, Nim will pass things as pointers if it sees that you aren't mutating them anyways. So you shouldn't worry about using var for speed
14:14:10m4r35n357oh, c_+printf
14:14:15FromDiscord<clyybber> m4r35n357: Yeah : )
14:14:53m4r35n357clyybber Error: type mismatch: got <cint> but expected 'string'
14:15:16narimiran@clyybber oh, now i see i miss-c/p-ed something
14:16:34narimiranok, now i get ~4s
14:16:45narimiranbut if i remove echo on every step, it is 0.3s
14:18:05narimiranso, m4r35n357, i think we discovered the biggest bottleneck :D
14:18:54m4r35n357OK, sounds like progress!
14:18:57*marmotini_ quit (Remote host closed the connection)
14:19:20m4r35n357If I could get this c_printf working I could confirm . ..
14:19:25*marmotini_ joined #nim
14:19:43narimiraneven if you print every 10th step, it is 0.6s, every 100th and further is 0.3s
14:19:54Araqwith fmt and --gc:arc there should be no need for printf
14:20:41PMunchWhat's you problem with printf m4r35n357?
14:21:19narimiran`echo fmt"{x0} {y0} {z0} {float64(step) * h}"` on every step is still the bottleneck: 4.5s
14:21:36*nsf quit (Quit: WeeChat 2.7)
14:21:52m4r35n357Error: type mismatch: got <cint> but expected 'string'
14:22:01m4r35n357so I can't test it myself
14:22:02PMunchAnd what code produces that error..
14:22:21PMunchI mean that says that your passing a C integer to something that expects a string
14:22:22m4r35n357c_printf("%+.12e %+.12e %+.12e %+.6e\n", x, y, z, t);
14:22:33narimiranevery 10th step with `fmt` is 0.6s, as before every 20th is 0.46s, etc.
14:22:38m4r35n357must be the formatting . . . ?
14:23:09m4r35n357I copied that code from the c version
14:23:44m4r35n357but it looks like you can proceed without my help ;)
14:24:15*marmotini_ quit (Ping timeout: 265 seconds)
14:24:41PMunchSeems to work fine: https://play.nim-lang.org/#ix=2cOG
14:24:56PMunchAre you sure you don't have echo c_printf?
14:25:20m4r35n357no, just the line I posted here
14:25:24PMunchc_printf returns a cint, so it might be that you're accidentally passing it to something (or have it as the last statement in a procedure that returns a string)
14:25:50m4r35n357I could discard it I suppose ?
14:26:24PMunchA, t_output returns a string (for some reason)
14:26:24FromDiscord<clyybber> its {.discardable.} so it implicitly discards
14:26:30m4r35n357real 2.56
14:26:38m4r35n357that better?
14:26:55FromDiscord<clyybber> how much is the C version?
14:27:00PMunchecho doesn't return anything, so that string will always be "". But with c_printf it tries to implicitly return the cint, which fails because it expects to return a string.
14:27:33PMunchHmm, you have multiple places where you declare a return type but without actually returning anything, that might give a little speedup if you remove them
14:30:07PMunchnarimiran, what was you c/p error? I'm also getting 3ms execution time :P
14:30:14m4r35n357clyybber debug build: real 3.83, dynamic build non-debug build: real 2.91
14:30:31narimiranPMunch: maybe it is not c/p error, but he gave us wrong params the first time ;)
14:30:31*marmotini_ joined #nim
14:30:36m4r35n357I think someone has exceeded the speed of light . . .
14:30:40PMunchAh, what are the correct ones?
14:30:47narimiranPMunch: now i'm running it with "16 10 .01 1000000 -15.8 -17.48 35.64 10 28 8 3"
14:31:14narimiranthat 1 million was 10 ;)
14:31:21m4r35n357hey, the only changed parameter is the number of steps, it needs to be high for speed test
14:31:29FromDiscord<clyybber> narimiran: Told ya :p
14:31:39FromDiscord<clyybber> pesky zeros
14:32:17m4r35n357with 10 you can see the output without scrolling off the page, you would never use it with 10 for anything useful!
14:33:01clyybberm4r35n357: Now I would remove those return types from the procs
14:33:08clyybberand make them {.inline.}
14:33:19clyybberOr even templates
14:33:27m4r35n357clyybber I couldn't find out how to not return something, believe me I looked!
14:33:35m4r35n357so how's abou7t a hint ;)
14:33:51FromDiscord<Rika> m4r35n357 just remove the : Type after the () and you have a void proc
14:33:52PMunchJust don't have a return type?
14:33:58narimiranyou delete everything after `)` and before `=` :D :D
14:34:08clyybberm4r35n357: proc t_output(x, y, z, y: float64) = ...
14:34:11m4r35n357I kept getting errors, tried with/without colons/equals
14:34:14PMunchhttp://ix.io/2cOH/nim like so
14:34:24FromDiscord<Rika> what errors
14:34:46m4r35n357OK, pretty sure I tried that, but thanks!
14:34:58PMunch(using that means you need to remove the "discard" statements from your client as t_output now doesn't return anything)
14:35:12narimiranPMunch: while at it, is `1.0'f64` needed?
14:35:12PMunch(not that it ever returned anything other than empty strings though..)
14:35:19m4r35n357Rika the sort of errors most people see on theie first day of a language and can't remember ;)
14:35:36narimiranPMunch: ...escpecially if you do `:%s/float64/float/g` :)
14:35:37PMunchUhm, no 1.0 should be a float which should be a float64 on a 64 bit machine
14:35:40m4r35n357narimiran, no, I've tried it
14:35:56*Lord_Nightmare is now known as LordNLptp
14:35:57m4r35n357jeez guys I did the hard part ;)
14:36:03*LordNLptp is now known as LordNAway
14:36:17*LordNAway is now known as Lord_Nightmare
14:36:18narimiranm4r35n357: you're new here, you'll learn that we really like stuff like this :D
14:36:49*Lord_Nightmare is now known as Lord_Nightmare2
14:36:57*Lord_Nightmare2 is now known as Lord_Nightmare
14:37:02m4r35n357well I am pretty imp[ressed with nim, nearly didn't try it after my experience with Julia!
14:37:13*solitudesf joined #nim
14:38:26FromDiscord<Rika> ~~only issue i have with julia is the array index thing tbh~~
14:38:46m4r35n357that taylor library is 60 lines even in Python
14:39:26m4r35n357Rika that is a real killer for this work, try to convert taylor.nim to Julia if you want your brain to bleed!
14:39:56FromDiscord<Rika> no clue on what your issue is with julia
14:40:06m4r35n357plus the start-up delays, and the fact that the code thye really use looks nothing like the examples they post to show how simple it all is ;)
14:40:20FromDiscord<Rika> ohh i see false simplicity lmao
14:40:50FromDiscord<Rika> ~~nim is true to its word, even when you're doing intermediate shit like macros and such~~
14:41:02FromDiscord<Rika> though it's still pretty verbose when you get to writing macros
14:41:09FromDiscord<clyybber> use breeze
14:41:16m4r35n357Rika there is a Julia lobrary called TaylorIntegration.jl, supposedly does pretty much what my lib does, and I cant' even read it!
14:41:35FromDiscord<Rika> i'd use breeze if i didnt have a massive macro already written
14:42:13m4r35n357OK guys AFK for a bit, cheers for the work-out!
14:42:24FromDiscord<Rika> oh yeah m4r35n357 what should i call you because it's getting tiring copy pasting your name
14:42:26FromDiscord<Rika> oof
14:43:30m4r35n357name's Ian, but the sig says "maresnest" if you quint properly
14:43:51m4r35n357I get autocomplete on nicks in XChat . . . ;)
14:44:51PMunchhttp://ix.io/2cOJ/nim changed some stuff to templates, made the output only go every 100th time (configurable) and removed some superfluous return types, changed from float64 to float and removed 'f64 (and fixed the indentation).
14:45:23FromDiscord<Rika> i did read that
14:45:26*hax-scramper quit (Ping timeout: 240 seconds)
14:45:33FromDiscord<Rika> but i dont know what your client pings you by
14:45:33narimiranPMunch: heh, i'm in the middle of doing that....
14:45:41PMunchHaha, yeah autocomplete of nicks on IRC is pretty neat :)
14:45:47*uvegbot quit (Ping timeout: 240 seconds)
14:45:52FromDiscord<Rika> haha only works on discord mentions
14:45:53*hax-scramper joined #nim
14:45:58FromDiscord<Rika> @gitterirc reeeeee
14:46:18narimiranPMunch, m4r35n357: this is what i currently have: http://ix.io/2cOM
14:46:42narimirannot sure if `t_sin_cos` and `t_tan_sec2` would be faster this way, without creating a tuple
14:47:15PMunchHmm, good question actually
14:47:15m4r35n357PMunch, really need to go, but all those lines are needed - the high order integration means you can use reasonable sized steps, and I do! I'll use echo/c_printf as & when I need speed ;)
14:47:30*uvegbot joined #nim
14:47:34narimiranm4r35n357: now you need to combine PMunch's ideas with my style fixes and you're ready to go :)
14:48:08PMunchMaybe slightly, but not much it seems
14:48:27narimiranPMunch: notice that his other file doesn't use these procs, from what i could tell ;)
14:48:40PMunchAh..
14:48:49PMunchOh you need all the output?
14:48:50PMunchHmm
14:49:00PMunchWell in that case it might be hard to optimise any further..
14:49:05FromDiscord<clyybber> inline
14:49:16PMunchShort of building a buffer and then outputting everything at the end
14:49:20PMunchWhich might be faster
14:49:23m4r35n357those other functions are used in the c an Python stuff, and to support testing
14:49:39clyybberPMunch: adding {.inline.} should help
14:49:43narimiranPMunch: do it (build a buffer). you know you want it! :)
14:53:28PMunchOh wow, even the dumbest buffer approach was much faster
14:53:43PMunchclybber, I'm already mostly using templates..
14:54:18clyybberoh
14:56:58PMunchIs there a way to get the same output as a format string easily in Nim?
14:57:07PMunchI know I can snprintf, but..
14:58:35narimiranPMunch: what do you mean?
14:58:50PMunchWell I want to use the format string he supplied
14:59:02narimiran`fmt"{x0} {y0} {z0} {float(step) * h}"`?
14:59:09PMunchIt has constant length, which means I can pre-initialise the buffer to the correct size..
14:59:15narimiranoh
15:04:59PMunchThere we go: http://ix.io/2cOQ/nim
15:05:06PMunchNice and buffered, and a lot faster
15:05:49narimiran`cast[cstring](cast[int](cast[ptr char]` you dawg, i heard you liked cast, so i put a cast in your cast
15:05:52PMunchThat requires a call to "initialise_output(steps)" before calling t_output by the way
15:06:04PMunchHaha, you can't use arithmetic on pointers in Nim :P
15:06:49PMunchI guess you could remove the inner cast[ptr char] though
15:06:51FromDiscord<mratsim> @narimiran, what is this >_> does it even end with '\0'?
15:07:12*floppydh quit (Quit: WeeChat 2.7.1)
15:07:16*dddddd joined #nim
15:07:22PMunchWas that aimed at me?
15:09:22*hax-scramper quit (Read error: Connection reset by peer)
15:09:52*hax-scramper joined #nim
15:10:13*hax-scramper quit (Read error: Connection reset by peer)
15:10:32*hax-scramper joined #nim
15:14:27*hax-scramper quit (Ping timeout: 240 seconds)
15:14:54*hax-scramper joined #nim
15:14:59Araqoh github is broken
15:15:03Araqyay
15:15:06*ptdel joined #nim
15:16:29PMunchThere, added some error checking to the buffer code, with minimal speed penalty: http://ix.io/2cOW/nim
15:16:45PMunchAnd it turns out that the initialisation should be steps + 2 :P
15:16:50*Vladar joined #nim
15:24:47PMunchOh well, I'm off. Let m4r35n357 know that I optimised his code a bit if I don't get back before he does :)
15:24:48*PMunch quit (Quit: Leaving)
15:38:47FromDiscord<Rika> what time function should i use to benchmark a function
15:39:58narimirani use `cpuTime`
15:42:36FromDiscord<Rika> does d:release enable LTO?
15:43:29FromDiscord<clyybber> noh
15:43:41FromDiscord<clyybber> nothing enables LTO I think
15:43:46FromDiscord<clyybber> you have to do it yourself
15:43:48*Hideki_ joined #nim
15:44:17FromDiscord<Rika> i see
15:46:12*Hideki_ quit (Remote host closed the connection)
16:07:54*Kaivo quit (Quit: WeeChat 2.7.1)
16:08:50*Kaivo joined #nim
16:19:52leorizeuse std/monotimes on devel
16:20:03*opal quit (Ping timeout: 240 seconds)
16:20:49*marmotini_ quit (Remote host closed the connection)
16:21:15*marmotini_ joined #nim
16:21:34*Hideki_ joined #nim
16:23:31FromDiscord<Rika> Why on devel? Stable has ir
16:23:32FromDiscord<Rika> It
16:24:25*marmotini_ quit (Remote host closed the connection)
16:24:31*marmotini_ joined #nim
16:27:09FromDiscord<clyybber> cpuTime should be fine
16:27:30FromDiscord<clyybber> unless you are benchmarking things that take a lot of time
16:28:32FromDiscord<clyybber> in fact cpuTime never decreases either
16:28:52*opal joined #nim
16:29:46FromDiscord<clyybber> at least not on posix
16:36:40*Trustable joined #nim
16:36:40*alexander92 quit (Read error: Connection reset by peer)
16:40:40disruptekoh, i missed araq's stream. 😒
16:40:44*Hideki_ quit (Remote host closed the connection)
16:41:27*Hideki_ joined #nim
16:43:16*marmotini_ quit (Remote host closed the connection)
16:43:27*marmotini_ joined #nim
16:45:43*Hideki_ quit (Ping timeout: 255 seconds)
16:46:03Araqdisruptek, psshst
16:46:12AraqI clicked the wrong button :P
16:46:25leorizeoh lol
16:46:58disrupteklet's work on this audio at some point. i'm gonna work on mine today.
16:49:08leorizeAraq: so what should I do about Araq/ormin#40?
16:50:41leorizehaving a ctx sounds fine to me, but how would it match with the current semantics?
16:51:07Araqnot sure but the state must be exposed somehow
16:51:25Araqthis design problem keeps Ormin from reaching v1 IMO
16:52:08Araqmaybe the only good solution is setContext()
16:55:12leorizehow would that work?
16:55:58leorizeor are you planning to make queries an imported module instead of being included?
16:57:18leorizeif it's included then we can just have a ctx global and a init() proc that should run before any queries are made
16:59:32*Hideki_ joined #nim
17:03:39*Hideki_ quit (Ping timeout: 240 seconds)
17:04:21m4r35n357narimiran, I've looked at your code, and I'm fairly sure it won't work properly for the sin and tan procs, as only the final value is returned. I believe they have to return a tuple to access the "companion" functions. Does that sound right to you?
17:04:47narimiranit doesn't :D
17:05:06narimiranyou're not returning anything there
17:05:46narimiranyou're assigning stuff to `s[k]` and `t[k]`
17:06:31narimiraneither that or i'm completely misunderstanding what those procs do
17:06:37*Cheer quit (Quit: Leaving)
17:07:08m4r35n357they do not _need_ to return values, but it makes the client code simpler if they do
17:07:23m4r35n357the c programs work this way
17:07:40m4r35n357the Python ones just use return values, but that is also sub-optimal,
17:07:46m4r35n357there is a case for having both
17:08:52m4r35n357I might knock together a client prog that uses sin_cos() . . .
17:09:10m4r35n357otherwise what I am saying won't make sense
17:09:56*marmotini_ quit (Remote host closed the connection)
17:10:23*marmotini_ joined #nim
17:11:56m4r35n357narimiran, BTW, what system are you running, do you have access to gnuplot? because it is much nicer to see the output that way
17:12:33m4r35n357time -p ./test 16 10 .01 10000 -15.8 -17.48 35.64 10 28 8 3 >/tmp/data; echo "splot '/tmp/data' with lines" | gnuplot -p
17:12:36m4r35n357for example
17:12:53narimiranbut you're current code doesn't return anything from `t_tan_sec2` and `t_sin_cos`
17:13:08*dadada_ quit (Ping timeout: 260 seconds)
17:13:11narimiran*current = the one you shared couple of hours ago
17:13:44m4r35n357I think that was http://ix.io/2cOH/
17:14:03m4r35n357it returns tuples in for sin_cos and tan_sec2
17:14:11narimiranno it does not :D
17:14:27m4r35n357well the error messages said it did ;)
17:14:58*marmotini_ quit (Ping timeout: 255 seconds)
17:15:00m4r35n357hence the auto type
17:15:14m4r35n357return type
17:15:29rockcaveraSome of the 10 new commits on devel are failing to compile nimsuggest. I tested it on Windows.
17:16:13narimiranm4r35n357: look the link you just shared: there's no return tuple, no return auto
17:16:41narimiranand look at the body of those procs - there's nothing you're returning there
17:16:43*opal quit (Ping timeout: 240 seconds)
17:17:48*opal joined #nim
17:18:27*opal quit (Excess Flood)
17:18:41*opal joined #nim
17:20:08*dadada joined #nim
17:20:31*dadada is now known as Guest69991
17:20:43narimiranm4r35n357: oh, yeah, here's a message for you from PMunch: "PMunch> Oh well, I'm off. Let m4r35n357 know that I optimised his code a bit if I don't get back before he does :)"
17:21:11narimiranwith this link: http://ix.io/2cOW/nim
17:23:18m4r35n357yes, I saw that!
17:23:39m4r35n357I'm still trying to work out what templates are for!
17:23:57disruptekwhich language are you coming from?
17:24:59m4r35n357I know Pascal, Java, Python and a bit of js(!), c and fortran ;)
17:25:43m4r35n357I know the phrase "templates" from people talking about generics in c++ . . .
17:25:44*clemens3 quit (Quit: quit)
17:25:47disruptektemplates are like c macros but much better. still, they fit that same substitution-into-ast role.
17:25:55m4r35n357so inline code?
17:26:04disruptekinline ast, yes.
17:26:13m4r35n357I see he inlined the "private" procs
17:26:36*marmotini_ joined #nim
17:26:45m4r35n357OK but AST is not the same as code, so is it some sort of "inline binary"?
17:27:02m4r35n357in any case, I'm stuck at "what would I use one for"
17:27:21m4r35n357the manual was no help, I think it is written for someone who already know the answer ;)
17:27:52disruptekyou use them for substitution.
17:27:59*marmotini_ quit (Remote host closed the connection)
17:28:25*marmotini_ joined #nim
17:28:59disruptekin c, a macro is a very stupid substitution.
17:29:04m4r35n357narimiran, so, is there a way of returning a tuple from a proc?
17:29:24disruptekin nim, templates are stronger, more robust.
17:29:51disruptekhttps://github.com/disruptek/nimph/blob/master/src/nimph/project.nim#L267
17:29:56m4r35n357to me it is just the prov with s/proc/template/ applied
17:30:01m4r35n357proc
17:30:08disrupteksee the subsequent iterators.
17:30:53m4r35n357that is less clear to me than the manual ;)
17:31:25disruptekin c, templates are not hygienic. in nim, they are (by default).
17:31:33narimiranm4r35n357: of course there is, but it will probably be slower than your current stuff
17:31:46Araqm4r35n357, if in doubt, use a proc
17:32:27m4r35n357yeah I need to look into tuples in a bit more detail . . . could be an array mind
17:32:41*Hideki_ joined #nim
17:32:46*marmotini_ quit (Ping timeout: 240 seconds)
17:33:03m4r35n357tuples were easy in Python, I think that is why I attempted it
17:33:03disruptektuples are like python tuples, but optionally named and more object-ish than array-ish.
17:33:40m4r35n357yeah I just need to return a tuple or array literal
17:34:18disruptekif you aren't iterating, there's a good chance you're better-served with an object.
17:34:49m4r35n357a lightweight one like a struct or js object?
17:35:00m4r35n357OK that is also a candidate
17:35:04disruptekeverything is lightweight in nim by comparison.
17:35:25m4r35n357yeah I meant one with just data, no methods ;)
17:35:27Araqwell tuples in Python are immutable, in Nim mutability is an aspect of the symbol kind, not of the type
17:36:01m4r35n357they are return values, they only need to be consumed, so np
17:36:43*opal quit (Ping timeout: 240 seconds)
17:36:46*Hideki_ quit (Ping timeout: 240 seconds)
17:36:50disrupteknim doesn't have classes, so...
17:36:55*solitudesf quit (Ping timeout: 260 seconds)
17:37:16m4r35n357so, if I assume that access is straightforward at the client, what is the most concise literal to return, array, tuple or object?
17:37:26disruptektuple
17:37:40m4r35n357OK so I was on the right lines ;)
17:38:06disrupteka tuple is a good way to return multiple values. it's not a good device to carry values around.
17:38:58ZevvHas it been considered to simply do .push stacktrace:off in the various async modules to make async-burdened stack traces more usable?
17:39:05m4r35n357yep, produced and consumed, (also the client needs to assign to something!)
17:39:36m4r35n357assign, or copy, but not mutate
17:39:39disruptekconsumption? no.
17:39:47leorizeobjects in Nim are C structs with visibility settings, unless you use inheritance
17:39:54*opal joined #nim
17:40:30m4r35n357If I can't consume the tuple I will have to call the function multiple times to get all the values won't I?
17:40:55disruptekthis is a question of style and future-proofing.
17:41:10m4r35n357pretty sure I can assign an array or object more easily . . . ?
17:41:30leorizeif anything, I've learned to not future-proof my design
17:41:42*narimiran quit (Ping timeout: 258 seconds)
17:41:45leorizeturns out you need different things when you finally got the problem figured out
17:42:01disruptekyes, so don't paint yourself into a corner with a tuple.
17:42:21disruptekif you are tempted to assign it a type name or define it with multiple lines, you probably shouldn't be using a tuple.
17:42:52disruptekif you know better, obviously you know better. it's a rule of thumb.
17:43:42m4r35n357disruptek, is this what you mean by consumption?, no. ? Error: expression 't_sin_cos(sx, cx, x, k)' has no type (or is ambiguous)
17:44:29disruptekconsumption == tuberculosis
17:49:17clyybberm4r35n357: Read the manual, you can do let (a, b) = someProcThatReturnsATupleWithTwoElements
17:49:36*NimBot joined #nim
17:50:01clyybberYou can also of course assign it to one variable
17:50:13clyybberlike so: let t = someProcThatReturnsATuple
17:50:37clyybberand then use t[i] to access the i'th field
17:50:52clyybberOr if your tuple is named you can do t.nameofthefield
17:51:18m4r35n357OK I have just got it working by returning an array literal
17:51:30*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
17:51:56clyybberm4r35n357: Ok. I don't think you mean literal though
17:52:05clyybbera literal is something thats literally in the code
17:52:13*njoseph joined #nim
17:52:34clyybberlike a string literal: "hello" or a int literal: 1 or an array literal: [1, 2, 3]
17:52:38m4r35n357I mean something that is constructed in one go, not created and populated
17:52:52m4r35n357oh you mean fixed value?
17:53:12*setenforce joined #nim
17:53:15clyybberWhat I gave examples for is called literal
17:53:21m4r35n357ok my terminology might be off, you guys must know by now that I'm not a dev ;)
17:53:36clyybbermathematician?
17:54:57m4r35n357nah, ex hardware engineer, software tester
17:55:27clyybberah nice
17:55:40m4r35n357I'm used to getting stuff going, then understanding how it works, then making it better. No top-down for me ;)
17:56:57leorizelol, ormin is giving me a "not an error" exception :P
17:57:59clyybberError: keyboard not found, not an error. press key to continue
17:59:28m4r35n357OK this is weird, I am returning an array using the values from what I thought was a tuple, and consuming it in what looks like a Python tuple, and it works! It actually plots the right trajectory
18:00:01m4r35n357but I can't assign directly into that array, nor just return the "tuple", and it won't compile
18:00:11m4r35n357still working code is a good start
18:01:20m4r35n357https://play.nim-lang.org/#ix=2cPE
18:02:28clyybberWhat do you mean directly assign into that array?
18:02:29m4r35n357oops think I overwrote the lib . . .
18:02:38m4r35n357I'm trying to post ;)
18:03:15m4r35n357lib:@ https://play.nim-lang.org/#ix=2cPE
18:03:48m4r35n357client: https://play.nim-lang.org/#ix=2cPF
18:04:36clyybberand where is the problem?
18:04:52m4r35n357clyyybber see t_sin_cos in lib
18:04:56clyybberok
18:05:04clyybberyou return an array there
18:05:16clyybberdo you want to return a tuple instead?
18:05:17m4r35n357clyybber, if you look at https://play.nim-lang.org/#ix=2cPF
18:05:35m4r35n357you will see the call puts the valus into what looks like a tuple
18:05:44m4r35n357that is how the Python code is put together
18:06:06clyybberYeah
18:06:15clyybberit unpacks them into the array
18:06:23clyybber*arrays
18:06:28m4r35n357but the Python t_sin_cos returns a tuple, but my nim code returns an array created from the tuple values
18:06:39m4r35n357butjust returning the tuple doesn't seem to work
18:07:15clyybberwrite return (s[k], c[k]) in t_sin_cos
18:07:24m4r35n357that tuple -> array - > tuple conversion seems unnecessary
18:07:35m4r35n357OK
18:08:53m4r35n357that works too
18:09:26m4r35n357but I was assuming nim would just return the last value assigned without this extra stage
18:10:00m4r35n357./thomas 9 8 0.1 30000 1 0 0 .19 >/tmp/data; echo "splot '/tmp/data' with lines" | gnuplot -p
18:10:13m4r35n357for anyone trying this at home who has gnuplot
18:10:27clyybberm4r35n357: Nope, that would be crazy
18:10:35clyybberI mean the last value assigned to thing
18:10:40m4r35n357where thomas.nim is the client from https://play.nim-lang.org/#ix=2cPF
18:11:14clyybberIs it intended btw that t_sin_cos returns the tuple but also modifies the arrays?
18:11:34clyybberoh, seems it is
18:11:45m4r35n357yes, I had to explain that earlier, it is desirable but not essential for the client code
18:11:52clyybberhmm no
18:11:55clyybberit doesn't make sense
18:12:06clyybberyou are writing into the array
18:12:11clyybberand then returning a tuple
18:12:18clyybberwhich you write into the arrays again
18:12:23clyybberso you are writing twice to it
18:12:29clyybberyou should just return the tuple
18:12:29m4r35n357I am writing into a tuple then returning an array
18:12:39clyybberno you are writing into the arrays
18:12:47m4r35n357clyybber, at last, that was my original question!
18:13:06clyybberone minute, I'll fix that
18:13:10m4r35n357Error: expression 't_sin_cos(sx, cx, x, k)' has no type (or is ambiguous)
18:13:21*nsf joined #nim
18:13:38m4r35n357that is by far the neatest solution apart from the compilation thing . .
18:13:58clyybberthere you go: https://play.nim-lang.org/#ix=2cPP
18:14:16m4r35n357oh!
18:14:41clyybberoh and remove the var thing from the parameters
18:14:41m4r35n357can't believe I got to where I was without being there first ;)
18:14:44clyybberits not needed anymore
18:14:52clyybberm4r35n357: heh :)
18:15:00clyybberalso the same goes for t_exp
18:15:09clyybberyou are saying that you return a float
18:15:18clyybberbut you actually write to the array in the parameter
18:15:22m4r35n357it is not needed in the use cases I have showed so far
18:15:26clyybberyeah
18:15:36clyybberbut you should fix it regardless
18:15:45clyybberjust remove the assignemtn
18:15:58clyybberand make the argument not var anymore
18:16:06m4r35n357the Python does not use vars, and it is unnecessarily verbose for the client because of it.
18:16:49*clemens3 joined #nim
18:16:54clyybberIMO its better to make the code for the client easy to understand
18:17:12m4r35n357clyybber, I shall revisit this issue, in case I am wrong . .
18:17:30*marmotini_ joined #nim
18:17:46clyybberso the client having to do `(s[k], t[k]) = something` is better IMO than the client just doing `something(s, t, k)`
18:17:54m4r35n357but I've removed stuff like this before then been "reminded" why it was there
18:17:54disruptekcode is write-once-read-many.
18:17:59clyybberIts also more flexible
18:18:17disruptekmake it so trivial that you'll have no trouble rewriting it later if necessary for optimization.
18:19:09m4r35n357when I say client I mean client code, just to avoid misnderstandings ;)
18:19:49clyybberm4r35n357: Heres how I would do it: https://play.nim-lang.org/#ix=2cPY
18:19:52*luis__ joined #nim
18:20:10clyybberThe client code will assign the results themselves to where they want them to be
18:20:17*tane quit (Quit: Leaving)
18:20:27clyybbermaybe they want to echo it or something
18:20:55clyybberits also just a mathematical function this way
18:21:06clyybberand you can actually write func instead of proc if you want to
18:22:20clyybberhttps://play.nim-lang.org/#ix=2cQ0
18:22:27clyybberWith func instead of proc
18:23:20m4r35n357clyybber, here we go, Python client loop: https://play.nim-lang.org/#ix=2cQ1
18:24:27clyybberto port to nim, just add `()` around the first 3 assignments
18:24:35clyybberm4r35n357: Or is that nim code already?
18:25:03m4r35n357clyybber, actually both at once: https://play.nim-lang.org/#ix=2cQ4
18:25:17m4r35n357sorry I kept pasting code into IRC, had to keep deleting it ;)
18:25:38m4r35n357clyybber, this is a direct comparison of how I use the code in Python and c
18:26:07clyybberoh
18:26:11m4r35n357clyybber, because it si such a PITA to do var parameters in Python, I just rely on returned values
18:26:17clyybberyeah the c version cuts corners
18:26:25m4r35n357wheras the c can use them inline
18:26:33m4r35n357as it updates the vars as it goes
18:26:43clyybberthe python/nim version is easier to understand though
18:27:07m4r35n357I just decided that the flexibility was to useful to give up
18:27:13m4r35n357so I do both
18:27:18clyybbercool!
18:27:29m4r35n357the c version just used to use the var parameters
18:28:34m4r35n357clyybber, anyway, I need to digest what I have learned in this session. Thanks for hanging in there
18:29:55m4r35n357clyybber, another factor that I didnt' mention is that the main version uses c with the MPFR arbitrary precision library, and using it is very verbose, saving lines saves sanity!
18:30:10*Hideki_ joined #nim
18:30:23clyybberI see
18:31:00m4r35n357anyway, I'm going to tidy all this up for now, thanks again!
18:31:06clyybbernp :)
18:34:13lqdev[m]I'm trying to pass a Table to a proc in a separate dll, but when the proc tries to access that table I get a segfault: http://ix.io/2cQ9
18:34:31lqdev[m]the table is stored in an object which is a global
18:35:33lqdev[m]it happens no matter if I use boehm or not
18:35:40Zevvcan you try with arc?
18:35:47lqdev[m]no
18:35:52Zevvoh wait boehm should be fine of course
18:36:25disruptekuse TableRef
18:36:49lqdev[m]would making the object ref also suffice?
18:37:31disruptekif that's what you're passing, yes.
18:38:26disrupteki mean, that's what i'd try.
18:38:57lqdev[m]let's see, then
18:43:10lqdev[m]oh wow, if you compile Nim in nvim with ALE it will automatically show you the errors in a quickfix window. nice.
18:43:22lqdev[m]and it works with make!
18:44:05leorizeyou don't even have to use ALE :P
18:44:26leorizenim.nvim have a compiler plugin for showing errors as well
18:44:35leorizethough neovim's make is no match for ALE
18:45:01lqdev[m]ah, it's neovim
18:45:02lqdev[m]nice
18:45:41lqdev[m]disruptek: making the object ref doesn't seem to work
18:46:06disruptekthis dll is something you wrote?
18:46:56lqdev[m]yes
18:46:59FromDiscord<Recruit_main70007> You can’t import objects from dlls right?
18:47:09clyybberyou mean types?
18:47:16clyybberno, types exist at compile time
18:47:17lqdev[m]nope, but you can import modules that contain those types.
18:47:54FromDiscord<Recruit_main70007> I see
18:48:41disrupteklook at hashcommon and see what it's trying to read from.
18:49:01disruptekis this shashlick's feud plugin system?
18:49:16lqdev[m]nope
18:49:46lqdev[m]it's my own https://github.com/liquid600pgm/nadio/blob/master/src/nadio/plugins.nim
18:50:25lqdev[m]the file is outdated
18:50:25*Hideki_ quit (Ping timeout: 272 seconds)
18:50:30lqdev[m]let me commit
18:51:33lqdev[m]done
18:54:20disruptekwell, it doesn't seem like the problem is in this code.
18:55:05disruptekneither is your test, i guess.
18:55:12lqdev[m]it fails in rawGetKnownHCImpl, while checking a `t`'s len
18:55:20lqdev[m]that `t` is a string in my case
18:55:29disruptekplease use a TableRef just to appease me.
18:55:31lqdev[m]so I suppose the string is nil or invalid.
18:57:44lqdev[m]no luck.
18:58:03lqdev[m]as in, it doesn't work.
18:58:19disruptekwhere is the init code?
19:00:05lqdev[m]init for what? the table?
19:00:10disruptekyou may as well embed your langtable since you're using, y'know, static data at ct.
19:00:32disruptekwhere is the plugin init defined?
19:00:35disruptekthe one that crashes?
19:00:58lqdev[m]here https://github.com/liquid600pgm/nadio/blob/master/plugins/test/test.nim
19:01:10*xet7 quit (Read error: Connection reset by peer)
19:01:17lqdev[m]and the lang table isn't static data, new strings can be loaded into it by plugins
19:01:43*xet7 joined #nim
19:01:46disruptekdo you think you understand the difference between Table and TableRef?
19:02:15lqdev[m]yes
19:02:19disruptekokay.
19:02:28lqdev[m]one lives on the stack, and the other lives on the heap, am I right?
19:02:32disruptekso it outputs, "hello from plugin" and then crashes?
19:02:38lqdev[m]yes
19:03:01lqdev[m]and it crashes on checking whether a key is stored in the table
19:03:24lqdev[m]ie. `key in tab`
19:04:00disruptekso you have a Resources object, a global, on the heap, which holds within it a Table, is that right?
19:04:30lqdev[m]yes
19:04:56shashlicklqdev u using boehm?
19:05:05disruptekand you think that makes sense?
19:06:42disruptekthis is the kind of thing where, in theory, it doesn't seem like a problem. in practice, i dunno. i'd be suspicious.
19:06:44lqdev[m]yes, why wouldn't it make sense?
19:06:46lqdev[m]shashlick: yes
19:07:04shashlickCdecl
19:07:10Zevvdisruptek: what are you hinting at here
19:07:15lqdev[m]instead of noconv
19:07:18lqdev[m]?
19:07:31lqdev[m]let me try
19:08:38*luis__ quit (Quit: luis__)
19:09:08*luis__ joined #nim
19:09:16Zevvthis table is not living on the stack in this case of course, it is just on the heap
19:09:22disruptekyep.
19:09:27disruptekbut assumptions may be made.
19:09:42Zevvremember roots and fuckups
19:10:06lqdev[m]ah, there we go
19:10:18lqdev[m]seems like I'm a dumbass and I was running `make` and not `make install`
19:10:34lqdev[m]thus, any changes in my plugin were not reflected
19:11:11disruptekso we won't know what fixed it?
19:11:35lqdev[m]probably changing the proc signature
19:12:03Zevvwell, running "make install" fixed it, right? :)
19:12:11lqdev[m]yes
19:12:27lqdev[m]because my `install` rule copies the file to Nadio's plugins directory.
19:12:39Zevvsure, makese sense. I was just answering disruptek's question :)
19:12:47lqdev[m]ah
19:13:28*luis__ quit (Client Quit)
19:13:56*luis__ joined #nim
19:18:22lqdev[m]anyhow, it works now. thanks for the help
19:20:12disruptekcool.
19:26:33*Vladar quit (Quit: Leaving)
19:44:13*Guest69991 quit (Ping timeout: 265 seconds)
19:50:05*dadada joined #nim
19:50:28*dadada is now known as Guest94405
19:50:29*luis__ quit (Quit: luis__)
20:04:02*Guest94405 quit (Ping timeout: 265 seconds)
20:05:08*dadada_ joined #nim
20:16:19*sentreen_ quit (Ping timeout: 255 seconds)
20:18:51*dadada_ quit (Ping timeout: 260 seconds)
20:19:39disruptek~stream is https://twitch.tv/disruptek
20:19:40disbotstream: 11https://twitch.tv/disruptek
20:19:44disruptekso.
20:19:57*dadada joined #nim
20:20:12disruptekjust gonna add speech bubble notifications when people talk in mumble.
20:20:18disruptekso we know who is speaking.
20:20:22*dadada is now known as Guest59192
20:21:26*clyybber quit (Ping timeout: 265 seconds)
20:21:42Zevvso what is this mumble
20:21:51Zevvhow does one know where to mumble
20:21:51disruptekit's group voice chat.
20:22:04Zevvyeah but is it tied to your twitch somehow?
20:22:11disruptek~stream is https://twitch.tv/disruptek and mumble://uberalles.mumbl.io/
20:22:12disbotstream: 11https://twitch.tv/disruptek and mumble://uberalles.mumbl.io/
20:22:13disruptekyes.
20:22:21Zevvah right
20:22:36disruptekyou want to talk but... privately?
20:22:54*clyybber joined #nim
20:23:22*sagax quit (Ping timeout: 265 seconds)
20:24:02*sagax joined #nim
20:27:11*abm joined #nim
20:29:00*sentreen_ joined #nim
20:34:17*Guest59192 quit (Ping timeout: 272 seconds)
20:35:03*dadada_ joined #nim
20:37:20*nsf quit (Quit: WeeChat 2.7)
20:39:32*ptdel quit (Ping timeout: 248 seconds)
20:39:50*ptdel joined #nim
20:42:35*krux02 quit (Remote host closed the connection)
20:48:37*Trustable quit (Remote host closed the connection)
20:58:21*Jesin quit (Quit: Leaving)
21:00:23*Jesin joined #nim
21:04:12*narimiran joined #nim
21:20:20*clyybber quit (Quit: WeeChat 2.7.1)
21:21:51*filcuc joined #nim
21:30:43*setenforce quit (Ping timeout: 260 seconds)
21:35:47*alexander92 joined #nim
21:46:01*filcuc quit (Ping timeout: 265 seconds)
21:51:17*filcuc joined #nim
21:55:05*narimiran quit (Ping timeout: 258 seconds)
21:55:25*solitudesf joined #nim
21:58:44*marmotini_ quit (Remote host closed the connection)
21:59:20*marmotini_ joined #nim
22:07:17*marmotini_ quit (Ping timeout: 265 seconds)
22:15:39*clyybber joined #nim
22:16:35*clyybber quit (Client Quit)
22:22:24*setenforce joined #nim
22:23:54*clyybber joined #nim
22:33:05disruptekwhat to work on next...
22:35:14disruptekoh, let's do the bot radio.
22:38:05*alexander92 quit (Read error: Connection reset by peer)
22:39:15*solitudesf quit (Ping timeout: 240 seconds)
22:45:41*letto quit (Ping timeout: 258 seconds)
22:49:08*marmotini_ joined #nim
22:49:13*letto joined #nim
22:53:21*luis__ joined #nim
23:02:39*a_b_m joined #nim
23:05:26*filcuc quit (Quit: Konversation terminated!)
23:06:15*abm quit (Ping timeout: 265 seconds)
23:08:06*lritter quit (Quit: Leaving)
23:17:50disruptek~stream
23:17:51disbotstream: 11https://twitch.tv/disruptek and mumble://uberalles.mumbl.io/ -- disruptek
23:24:25*krux02 joined #nim
23:47:07*clyybber quit (Quit: WeeChat 2.7.1)
23:52:11shashlickMeh, cannot get into mumble with android
23:52:33disruptekwhy not?
23:52:50zedeushttps://f-droid.org/en/packages/com.morlunk.mumbleclient/
23:53:24disruptekare you on the stream?
23:57:00*theelous3 quit (Read error: Connection reset by peer)
23:57:54krux02I am watching the stream right now
23:58:03krux02is the IRC on the stream?
23:58:50krux02ok I see you opening the IRC chat :D
23:59:18krux02currently my twitch account information is somewhere lost