<< 12-09-2021 >>

00:31:10*Jjp137 quit (Quit: Leaving)
00:31:18*Jjp137 joined #nim
00:39:26*jmiven joined #nim
01:04:13*bkay joined #nim
01:04:56*beshr quit (Ping timeout: 256 seconds)
02:05:38*arkurious quit (Quit: Leaving)
04:06:01*supakeen quit (Quit: WeeChat 3.2.1)
04:06:30*supakeen joined #nim
04:38:13arfyhi. Just wanted to say, a few days on, enjoying nim a lot. I've been able to rewrite a couple of small utilites I wrote in python quite easily. :)
04:39:24FromDiscord<impbox [ftsf]> awesome =)
04:39:43FromDiscord<Elegantbeef> Nice any issues you run into?
04:39:52arfyyeah. it's a nice language so far.
04:40:37arfyno, although i was very amused by the deduplicate function from sequtils. deduplicate?
04:43:22arfyalso, under windows, is it possible to use nim with the latest VC++ tools?
04:44:10FromDiscord<Elegantbeef> I do not know, i'm not a windows user
04:45:21arfyfair. if I could, I'd do everything on my mac machine.
04:46:12FromDiscord<impbox [ftsf]> i use windows but i don't use vc++
04:46:18FromDiscord<impbox [ftsf]> using mingw is easy
04:46:55arfyyeah. mingw works fine for me, I was just curious
04:47:07FromDiscord<Elegantbeef> The forum/github issues might be of help if you want to investigate
04:47:26FromDiscord<impbox [ftsf]> but i think vc++ is supported
04:49:43FromDiscord<demotomohiro> Nim supports vc++ but it seems not much tested with it.
04:51:03FromDiscord<impbox [ftsf]> does vc include a c compiler or only c++?
04:51:52FromDiscord<demotomohiro> Add --cc:vcc option if you try vc++ backend.
04:53:00FromDiscord<demotomohiro> cl.exe /? says "Microsoft(R) C/C++ Optimizing Compiler Version 19.00.24210 for x86"
05:04:21FromDiscord<Gumber aka Zachary Carter> I use `--cc:vcc` all the time when building on windows
05:19:47*Doraemon joined #nim
05:22:01*neocron quit (Ping timeout: 252 seconds)
07:34:14FromDiscord<Saurav Niroula> is there none in nim?
07:34:43FromDiscord<Elegantbeef> That's the exact amount
07:34:43FromDiscord<Elegantbeef> No there is no `none`
07:35:01FromDiscord<Elegantbeef> If you want an optional type look at `std/options`
07:37:32FromDiscord<linux user> how to compile 32 bit exe on 64 bit liux
07:40:34FromDiscord<Saurav Niroula> https://media.discordapp.net/attachments/371759389889003532/886516618916683796/20210912_132535.jpg
07:40:50FromDiscord<Saurav Niroula> i wrote this in python
07:41:08FromDiscord<Saurav Niroula> but i cant figure out to convert it in nim
07:41:38FromDiscord<Saurav Niroula> this is example from youtube
07:41:57FromDiscord<Elegantbeef> You dont need to handle that if statement
07:42:23FromDiscord<Elegantbeef> Nim is statically typed it'll always be a value
07:42:44FromDiscord<cabboose> What he said
07:42:47*max22- joined #nim
07:43:06FromDiscord<Saurav Niroula> i am trying to convert python algorithm to nim
07:43:12FromDiscord<cabboose> Also there are nim tutorials on the youtubes
07:43:33FromDiscord<Saurav Niroula> very less tutorial
07:43:54FromDiscord<Elegantbeef> So convert the algorithim the `verify` isnt needed it's just `if x in yourSeq.low .. yourSeq.high`
07:44:35FromDiscord<Saurav Niroula> ohh
07:45:09FromDiscord<enthus1ast> you could either return -1 if not found, or option[int]
07:50:47FromDiscord<enthus1ast> i think in your case (when list is a seq) -1 is more convenient
07:50:49FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=3yDD
07:50:49FromDiscord<enthus1ast> but you could also go with option as i said, then you would return some[T] or none
07:51:14FromDiscord<Saurav Niroula> https://media.discordapp.net/attachments/371759389889003532/886519302449160222/20210912_133614.jpg
07:52:17FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=3yDE
07:52:31FromDiscord<enthus1ast> ^ another one with option and pairs iterator
07:53:08FromDiscord<Saurav Niroula> what is the difference between func and proc
07:53:25FromDiscord<enthus1ast> func check for side effects, and errors if one is detected
07:53:39FromDiscord<enthus1ast> so no prints, no global var access etc
07:55:28*Doraemon quit (Ping timeout: 252 seconds)
07:57:21FromDiscord<Saurav Niroula> ok
07:58:42FromDiscord<linux user> terminal module doesnt work correctly when win xp
07:58:47FromDiscord<enthus1ast> my example also is generic, [T], this means you can do this\:
07:58:52FromDiscord<linux user> weird chareacters in cmd.exe tho
07:59:01FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3yDG
08:00:18FromDiscord<Saurav Niroula> what is bot in discord
08:00:32FromDiscord<enthus1ast> on newer windows you could try to load consolas, but for windows xp idk
08:00:49FromDiscord<enthus1ast> maybe this helps but just guessing\: http://www.hanselman.com/blog/using-consolas-as-the-windows-console-font
08:01:26FromDiscord<enthus1ast> the nim chats are bridged between discord \<-\@Saurav Niroula)
08:02:15FromDiscord<enthus1ast> to form a bigger comunity, and the bridges are implemented sometimes with bot accounts
08:02:26FromDiscord<Saurav Niroula> ohh
08:06:03FromDiscord<Saurav Niroula> https://media.discordapp.net/attachments/371759389889003532/886523030958915624/20210912_135103.jpg
08:06:19FromDiscord<enthus1ast> but everyone should of course switch to matrix, since its open source (in contrast to discord) and provides strong encryption (not on this channel, though), and does not have a central server infrastructure but is federated ;)
08:06:19FromDiscord<Saurav Niroula> why this code prints num not found
08:08:27FromDiscord<enthus1ast> int is not a natural
08:08:44FromDiscord<enthus1ast> better check for \> -1
08:09:13FromDiscord<enthus1ast> another thing, better not name a variable result
08:09:49FromDiscord<enthus1ast> because result is automatically available in a a proc and is of the type of the return code
08:17:41FromDiscord<Saurav Niroula> In reply to @enthus1ast "another thing, better not": thanks
08:17:58FromDiscord<Saurav Niroula> thanks all
08:19:16FromDiscord<Saurav Niroula> #wnim
09:37:31FromDiscord<Varriount> In reply to @Saurav Niroula "ok": For screenshots, try Shift+Windows Key+S
10:13:21FromDiscord<Yardanico> hey @ElegantBeef you around? https://github.com/nim-lang/Nim/issues/18838
10:55:41*max22- quit (Remote host closed the connection)
10:58:25*max22- joined #nim
11:13:16FromDiscord<tandy> sent a code paste, see https://paste.rs/GS8
11:15:40FromDiscord<Rika> Probably not
11:16:39NimEventerNew thread by Serge: The "reset password" routine does not seem to send me a message at my e-mail address, see https://forum.nim-lang.org/t/8416
11:16:48FromDiscord<tandy> dam↵(@Rika)
11:17:26FromDiscord<Rika> It’s probably because every number increment might have a breaking change
11:17:32FromDiscord<tandy> it would be manageable if i could just download an old chromedriver bin, but u also have to have chromium at the same version installed
11:19:02FromDiscord<tandy> i guess i could just write this in python
11:21:28arkanoidI've never used nim for frontent javascript, but I'm reading how elm works as I don't like javascript and I like the proposed model/view/update pattern. Do you know if there's anything similar for nim? I mean if there are frameworks for javascript frontend for nim
11:25:10FromDiscord<Yardanico> https://github.com/karaxnim/karax is exactly that
11:25:12nrds<R2D299> itHub: 7"Karax. Single page applications for Nim."
11:25:29FromDiscord<Yardanico> but not sure if it's the model/view/update pattern you want
11:25:29arkanoidgood, I was on right path then. Thanks!
11:36:04*Guest51 joined #nim
11:36:28*Guest51 quit (Client Quit)
11:45:37*arfy quit (Remote host closed the connection)
11:49:52*Guest50 joined #nim
11:50:29*Guest50 quit (Client Quit)
11:51:27*jjido joined #nim
11:53:45*max22- quit (Ping timeout: 260 seconds)
12:06:02*supakeen quit (Quit: WeeChat 3.2.1)
12:06:30*supakeen joined #nim
12:13:36arkanoidis ormin + karax the way to go for full stack web development with nim?
12:22:13*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
12:22:33*Gustavo6046 joined #nim
12:31:37FromDiscord<Yardanico> there's no "the way to go", there are multiple ORMs available for Nim :)
12:31:41FromDiscord<Yardanico> no one forces you to a specific combination
12:32:43FromDiscord<Yardanico> I personally like ormin too, but there's for example https://github.com/moigagoo/norm
12:32:46nrds<R2D299> itHub: 7"A Nim ORM"
12:33:09arkanoidyeah but I'm not into evolution of nim tools for the web, karax, ormin, jester, norm, fidget, basolato, prologue. I'm getting lost
12:34:32*pro joined #nim
12:34:34arkanoidI'm aiming to a solution that is more than a poc, and has already been bent to production use. I know just karax and ormin due to nim forum
12:41:57FromDiscord<Rika> Most of what you said save for Basolato have been used in production I believe?
12:43:00FromDiscord<gogolxdong (liuxiaodong)> Nim should replace nodejs
12:43:04FromDiscord<gogolxdong (liuxiaodong)> most DeFi application is written in React + nodejs
12:43:17arkanoidis there a blog post comparing the different solutions and highlighting the pro/cons and features? I mean, karax seems for frontend only
12:43:29arkanoidbut unsure
12:47:17*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:48:27arkanoidthere must be a "go well together" path. I mean, frontent + backend + orm technologies generally moves as a group, but what is the currente prefence for nim? Maybe Karax + Jester + ormin?
12:56:57FromDiscord<auxym> I do believe the nim forum runs on karax+jester, not sure for ORM though.
12:57:08FromDiscord<Yardanico> In reply to @auxym "I do believe the": it doesn't use an ORM
12:57:30arkanoidyeah ORM is not always part of the game
12:58:03FromDiscord<Yardanico> you can check the source, e.g. https://github.com/nim-lang/nimforum/blob/master/src/forum.nim#L662
13:00:02arkanoidin my opinion, the nim forum way is bad for web development, as it's SEO nightmare: white page without js
13:02:49arkanoidalso reason why you're not finding any answer about nim programming with google on nim forum but just stackoverflow
13:02:56FromDiscord<Yardanico> no, not really
13:03:01FromDiscord<Yardanico> google indexes nim forum just fine
13:03:09FromDiscord<Yardanico> but yes, I agree with your about JS-only :)
13:03:33FromDiscord<Yardanico> in fact I've been running a read-only static html nimforum viewer for a while before the domain expired, maybe I should enable it again
13:03:40arkanoidany SEO tecnique would be obliterated by this false start
13:04:04FromDiscord<Yardanico> first response from nim forum https://media.discordapp.net/attachments/371759389889003532/886598030491541514/unknown.png
13:04:34arkanoidwhy my google is not returning that answer?
13:05:07FromDiscord<Yardanico> because it doesn't know that you use nim a lot :P
13:06:14arkanoidyeah, I kind of guy that uses google via tor browser without logging in
13:06:19FromDiscord<Yardanico> and yeah, nimforum was made to showcase how you can write apps with karax, but it was made before karax had server-side rendering
13:06:35FromDiscord<Yardanico> also IIRC even now there's no way to cleanly mix statically rendered and dynamic content in karax
13:07:17arkanoidonly way is to help google digest your js https://developers.google.com/search/docs/advanced/javascript/javascript-seo-basics
13:14:12*arkurious joined #nim
13:17:34*xet7 quit (Quit: Leaving)
13:18:45*xet7 joined #nim
13:30:01arkanoidI've just created my first barebone karax app. Karun produced "<script type="text/javascript" src="/app.js"></script>" but I had to fix it manually to "<script type="text/javascript" src="app.js"></script>" to make it work
13:33:56FromDiscord<Gumber aka Zachary Carter> Sounds like you did something incorrectly then
13:34:04FromDiscord<Gumber aka Zachary Carter> I haven't used Karax in years but I never had to do that
13:34:57FromDiscord<Gumber aka Zachary Carter> also not everyone cares about SEO
13:35:10arkanoidsure for last line
13:35:17FromDiscord<Gumber aka Zachary Carter> like, I'm probably guessing most of Nim's community doesn't care about it
13:35:26arkanoidfor first line, I don't know how. it's just barebone
13:35:35FromDiscord<Gumber aka Zachary Carter> gotcha
13:36:10arkanoidthis is my karax app: https://play.nim-lang.org/#ix=3yFa
13:36:16FromDiscord<Gumber aka Zachary Carter> yeah - I don't really do web dev with Nim. I already have to do it for work, but... IMO it doesn't really matter what frontend technology or framework or library you use, they're all pretty terrible
13:36:20arkanoidI'm doing "karun src/webtest.nim"
13:36:25FromDiscord<Gumber aka Zachary Carter> Karax is at least somewhat lightweight in comparison to a lot of others
13:37:04FromDiscord<Gumber aka Zachary Carter> all karun does is generate HTML boilerplate coded
13:37:06FromDiscord<Gumber aka Zachary Carter> (edit) "coded" => "code apparently"
13:37:14FromDiscord<Gumber aka Zachary Carter> like, you don't even need it really - it's simply there for convenience
13:37:28FromDiscord<Gumber aka Zachary Carter> You just need to compile your Nim to JS and then have an HTML load the JS file via a script tag
13:37:58FromDiscord<Gumber aka Zachary Carter> it's just JS and HTML at the end of the day...
13:38:35arkanoidI'm not a web developer, I've successfully skipped the whole web era as I consider it horror. I've always lived on backend/desktop/console/microcontroller. Occasionally I still want to "know" how to bake basic web apps. I used to play with python + vue, but it's time to replace my last-favorite-thing with something I like, that's nim
13:39:14FromDiscord<impbox [ftsf]> moving from python+vue to jester+karax was pretty easy for me
13:39:33FromDiscord<impbox [ftsf]> though they don't seem as well used
13:40:41arkanoidimpbox, I hope so. I don't require anything complicated, just a way to get shit done, and static typing is something I now want at same level of eating and sleeping
13:46:13NimEventerNew Nimble package! tic80 - TIC-80 bindings, see https://github.com/thisago/tic80
13:46:16nrds<R2D299> itHub: 7"Nim TIC-80 bindings"
13:46:33FromDiscord<impbox [ftsf]> ooh
13:47:03arkanoidwow?
13:47:43FromDiscord<impbox [ftsf]> didn't realise tic-80 could do native code
13:47:57FromDiscord<impbox [ftsf]> sounds rad
13:49:23FromDiscord<Yardanico> In reply to @impbox "didn't realise tic-80 could": it's not native :P
13:49:48FromDiscord<Yardanico> this binding uses the JS backend
13:49:53FromDiscord<impbox [ftsf]> oh i see
13:51:08FromDiscord<Yardanico> tic 80 supports 4 languages officially - " 64KB of Lua or Moonscript or JavaScript or Wren or Fennel"
13:51:14FromDiscord<Yardanico> moonscript and fennel also compile to Lua
13:51:53arkanoidside question: in vscode F6 runs "nim c ...", how to make it run nimble build/run instead?
13:52:58FromDiscord<Yardanico> I don't think you can change the command that's being run when pressing F6
13:53:12FromDiscord<Yardanico> but you can add specific vscode tasks for Ctrl+F5 (run without debugging) which is a vscode keybind
13:53:29FromDiscord<fenrave> if you mean with coderunner, you can edit the json file for it to change the command that it runs
13:53:38FromDiscord<Yardanico> In reply to @fenrave "if you mean with": nah, he's talking about the nim extension
13:54:01FromDiscord<Yardanico> both Nim extensions (the pragmagic and saem) have F6 hotkey to run "nim c /path/to/currentFile.nim"
13:54:42FromDiscord<fenrave> did not know that
13:55:59arkanoidI'm using the saem one. It has a "build command" option that defaults to "c", but replecing it with "nimble build" results in it trying to run "nim nimble build ..."
13:56:21FromDiscord<Yardanico> ah maybe you can change, lemme check the config
13:56:52FromDiscord<Yardanico> eh, seems like you can't :)
13:57:04FromDiscord<Yardanico> https://github.com/saem/vscode-nim/blob/main/src/nimvscode.nim#L235 it's hardcoded here
13:57:14FromDiscord<Yardanico> (nim saem extension inherited most behaviour from the pragmagic extension)
13:59:48FromDiscord<Yardanico> you can make a PR adding a config variable for that since this extension is written in Nim (and compiled via JS backend)
14:03:46arkanoidyeah! I've opened an issue to talk about this
14:03:48arkanoidthanks
14:06:02arkanoidnot the smoothest karax intro experience: this compiles to js but triggers assertionDefect in js https://play.nim-lang.org/#ix=3yFj
14:06:17FromDiscord<Yardanico> why are you including stdlib modules?
14:06:20FromDiscord<Yardanico> you should import them
14:06:48arkanoidI was following this tutorial: https://moigagoo.svbtle.com/exploring-karax
14:07:04arkanoidold, yes, but he is using sugar
14:07:18FromDiscord<Yardanico> but he is importing sugar :)
14:07:31FromDiscord<Yardanico> not sure about the issue itself though
14:07:45FromDiscord<Yardanico> we have a #webdev on discord, I think it's bridged to matrix as well
14:07:49FromDiscord<Yardanico> it's better to ask about karax there
14:07:55arkanoidis there a difference between "import sugar" and "import std/sugar"?
14:08:13FromDiscord<Yardanico> yes
14:08:33FromDiscord<Yardanico> if you have a file named "sugar.nim" in the same folder as the main file, then "import sugar" will import that local file instead of stdlib
14:08:49arkanoidsure, but I have just "webtest.nim" in my src
14:08:53FromDiscord<Yardanico> "std" is the stdlib module prefix, and all new modules since 0.20.0 (or near that) are created in std namespace specifically
14:09:11FromDiscord<Yardanico> so it's better to just always use std prefix when importing stdlib modules
14:09:25FromDiscord<Yardanico> You can of course import multiple modules as easily - `import std/[strutils, strscans, httpclient]`
14:09:28arkanoidyeahm that's why I'm using std/[]
14:09:40arkanoidthis is the js error I'm getting: https://play.nim-lang.org/#ix=3yFk
14:11:52*jjido joined #nim
14:12:32arkanoidoh, wait, It's a problem about include vs import
14:12:59arkanoidso karax has to be included and not imported?
14:13:52arkanoidincluding karax + importing sugar works
14:16:32*max22- joined #nim
14:57:41*leth joined #nim
14:58:18NimEventerNew Nimble package! alasgar - Game Engine, see https://github.com/abisxir/alasgar
14:58:21nrds<R2D299> itHub: 7"3D game engine for nim"
15:01:11lethIn javascript it's possible and sometimes rather nifty to pass functions as arguments and calling them, when writing js specific nim code how would one represent this? Is there a way to call a JSObject, or should the argument be of some other type?
15:07:33arkanoidafter grokking elementary karax, I'm trying to slit effectful code from pure, but I'm failing. Do you know why this code can trigger effects? https://play.nim-lang.org/#ix=3yFO
15:53:05*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
15:55:24*max22- quit (Remote host closed the connection)
15:57:44FromDiscord<hotdog> In reply to @leth "In javascript it's possible": You can have procs as arguments
16:00:23*stkrdknmibalz quit (Read error: Connection reset by peer)
16:01:46FromDiscord<Kiloneie> @Yardanico when you meant shared ownership, you meant multiple objects using a ref objects right?
16:02:06FromDiscord<Yardanico> I meant multiple objects having the same reference to an object
16:03:17FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3yGd
16:03:29FromDiscord<Yardanico> in this case both `b` and `c` point to the same instance of `A`
16:03:54FromDiscord<Yardanico> hence "shared ownership"
16:08:42*jjido joined #nim
16:22:44*pro quit (Quit: WeeChat 3.2)
16:36:43*stkrdknmibalz joined #nim
16:39:49arkanoiddo you have an url where I can get a good example on how to ffi javascript using jsffi? I'm trying to interface with leaflet js lib. I've aready got working code using jsffi and magic JsObject type, but I'm trying to learn how to map types to achieve static typing
16:41:31FromDiscord<leorize> jsffi is mainly for untyped ffi
16:42:12arkanoidok, so I think what I want to do is avoiding it and map types
16:42:49FromDiscord<leorize> yea
16:42:59*max22- joined #nim
16:43:13FromDiscord<leorize> though you can probably do `distinct JsObject` as a start
16:45:16arkanoidI'm puzzled how should I import a namespace
16:45:49arkanoidthis lib has a global "L" that contains all funcs https://leafletjs.com/examples/quick-start/
16:45:52FromDiscord<leorize> importing a module you mean?
16:46:00FromDiscord<leorize> https://github.com/alaviss/setup-nim/blob/ng/src/private/actions/core.nim#L34
16:46:04FromDiscord<leorize> ^ something like that?
16:46:14arkanoidI'm doing "var L {.importc, nodecl.}: JsObject" and it is working
16:47:07FromDiscord<leorize> yea, just use it as a global and map have your wrappers access it
16:50:56lethhotdog: What if the arguments are unknown and may vary? as in they come from external js.
16:52:17FromDiscord<hotdog> In reply to @leth "<@472459996068839424>: What if the": How will you call the function if you don’t know the arguments?
16:52:29arkanoidnot sure I've got the correct pattern
16:53:02lethhotdog: That might very well happen in external code.
16:55:22lethhotdog: but say i want to call a function without arguments, that is passed in as a JSObject how do I do that?
16:55:32arkanoidconfused by importc and importcpp with js
16:56:55FromDiscord<hotdog> In reply to @leth "<@472459996068839424>: That might very": If you just pass it out to external js code type probably won’t matter
16:57:53FromDiscord<hotdog> In reply to @leth "<@472459996068839424>: but say i": You can probably ‘cast[proc()](jsobj)()’ or similar
16:58:07arkanoidI seoh, there's also imporjs
16:59:13FromDiscord<hotdog> In reply to @arkanoid "I seoh, there's also": IIRC importjs and importcpp function the same
17:04:58lethhotdog: Can't find a way to cast it.
17:15:15arkanoidI'm really missing the point on how to map a JsObject to a nim type properly
17:16:35arkanoidI see that jsffi module has the "toJs", "to", newJsAssoc procs/macros that may be relevant to the solution of the problem, but I cannot find a proper example on how I'm supposed to use them
17:18:41arkanoidalso what is this importjs syntax that contains hash char? Where is it documented? proc isUndefined*[T](x: T): bool {.noSideEffect, importjs: "(# === undefined)".}
17:19:07FromDiscord<Yardanico> importjs https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importjs-pragma
17:19:08FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
17:19:20FromDiscord<Yardanico> importjs is a different name for importcpp which has some syntax for stuff
17:20:36arkanoidah, ok, thanks. I've always working with C ffi and never with C++, gonna read it
17:22:44arkanoidwonder if the importcpp "::" namespace indicator works for importjs too, where I have a whole API under L. name (see https://leafletjs.com/examples/quick-start/)
17:25:27FromDiscord<hotdog> In reply to @leth "<@472459996068839424>: Can't find a": What did you try?
17:28:12lethhotdog: just solved it: with jsffi's to
17:28:55FromDiscord<hotdog> In reply to @leth "<@472459996068839424>: just solved it:": Good job
17:29:25lethto(jsobject-to-be-called, proc(args): JSObject)
17:29:40lethoh and call that.
17:30:09lethto(jsobject-to-be-called, proc(args): JSObject)(args)
17:32:45lethhotdog: thank you, and thanks for your time and help.
18:02:00FromDiscord<Kiloneie> sent a code paste, see https://play.nim-lang.org/#ix=3yGF
18:14:46*jmiven quit (Ping timeout: 260 seconds)
18:15:56*jmiven joined #nim
18:27:34FromDiscord<ynfle (ynfle)> Is it possible to suppress error checks for one variable that needs to be snake case/
18:28:01FromDiscord<Rika> Needs for what reason? Json?
18:29:02FromDiscord<ynfle (ynfle)> Yup
18:29:18FromDiscord<ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/886679447036653629): Is it possible to suppress error checks for one variable that needs to be snake case?
18:30:14FromDiscord<Rika> I don't think you can suppress those
18:35:40*max22- quit (Ping timeout: 260 seconds)
18:49:57*leth quit (Quit: no reason)
18:52:19*max22- joined #nim
19:32:33FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3yH3
19:45:52FromDiscord<Yardanico> yes
19:46:34FromDiscord<Yardanico> you can use `walkDir` at compile-time
19:46:36FromDiscord<Yardanico> from os
19:48:23FromDiscord<Elegantbeef> I am now yardanico, now i get to try to figure out why the cgen is dumb
19:48:43FromDiscord<Yardanico> ecksdee
19:48:50FromDiscord<Yardanico> also I misread "I am now yardanico"
19:49:00FromDiscord<Yardanico> like "why does he think he's me now"
19:49:20FromDiscord<Elegantbeef> Well i mean that's how it's written commas stop accidental name reassignment 😛
19:50:50FromDiscord<brainproxy> In reply to @Yardanico "you can use `walkDir`": I'm not sure how to use walkDir to build up a `const`
19:51:04FromDiscord<Elegantbeef> Sadly it's semantically fine i think, so that's fun
19:51:09FromDiscord<brainproxy> do I need to do it inside a macro?
19:51:12FromDiscord<Yardanico> no?
19:51:16FromDiscord<Yardanico> you can execute code at compile-time
19:51:46FromDiscord<Elegantbeef> Isnt walkdir an importC so you cannot use it you need to use the nimscript walkfiles or w/e
19:52:02FromDiscord<Yardanico> you can use walkDir
19:52:56FromDiscord<Yardanico> lemme show an example
19:53:28FromDiscord<brainproxy> I understand I can run code at compile time, and thanks for the tip re: walkDir, I'm just not sure how to arrange it so I end up with a `const myArray`
19:56:08FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3yH8
19:56:12FromDiscord<Yardanico> basically create a compile-time seq and create an array out of it
19:57:00FromDiscord<Yardanico> or you can just keep it as a const seq if you want, then you won't need this `block` at all
19:57:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3yH9
19:57:34FromDiscord<brainproxy> cool, thanks!
19:59:00*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:59:51FromDiscord<Yardanico> @ElegantBeef honestly I'm not sure how it works
20:00:10FromDiscord<Elegantbeef> In regards to?
20:00:23FromDiscord<Yardanico> walkDir
20:00:40FromDiscord<Elegantbeef> Ah
20:01:32FromDiscord<Elegantbeef> I think there is probably a vmops for that function somewhere
20:02:16FromDiscord<Yardanico> there's only this https://github.com/nim-lang/Nim/blob/devel/compiler/vmops.nim#L227
20:02:29FromDiscord<Yardanico> but it's staticWalkDir and not walkDir
20:04:27*supakeen quit (Remote host closed the connection)
20:04:50*supakeen joined #nim
20:05:17*Amun-Ra quit (Ping timeout: 252 seconds)
20:05:48*Amun-Ra joined #nim
20:30:13FromDiscord<ynfle (ynfle)> Is there a way to attacha metadata to `test` from `unittest`?
20:33:59FromDiscord<ynfle (ynfle)> Like with a custom pragma or something like that
20:45:21FromDiscord<Hamid Bluri> hey
20:45:30FromDiscord<Hamid Bluri> how can i make a library
20:45:32FromDiscord<Hamid Bluri> and
20:46:21FromDiscord<Hamid Bluri> when a user install it vie nimble
20:47:55FromDiscord<Hamid Bluri> he can run it by typing the my library name
20:48:10FromDiscord<Hamid Bluri> something like `inim` package
20:48:29FromDiscord<Hamid Bluri> https://github.com/inim-repl/INim
20:48:31nrds<R2D299> itHub: 7"Interactive Nim Shell / REPL / Playground"
20:48:45FromDiscord<Hamid Bluri> (edit) removed "my"
20:49:06FromDiscord<Hamid Bluri> (edit) "he can run it by typing the library name ... " added "in terminal"
20:50:55FromDiscord<Elegantbeef> `bin = @[]`
20:52:01FromDiscord<Hamid Bluri> got it, thanks
20:53:47*Jjp137 quit (Read error: Connection reset by peer)
20:54:37*Jjp137 joined #nim
20:57:18*Gustavo6046_ joined #nim
20:58:09*Gustavo6046 quit (Ping timeout: 265 seconds)
21:00:00*Gustavo6046_ is now known as Gustavo6046
21:20:52arkanoiddo I really need to use ctypes for js ffi?
21:21:01arkanoidcfloat for example
21:32:57*Gustavo6046 quit (Ping timeout: 265 seconds)
21:37:25*Gustavo6046 joined #nim
21:43:32arkanoiddo you know how to get a string representation of a JsObject?
21:45:36FromDiscord<konsumlamm> `$`?
21:48:27arkanoidno, getting js errors with that and repr
21:49:18arkanoidthe only way I'm able to get something out of a JsObject is to create a ref object type with known field and use myJsObject.to(FooType).repr
21:50:02arkanoidfor example echo (clickEvent.JsObject).latlng.to(LatLng).repr
21:51:02arkanoidthe '$' function does not exist for JsObject
21:52:50arkanoidwell, obviously also "echo (clickEvent.JsObject).latlng.to(LatLng)[]" works
21:53:13arkanoidbut really it should be able to print someting with just "echo clickEvent"
21:54:02arkanoidif you search for '$' in this page, you get zero procs https://nim-lang.org/docs/jsffi.html
21:58:47FromDiscord<Elegantbeef> cant you make a `$` proc that iterates the `pairs` echoing out `a: $y`?
21:58:58FromDiscord<Elegantbeef> Only issue is if you have recursive types
22:01:12arkanoidyes but why not include it in jsffi, there must be a traphole somewhere
22:02:44FromDiscord<Elegantbeef> Well if you have recursive types you'll have an issue
22:03:23FromDiscord<Elegantbeef> If a -\> b -\> a you'll hit an endless loop of writing to the string
22:03:32*max22- quit (Quit: Leaving)
22:03:51arkanoidexactly: "Uncaught InternalError: too much recursion"
22:08:24arkanoidwell, got the problem, thanks
22:08:53FromDiscord<Elegantbeef> I dont know if there is a way to get a unique id for a js object to stop that either
22:11:23arkanoidI've just written my first toy js ffi interface to a lib. It works nicely but I'd like a review from a more experienced user to fix bad practices early. Would you? https://play.nim-lang.org/#ix=3yHJ
22:11:40arkanoids/interface//
22:12:12arkanoidit follows most of quick start guide: https://leafletjs.com/examples/quick-start/
22:22:11*Gustavo6046 quit (Ping timeout: 265 seconds)
22:22:11*Gustavo6046_ joined #nim
22:23:49*Gustavo6046_ is now known as Gustavo6046
22:49:26*NeoCron joined #nim
22:57:47*NeoCron quit (Remote host closed the connection)
23:47:31*arfy joined #nim