<< 25-05-2021 >>

00:00:06FromDiscord<treeform> In reply to @Hi02Hi "i use it, did": I just have not seen it before, but it looks like its been up for a while.
00:00:12FromDiscord<Hi02Hi> haters would probably say nimrods
00:00:23FromDiscord<treeform> In reply to @dom96 "<@!107140179025735680> curious: have you": Yes we do all the time. Some times our rendering is smoother.
00:00:49FromDiscord<treeform> We event have a special X-ray mode to see the diffs:
00:00:50FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/846538259860946974/tiger.png
00:00:57FromDiscord<Hi02Hi> i mean, this is the first time ive heard of it before, and the blog post is from today
00:01:02FromDiscord<dom96> I'm in particular curious about text rendering perf vs. skia
00:01:33FromDiscord<treeform> We are not faster then skia. We are close though.
00:02:07FromDiscord<dom96> ahh, fair enough
00:02:34FromDiscord<treeform> We were like 20,000 time slower, then 2000, then 200, then 20, then 10 ... we are closing in.
00:02:48FromDiscord<treeform> But every bit is getting harder and harder to squeeze out.
00:03:01FromDiscord<treeform> Compiler flags are starting to matter a ton
00:03:31FromDiscord<dom96> Right, there is a project at work that needs highly performant text rendering
00:03:44FromDiscord<treeform> I had a GPU version, that I thought would win.
00:03:47FromDiscord<dom96> if it's not significantly faster then not much reason to not just use Skia tbh
00:03:51FromDiscord<treeform> Currently is not winning CPU is faster.
00:04:06FromDiscord<treeform> But I think GPU compute shader might win again.
00:04:24FromDiscord<treeform> Yeah if you have Skia already there is no need to switch.
00:04:39FromDiscord<treeform> Unless you want to support Nim ecosystem or some thing...
00:05:19FromDiscord<treeform> Big speed thing that we don't fully understand is array vs object access.
00:06:33FromDiscord<treeform> In reply to @treeform "I am stuck on": See: https://discord.com/channels/371759389889003530/371759389889003532/841064288755646565
00:07:53FromDiscord<gavr> just use GTK 4 heh
00:08:26*noeontheend quit (Ping timeout: 240 seconds)
00:08:51FromDiscord<gavr> https://youtu.be/zDLCJCX1kL0
00:19:48FromDiscord<ElegantBeef> Hey pixie was quite easy to setup with this πŸ˜› https://media.discordapp.net/attachments/371759389889003532/846543033650774097/unknown.png
00:21:14FromDiscord<ElegantBeef> Automagic constants may or may not have been abused in the construction of this
00:24:31*noeontheend joined #nim
00:35:46FromGitter<kaushalmodi> @BracketMaster Yep, I do digital verification
00:37:16*noeontheend quit (Ping timeout: 265 seconds)
00:37:40FromDiscord<exelotl> In reply to @BracketMaster "Rust has Rustaceans, does": Nimmers is the only non-cringe one :P
00:43:51FromGitter<BracketMaster> @kaushalmodi - heard of these guys? https://chipeleven.com
00:43:59FromGitter<BracketMaster> they're doing cool things
00:47:13*joast quit (Quit: Leaving.)
00:47:17FromGitter<kaushalmodi> Yep, I heard about it recently on hacker news in that Nim 2.0 thread. But the website doesn't give much info. What products have you taped out? Or are you only an IP company?
00:47:48FromGitter<kaushalmodi> Bad wording: I meant "IP-only company"
00:50:36*NimBot joined #nim
00:57:08*nphg1 joined #nim
00:58:37*nphg quit (Ping timeout: 240 seconds)
01:01:24FromDiscord<Rika> In reply to @exelotl "Nimmers is the only": Nimion isn’t cringe smh
01:02:12*NimBot joined #nim
01:02:40FromGitter<BracketMaster> eyyy... Nimion! I like it!
01:03:01FromGitter<BracketMaster> @kaushalmodi - can't say much here - but we're doing some really amazing things and have great partnerships
01:03:05*Tlangir joined #nim
01:03:12FromGitter<BracketMaster> Chip11 is why 2023 won't be quite like 2023
01:03:47FromGitter<BracketMaster> I could probably say more over a phone call
01:05:12*nphg1 quit (*.net *.split)
01:05:12*rockcavera quit (*.net *.split)
01:05:12*arecaceae quit (*.net *.split)
01:05:12*Jesin quit (*.net *.split)
01:05:12*astronavt quit (*.net *.split)
01:05:12*zedeus quit (*.net *.split)
01:05:12*Gustavo6046 quit (*.net *.split)
01:05:12*sagax quit (*.net *.split)
01:14:56ForumUpdaterBotNew question by GGibson: How to CosmoNim (GCC) on Solus Linux? (segfault), see https://stackoverflow.com/questions/67665566/how-to-cosmonim-gcc-on-solus-linux-segfault
01:15:22*nphg1 joined #nim
01:15:22*rockcavera joined #nim
01:15:22*arecaceae joined #nim
01:15:22*astronavt joined #nim
01:15:22*zedeus joined #nim
01:15:22*Gustavo6046 joined #nim
01:15:22*sagax joined #nim
01:15:22*Jesin joined #nim
01:15:32*Jesin quit (Max SendQ exceeded)
01:15:32*Gustavo6046 quit (Max SendQ exceeded)
01:16:41*Gustavo6046 joined #nim
01:16:42*Jesin joined #nim
01:33:17ForumUpdaterBotNew thread by Lotzz: Nimsuggest, neovim, nim.nvim trouble, see https://forum.nim-lang.org/t/8029
01:33:51FromGitter<BracketMaster> Are there any templates or macros that can stringify arbitrary type? Like recursively print member until one hits a base type?
01:39:42FromDiscord<ElegantBeef> you can checkout https://github.com/treeform/print
01:46:18FromGitter<kaushalmodi> How can I pass varargs arg from one template to another after manipulating them?
01:46:36FromGitter<kaushalmodi> The other template accepts varargs too
01:49:27FromGitter<kaushalmodi> Here's a simple example I am trying to get working ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac57a7fec22b4786dc0e21]
01:50:12FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac57d445c2185a5eea51fc]
01:50:31FromGitter<bung87> in macros module, does it work for you?
01:52:06FromGitter<kaushalmodi> @bung87 Ah! I had read about it but had forgotten.. Isn't it the same defined in macros? https://nim-lang.github.io/Nim/macros#unpackVarargs.m%2Cuntyped%2Cvarargs%5Buntyped%5D
01:52:28FromDiscord<ElegantBeef> That's what they were suggesting πŸ˜„
01:52:37FromGitter<kaushalmodi> Thanks! :D
01:53:02FromDiscord<ElegantBeef> Worth noting you'd have hit an index error in your example anywho
01:53:35FromDiscord<ElegantBeef> `signalCint[i]` on a seq with `len == 0`
01:54:07FromGitter<kaushalmodi> Good point; should have put a doAssert of len >= 1
01:54:40FromGitter<kaushalmodi> ah, no
01:54:48FromGitter<kaushalmodi> needed to do a .add
01:54:57FromDiscord<ElegantBeef> you should do `signalsCint.add signal.cint` since `signalsCint` isnt intialized...
01:54:58FromDiscord<ElegantBeef> Yes πŸ˜„
01:58:57FromGitter<kaushalmodi> Thanks, this worked: http://ix.io/3nMA
02:00:35FromDiscord<ElegantBeef> here's where i say you can remove that for loop and just `import std/sequtils` and do `signals.mapit(it.cint)`
02:00:55PrestigeIs there a way to specify a commit as a dependency with nimble? Looking at https://github.com/nim-lang/nimble#dependencies I've tried a few things, but it fails
02:01:11FromGitter<kaushalmodi> ElegantBeef: Yep, that's what I did eventually
02:01:24FromDiscord<ElegantBeef> `requires "package@#commitid"` i believe
02:02:28Prestigeah, it's foo#commit without the @
02:02:29FromDiscord<ElegantBeef> Ah no `@`
02:03:13FromGitter<kaushalmodi> The weird thing about when to use @ and when not to always gets me
02:03:40FromDiscord<ElegantBeef> Seems it's just in the CLI you use `@` otherwise you dont
02:04:58FromGitter<kaushalmodi> I think for commit and branch names, you cannot use @
02:05:14FromGitter<kaushalmodi> But for version numbers, you use that
02:05:41FromDiscord<ElegantBeef> Dont know i generally just drop a git url in πŸ˜„
02:06:42FromDiscord<slymilano> Is there a recommended way to track bugs in Nim apps? Sentry or appsignal anything like that?
02:07:22FromGitter<kaushalmodi> ElegantBeef: I just tried out.. you're right.. we need `@` from CLI
02:07:43FromDiscord<ElegantBeef> Most nim devs use github so just use github issues πŸ˜„
02:08:54FromDiscord<slymilano> I mean automatic exception tracking
02:09:14FromDiscord<slymilano> How do you know if Nim programs are bugging out in production?
02:09:22FromDiscord<ElegantBeef> "Production"? πŸ˜›
02:09:28FromDiscord<slymilano> Lol wyldin
02:10:37FromDiscord<ElegantBeef> Someone somewhere actually would know what is a good library for that, but as a numpty that doesnt ship anything i'm not
02:17:02FromGitter<kaushalmodi> I have a followup question about passing on varargs. The previous example with passing Nim varargs to Nim varargs worked. ⏎ ⏎ But it doesn't work when passing Nim varargs to a C-mapped proc accepting varags .. Here's an example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac5e1d9d18fe199824118b]
02:17:55FromGitter<kaushalmodi> Compilation error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac5e523d43a15a65c47bf9]
02:19:00FromDiscord<ElegantBeef> Why are you even aliasing that proc like that?
02:19:41FromGitter<kaushalmodi> above is a simplification; I intend to make vpi_control accept enums and convert that to cint when passing to C
02:20:44FromGitter<kaushalmodi> right now, because I cannot figure out how to pass on the varargs, I just do this and that works ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ But I'd like to change my API to use enums instead of cint consts from the header [https://gitter.im/nim-lang/Nim?at=60ac5efcbdecf719a079a6ad]
02:20:48FromDiscord<ElegantBeef> Ah, well i think it's cause in a template the `varargs` is transformed differently due to being a lighteight macro, so you can just treat it as a `openarray[cint]` in the proc
02:24:22FromDiscord<ElegantBeef> So in that case you might be able to just call the C proc with the varargs input
02:27:23FromGitter<kaushalmodi> ElegantBeef: I didn't follow. ⏎ ⏎ Here's another example what anything can run (does not need at VPI API): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac608bfec22b4786dc1dfe]
02:27:36FromGitter<kaushalmodi> ElegantBeef: Can you help the above dummy example work?
02:27:41FromGitter<kaushalmodi> *help make
02:28:20FromGitter<kaushalmodi> ugh; made a typo: last call is to `printfWrapper`
02:28:59FromGitter<kaushalmodi> but it's the same kind of problem
02:33:22*joast joined #nim
02:39:52*NimBot joined #nim
02:40:34FromDiscord<ElegantBeef> The issue is you need these values to be resolved at compile time to make the call
02:40:58FromDiscord<ElegantBeef> So by doing the `x it` map it's in a `seq[cstring]` which cannot be passed to the C proc
02:41:49FromGitter<kaushalmodi> even if I don't do that mapit, the problem remains
02:42:20FromGitter<kaushalmodi> the compilation error is ⏎ ⏎ ```but expected one of: ⏎ proc printf(formatStr: cstring)``` ⏎ ⏎ it's as if the `{.varargs.}` pragma didn't work there [https://gitter.im/nim-lang/Nim?at=60ac640c850bfa2d3be07afa]
02:42:27*hyiltiz quit (Ping timeout: 265 seconds)
02:43:47FromDiscord<ElegantBeef> Well it works with a template cause like i said in a proc varargs is converted to an openarray https://play.nim-lang.org/#ix=3nMF
02:44:09FromGitter<kaushalmodi> this worked! http://ix.io/3nMG
02:44:40FromGitter<kaushalmodi> well.. similar thing :D
02:44:57*hyiltiz joined #nim
02:44:57*hyiltiz quit (Changing host)
02:44:57*hyiltiz joined #nim
02:45:01FromDiscord<ElegantBeef> It's cause you cannot emit the `cPrintf(fmt[0], fmt[1], ...)` when it's in a proc since that `fmt` is a runtime value, and you cannot emit a function call with it
02:45:50FromGitter<kaushalmodi> yeah, that makes sense
02:47:15FromGitter<kaushalmodi> well, not exactly :)
02:47:51FromGitter<kaushalmodi> anyways, I think it's just a limitation that a Nim varargs proc isn't the same as C mapped proc with varargs pragma
02:48:02*rockcavera quit (Remote host closed the connection)
02:50:17FromDiscord<ElegantBeef> Well no, it's cause in a template varargs isnt a `@["a" , "b", "c"]`, where as when inside a template it's a `bracket` of each strlit
02:50:47FromDiscord<ElegantBeef> So when you try to use it through a proc you have a `seq[string]` and that cannot be unpacked to the C varargs
02:51:10FromDiscord<ElegantBeef> Since varargs have to be called `cprintf(fmt[0], fmt[1], fmt[2])`
02:53:07FromGitter<kaushalmodi> but then how did the above example of direct forwarding the varargs without any manipulation work?
02:53:17FromDiscord<ElegantBeef> Which one?
02:53:36FromGitter<kaushalmodi> the one you pasted and mine http://ix.io/3nMG
02:53:56FromDiscord<ElegantBeef> cause unpackvarargs goes through the bracket expr and releases each inside
02:54:08FromDiscord<ElegantBeef> It turns it into a proper call with each value as a parameter
02:54:42FromDiscord<ElegantBeef> So it becomes a nnkCall(nnkident, nnkStrlit, nnkStrlit, nnkstrlit)
02:54:51FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3nMI to show the difference between the proc/template
02:55:00FromDiscord<ElegantBeef> In proc it's a sym, in template it's a collection of literals
02:56:08FromDiscord<ElegantBeef> Like this `unpackVarargs(printf, fmt)` is turned into `printF("hello %s%s".cstring, "world".cstring, "\n".cstring)`
02:56:22FromGitter<kaushalmodi> yes, I understood that we would need a template, but below doesn't work .. it's the same but with the manipulation of the fmt ⏎ ⏎ but why wouldn't this work then ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac675684a2f633a76ed80f]
02:56:51FromDiscord<ElegantBeef> cause you need to unpack that sequence that's emitted into the ast required to call it
02:57:04FromDiscord<ElegantBeef> that fmtCString isnt a compile time value
02:57:18FromGitter<kaushalmodi> ah, ok
02:57:26FromGitter<kaushalmodi> thanks
02:57:44FromDiscord<ElegantBeef> I'm going to make it work that work now, to show how you'd get around this
03:01:56FromGitter<kaushalmodi> ElegantBeef: I think I will need a new macro that does something like this? https://play.nim-lang.org/#ix=3nMN (see dumpTree)
03:02:26FromDiscord<ElegantBeef> I'm making something as an example, so just give me a minute, but kinda?
03:02:48FromGitter<kaushalmodi> thanks!
03:05:10FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3nMO
03:05:32FromDiscord<ElegantBeef> There you go that's how one would do the str mapping example, you need to work on the nim nodes and emit the proc call
03:06:05FromDiscord<ElegantBeef> With `{.varargs.}` `string`s are converted to cstring implictly
03:06:48FromDiscord<ElegantBeef> That map function can of course be baked into the macro itself, but it's what you need to do anyway
03:08:50FromGitter<kaushalmodi> That's awesome! Thanks
03:09:31FromGitter<kaushalmodi> here's my failed attempt. I will tinker with that a bit as well
03:09:34FromGitter<kaushalmodi> https://play.nim-lang.org/#ix=3nMR
03:10:06FromDiscord<ElegantBeef> Yea you dont need to convert it
03:10:25*arecaceae quit (Remote host closed the connection)
03:10:44*arecaceae joined #nim
03:11:07FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#foreign-function-interface-varargs-pragma the conversion is explicitly stated here
03:11:26FromGitter<kaushalmodi> it's just a dummy example. My real usage is that first example where I intend to convert from enum to cint
03:11:37FromDiscord<ElegantBeef> Oh yea πŸ˜„
03:12:07FromGitter<kaushalmodi> "convert" is just my best name that I came up right now.. it could be any proc that returns the type that matches the C vararg
03:12:18FromDiscord<ElegantBeef> I mean you could just use a converter then
03:12:27FromDiscord<ElegantBeef> Though can be messy
03:12:37FromGitter<kaushalmodi> I haven't used those yet.
03:12:46FromDiscord<ElegantBeef> Actually dont know how that behaves with the C varargs
03:13:23FromDiscord<ElegantBeef> It's just a `proc` but instead you do `converter` and it implicitly converts when it's "needed"
03:13:38FromDiscord<ElegantBeef> I generally dont think it's the smartest to use them, but they do exist
03:17:05FromDiscord<ElegantBeef> Well if you get lost i'm here to explain why it doesnt work for 30 minutes then take 5 minutes to fix it πŸ˜›
03:19:57FromGitter<kaushalmodi> heh, thanks, I will go the macro route only.. just understanding why you put the proc type in the macro defn.. and why untyped doesn't work there
03:22:15FromDiscord<ElegantBeef> Well the untyped should work, but i was operating on literals in that example so i just preferred the implementation that allows changing the literals easily πŸ˜„
03:24:04FromDiscord<ElegantBeef> The issue in your example you sent was, you were attempting to call the proc with no args if you did `newCall(convert, args[i])` it worked
03:24:23*spiderstew joined #nim
03:26:02*spiderstew_ quit (Ping timeout: 246 seconds)
03:26:05FromGitter<kaushalmodi> thanks, that was it! this works https://play.nim-lang.org/#ix=3nMV
03:26:44FromGitter<kaushalmodi> I was doing ⏎ ⏎ ``` for arg in args: ⏎ result.add newCall(convertproc) ⏎ result.add arg``` ⏎ ⏎ and wondering why that arg wasn't added after the proc call [https://gitter.im/nim-lang/Nim?at=60ac6e74fec22b4786dc3acf]
03:29:17FromDiscord<ElegantBeef> Yea the AST is fun to learn/manipulate πŸ˜„
03:31:36FromGitter<kaushalmodi> I created my first real macro just 7-10 days back: here (https://github.com/kaushalmodi/nim-svvpi/blob/fb8402143f8bf0b59319a1ceb0ca4de75bac0e55/svvpi.nim#L246). Still learning .. If you still have time, I can use some feedback
03:31:57FromDiscord<ElegantBeef> That's a big boi
03:32:32FromDiscord<ElegantBeef> To increase maintainability use procs that take ↡ and return Nimnodes
03:32:36FromGitter<kaushalmodi> I just went down the rabbit hole
03:34:48FromGitter<kaushalmodi> ElegantBeef: This (https://github.com/kaushalmodi/nim-svvpi/blob/2e51181db9ff820d50098337076c020e7d1794a6/src/svvpi.nim#L68) is how it began, hehe
03:35:43FromDiscord<ElegantBeef> This might be an easier thing to compartmentalise but here's what it looks like when using procs to seperate the logic https://github.com/beef331/hseq/blob/master/src/hseq.nim
03:36:12FromDiscord<ElegantBeef> You can make it much much simpler to work on and maintain since it's not a super large tree of flow control
03:36:50FromGitter<kaushalmodi> ElegantBeef: Certainly, I will refactor that next. I wasn't aware procs can do that nimnode construction
03:37:07FromDiscord<ElegantBeef> Ah, makes sense then
03:43:50*noeontheend joined #nim
04:11:23FromDiscord<slymilano> Is there a way to have testament autoclean up the binaries it's built after a `testament cat .` run? It's cluttering up the repo and I'm unsure how to git ignore these files. it's generating one binary for every test file
04:19:16*Lord_Nightmare quit (Ping timeout: 252 seconds)
04:19:48FromDiscord<slymilano> did a little Makefile jutsu
04:20:04FromDiscord<slymilano> test:↡ @testament --targets:c cat .↡ @find tests/ -type f ! -name ".nim" -exec rm {} \;
04:24:43*Lord_Nightmare joined #nim
04:25:03*noeontheend quit (Ping timeout: 258 seconds)
04:33:04*Gustavo6046 quit (Ping timeout: 268 seconds)
05:07:56*Gustavo6046 joined #nim
05:20:34FromDiscord<haxscramper> In reply to @slymilano "I mean automatic exception": You can get full stacktrace of the exception upon catching using https://nim-lang.org/docs/system.html#getStackTraceEntries%2Cref.Exception . I used it to create pretty-printing for stacktraces, but automatically tracking which exception is raised (and where) is also possible I think.
05:24:04FromDiscord<slymilano> @haxscramper so perhaps for production usage, I log the stacktraceentries to stdout and write a datadog trigger. hm...
05:34:19*Lord_Nightmare quit (Remote host closed the connection)
05:36:03*Lord_Nightmare joined #nim
05:37:18*narimiran_ joined #nim
05:47:19FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNc
05:47:24FromDiscord<codic> considering nim doesn't have struct methods but instead ufcs
05:48:01FromDiscord<haxscramper> https://github.com/yglukhov/iface
05:55:06*Jesin quit (Ping timeout: 240 seconds)
06:09:16FromDiscord<codic> very cool, still looks like macro hackery though lol
06:11:16FromDiscord<ElegantBeef> It's not really hackery if the language doesnt support it you add it using the best tool and that's macros in many cases
06:35:37FromDiscord<codic> hmm, perhaps
06:35:45FromDiscord<codic> i don't think i will need this oop pattern after all
06:36:03FromDiscord<codic> is there a way to pass arguments to the underlying C compile in nim?
06:36:59FromDiscord<Rika> --passC i think
06:39:32FromDiscord<ElegantBeef> yep and `--passL` for the linker
06:45:22FromDiscord<codic> got it
06:46:45FromDiscord<codic> what if I just want to skip linking?
06:47:32jfondren[m]-c / --compileOnly:on
06:47:44jfondren[m]or --noLinking:on
06:47:51jfondren[m]all under --fullhelp
06:48:45FromDiscord<codic> ah fullhelp is interesting
06:48:50FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNk
06:50:30FromDiscord<Rika> isnt it supposed to go after cc and not before
06:51:03FromDiscord<codic> same effect
06:51:16FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNm
06:51:23FromDiscord<Rika> i mean everything
06:51:25FromDiscord<Rika> nim cc --cc...
06:53:20FromDiscord<codic> don't think it cares about order
06:53:27FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNn
06:53:36FromDiscord<codic> oh wait, it isn't generating a new binary
06:53:52FromDiscord<codic> i just removed the file
06:54:07FromDiscord<codic> so it says `out: ~/nk/kernel` but it spits out nothing
06:54:12FromDiscord<codic> i want an object file
06:54:39FromDiscord<codic> hidden in nimcache?
06:54:40FromDiscord<Rika> --usenimcache
06:54:46FromDiscord<Rika> ah no
06:54:47FromDiscord<Rika> wrong one
06:55:00FromDiscord<Rika> --nimcache:"path"
06:57:09*johnnynitwits quit (Quit: Bridge terminating on SIGTERM)
06:58:04*johnnynitwits joined #nim
06:58:41FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNq
06:58:53FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNr
06:59:11FromDiscord<codic> idk i should just go to bed lol
07:01:01*PMunch joined #nim
07:06:49FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNv
07:07:08FromDiscord<codic> wat, even this doe
07:07:09FromDiscord<codic> (edit) "doe" => "does"
07:07:14FromDiscord<codic> weird nim bug?
07:07:16FromDiscord<codic> kernel.nim:
07:07:20FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNw
07:07:33FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nNx
07:34:26*PMunch quit (Ping timeout: 240 seconds)
07:48:26*PMunch joined #nim
07:48:31*superbia joined #nim
07:51:13*Jesin joined #nim
08:03:23*Tlangir quit (Quit: Leaving)
08:04:12*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
08:11:38*r4vi quit (Read error: Connection reset by peer)
08:13:19*omnigoat quit (Read error: Connection reset by peer)
08:14:29*surma quit (Ping timeout: 268 seconds)
08:16:56ForumUpdaterBotNew thread by Miran: Nim version 1.4.8 released, see https://forum.nim-lang.org/t/8031
08:23:12*surma joined #nim
08:25:37*omnigoat joined #nim
08:26:45*r4vi joined #nim
08:28:16FromDiscord<jseb> how to import Β«freeΒ» from libc ? I tried: `proc free(pBuffer: pointer) {.header: "<stdlib.h>", importc: "free", pointer.}` but it doesn't like the Β«pointerΒ» type in the {}
08:32:50*tane joined #nim
08:35:33*Tlangir joined #nim
08:39:16*Tlanger joined #nim
08:41:46*Tlangir quit (Ping timeout: 252 seconds)
08:42:23PMunch@jseb, remove the `pointer` in the {}?
08:46:46FromDiscord<jseb> ah yes, thank you PMunch
08:47:15PMunchWhy had you put that there to begin with?
08:48:06FromDiscord<jseb> i was following the `printf` sample of the documentation: https://nim-lang.org/docs/manual.html#foreign-function-interface (there is a `varargs` in the template arguments, and as it's the arg of printf, i was thinking `free` was needing its pointer arg)
08:48:56PMunchAah, no varargs is its own thing
08:49:07PMunchThe way C does varargs is really weird :P
08:49:53FromDiscord<jseb> i import `free` to reproduces the problem in the nimraylib_now lib, when the lib part frees memory on it self, nim isn't aware of this and panics
08:51:00FromDiscord<jseb> do you read gamedev chan of nim/discord PMunch ? It was discussed here
08:51:20PMunchYeah I do, but only when I'm online
08:51:32PMunchI'm on IRC so I don't see what has been typed when I'm not around
08:51:51FromDiscord<jseb> sent a code paste, see https://play.nim-lang.org/#ix=3nO3
08:52:25PMunchUse dealloc?
08:52:43PMunchYou don't need discardable either by the way
08:53:08PMunchThat's just used for procedures that returns something but you want to be able to discard it without doing "discard"
08:54:06FromDiscord<jseb> ok for discardable
08:54:08PMunchThat cast[string](leak) is also not really going to work will it?
08:54:44FromDiscord<jseb> the cast is working (may be by accident, but i see the string in the term)
08:55:28FromDiscord<jseb> the only difference between my snippet and the issue in libray is the issue in ilbray is mitigated by using a gc (arc or orc, not refc)
08:56:00FromDiscord<jseb> with my snippet, double free even with `--gc arc`
08:56:33PMunchThis should work: https://play.nim-lang.org/#ix=3nO4
08:59:54FromDiscord<jseb> thank you PMunch, but it was to mimic the raylib problem
09:01:47PMunchWell if raylib is doing something like that they should probably change :P
09:20:35*johnnynitwits quit (Quit: Bridge terminating on SIGTERM)
09:21:01*johnnynitwits joined #nim
09:27:09*narimiran_ is now known as narimiran
09:27:48narimiranPMunch: do you have admin rights for this channel? can you change the topic, so it says that the latest version is 1.4.8 (and not 1.4.2)?
09:39:29superbianarimiran: are we mitigating to libera?
09:39:49narimiransuperbia: https://forum.nim-lang.org/t/8002
09:41:21*superbia quit (Quit: WeeChat 3.1)
09:42:37ForumUpdaterBotNew post on r/nim by miran1: Nim version 1.4.8 released, see https://reddit.com/r/nim/comments/nklqnz/nim_version_148_released/
10:08:41*Guest007[m]1 quit (*.net *.split)
10:08:41*Avatarfighter[m] quit (*.net *.split)
10:08:41*vegai1 quit (*.net *.split)
10:08:41*gemath[m] quit (*.net *.split)
10:08:42*BitPuffin quit (*.net *.split)
10:08:42*Clonkk[m] quit (*.net *.split)
10:08:42*blackbeard420 quit (*.net *.split)
10:08:42*EastByte quit (*.net *.split)
10:08:56*tane quit (Remote host closed the connection)
10:09:19*tane joined #nim
10:09:28*tane quit (Remote host closed the connection)
10:09:44*tane joined #nim
10:09:56*Guest007[m]1 joined #nim
10:09:56*Avatarfighter[m] joined #nim
10:09:56*vegai1 joined #nim
10:09:56*gemath[m] joined #nim
10:09:56*BitPuffin joined #nim
10:09:56*Clonkk[m] joined #nim
10:09:56*blackbeard420 joined #nim
10:09:56*EastByte joined #nim
10:11:39*Zoom[m] quit (Ping timeout: 245 seconds)
10:11:41*Hasnep[m] quit (Ping timeout: 247 seconds)
10:11:41*alri[m] quit (Ping timeout: 247 seconds)
10:11:42*Benjamin[m]1 quit (Ping timeout: 247 seconds)
10:12:01*jfondren[m] quit (Ping timeout: 246 seconds)
10:12:01*CodeBitCookie[m] quit (Ping timeout: 246 seconds)
10:12:03*Guest007[m]1 quit (Ping timeout: 248 seconds)
10:12:03*lnxw37d4 quit (Ping timeout: 258 seconds)
10:12:03*vegai1 quit (Ping timeout: 248 seconds)
10:12:04*wanr[m] quit (Ping timeout: 245 seconds)
10:12:04*altarrel quit (Ping timeout: 258 seconds)
10:12:04*BitPuffin quit (Ping timeout: 248 seconds)
10:12:05*Clonkk[m] quit (Ping timeout: 248 seconds)
10:12:05*ee7[m] quit (Ping timeout: 258 seconds)
10:12:09*npham[m] quit (Ping timeout: 250 seconds)
10:12:13*MTRNord quit (Ping timeout: 276 seconds)
10:12:14*dithpri[m] quit (Ping timeout: 276 seconds)
10:12:14*cadmium[m] quit (Ping timeout: 276 seconds)
10:12:14*fbpyr[m] quit (Ping timeout: 276 seconds)
10:12:22*cheer[m] quit (Ping timeout: 246 seconds)
10:12:22*customer[m] quit (Ping timeout: 246 seconds)
10:12:22*goblinslayer[m] quit (Ping timeout: 246 seconds)
10:12:26*stisa quit (Ping timeout: 258 seconds)
10:12:26*bluemax[m] quit (Ping timeout: 245 seconds)
10:12:26*reversem3 quit (Ping timeout: 245 seconds)
10:12:27*Avatarfighter[m] quit (Ping timeout: 245 seconds)
10:12:27*gemath[m] quit (Ping timeout: 245 seconds)
10:12:29*Edoardo[m]1 quit (Ping timeout: 245 seconds)
10:12:35*DannyHpy[m] quit (Ping timeout: 250 seconds)
10:12:48*||[m] quit (Ping timeout: 258 seconds)
10:12:48*Avahe[m] quit (Ping timeout: 258 seconds)
10:12:48*bfgcoding[m] quit (Ping timeout: 258 seconds)
10:13:32*Gambit[m] quit (Ping timeout: 276 seconds)
10:13:32*screamapiller[m] quit (Ping timeout: 276 seconds)
10:13:32*leorize[m] quit (Ping timeout: 276 seconds)
10:13:50*mahlon quit (*.net *.split)
10:13:50*oz quit (*.net *.split)
10:14:27*mahlon joined #nim
10:14:27*oz joined #nim
10:14:49*johnnynitwits quit (*.net *.split)
10:14:49*Lord_Nightmare quit (*.net *.split)
10:14:49*mal`` quit (*.net *.split)
10:14:49*Adeon quit (*.net *.split)
10:14:49*fifth quit (*.net *.split)
10:14:49*kaliy quit (*.net *.split)
10:14:50*Prestige quit (*.net *.split)
10:14:50*so quit (*.net *.split)
10:14:50*junland quit (*.net *.split)
10:15:06*zuckerberg[m] quit (Ping timeout: 258 seconds)
10:16:37*johnnynitwits joined #nim
10:16:37*mal`` joined #nim
10:16:37*Adeon joined #nim
10:16:37*fifth joined #nim
10:16:37*kaliy joined #nim
10:16:37*Prestige joined #nim
10:16:37*so joined #nim
10:16:37*junland joined #nim
10:16:45*Cthalupa quit (*.net *.split)
10:16:46*euantorano quit (*.net *.split)
10:16:46*Ekho quit (*.net *.split)
10:16:53*Lord_Nightmare joined #nim
10:18:39*robertmeta quit (*.net *.split)
10:18:40*fowl quit (*.net *.split)
10:18:40*skelett quit (*.net *.split)
10:18:40*siinamon quit (*.net *.split)
10:18:40*Yardanico quit (*.net *.split)
10:18:40*stefantalpalaru quit (*.net *.split)
10:18:40*conkker quit (*.net *.split)
10:18:40*Eyess quit (*.net *.split)
10:18:40*Araq quit (*.net *.split)
10:18:40*Northstrider[m] quit (*.net *.split)
10:18:40*crem quit (*.net *.split)
10:18:41*motersen quit (*.net *.split)
10:18:41*fantis quit (*.net *.split)
10:18:41*koltrast quit (*.net *.split)
10:18:41*JStoker quit (*.net *.split)
10:18:41*FromDiscord quit (*.net *.split)
10:18:41*xace quit (*.net *.split)
10:18:41*casaca quit (*.net *.split)
10:18:41*Q-Master quit (*.net *.split)
10:18:41*pauwel_kwak quit (*.net *.split)
10:18:41*Jesin quit (*.net *.split)
10:18:41*arecaceae quit (*.net *.split)
10:18:41*hyiltiz quit (*.net *.split)
10:18:41*uvegbot quit (*.net *.split)
10:18:41*mindhunter0x quit (*.net *.split)
10:18:42*idxu quit (*.net *.split)
10:18:42*WilhelmV1nWeiner quit (*.net *.split)
10:18:42*shodan45 quit (*.net *.split)
10:18:42*revere quit (*.net *.split)
10:18:42*ldlework quit (*.net *.split)
10:18:42*jken quit (*.net *.split)
10:20:05*Jesin joined #nim
10:20:05*arecaceae joined #nim
10:20:05*hyiltiz joined #nim
10:20:05*uvegbot joined #nim
10:20:05*motersen joined #nim
10:20:05*Yardanico joined #nim
10:20:05*siinamon joined #nim
10:20:05*skelett joined #nim
10:20:05*fowl joined #nim
10:20:05*robertmeta joined #nim
10:20:05*fantis joined #nim
10:20:05*koltrast joined #nim
10:20:05*JStoker joined #nim
10:20:05*FromDiscord joined #nim
10:20:05*Northstrider[m] joined #nim
10:20:05*stefantalpalaru joined #nim
10:20:05*mindhunter0x joined #nim
10:20:05*Q-Master joined #nim
10:20:05*crem joined #nim
10:20:05*Araq joined #nim
10:20:05*Eyess joined #nim
10:20:05*conkker joined #nim
10:20:05*pauwel_kwak joined #nim
10:20:05*idxu joined #nim
10:20:05*WilhelmV1nWeiner joined #nim
10:20:05*jken joined #nim
10:20:05*ldlework joined #nim
10:20:05*revere joined #nim
10:20:05*shodan45 joined #nim
10:20:11*so quit (Max SendQ exceeded)
10:20:11*xace joined #nim
10:21:08*Cthalupa joined #nim
10:21:08*euantorano joined #nim
10:21:08*Ekho joined #nim
10:21:11*narimiran quit (*.net *.split)
10:21:12*nphg1 quit (*.net *.split)
10:21:12*surma quit (*.net *.split)
10:21:12*astronavt quit (*.net *.split)
10:21:12*zedeus quit (*.net *.split)
10:21:12*sagax quit (*.net *.split)
10:24:39*surma joined #nim
10:24:39*narimiran joined #nim
10:24:39*nphg1 joined #nim
10:24:39*astronavt joined #nim
10:24:39*zedeus joined #nim
10:24:39*sagax joined #nim
10:25:26*vegai1 joined #nim
10:27:00*Guest007[m]1 joined #nim
10:27:02*Clonkk[m] joined #nim
10:27:03*gemath[m] joined #nim
10:27:34*cornfeedhobo quit (*.net *.split)
10:27:34*Avatarfighter[m] joined #nim
10:27:47*CodeBitCookie[m] joined #nim
10:27:47*cheer[m] joined #nim
10:27:47*alri[m] joined #nim
10:27:48*Hasnep[m] joined #nim
10:27:48*customer[m] joined #nim
10:27:50*jfondren[m] joined #nim
10:28:31*so joined #nim
10:29:43*Benjamin[m]1 joined #nim
10:36:54ForumUpdaterBotNew post on r/nim by h234sd: Nim vs TypeScript/JS, comparing just the feel of the code structure :), see https://reddit.com/r/nim/comments/nkmlvo/nim_vs_typescriptjs_comparing_just_the_feel_of/
10:36:59*stisa joined #nim
10:37:08*dithpri[m] joined #nim
10:37:59*cornfeedhobo joined #nim
10:38:03PMunchnarimiran, there done
10:40:21*cheer[m] quit (Ping timeout: 245 seconds)
10:40:21*Hasnep[m] quit (Ping timeout: 246 seconds)
10:40:22*customer[m] quit (Ping timeout: 245 seconds)
10:40:22*alri[m] quit (Ping timeout: 245 seconds)
10:40:22*Avatarfighter[m] quit (Ping timeout: 245 seconds)
10:40:24*jfondren[m] quit (Ping timeout: 245 seconds)
10:40:24*CodeBitCookie[m] quit (Ping timeout: 258 seconds)
10:47:26*npham[m] joined #nim
10:55:24narimiranthanks
10:56:22*MTRNord joined #nim
10:56:35*reversem3 joined #nim
10:57:56*conkker quit (Ping timeout: 246 seconds)
10:58:19*conkker joined #nim
10:58:37*stefantalpalaru quit (Ping timeout: 246 seconds)
10:58:45*stefantalpalaru_ joined #nim
11:01:35*Zoom[m] joined #nim
11:02:49*fbpyr[m] joined #nim
11:03:58*cadmium[m] joined #nim
11:05:38*Gambit[m] joined #nim
11:06:03*screamapiller[m] joined #nim
11:06:09*SunDwarf joined #nim
11:06:15*Eyess quit (Ping timeout: 246 seconds)
11:06:55*bluemax[m] joined #nim
11:08:23*lnxw37d4 joined #nim
11:08:49*wanr[m] joined #nim
11:08:50*Edoardo[m]1 joined #nim
11:17:30*bfgcoding[m] joined #nim
11:17:30*altarrel joined #nim
11:18:39*ee7[m] joined #nim
11:21:12*goblinslayer[m] joined #nim
11:21:41*BitPuffin joined #nim
11:33:15*leorize[m] joined #nim
11:35:09*rockcavera joined #nim
11:35:27*DannyHpy[m] joined #nim
11:38:00*||[m] joined #nim
11:38:15*Avahe[m] joined #nim
11:44:57*zuckerberg[m] joined #nim
11:48:01*jfondren[m] joined #nim
11:48:14*Hasnep[m] joined #nim
11:48:15*CodeBitCookie[m] joined #nim
11:48:15*cheer[m] joined #nim
11:48:15*customer[m] joined #nim
11:48:16*Avatarfighter[m] joined #nim
11:49:17*alri[m] joined #nim
11:55:36*noeontheend joined #nim
12:02:30*Vladar joined #nim
12:05:44*kitech1 quit (Ping timeout: 268 seconds)
12:05:58*kitech1 joined #nim
12:18:05*||[m] left #nim ("User left")
12:19:07*casaca joined #nim
12:33:17FromGitter<kaushalmodi> ElegantBeef: Continuing our discussion regarding passing varargs to printf: I had a shower thought for a simpler method, and thought of trying it out.. it Just Worked!: https://play.nim-lang.org/#ix=3nOQ
12:40:21FromDiscord<ajusa> In reply to @kaushalmodi "<@145405730571288577>: Continuing our discussion": How is this different than the example in the docs for wrapping printf?
12:42:08FromDiscord<ajusa> Specifically https://nim-lang.org/docs/manual.html#types-cstring-type
12:54:52FromGitter<bung87> anyone would like to help me verify this locally ? https://github.com/bung87/FrameworkBenchmarks/tree/scorper_init2 I cant use my http proxy inside container.
12:57:55FromGitter<kaushalmodi> ajusa: That printf was a toy example. I was experimenting on how to have a Nim proc with varargs, modify that input and pass that on to a C varargs func. In that example, I am doing some dummy operation on the inputs before passing them on to C printf.
12:59:20FromGitter<kaushalmodi> Anyways, while that `varargs[typed, proc]` worked on the dummy printf, that same doesn't work on my real example. I still need a custom unpacking macro for my actual example (https://github.com/kaushalmodi/nim-svvpi/blob/99340fdd1c0a0e9489fd37f9f82188990fc7b991/svvpi.nim#L98-L108)
13:18:26*noeontheend quit (Ping timeout: 240 seconds)
13:35:39*noeontheend joined #nim
13:35:43ForumUpdaterBotNew thread by Asrp: Porting to Nim, see https://forum.nim-lang.org/t/8032
13:38:19*arkurious joined #nim
13:42:40FromDiscord<sin> hey guys!↡how do i use the "do" thing in my functions
13:44:53FromDiscord<Rika> depends on what you want it to actually do
13:45:12FromDiscord<Rika> `do (...):` is a first-class function instantiation
13:45:18FromDiscord<Rika> `do:` is a code block
13:45:32FromDiscord<sin> ok
13:45:56FromDiscord<Rika> https://nim-lang.org/docs/manual_experimental.html#do-notation
13:47:28FromGitter<kaushalmodi> sin: I have more Do notations examples here: https://scripter.co/notes/nim/#do-notation
13:56:01FromDiscord<treeform> In reply to @ElegantBeef "Hey pixie was quite": Looks great
13:57:45ForumUpdaterBotNew thread by HJarausch: Fortran to Nim? , see https://forum.nim-lang.org/t/8033
14:00:02*noeontheend quit (Ping timeout: 252 seconds)
14:05:17*PMunch quit (Quit: leaving)
14:09:12ForumUpdaterBotNew Nimble package! expander - Code expander for competitive programing in Nim., see https://github.com/soraiemame/expander
14:09:25*stefantalpalaru_ is now known as stefantalpalaru
14:09:37*stefantalpalaru quit (Changing host)
14:09:37*stefantalpalaru joined #nim
14:15:08FromGitter<kaushalmodi> `choosenim devel --latest` is failing for me on Travis (https://travis-ci.org/github/kaushalmodi/aoc2019/jobs/772325553). ⏎ ⏎ > /home/travis/.choosenim/toolchains/nim-#devel/compiler/semtypes.nim(259, 78) Error: undeclared field: 'isNaN' for type system.BiggestFloat [declared in /home/travis/.choosenim/toolchains/nim-#devel/lib/system.nim(1397, 3)] ⏎ ⏎ I could reproduce that issue even on Windows 10. Can
14:15:08FromGitter... anyone confirm? [https://gitter.im/nim-lang/Nim?at=60ad066c45c2185a5eec0607]
14:18:10FromGitter<kaushalmodi> I am tracking this issue on https://github.com/dom96/choosenim/issues/256 now
14:18:50leorize[m]looks like choosenim is not csources_v1 aware yet
14:20:12FromDiscord<Hi02Hi> In reply to @kaushalmodi "sin: I have more": wait are you the person who wrote that out?
14:21:04FromDiscord<zetashift> That is correct! Awesome reference and pretty to look at too
14:21:05FromGitter<kaushalmodi> Hi02Hi: Hello! Yes :)
14:22:08FromDiscord<Hi02Hi> nice!
14:22:31FromDiscord<Hi02Hi> loved your notes πŸ™‚
14:23:45FromGitter<kaushalmodi> Thanks! It started out as my personal reference, but then I just started publishing my notes.
14:27:19*noeontheend joined #nim
14:36:02FromGitter<BracketMaster> Dumb question of the day: I did ``nimble install inim`` now how do I run ``inim``?
14:36:09FromDiscord<codic> ~/.nimble/bin/inim
14:36:46FromDiscord<codic> add ~/.nimble/bin to your path if you like
14:36:57FromGitter<BracketMaster> appreciated
14:38:12FromDiscord<codic> πŸ‘
14:38:35*xheimlich joined #nim
14:39:17FromGitter<BracketMaster> does inim us NimVM?
14:39:20FromGitter<BracketMaster> How does it work?
14:40:06FromDiscord<Rika> no it doesnt
14:40:13FromDiscord<codic> i think nim secret does tho
14:41:21FromGitter<BracketMaster> what's nim secret?
14:41:31FromGitter<BracketMaster> can't seem to find much on it?
14:41:40FromGitter<BracketMaster> it must be quite secret
14:41:42FromDiscord<Rika> try running `nim secret` in cli
14:41:44Clonkk[m]<FromGitter "<BracketMaster> How does it work"> It compiles the Nim code you type using tinyC as a C compiler (because it's fast) and run the result
14:42:17*Gustavo6046 quit (Ping timeout: 258 seconds)
14:42:22FromDiscord<codic> problem with nim secret is it can't use anything that needs C linkage and iirc a lot of the standard library does
14:42:37FromGitter<BracketMaster> tinyC?
14:42:47FromDiscord<codic> it's a C compiler, tcc
14:42:49FromGitter<BracketMaster> Fabrice Bellard's work keeps popping up
14:43:03FromDiscord<codic> that is correct, that one
14:43:20FromDiscord<codic> i narrowed my issue from yesterday down, I still get the error if I try to even compile hello world
14:43:30FromDiscord<codic> cross-compile that is
14:43:31*xheimlich quit (Ping timeout: 260 seconds)
14:43:40FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPh
14:43:51FromDiscord<Rika> im p.sure the sizeof ni sizeof void is a common bug
14:43:56FromDiscord<Rika> ive seen it a few times here alreayd
14:43:58nphg1Clonkk[m]: sure about tcc? For me `inim -d:--cc:tcc` is faster than `inim`
14:44:09FromDiscord<Rika> thought ivent a slightest of what the solution is
14:44:38Clonkk[m]<nphg1 "Clonkk: sure about tcc? For me `"> Eh not sure. I'm quite convinced inim used tcc at one point but maybe it changed.
14:44:45Clonkk[m]Or maybe I'm wrong
14:44:54Clonkk[m]It's not that important to how inim works anyway
14:45:00*xheimlich joined #nim
14:45:11FromGitter<BracketMaster> well true - but I'd like to know at a high level
14:46:01*noeontheend quit (Ping timeout: 260 seconds)
14:46:03nphg1Yea, I just wanted to know if I should redo my measurements :)
14:47:43FromDiscord<codic> oh wait i see the issue
14:47:52FromGitter<kaushalmodi> @BracketMaster It writes your commands to a tmpfile and runs `nim c -r ..` on that . See https://github.com/inim-repl/INim/blob/53a18a52f6a427ea273182ebb658ad2a28a7d333/inim.nim#L76
14:47:56FromDiscord<codic> it is trying to compile my 64-bit kernel with gcc
14:48:05FromDiscord<codic> so I need to build a cross compiler or use clang
14:48:57FromGitter<BracketMaster> why is nim secret called nim secret?
14:49:08FromDiscord<codic> it's not supposed to be used
14:49:12FromDiscord<codic> because it's very limited
14:50:17FromDiscord<codic> sent a code paste, see https://paste.rs/afp
14:50:21FromDiscord<codic> but now
14:50:21FromDiscord<codic> fatal error: : 'gnu/stubs-32.h' file not found
14:50:39FromDiscord<codic> think i need glibc i386
14:51:40*xheimlich quit (Quit: Lost terminal)
14:52:56FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPk
14:53:56FromDiscord<codic> os:standalone gives me, cannot open file pannicoverride
14:55:08FromDiscord<Rika> --os:any i think is the new flag
14:55:11FromDiscord<codic> so close... i made a panicoverride.nim, just need to get rid of these
14:55:13FromDiscord<codic> ah
14:55:20FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPm
14:55:26FromDiscord<codic> that tells me to port a memory managed to my platform
14:56:31*noeontheend joined #nim
15:03:54FromDiscord<codic> eliminated everything but systeminit000
15:05:21FromDiscord<codic> even with noMain on
15:05:34FromDiscord<codic> very spammy lol
15:05:40FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPG
15:06:14FromDiscord<Rika> i have no idea what systemInit000 is
15:06:52FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPH
15:07:57FromDiscord<codic> ok, this is it
15:08:34FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3nPI
15:14:04*xet7 quit (Remote host closed the connection)
15:34:11*xet7 joined #nim
15:35:26FromDiscord<slymilano> What is this called in Nim? A hash? `let x = %{"test": 1, "test_b": 2}`
15:35:48FromDiscord<Rika> which?
15:36:01FromDiscord<Rika> `%`? `{"": ...}`?
15:36:34FromDiscord<slymilano> The `{}`
15:36:43FromDiscord<Rika> well in this case its just syntax
15:37:08FromDiscord<Rika> i believe `%` is a macro that takes a `{:}` syntax and processes that
15:37:22*xet7 quit (Client Quit)
15:37:30FromDiscord<Rika> ...i believe. otherwise `{a:b}` is syntax sugar for `[(a, b)]`
15:37:49*xet7 joined #nim
15:39:02FromDiscord<Zachary Carter> @slymilano I believe this is a macro in the `json` module
15:39:18FromDiscord<slymilano> thank you
15:39:18FromDiscord<Zachary Carter> https://nim-lang.org/docs/json.html#%25%2A.m%2Cuntyped
15:39:18FromDiscord<Rika> :/
15:39:38FromDiscord<Rika> tfw ignored
15:39:54FromDiscord<Zachary Carter> I was just adding context Rika πŸ™‚
15:39:55FromDiscord<Zachary Carter> not ignoring you
15:40:20FromDiscord<Rika> not you i mean sly
15:40:55*NimBot joined #nim
15:42:03FromDiscord<Zachary Carter> so the macro anyway is just for unmarshalling JSON into a JSONNode type
15:42:08FromDiscord<slymilano> i wasn't ignoring i said thank you! πŸ˜„ where can I learn more about: `{a:b} is syntax sugar for [(a, b)]`
15:42:38FromDiscord<Rika> one moment
15:42:48FromDiscord<Rika> i forget where it would be put
15:44:50FromGitter<BracketMaster> I also had discovered some sugar for list comprehensions some time ago and can't seem to find it anymore
15:45:26*noeontheend quit (Ping timeout: 240 seconds)
15:46:21FromDiscord<Rika> list comprehensions are deprecated
15:46:27FromDiscord<Rika> are you talking about collect?
15:46:36FromGitter<BracketMaster> It might have been collect
15:48:00FromDiscord<Rika> here it is @slymilano https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor
15:48:39FromDiscord<Rika> of course this has the limitation that they are homogenous
15:48:50FromDiscord<Rika> homogeneous
15:48:57FromDiscord<Rika> english needs to be abolished
15:49:12FromDiscord<slymilano> thank you Rika very helpful!
15:54:03*arecaceae quit (Remote host closed the connection)
15:56:23*arecaceae joined #nim
16:04:46*noeontheend joined #nim
16:16:50*Gustavo6046 joined #nim
16:25:34*noeontheend quit (Ping timeout: 265 seconds)
16:25:36*Gustavo6046 quit (Ping timeout: 260 seconds)
16:26:51*Gustavo6046 joined #nim
16:34:56*Gustavo6046 quit (Ping timeout: 260 seconds)
16:38:16*zedeus quit (Ping timeout: 268 seconds)
16:38:49*Gustavo6046 joined #nim
16:44:51*WilhelmV1nWeiner quit (Ping timeout: 260 seconds)
16:50:16*WilhelmVonWeiner joined #nim
16:50:40*WilhelmVonWeiner is now known as Guest78830
16:51:21*noeontheend joined #nim
16:52:29*Gustavo6046 quit (Ping timeout: 260 seconds)
17:19:46*noeontheend quit (Ping timeout: 240 seconds)
17:22:29*superbia joined #nim
17:26:32ForumUpdaterBotNew thread by Xigoi: Export in JS backend, see https://forum.nim-lang.org/t/8035
17:28:01FromDiscord<reilly> Hey @Zachary Carter, how good is the tooling for your Machinery bindings?
17:29:54FromDiscord<reilly> Or I guess more accurately, is the workflow smooth and well-integrated, or is it hacky?
17:30:14FromDiscord<exelotl> Just drove past a hamlet called "Nimlet"
17:38:04*noeontheend joined #nim
17:40:27FromDiscord<slymilano> How can I parse a json array into an array of T? I tried this already↡↡`let deployment = to(deploymentJson, Deployment)`
17:41:18FromDiscord<slymilano> https://play.nim-lang.org/#ix=3nQn
17:42:03FromDiscord<Rika> What were the issues with what you did
17:42:54*superbia left #nim ("WeeChat 3.1")
17:44:45*xace quit (Ping timeout: 260 seconds)
17:45:34*xace joined #nim
17:49:14*superbia joined #nim
17:52:19nphg1slymilano: try `deploymentJson.to seq[Deployment]`
17:52:25*superbia quit (Client Quit)
17:52:43*superbia joined #nim
17:52:53FromDiscord<jseb> sent a code paste, see https://play.nim-lang.org/#ix=3nQt
17:53:33FromDiscord<jseb> (edit) "https://play.nim-lang.org/#ix=3nQt" => "https://play.nim-lang.org/#ix=3nQu"
17:53:45*Gustavo6046 joined #nim
17:53:47*superbia quit (Client Quit)
17:55:48FromDiscord<slymilano> @Rika I'm getting None results https://play.nim-lang.org/#ix=3nQv
17:56:38FromDiscord<slymilano> awesome thank you @nphg1!
18:01:38*superbia joined #nim
18:02:04FromDiscord<Zachary Carter> In reply to @reilly "Hey <@!204328759715692544>, how good": They're just bindings to the C API. There is no tooling...
18:03:10FromDiscord<Goat> Is there a way to import all modules in subfolder other than having to list all of them?
18:04:46*superbia left #nim (#nim)
18:05:07FromDiscord<jseb> sent a code paste, see https://play.nim-lang.org/#ix=3nQy
18:05:46*superbia joined #nim
18:06:55FromDiscord<jseb> holy sweat , everything is so hard… let's point myself to lunch , et bon appΓ©tit πŸ˜‹
18:07:16nphg1jseb: sizeof(int) == 8
18:07:36*superbia left #nim (#nim)
18:07:40nphg1at least in 64bit nim
18:08:04FromDiscord<jseb> ah i had forgotten to put again sizeof(int)3 in the copyMem
18:09:09FromDiscord<jseb> and it's ok with that ! So UncheckedArray + sizeof . Bon appΓ©tit nphg1 πŸ™‚
18:10:49nphg1merci
18:14:53*theelous3 joined #nim
18:30:42*Cthalupa quit (*.net *.split)
18:30:42*euantorano quit (*.net *.split)
18:30:42*Ekho quit (*.net *.split)
18:30:52*euantorano joined #nim
18:31:58*Cthalupa joined #nim
18:35:31*Ekho joined #nim
18:48:07*willyboar joined #nim
19:12:17FromDiscord<mlokis> i found a way to bind nimpretty to ctrl+s in vscode
19:12:25FromDiscord<mlokis> someone interested
19:13:01FromDiscord<mlokis> (edit) "interested" => "interested?"
19:22:38*Figworm quit (Quit: Figworm)
19:27:00FromDiscord<reilly> In reply to @Zachary Carter "They're just bindings to": Here's a better question: Will it create 1075 Nimsuggest instances and use up 98% of my RAM?
19:28:55FromDiscord<Zachary Carter> That's a Nimsuggest bug I think? I don't use Nimsuggest so I wouldn't know tbh...
19:39:12*noeontheend quit (Ping timeout: 252 seconds)
19:47:54*Jjp137 quit (Ping timeout: 245 seconds)
19:49:01*noeontheend joined #nim
19:56:52*Jjp137 joined #nim
20:06:26*noeontheend quit (Ping timeout: 240 seconds)
20:15:47*Vladar quit (Quit: Leaving)
20:16:06*narimiran quit (Ping timeout: 272 seconds)
20:37:19FromGitter<BracketMaster> I'm trying to parse a fairly large file and want to read a file line by line in Nim
20:37:41FromGitter<BracketMaster> I would hope to do this in a for loop iterator
20:38:57FromDiscord<Hi02Hi> sent a code paste, see https://play.nim-lang.org/#ix=3nRv
20:41:51FromGitter<BracketMaster> but doesn't readFile consume the entire file?
20:42:03FromGitter<BracketMaster> I don't want to load a larger than memory file into RAM
20:42:20FromGitter<BracketMaster> for example, VCDs can be very large
20:42:25FromGitter<BracketMaster> sometimes up to terabyts
20:46:47FromGitter<BracketMaster> ok - it seems lines is just an interator
20:47:33FromDiscord<ElegantBeef> https://nim-lang.org/docs/io.html#lines.i%2CFile
20:55:06*ghosthell joined #nim
20:55:20ghosthellTrans-Universal Transportation Equipment Wanted. PM Me with offers.86
21:01:00*tane quit (Quit: Leaving)
21:03:24FromGitter<BracketMaster> are there plans for a first class nim REPL?
21:06:08Prestigelike inim?
21:06:22FromGitter<BracketMaster> inim is kinda slow...
21:06:31FromGitter<BracketMaster> but then again, tinycc doesn't work on M1
21:07:51FromGitter<BracketMaster> at any rate, wouldn't consider writing statements to a file and then quickly compiling them for a REPL a first class experience
21:07:58FromGitter<BracketMaster> Not that inim is bad
21:08:31FromDiscord<Hi02Hi> what would you suggest?
21:10:35FromGitter<BracketMaster> probably spiffying up the nimVM to be fast so you'd get a faster nim secret
21:11:33FromGitter<BracketMaster> or making nim secret more robust - it tends to not handle exceptions well
21:11:58FromGitter<BracketMaster> I'm no expert here and I realize this is a hard problem
21:12:30FromDiscord<InventorMatt> we could convert the nimVM to be JIT and maybe get some speed gains there
21:12:49PrestigeI mean wouldn't the code have to go through the whole compilation process to get all the features of nim (and not nims)?
21:13:01PrestigeI'm not sure how the whole process works either, just thinking
21:13:43FromGitter<BracketMaster> how does lisp do it?
21:20:45FromDiscord<ElegantBeef> In reply to @InventorMatt "we could convert the": Oh i see we have a volunteer πŸ˜„
21:22:19FromDiscord<InventorMatt> I know next to nothing about writing interpreters or compilers so I would not be a good fit for doing it.
21:23:29*willyboar quit (Quit: Konversation terminated!)
21:30:38FromDiscord<zetashift> does iNim use nim secret?
21:30:50FromDiscord<ElegantBeef> It's compiled afaik
21:31:47FromDiscord<zetashift> there is a hot code reload draft PR for iNim that might be worth pursuing
21:31:55FromGitter<BracketMaster> I want to create a function that mutates a string argument it consumes without returning the string
21:32:10FromDiscord<ElegantBeef> `proc yourProc(s: var string)`
21:32:34FromGitter<BracketMaster> thx
21:37:39FromGitter<BracketMaster> ```code paste, see link``` ⏎ ⏎ nim doesn't seem to like ``..^1]`` [https://gitter.im/nim-lang/Nim?at=60ad6e23bdecf719a07c6edb]
21:38:24FromGitter<BracketMaster> `` Error: type mismatch: got <HSlice[system.int, system.int], int literal(1)>``
21:39:16FromDiscord<ElegantBeef> The issue is you have a slice and you're doing + 1
21:39:34FromDiscord<ElegantBeef> Look at the error message `proc +` is the issue
21:40:48FromDiscord<ElegantBeef> Feel like i have to do @kaushalmodi on the repeat forum post that's not a bug, that's overloads working as intended πŸ˜„
21:41:13FromGitter<BracketMaster> that's on me
21:43:30*ghosthell quit (Remote host closed the connection)
21:44:32*ghosthell joined #nim
21:48:56FromGitter<BracketMaster> ```code paste, see link``` ⏎ ⏎ This is something I find myself using often [https://gitter.im/nim-lang/Nim?at=60ad70c814d9cd234a5ac094]
21:50:29FromDiscord<ElegantBeef> What's it for?
21:50:49FromGitter<BracketMaster> whenever I need to debug a variable
21:51:15FromGitter<BracketMaster> instead of ``echo "a = "``, a, you do, ``echo debugString(a)``
21:51:21FromGitter<BracketMaster> typo
21:51:29FromGitter<BracketMaster> echo "a = ", a
21:52:03FromGitter<BracketMaster> I guess I found my self typing ``echo "something = ", something`` alot
21:52:13FromGitter<BracketMaster> And then I remember nim has templates
21:52:27FromDiscord<ElegantBeef> yea this is better done in a template πŸ˜„
21:52:33FromDiscord<Hi02Hi> sounds like https://nim-lang.org/docs/sugar.html#dump.m%2Cuntyped to me
21:53:45FromGitter<BracketMaster> wow, you're right
21:53:49FromGitter<BracketMaster> sugar is very sweet
21:54:06FromDiscord<ElegantBeef> Someone somewhere is screaming due to macro use
21:54:13FromDiscord<ElegantBeef> And we shun them from society
21:54:31FromGitter<BracketMaster> screaming due to macro use?
21:54:35FromGitter<BracketMaster> Is macro use bad?
21:55:53FromDiscord<ElegantBeef> Some people dislike magic in their languages, and those people are what we call wrong πŸ˜›
21:56:24FromGitter<BracketMaster> go is an example of wrong
21:56:32FromGitter<BracketMaster> go is like the exact opposite of nim
21:56:39FromGitter<BracketMaster> In fact, I think go is worse than C
21:56:44FromDiscord<ElegantBeef> Funded and garbage? πŸ˜›
21:57:05FromGitter<BracketMaster> Funded by Google, yeah
21:57:14FromGitter<BracketMaster> I tend to avoid Google's tools
21:57:19FromGitter<BracketMaster> Like tensorflow, and MLIR
21:57:24FromGitter<BracketMaster> very gross
21:57:25FromDiscord<ElegantBeef> You said the exact opposite of nim so i had to make a joke about the fact they have a "big backer"
21:57:55FromGitter<BracketMaster> for all the fuss GOogle made about go, I hear they're trying to internally move to Rust
21:58:08FromDiscord<ElegantBeef> The thing that topped my dislike of go was when i learned about the fact their line directives are just `//:` or w/e
21:58:21FromGitter<BracketMaster> Rust also has macros and inplace AST modification like nim
21:58:26FromDiscord<ElegantBeef> Yes the same two symbols that are for comments actually does something... who the hell designed that shit
21:58:52FromGitter<BracketMaster> The inventor of C apparently
21:58:56FromGitter<BracketMaster> How the mighty have fallen
22:00:32FromDiscord<konsumlamm> or C just wasn't good either...
22:01:31FromGitter<BracketMaster> Linux is written in C, and I haven't had much trouble with kernel dev - as in the use of C there doesn't feel limiting
22:01:39FromGitter<BracketMaster> C is... well, C
22:05:40FromGitter<BracketMaster> About a month ago actually, I was trying to choose between Nim and Crystal and there was one thing that made the difference
22:19:27*casaca quit (Remote host closed the connection)
22:20:00*casaca joined #nim
22:24:00FromDiscord<gavr> Heh rigth now Im looking for Crystal, its language ide support so much betteer, but I think its too OOP oriented
22:24:45FromDiscord<gavr> https://github.com/crystal-lang/crystal/issues/1388↡Wasnt added because its too functional
22:26:04FromDiscord<gavr> sent a long message, see http://ix.io/3nS2
22:26:59FromDiscord<gavr> Also wanna ask whats wrong with nim call syntax: https://media.discordapp.net/attachments/371759389889003532/846877033732505610/unknown.png
22:28:04FromDiscord<gavr> Why is it possible to call a function with named arguments without parentheses(as in Smalltalk) only if the first argument is not named? I don't think it makes sense
22:32:55FromGitter<BracketMaster> The reason I didn't go with Crystal is because it doesn't work on M1
22:33:08FromGitter<BracketMaster> Crystal must be built with Crystal
22:33:18FromGitter<BracketMaster> And right now, it only works on x86
22:33:41FromDiscord<gavr> also no windows and parallelizm
22:33:56FromDiscord<gavr> but that not that bad as hard oop oriented
22:33:56FromGitter<BracketMaster> You **can cross compile, but long ago in life, I decided that fighting LLVM is one of those things that just isn't worth it
22:34:04FromGitter<BracketMaster> Nim has C-source - which means nim is portable
22:34:21FromGitter<BracketMaster> Very ironic as llvm is supposed to be "architecture agnostic"
22:51:05ForumUpdaterBotNew question by celyes: Nim-lang (nimrod) fatal error: limits.h: No such file or directory, see https://stackoverflow.com/questions/67696460/nim-lang-nimrod-fatal-error-limits-h-no-such-file-or-directory
23:08:29FromDiscord<ElegantBeef> In reply to @gavr "Why is it possible": it comes down to how that's evaluated without a parameter in the first arg it's turned into `someproc(x) = 10`
23:09:04FromDiscord<ElegantBeef> As such if you dont use the command syntax you can override that
23:11:22FromDiscord<ElegantBeef> The ast that is usable like this https://play.nim-lang.org/#ix=3nSl
23:11:36FromGitter<BracketMaster> @treeform - trying you use your nim raytracer but can't seem to find chroma?
23:11:37FromGitter<BracketMaster> https://raw.githubusercontent.com/treeform/raytracer/master/nim/RayTracer.nim
23:11:55ForumUpdaterBotNew thread by Gavr: How does no parenthesis function call syntax work?, see https://forum.nim-lang.org/t/8037
23:12:36FromDiscord<ElegantBeef> Well i just made that forum post deprecated
23:14:59FromGitter<BracketMaster> Also, somebody yesterday posted a link to a recursive stringify that works on compound types - can't seem to find it anymore
23:15:18FromDiscord<ElegantBeef> That was me i think treeform/print
23:15:32FromDiscord<ElegantBeef> https://github.com/treeform/print
23:15:45FromGitter<BracketMaster> ty
23:18:35FromDiscord<ElegantBeef> to note the override for that is to just do `someProc(x = 10, y = 30...)`
23:26:37FromDiscord<gavr> In reply to @ElegantBeef "The ast that is": oh, here you are, ty for answear, but this looks to me like one of the most non-obvious things, in terms of readability
23:27:24FromDiscord<ElegantBeef> Well yea but it's just how the current evaluation works, it reads `someProc x` and converts that into a proc call then gets to `=` and makes it an assign
23:27:44FromGitter<BracketMaster> @treeform, you must be some sort of Nim genius
23:27:47FromGitter<BracketMaster> print is nice
23:28:06FromDiscord<gavr> 300 goes to someInt just because someProc returns it, right?
23:28:11FromDiscord<ElegantBeef> yea
23:28:28FromDiscord<ElegantBeef> It was just an example of where that's valid and why
23:28:45FromDiscord<gavr> looks so unpredictable
23:29:05FromDiscord<gavr> is there any other lang that doing that for reference
23:29:06FromDiscord<ElegantBeef> Well i just dumped the tree and reported what the AST was
23:29:06*test_usr quit (Ping timeout: 240 seconds)
23:29:22FromDiscord<ElegantBeef> Before Nim i didnt even know languages had command style syntax so not a clue
23:30:07FromDiscord<gavr> cant google command style syntax
23:30:19FromDiscord<gavr> what do you mean by that
23:30:21FromDiscord<ElegantBeef> That's what Nim calls it, it probably has another name
23:30:32FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax
23:33:06FromDiscord<ElegantBeef> I think it just comes down to a limitation of that calling syntax, i dont know if Crystal can return mutable references, but it's a case of "what's the right way to parse/generate the ast here"
23:39:44FromDiscord<treeform> In reply to @BracketMaster "<@107140179025735680>, you must be": Thank you. I wish print was the default echo.
23:40:32FromDiscord<ElegantBeef> Rfc for nim 2.0? πŸ˜›
23:50:24*noeontheend joined #nim