<< 25-11-2020 >>

00:11:55*nixfreak joined #nim
00:16:40*nixfreak quit (Ping timeout: 260 seconds)
00:31:27*pixtum[m] joined #nim
00:44:42*junland quit (Quit: %ZNC Disconnected%)
00:45:42*Tanger quit (Remote host closed the connection)
01:10:52*Vladar quit (Quit: Leaving)
01:17:12FromDiscord<Quibono> Has anyone used https://github.com/Michedev/DecisionTreeNim?
01:24:47*Tanger joined #nim
01:27:59*vicfred quit (Quit: Leaving)
01:55:53*vicfred joined #nim
01:56:58*vicfred quit (Max SendQ exceeded)
01:57:28*vicfred joined #nim
01:58:27*vicfred quit (Max SendQ exceeded)
01:58:55*vicfred joined #nim
02:08:08*hyiltiz quit (Quit: hyiltiz)
02:08:31*hyiltiz joined #nim
02:08:31*hyiltiz quit (Changing host)
02:08:31*hyiltiz joined #nim
02:11:09*hyiltiz quit (Client Quit)
02:11:31*hyiltiz joined #nim
02:12:14*hyiltiz quit (Client Quit)
02:12:31*hyiltiz joined #nim
02:12:31*hyiltiz quit (Changing host)
02:12:31*hyiltiz joined #nim
02:12:47*nixfreak joined #nim
02:14:26*hyiltiz quit (Client Quit)
02:14:44*hyiltiz joined #nim
02:16:00*fredrikhr5 joined #nim
02:17:28*nixfreak quit (Ping timeout: 260 seconds)
02:19:25*fredrikhr quit (Ping timeout: 264 seconds)
02:19:25*fredrikhr5 is now known as fredrikhr
02:26:09*apahl quit (Ping timeout: 272 seconds)
02:27:44*apahl joined #nim
02:39:36*abm quit (Read error: Connection reset by peer)
03:00:48*kinkinkijkin quit (Remote host closed the connection)
03:05:03*kinkinkijkin joined #nim
03:10:04*D_ quit (Remote host closed the connection)
03:11:30*D_ joined #nim
03:38:03*NimBot joined #nim
03:43:06*bung joined #nim
03:54:33FromDiscord<Quantum> probably a stupid question, but for the life of me I can't figure out what the point of the --app flag is
03:54:46FromDiscord<Quantum> what does it do? it doesn't seem to generate anything when I call it
03:55:10disrupteknim --fullhelp | grep app
03:55:20disruptek --app:console|gui|lib|staticlib
03:55:21disruptek generate a console app|GUI app|DLL|static library
03:56:02FromDiscord<Quantum> I saw that, I doesn't really do much when calling ↵> nim --app:gui↵returns an error
03:56:56disruptekit's supposed to omit console output in favor of a gui, but i don't use windows so i cannot tell you how to code the gui part.
03:57:26FromDiscord<Quantum> ohhhhh, I thought is was like a project generation command
03:57:28disruptekyou need to use it along with another compilation command, like `c`.
03:57:37FromDiscord<Quantum> ok that makes more sense
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:35*supakeen joined #nim
04:11:20FromDiscord<ProfessorEevee> Is there a way to implement like a "Press any key to exist" in Nim?
04:11:53FromDiscord<ProfessorEevee> I tried using `readChar(stdin)`, but that didn't work how I expected it to
04:13:42*nixfreak joined #nim
04:17:56*nixfreak quit (Ping timeout: 240 seconds)
04:19:56FromDiscord<ElegantBeef> for a CLI?
04:21:22FromDiscord<cabboose> Having some weird trouble with the mysql dll. On my development computer it’s all working fine with the dll in the folder of the generated executable; however it does not work similarly on the client computers
04:21:45FromDiscord<cabboose> Both are 64 bit systems with 64 bit dyn library
04:22:04FromDiscord<cabboose> My dev is amd and the client is intel
04:22:07FromDiscord<ElegantBeef> @ProfessorEevee you probably want to use `getCh` from the `terminal` module if that's the case
04:22:19FromDiscord<cabboose> However I tried compiling on a intel dev computer with the same outcome
04:23:29FromDiscord<ProfessorEevee> Yep, this is exactly what I was looking for. Thank you!
04:23:34FromDiscord<ElegantBeef> No problem
04:26:02FromDiscord<ElegantBeef> @cabboose you are copying the .dll over and it's next to the exe?
04:26:09FromDiscord<cabboose> Yes
04:26:41FromDiscord<cabboose> Added the dir to the user path manually too
04:28:07FromDiscord<ElegantBeef> Another case of something outside what i know, can only guess. Which means I guess something like the search path is being hardcoded to the absolute path of the compiled binary, but yea 0 clue so dont believe anything i write
04:30:28FromDiscord<cabboose> Hmmm but the odd thing is that when I compile it on another system it fails again
04:30:42FromDiscord<cabboose> Could there be requirements that aren’t fulfilled for the dynamic library?
04:31:12FromDiscord<ElegantBeef> What modules are you using?
04:32:25FromDiscord<ElegantBeef> I assume since you're using mysql you're using the `-d:ssl` flag, so if you dont have the ssl dlls it'll not work
04:33:29FromDiscord<ElegantBeef> I cannot think of anything else to cause this behaviour, so if that's not it, guess wait untill someone smarter than i steps in
04:33:46FromDiscord<cabboose> Ah that could be it
04:34:41FromDiscord<cabboose> So it’s likely I’ve already got those libraries in my dev computers path but they aren’t present on the client and intel dev computer
04:34:44FromDiscord<ElegantBeef> It should complain about missing stuff
04:34:48FromDiscord<cabboose> I’ll have a crack at that
04:34:55FromDiscord<ElegantBeef> Have you not ran it in terminal to see the output?
04:35:16FromDiscord<cabboose> Yeah; just says “can not load libmysql|libmariadb”
04:35:42FromDiscord<ElegantBeef> Then afaik the SSL isnt the issue 😛
04:36:40FromDiscord<cabboose> Looking at MySQL documentation for the library, the issue might be as simple as not having the correct Visual C redistributable
04:39:21FromDiscord<shad0w> i am gonna get some time on my hands the coming days
04:40:01FromDiscord<shad0w> i was looking into start contributing to the compiler. it'll be a good learning experience i reckon
04:40:39FromDiscord<shad0w> but i guess there's some general ideas about compilers one should have ? i did take a compiler course in college but that was about 4 years ago : P
04:41:30FromDiscord<shad0w> what would some good resources to get started here? i prefer books over videos if that's relevant ?
04:42:42FromDiscord<cabboose> Well the Visual C redistrib didn’t work
04:42:54FromDiscord<cabboose> I’m just going to chuck every bloody library in the file until it opens
04:42:57disruptekread the source.
04:43:04FromDiscord<cabboose> Brute force
04:45:33disruptekshad0w: https://inf.ethz.ch/personal/wirth/CompilerConstruction/CompilerConstruction1.pdf
04:45:46disruptekand https://inf.ethz.ch/personal/wirth/CompilerConstruction/CompilerConstruction2.pdf
04:46:00FromDiscord<shad0w> ah, the wirth papers
05:31:29*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:31:35*njoseph joined #nim
05:45:22*habamax joined #nim
05:49:53*Tanger quit (Remote host closed the connection)
05:50:33*Tanger joined #nim
06:07:32FromDiscord<shad0w> disruptek: just read the introduction and chapter 1
06:07:57FromDiscord<shad0w> this should be fun
06:08:15FromDiscord<shad0w> the fact that it updated in 2017 also makes me happy
06:11:44*vicfred quit (Quit: Leaving)
06:14:29*nixfreak joined #nim
06:16:34*waleee-cl quit (Quit: Connection closed for inactivity)
06:18:59*nixfreak quit (Ping timeout: 260 seconds)
06:28:46*bonoboking joined #nim
06:28:54bonobokingis there a reason that slice does not have low/high defined?
06:30:57mipri!eval let r = 1..10; echo (r.a, r.b)
06:31:02NimBot(1, 10)
06:35:49*audiofile joined #nim
06:52:15*a_chou joined #nim
06:52:38bungcan I add method to object variant depends on its kind compile time?
06:55:53*a_chou quit (Client Quit)
06:56:34miprino, you've gotta take the whole object.
06:56:45*narimiran joined #nim
06:57:50bungok, I guess I may construct a new type for it
07:04:40*bonoboking quit (Ping timeout: 245 seconds)
07:05:37FromDiscord<inv> Is it possible to use some special naming for proc name? I need it, because it is just some kind of internal interface functions for python. I would like to call it maybe _calc_fn1
07:05:51FromDiscord<inv> (edit) "Is it possible to use some special naming for proc name? I need it, because it is just some kind of internal interface functions for python. I would like to call it maybe _calc_fn1" => "sent a code paste, see https://play.nim-lang.org/#ix=2FoN"
07:06:00FromDiscord<inv> (edit) "sent a code paste, see https://play.nim-lang.org/#ix=2FoN" => "Is it possible to use some special naming for proc name? I need it, because it is just some kind of internal interface functions for python. I would like to call it maybe _calc_fn1"
07:06:16FromDiscord<ElegantBeef> underscores cannot be used as the first token of an identifier
07:06:36FromDiscord<ElegantBeef> Explain what you're doing more
07:07:42FromDiscord<inv> last tokens does not work also
07:07:52FromDiscord<ElegantBeef> What?
07:08:25narimiranyes you cannot have `_foo` nor `foo_`
07:08:27FromDiscord<inv> I want it naming is in a bit obfuscard way => so, it would be visible to python user to do not use it
07:08:43FromDiscord<ElegantBeef> That's easy, you dont export it
07:08:49FromDiscord<inv> (edit) "obfuscard" => "obfuscated"
07:08:59FromDiscord<ElegantBeef> Nim doesnt have a convention of "dont use" we dont let you use what we dont want you to
07:09:16FromDiscord<inv> I cannot not export - it is not Nim, it is nimpy export
07:09:30FromDiscord<ElegantBeef> If it's not nim i cannot help
07:09:50FromDiscord<inv> ok, it is Nim, but it is export from nimpi
07:09:55FromDiscord<inv> (edit) "nimpi" => "nimpy"
07:10:00FromDiscord<inv> (edit) "ok, it is Nim, but it is export from nimpy ... " added "🙂"
07:10:14FromDiscord<inv> (edit) "ok, it is Nim, but it is export from nimpy 🙂 ... " added " ... into python's module"
07:10:18FromDiscord<nikki> just use some prefix or suffix like "internal" if you really need to?
07:10:36FromDiscord<ElegantBeef> `dontFuckingTouch_ThisProc`
07:10:44FromDiscord<nikki> pretty much
07:46:57FromDiscord<lqdev> i just add a prefix IMPL_ and add a `## Do not use this.` doc comment
07:48:44*PMunch joined #nim
08:14:11FromDiscord<inv> thx
08:15:25*nixfreak joined #nim
08:20:08*nixfreak quit (Ping timeout: 256 seconds)
08:41:28*Tanger quit (Quit: Leaving)
08:49:59*nyaayaya quit (Remote host closed the connection)
08:50:13*nyaayaya joined #nim
08:51:06*nyaayaya quit (Remote host closed the connection)
08:51:18*nyaayaya joined #nim
08:59:31*hmmmmm joined #nim
09:09:49*audiofile quit (Ping timeout: 264 seconds)
09:12:23*opal quit (Ping timeout: 240 seconds)
09:15:05FromDiscord<pietroppeter> @inv: I just tried the following (by analogy with exportc) and it works (ref example is from nimpy's readme): `proc greet(name: string): string {.exportpy: "greet".}`
09:15:22*opal joined #nim
09:15:42FromDiscord<inv> did not know about the name for export, looks perfect. Thank you!
09:17:48FromDiscord<inv> Strange, it works, but does not work for fn 🙂
09:18:12FromDiscord<inv> (edit) "works," => "works for fn,"
09:18:34FromDiscord<inv> (edit) "Strange, it works for fn, but does not work for fn 🙂" => "sent a code paste, see https://play.nim-lang.org/#ix=2Fpl"
09:18:43FromDiscord<inv> (edit) "https://play.nim-lang.org/#ix=2Fpl" => "https://play.nim-lang.org/#ix=2Fpn"
09:20:10FromDiscord<pietroppeter> just tried and works for me
09:23:37FromDiscord<pietroppeter> https://gist.github.com/pietroppeter/5c6f24ddaf2d7bdcac23fcfdbede3067
09:23:50*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:35:27FromDiscord<inv> hm
09:37:23hmmmmmyes?
09:37:31FromDiscord<ElegantBeef> No
09:56:16ForumUpdaterBotNew thread by Cmc: Compile Error for Nim-Generated C-code for android with ndk-build (through wiish), see https://forum.nim-lang.org/t/7152
09:57:02*apahl quit (Ping timeout: 264 seconds)
09:57:48*apahl joined #nim
09:57:50FromDiscord<ProfessorEevee> Is there a way to clear a terminal in Nim?
09:59:10PMunchThis should work: https://nim-lang.org/docs/terminal.html#eraseScreen.t
10:00:52FromDiscord<ProfessorEevee> it did, but... not exactly how I wanted
10:02:05FromDiscord<ProfessorEevee> Never mind, I forgot to set the cursor pos to 0,0
10:02:08FromDiscord<ProfessorEevee> (edit) "0,0" => "0, 0"
10:14:44*Jjp137 quit (Read error: Connection reset by peer)
10:16:13*nixfreak joined #nim
10:20:56*nixfreak quit (Ping timeout: 265 seconds)
10:21:47*Torro joined #nim
10:31:09FromDiscord<ProfessorEevee> How do you use `exitprocs.addExitProc()`? I'm trying to import it, but I can't figure out how to use it
10:36:43FromDiscord<ProfessorEevee> I keep getting `Error: undeclared identifier: 'addExitProc'` :c
10:36:48Zevvimport std/exitprocs
10:37:58FromDiscord<lqdev> we really gotta start adding std/ to all imports in docs
10:38:27Zevvit was never clear to me what goes in std and what does not
10:40:37FromDiscord<ProfessorEevee> ah, I had tried importing std directly but that did not work
10:40:54FromDiscord<ProfessorEevee> I couldn't find that anywhere in the docs, I was so confused
10:42:13Zevvyou should be
10:45:01FromDiscord<ProfessorEevee> Well at first I thought it was by default imported because `import std` didn't work
10:45:17FromDiscord<ProfessorEevee> which I only got from looking at the source code
10:46:03FromDiscord<ProfessorEevee> Then I thought "Hey, maybe it's a nimble package". That wasn't it either
10:46:35ZevvUsually I go to the `tests/` directory and see how things are used. but the docs are clearly lacking here, this module also needs an example or two
10:47:57FromDiscord<ProfessorEevee> also for some reason, I can't do `addExitProc(showCursor)`
10:48:59FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FpH
10:56:20FromDiscord<lqdev> @ProfessorEevee please read zevv's message again and rethink what you're doing.
10:56:27FromDiscord<lqdev> > import std/exitprocs
10:56:36FromDiscord<ProfessorEevee> Oh, I already got that part working
10:56:44FromDiscord<ProfessorEevee> I should've clarified, sorry
10:56:48FromDiscord<lqdev> ah right
10:57:07FromDiscord<lqdev> now, i suppose showCursor is a template?
10:57:33FromDiscord<ProfessorEevee> I have yet to work with templates, so I have no clue what that means or how knowing that can solve my issue
10:57:48FromDiscord<lqdev> oh righty
10:57:56FromDiscord<lqdev> showCursor is a template in the terminal module
10:58:03FromDiscord<lqdev> https://nim-lang.org/docs/terminal.html#showCursor.t
10:58:15FromDiscord<lqdev> you'll need to do `addExitProc proc () = showCursor()`
10:59:57FromDiscord<ProfessorEevee> Hmm, that works, although I have no clue how it works lol
11:00:23FromDiscord<lqdev> you see, the `addExitProc` procedure accepts either a `proc () {.closure.}` or `proc () {.noconv.}`
11:00:41FromDiscord<lqdev> so basically it expects a proc without arguments
11:00:53FromDiscord<lqdev> `showCursor` is the only callable without arguments that matches
11:01:02FromDiscord<lqdev> but it seems that the compiler tries to do something weird :p
11:01:07FromDiscord<lqdev> most likely due to a bug
11:01:25FromDiscord<lqdev> anyways, the compiler seems to match `showCursor`, but it's not a proc
11:01:28FromDiscord<lqdev> which trips it up
11:01:36FromDiscord<ProfessorEevee> So what is `proc ()`? Is that some sort of type casting?
11:01:47FromDiscord<lqdev> that's syntax for closures
11:02:03FromDiscord<ProfessorEevee> Ah, yeah I haven't learned about those either
11:02:08FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2FpN
11:02:20FromDiscord<lqdev> a closure is basically a local proc that closes over any enclosing local variables
11:02:39FromDiscord<lqdev> closures are also known as lambdas
11:03:07FromDiscord<ProfessorEevee> I see, how.. confusing and weird
11:03:35FromDiscord<lqdev> well we need that because addExitProc expects a proc and showCursor without arguments is a template
11:03:47FromDiscord<lqdev> so we pass it a proc that simply calls showCursor
11:04:07FromDiscord<ProfessorEevee> Ah I see
11:04:25FromDiscord<ProfessorEevee> So it basically creates a proc from the template?
11:04:33FromDiscord<ProfessorEevee> like a sort of wrap?
11:04:56FromDiscord<lqdev> yeah kind of
11:05:13FromDiscord<lqdev> to be more precise, it creates a proc that calls the template
11:05:49FromDiscord<ProfessorEevee> Yeah, that's what I was thinking
11:06:14FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FpO
11:06:31FromDiscord<ProfessorEevee> I assume it's a similar concept
11:06:38FromDiscord<lqdev> that effectively does the same thing
11:06:47FromDiscord<lqdev> it's just that the closure form is shorter
11:06:56FromDiscord<lqdev> and doesn't pollute your scope with an extra proc
11:07:05FromDiscord<ProfessorEevee> Yeah, makes sense
11:07:14FromDiscord<ProfessorEevee> this of course was just as concept and understanding
11:07:25FromDiscord<lqdev> sure
11:07:42FromDiscord<ProfessorEevee> Alright, that's cool. Weird, but cool
11:11:02FromDiscord<ProfessorEevee> Thank you, by the way
11:15:59FromDiscord<exelotl> on the GBA toolchain (based on gcc) it seems that there's no difference between {.nimcall.} / no annotation, and {.noconv.}
11:16:36ForumUpdaterBotNew thread by Domogled: Wonderfully prologue, see https://forum.nim-lang.org/t/7153
11:16:50FromDiscord<exelotl> I wonder if I should simplify my library and stop using {.noconv.} even where it would be technically more correct to use it
11:19:00*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
11:19:18*kitech1 joined #nim
11:20:54FromGitter<HJarausch_gitlab> Some help on mapIt please. ⏎ The following fails since Nim thinks the identifier 'it' is undefined. ⏎ But according to the docs it is injected by the 'mapIt' template. ⏎ import sequtils ⏎ type ... [https://gitter.im/nim-lang/Nim?at=5fbe3e160451324f1534fc0c]
11:21:02FromDiscord<exelotl> I might be wrong about that though... I haven't tested it thoroughly
11:22:19FromDiscord<lqdev> @HJarausch_gitlab have you tried doing `mapIt(s, it.origin)`?
11:26:38FromGitter<Vindaar> Yep, or just `s.mapIt(it.origin)` of course. `mapIt` does not take an argument for the type
11:27:48FromDiscord<exelotl> I think they looked at the docs and thought "typed" meant a type is expected 😅
11:29:55FromDiscord<lqdev> oh i didn't notice they added an extra arg
11:31:44FromGitter<HJarausch> Thanks exelotl. It came from a code example from 2014
11:40:09FromGitter<HJarausch> Sorry; many thanks to lqdev and Vindaar
11:58:10FromDiscord<exelotl> https://media.discordapp.net/attachments/371759389889003532/781126578431197194/90f.png
12:02:20FromDiscord<exelotl> so... confirmed that fastcall doesn't exist on ARM. Should I just remove {.nodecl.} from my code?
12:03:11FromDiscord<exelotl> hypothetically, if there was an x86 GBA, my code would break
12:03:34FromDiscord<exelotl> but there isn't an x86 GBA, so I think I have nothing to worry about xD
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:39*supakeen joined #nim
12:13:34*Vladar joined #nim
12:14:32*Jjp137 joined #nim
12:25:53hmmmmmhey stupid question: I'm still fiddling with nigui, is there some VScode thingy to see all the procs I can use on a gui element like fontsize etc?
12:27:26PMunchNimLsp and the VSCode plug-in should both have this capability
12:27:33PMunchBut it's a bit, uhm, wonky
12:27:51hmmmmmhmm
12:28:02hmmmmmand how do you do it munchie
12:28:31hmmmmmyou just go to the source of nigui and poke stuff around?
12:30:14PMunchUhm, normally it's just tab
12:30:19hmmmmmoh
12:32:23FromDiscord<inv> stupid question: how to get only one value from iterator? Smth like next(it)
12:32:44PMunchZevv, one feature which would be neat in npeg is passing an enum as a pattern
12:32:54Zevvlike how
12:33:20PMunchSo I don't have to write ("One" | "Two" | "Three") for enum One, Two, Three
12:34:07ZevvHmm but then you'd like to capture the enum insteda of the string I guess
12:34:13Zevvand you want to match style-insensitive?
12:34:55FromDiscord<inv> + how to make it.take(10) ?
12:34:58hmmmmmtab didn't work
12:35:07PMunchI mean optimally I'd want to capture the enum, but if it's not a direct capture that might be hard (e.g. `>("hello_" * MyEnum)`)
12:35:08hmmmmmbut I see there is a thingy called nimsuggest
12:35:08FromDiscord<inv> (edit) "+ how to make it.take(10) ? ... " added "any package ?"
12:35:59PMunchAnd I wouldn't want it style-sensitive (at least not by default), but use the stringified value of the enum
12:37:42FromDiscord<Rika> @inv call the iterator to get the next value
12:37:50PMunch@inv you can quite easily do that with closure iterators
12:37:55PMunchA tad harder with normal iterators
12:38:19PMunchhmmmmm, yeah nimsuggest is what the plug-in for VSCode wraps and what nimlsp uses as a library
12:38:49Zevvhm I'm not sure if npeg has access to the enum type, let me see
12:39:02hmmmmmhmm
12:39:13hmmmmmI already have the extension installed
12:39:16ZevvI find this confing
12:39:23Zevvthe guy called hmmmmm saying hmm
12:39:31FromDiscord<Rika> hmm
12:39:32hmmmmm:3
12:45:39FromDiscord<inv> Just found iterutils, but I think `[range]` would be perfect in iterators
12:45:53FromDiscord<inv> (edit) "Thank you.Just found iterutils, but I think `[range]` would be perfect in iterators ... " added "too"
12:45:56PMunchIsn't it annoying to be called hmmmmm? People have to end up highlighting you from time to time :P
12:46:00FromDiscord<inv> (edit) "iterutils," => "iterutils.slice,"
12:46:15FromDiscord<inv> hmm
12:47:10ZevvPMunch: I don't know if this can work; npeg is untyped so it does not know about MyEnum being an enum
12:48:45PMunchOoh, that's unfortunate
12:49:06PMunchHow do you do Digit/Alpha/Whitespace and all those?
12:49:22FromGitter<HJarausch_gitlab> dumb question? How to terminate an iterator early? (current) Nim doesn't allow a 'return' statement - and using flags to "fall through" would be ugly. Thanks for a hint, Helmut
12:50:18PMunchbreak?
12:50:19hmmmmmoh we are making progress, with ctrl + t, and @ I can find all the symbols I used in my file
12:51:27PMunch@HJ, that was for you by the way :P
12:51:29ZevvPMunch: https://github.com/zevv/npeg/blob/master/src/npeg/lib/core.nim
12:51:32FromDiscord<Rika> How else would you terminate an iterator early
12:53:02PMunch@Rika, with a block and `break blockname`?
12:53:07PMunchOr wrap it in a proc
12:53:46FromDiscord<Rika> Ah, I see, you mean within an iterator
12:54:02FromGitter<HJarausch_gitlab> break doesn't work either : ⏎ iterator domore(x:int) : int = ⏎ if x == 0 : break ⏎ if x == 1 : yield 1 ⏎ yield 2 ... [https://gitter.im/nim-lang/Nim?at=5fbe53eae6f2b51c68b70f11]
12:55:30Zevvno, I don't think it can be done. MyEnum is just an ident
12:55:46hmmmmmeven more progress if I start typing "set" it lists all the procs that start with "set" that I can use
12:56:07PMunchOh from within an iterator!
12:56:10PMunchhttps://play.nim-lang.org/#ix=2Fqd <- this wroks
12:56:12PMunchworks*
12:56:25PMunchAnd if you make it a closure iterator you can use return instead IIRC
12:56:42PMunchZevv, well that's a shame
12:57:23Zevvso, who are you mad at now. Me? Nim? Ar4q? Or shall we just shame disruptek?
12:57:31ZevvI like that option, because he's not here
12:57:53FromGitter<HJarausch_gitlab> @PMunch Yes, this works, thanks! Though I wouldn't call this this ⏎ principle of least surprise.
12:57:59PMunchWell I mean it's not impossible to do, just impractical
12:58:48PMunchI mean even just a special symbol that means "hey this thing is an enum, do some unwrap magic on it later" might work
12:59:12PMunchOr just something I could do to create a subparser from an enum before I create the pattern
12:59:40PMunch@HJ, yeah it might look a bit odd. But that whole iterator is a bit odd..
13:01:29hmmmmmyay got it, I just need to write the start of it like "inputcontainer." and it will suggest the right stuff
13:01:30PMunchI mean you could of course also do it like this: https://play.nim-lang.org/#ix=2Fqk
13:02:04ZevvPMunch: you should be able to make a sub-parser easily
13:02:09Zevvlet me show that
13:11:12hmmmmmwoa F12 opens the definition in the source
13:11:16ZevvPMunch: https://play.nim-lang.org/#ix=2Fqo
13:12:30PMunchOh I was more thinking if I could create it outside of `peg`. That way I could write a macro which does it
13:15:45FromGitter<HJarausch_gitlab> @PMunch This was just a tiny example. I intend to use it in an iterator with nearly 300 lines of code. The next thing I have to find out is how to transfrom a Python 'yield from' to this iterator itself (i.e. recursively) ⏎ into valid Nim code. Any pointers are kindly appreciated.
13:16:06Zevvhttps://play.nim-lang.org/#ix=2Fqq :)
13:16:49PMunchHmm, I guess that kinda works..
13:19:55*hmmmmm quit (Remote host closed the connection)
13:24:48FromDiscord<inv> Is it possible to expose object(struct) definition into python in nimpy?
13:26:38*Torro left #nim ("bye")
13:36:09*filpAM joined #nim
14:01:10FromDiscord<ProfessorEevee> Is there an alternative proc for `+`?
14:01:39FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqC
14:02:01FromDiscord<ProfessorEevee> (edit) "https://play.nim-lang.org/#ix=2FqC" => "https://play.nim-lang.org/#ix=2FqD"
14:04:03PMunchUhm, no
14:04:09PMunchWhat exactly do you need that for?
14:04:35PMunchI mean you can do "x.`+`(10)"
14:04:50PMunchOh, that probably looks weird on Discord
14:04:57PMunchThat plus is meant to be in backticks
14:05:41FromDiscord<ProfessorEevee> Well, I want to basically override \`x`
14:05:57FromDiscord<ProfessorEevee> but if I do that, I'll run into recursion
14:07:25*Kaivo quit (Ping timeout: 240 seconds)
14:07:26FromDiscord<Rika> What do you mean
14:07:33FromDiscord<Rika> Override?
14:08:31FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqG
14:09:34FromDiscord<Rika> Well, does it actually run into recursion? Nim uses the most specific procedure there is does it not? And using add over + won’t fix the issue would it?
14:09:56FromDiscord<ProfessorEevee> It does, I had tried it
14:10:11*Kaivo joined #nim
14:10:49FromDiscord<Rika> We don’t have an add, we just strop + if we need an “add”
14:11:38FromDiscord<ProfessorEevee> I confused myself a bit
14:12:21FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqL
14:15:02FromDiscord<Clyybber> because system.\`+\` matches better
14:16:09FromDiscord<Clyybber> @ProfessorEevee you can try import system except \`+\` :D
14:16:10FromDiscord<Rika> Any is unspecific, system has a proc that is more specific (int, int) than yours (any, any)
14:16:24FromDiscord<Rika> You can? Isn’t system automatically imported
14:16:40FromDiscord<Clyybber> it is, but afair that works
14:16:56FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2FqM
14:17:17*nixfreak joined #nim
14:17:20FromDiscord<exelotl> (edit) "https://play.nim-lang.org/#ix=2FqM" => "https://play.nim-lang.org/#ix=2FqN"
14:17:56FromDiscord<Clyybber> @Rika yep just tested, it works :D
14:18:30FromDiscord<Rika> Interesting
14:18:44FromDiscord<Clyybber> and exelotls works too
14:21:40*nixfreak quit (Ping timeout: 256 seconds)
14:29:12FromDiscord<ProfessorEevee> Ohh, that's great
14:29:19FromDiscord<ProfessorEevee> Thank you guys for the help
14:51:05Araqx.inc(10)
14:53:07FromDiscord<Quantum> when trying to run "nake build" in a project I get the following error
14:53:08FromDiscord<Quantum> Error: cannot open file: os/nim
14:53:33FromDiscord<Quantum> The project is the godot stub for nim
14:53:39PMunchAre you trying to import os.nim?
14:53:45FromDiscord<Quantum> ya
14:54:14PMunchChange that to `import os`
14:54:20PMunchWithout the .nim part
14:54:22FromDiscord<Quantum> ok
14:54:29Zoom[m]Araq: what is the status of Concepts? Any work going on there recently? What are the plans for them? Haven't really seen anything public besides the docs.
14:54:52*lritter joined #nim
14:55:18FromDiscord<Quantum> now I get ↵> Error: cannot open file: std/private/miscdollars
14:55:46FromDiscord<Quantum> wait actually
14:56:25FromDiscord<Quantum> nvm doesn't work
14:57:58PMunchThat is more strange
14:58:03PMunchWhat is your nim version?
14:59:08narimiranZoom[m]: i wouldn't hold my breath
14:59:11FromDiscord<Quantum> sent a long message, see http://ix.io/2Fr4
15:01:23Zoom[m]narimiran: I won't, just interested in status and overall thoughts. I'll go read on RFCs on GH first, though
15:01:55PMunch@Quantum, that file didn't exist in 1.2
15:01:58PMunchTry upgrading your Nim
15:02:09PMunchBut why are you trying to import that anyways?
15:03:04FromDiscord<Quantum> I'm currently at the newest version in the ubuntu repos so I'll have to build from source one sec
15:03:30PMunchYou should try choosenim
15:04:13FromDiscord<lqdev> ^
15:04:20FromDiscord<lqdev> ubuntu repos suck tbh
15:04:29*waleee-cl joined #nim
15:04:36FromDiscord<zetashift> @Zoom[Matrix] https://github.com/nim-lang/Nim/pull/15251#issuecomment-726113404
15:04:37disbotnew-style concepts implementation, WIP
15:05:06FromDiscord<Quantum> What's choosenim?
15:05:20narimirani thought ubuntu had 1.4.0?
15:05:44FromDiscord<Quantum> I'm on pop os which uses the ubuntu repos, at least I thought it did
15:06:26Zoom[m]@zetashift, thanks, missed that one, there's a bunch of interesting stuff in #13, #167 and #12048 also.
15:06:29disbothttps://github.com/nim-lang/Nim/pull/12048 -- 5enableif: simpler and more powerful alternative to `concepts` ; snippet at 12https://play.nim-lang.org/#ix=2Fre
15:06:36PMunchChoosenim is a program that allows you to quickly and easily update Nim and switch between versions
15:06:58PMunchI think it is in the Ubuntu repos
15:07:04narimiranhttps://repology.org/project/nim/versions
15:07:11narimirandebian has 1.4, ubuntu doesn't
15:07:23FromDiscord<lqdev> the ubuntu state of mind, folks.
15:07:44FromDiscord<lqdev> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh`
15:08:39FromDiscord<Quantum> thanks
15:08:45FromDiscord<Idefau> obligatory reminder to check stuff before piping it to sh, i mean i know that url is safe, its just a good habit
15:19:13ForumUpdaterBotNew thread by B3liever: How to properly deserialize variant (case) objects, see https://forum.nim-lang.org/t/7154
15:31:11*PMunch quit (Quit: leaving)
15:44:47*hmmmmm joined #nim
15:44:58hmmmmmhallo :>
15:50:26*filpAM quit (Remote host closed the connection)
15:54:32leorizehi :)
15:56:31FromDiscord<zetashift> hiya
16:01:41*junland joined #nim
16:02:48*aenesidemus joined #nim
16:03:32FromGitter<matrixbot> `pandrian75` hello
16:06:26*junland quit (Client Quit)
16:08:09*junland joined #nim
16:08:34*junland quit (Remote host closed the connection)
16:09:30*junland joined #nim
16:09:47*junland quit (Remote host closed the connection)
16:10:27*junland joined #nim
16:11:59*junland quit (Client Quit)
16:12:43*junland joined #nim
16:14:39*junland quit (Client Quit)
16:15:21*junland joined #nim
16:15:31*junland quit (Remote host closed the connection)
16:16:12*junland joined #nim
16:16:41*junland quit (Remote host closed the connection)
16:17:18*aenesidemus quit (Quit: Leaving)
16:17:22*junland joined #nim
16:18:10*nixfreak joined #nim
16:21:34*junland quit (Client Quit)
16:21:36narimiran!matrix
16:21:44narimiran~matrix
16:21:44disbotmatrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr)
16:22:15*junland joined #nim
16:22:17narimiranah, i kinda expected to see the message telling people on matrix that they don't need to connect via gitter
16:23:06*junland quit (Client Quit)
16:23:53*junland joined #nim
16:32:54*natrys joined #nim
16:35:38*junland quit (Quit: %ZNC Disconnected%)
16:37:58FromDiscord<zetashift> The `Strange error message from collections/sets.nim` thread on the forum has outlived it's usefullness imho, it's turned into some serious bikeshedding
16:38:23FromDiscord<zetashift> also ironically it has one of the most views haha
16:41:43*vicfred joined #nim
16:42:24FromDiscord<haxscramper> I think that we should just make forum message filter and nuke everything that has words like `'tabs'`, `'fibonachhi'` and `'I have been X for Y years'` because the minute you see them you know the thread will turn into dumpster fire anyway
16:42:50*junland joined #nim
16:42:50*junland quit (Client Quit)
16:46:58*junland joined #nim
16:47:51*abm joined #nim
16:47:58FromDiscord<Daniel> ot/ot https://hey.science/dumpster-fire/
16:48:22*abm quit (Client Quit)
16:52:16*abm joined #nim
17:13:00*habamax quit (Quit: leaving)
17:13:18*habamax joined #nim
17:14:48*habamax quit (Client Quit)
17:15:07*habamax joined #nim
17:16:45*hnOsmium0001 joined #nim
17:21:41*habamax quit (Quit: leaving)
17:21:58*habamax joined #nim
17:27:15FromDiscord<Vindaar> damn, just bit my own ass. Tried to debug a segfault in nimhdf5, which I got adding a new feature. Turned out I forgot to change the wrapper at the beginning of the year when `csize_t` was introduced. Well, technically I think I simply trusted the old documentation stating that `csize` was equal to `size_t` in C and my wrapper was broken even before that, haha
17:28:10Zoom[m]Hm, why does rand overflow on int64?
17:31:20Zoom[m]If I use a slice as an arg
17:31:53narimiranZoom[m]: huh? show us the code
17:33:13*bung quit (Ping timeout: 246 seconds)
17:34:23*junland quit (Quit: %ZNC Disconnected%)
17:35:11Zoom[m]I look at the source of rand (line 366) and I don't see much difference
17:35:45Zoom[m]https://play.nim-lang.org/#ix=2FrS
17:35:55*bung joined #nim
17:37:47narimiranZoom[m]: hint: what does this output? `echo high(int64) - low(int64)`
17:40:05Zoom[m]Same?
17:40:12narimiranyep
17:40:31*junland joined #nim
17:41:16narimiranZoom[m]: use `rand(int64)` if you want the whole int64 range
17:42:27hmmmmmis there some vscode thingy to call nimpretty
17:42:49narimiranhmmmmm: yes, integrated terminal
17:43:07hmmmmm:|
17:43:24hmmmmmsomething like call nimpretty on save?
17:43:55narimiranprobably. i don't use vscode, but somebody might know how to do it
17:44:05hmmmmmok thanks nari :>
17:52:58FromDiscord<ProfessorEevee> narimiran: If not VSCode, what do you use?
17:57:37narimiranneovim
17:58:04narimiranwith this great plugin by leorize: https://github.com/alaviss/nim.nvim
18:01:33Zoom[m]narimiran: Could you take a look at my reverse iterator for BTree?
18:01:46Zoom[m]https://play.nim-lang.org/#ix=2Fs2
18:02:01Zoom[m]I posted a version yesterday but it was utterly broken
18:21:03narimiranZoom[m]: oooh, i can take a look, but i can't promise anything since i already forgot the logic i've written :)
18:22:48*junland quit (Quit: %ZNC Disconnected%)
18:25:42*junland joined #nim
18:27:04Zevvjust move the st
18:27:23Zevvuff into a seq, call reversed() and iterate. much easier
18:27:33Zevvall that hard work!
18:28:25FromDiscord<ProfessorEevee> So uh. How does one append to a list?
18:28:41Zevv.add()
18:29:25Zoom[m]Zevv: this is a workaround, we have an iterator and a structure which allows iterating both ways = it needs to be done.
18:30:19Zoom[m]narimiran: There's amazing writeup on old version of Rust's BTreeMap here: http://cglab.ca/~abeinges/blah/rust-btree-case/
18:30:29*junland quit (Client Quit)
18:30:45narimiranbut then i need to read rust code
18:31:15*junland joined #nim
18:31:23Zoom[m]Nah, it explains the basic reasoning in designing it pretty well
18:31:59FromDiscord<ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2Fsc
18:32:07FromDiscord<ProfessorEevee> Is this not how it works? \🤔
18:32:31narimiranyes
18:32:42narimiranbut your `people` is an array, not a seq
18:32:51FromDiscord<ProfessorEevee> uhhh
18:32:53narimiran`var people = @[j, m]` -- notice `@`
18:33:18Zoom[m]I couldn't write a better version than what you have, of course, but I can theorize a bit :)
18:33:54narimiranZoom[m]: i think there is a large room for improvement in my version
18:34:51FromDiscord<ProfessorEevee> Ayy that worked. thanks for the help
18:35:03Zoom[m]Should I prepare a PR to fusion if this iter works?
18:38:19disrupteksmells like someone needs a shower.
18:39:12disruptekdo we really need the forum updater bot in #nim?
18:39:27narimirani like it
18:39:46disruptekaren't you in news?
18:40:03disruptek~news
18:40:04disbotnews: 11the #nim-news channel has a Nim news feed of updates to pull requests, issues, and packages. The bot also broadcasts ix.io -> playground URLs here automatically. -- disruptek
18:40:12narimirannope
18:40:30disruptekalright. i can ignore it.
18:42:35Zoom[m]narimiran: isn't `if not child.isNil: while not child.isNil:` redundant?
18:43:15narimiranwhere's that?
18:43:19disruptekcheck for else and change it to a named block.
18:44:53Zoom[m]It's in your code, Next
18:45:14disrupteknarimiran's getting an audit. 🍿
18:45:26Zoom[m]Line 636
18:45:33narimiranremember when i said: "Zoom[m]: i think there is a large room for improvement in my version"? :)
18:45:52Zoom[m]Yeah, I just checking if I don't get something.
18:45:59narimiranyeah, that line looks redundant
18:46:49Zoom[m]As you could have noticed, I'm pretty capable of not understanding simple thing
18:47:04narimiranthat makes two of us
18:47:16disruptekwait, let's get dom96 in here.
18:50:34Zoom[m]From what I understood, in the grand scheme of things, it may be beneficial to separate keys, values and pointers. This could speed search up
18:52:23Zoom[m]And that p0 is only complicating things, as it needs to be treated separately throughout the code
18:52:57Zoom[m] * And that p0 is only complicating things, as it needs to be treated conditionally throughout the code
18:56:30hmmmmmhey what is the inverse of $
18:56:35hmmmmmfrom number to string
18:56:55narimiranparseInt
18:58:11hmmmmmthat looks like it
18:58:13hmmmmmty nari
19:03:19disruptekhmm, maybe the forum updater only posts new threads here. that makes some kinda sense.
19:03:33narimirandisruptek: it is exactly like that
19:03:44*lritter quit (Ping timeout: 260 seconds)
19:08:10ForumUpdaterBotNew thread by Treeform: Is there an easy way to bake in parameters at compile time?, see https://forum.nim-lang.org/t/7155
19:12:48*hmmmmm quit (Remote host closed the connection)
19:13:52FromDiscord<inv> newSeq[int]().foldl(a+b) => Exception. WTF?
19:14:33FromDiscord<inv> (edit) removed "WTF?"
19:14:46FromDiscord<inv> Ah, no monoids here
19:24:55disruptekZoom[m]: if you can make SortedTable.getOrDefault() faster than a Table.getOrDefault() then i'll be very happy.
19:26:19Zoom[m]I very much doubt it, unless there's some low-hanging fruit there, but then why would you need me?
19:27:38disruptekwhat, you think i'm smarter than you?
19:28:09disruptekshouldn't a sorted table be faster to search than an unsorted table?
19:33:21*hmmm joined #nim
19:35:05*bung quit (Ping timeout: 240 seconds)
19:35:45*j-james joined #nim
19:35:55Zoom[m]I'm not even 100% sure which tables you're talking about, so I'm pretty sure about it :P
19:38:20FromDiscord<AmjadHD> Hi, Is it a good idea for inim to use nimscript instead of compiling and running statements every time ?
19:39:05disrupteki thought you were working on miran's sorta package.
19:41:35leorize@AmjadHD no, nimscript is limited in terms of what you can do
19:41:55leorizebasically anything C FFI won't work
19:42:45FromDiscord<AmjadHD> Yeah I'm aware of that, but I'd argue that typically you'll not use such things in a REPL
19:42:49j-jamesIs there a nice way to regex replace strings one at a time?
19:43:10FromDiscord<AmjadHD> Text editor
19:43:13FromDiscord<AmjadHD> ?
19:43:31leorize@AmjadHD apparently you do, which is why inim exists. For the nimscript-only case we got `nim secret`.
19:44:01FromDiscord<Imperatorn> Binary search is always faster if sorted?
19:45:14j-jamesImperatorn: I'll take a look at that
19:45:19hmmmhey is there a faster way to set an argument as variable inside a proc without needing to manually do something like var foo : int = foo
19:45:50narimiranyeah, omitting `: int` part will be faster
19:46:09disruptekomit the value, too.
19:46:25FromDiscord<AmjadHD> WOW, wasn't aware of that, it's even faster than inim. so that's using the VM (and not compiling) ?
19:47:04leorizeyes
19:47:27FromDiscord<AmjadHD> why is it called `secret`
19:47:30FromDiscord<AmjadHD> ?
19:47:37disruptekwe're not supposed to tell you.
19:48:17*j-james quit (Remote host closed the connection)
19:48:36mipribecause giving it any name that drew attention to it would draw nothing but complaints about how it isn't more like inim
19:49:06FromDiscord<Imperatorn> What do you mean replace regex one at a time? @j-james
19:49:14FromDiscord<Imperatorn> Like in groups or just sequential?
19:49:29Zoom[m]disruptek: no, I'm looking at what's in fusion, but thet are authored by narimiran. I'm not sure how different they are, though
19:49:45narimiranZoom[m]: it is the same as `sorta`
19:50:01disruptekfusion is for chumps.
19:50:04narimiranonly generic names are changed to be more like it is for stdlib Table
19:52:56FromDiscord<AmjadHD> So is this `nim secret` a prototype ? that is meant to be improved and eventually exposed to the public ?
19:53:30miprino. otherwise it would given a name that would draw nothing but complaints, so that the complaints could be addresse.d
19:56:46PrestigeHow can I pass an iterator to a function?
19:56:59disrupteksupply it as a parameter.
19:57:12FromDiscord<AmjadHD> but I don't see what's so special about inim, that you think that "it would draw nothing but complaints about how it isn't more like inim" ?
19:57:17PrestigeI was trying something like this: https://play.nim-lang.org/#ix=2FsW
19:57:49disruptekwell, that's not the correct signature for the values iterator.
19:57:54mipriinim works very well and nim secret doesn't at all. I think any but the most trivial interaction should show that.
19:58:48leorizeimport times; let time = getTime() <- run that on nim secret
19:59:11Prestigedisruptek: you mean proc foo's signature is incorrect?
19:59:18disruptekyes.
19:59:28PrestigeIdk what's incorrect about it
19:59:35narimiranx
19:59:50disruptekpretty sure values takes a table.
20:00:22disruptekimmaculate iteration is something that only happens in stories of faith.
20:03:15PrestigeWell I tried changing it, but can't figure out what's missing: https://play.nim-lang.org/#ix=2FsZ
20:03:33disruptekwhat are you trying to do?
20:03:49PrestigeI want foo to be given an iterator it can use
20:03:58narimiranPrestige: this works: https://play.nim-lang.org/#ix=2Ft0
20:06:07PrestigeSo I have to write my own iterator that will just iterate over the tables values? I can't use the Table `values` iterator?
20:06:22disruptekyou can, chucklehead.
20:06:23narimiranyou need closure iterator. `values` is not that
20:06:36disruptekyes, but he can wrap it.
20:07:03PrestigeYeah, I can wrap it, but I can't just use it directly
20:07:08*superbia joined #nim
20:07:13*habamax quit (Ping timeout: 265 seconds)
20:09:03PrestigeUnfortunate if that's the case
20:09:23disruptekwhy?
20:09:27disruptekwho gives a shit?
20:09:32PrestigeMe
20:09:41miprithat's the case. closure iterators are first class; inline iterators are inline. Most iterators that you run into will be inline.
20:09:42disrupteki mean, important people.
20:10:32PrestigeWould be nice if there were a simple way to create a closure iterator from an inline iterator
20:10:44disruptekhow much simpler could it be?
20:10:53PrestigeKeep running into this issue, it's cumbersome
20:11:19disruptekwell, +1 to separating them with a keyword, but that won't happen.
20:11:26disruptekso just write the macro.
20:14:19ForumUpdaterBotNew thread by HJarausch: Recursive iterators - is there a recommend workaround? , see https://forum.nim-lang.org/t/7156
20:16:41*superbia quit (Quit: WeeChat 2.9)
20:17:03*jeko joined #nim
20:25:28*narimiran quit (Ping timeout: 272 seconds)
20:27:15*thomasross joined #nim
20:33:01*jeko quit (Quit: Leaving)
20:36:26Zoom[m]By the way, narimiran , I was asking about concepts earlier because I don't see much point in making serious changes to containers if such things are really in the works: https://github.com/nim-lang/Nim/blob/devel/tests/concepts/tmapconcept.nim
20:36:46*CcxWrk quit (Quit: ZNC 1.7.4 - https://znc.in)
20:38:12*CcxWrk joined #nim
20:41:50*Kaivo quit (Quit: WeeChat 2.9)
20:42:11*Kaivo joined #nim
20:45:54*Kaivo quit (Client Quit)
20:46:19*Kaivo joined #nim
20:48:19*solitudesf joined #nim
20:48:34*solitudesf quit (Remote host closed the connection)
21:05:53planetis[m]wtf !? https://play.nim-lang.org/#ix=2Fto
21:05:59planetis[m]am i using assert wrong?
21:06:51planetis[m]oh shit am dumb
21:08:07*nixfreak quit (Ping timeout: 246 seconds)
21:18:37*CcxWrk quit (Ping timeout: 246 seconds)
21:19:56*CcxWrk joined #nim
21:21:49miprithat's a pretty confusing error message though
21:28:25*CcxWrk quit (Read error: Connection reset by peer)
21:29:44*CcxWrk joined #nim
21:31:13*hmmm quit (Ping timeout: 246 seconds)
21:35:58*nixfreak joined #nim
21:36:38nixfreakError: type mismatch: got <tuple[socket: AsyncSocket, netAddr: string, id: int, connected: bool]> but expected 'Client = ref Client:ObjectType'
21:36:52nixfreakgetting error , going though nim in action
21:40:32mipriplease ask the question like it's in your own code. because of course it might be, even if you're intending to closely follow the book.
21:42:24nixfreakI post the code
21:42:37nixfreakany paste works ?
21:43:26miprihttps://play.nim-lang.org/ is pretty good
21:43:45miprithe share link at the bottom left is what I mostly see in here
21:44:57nixfreakhttp://sprunge.us/p3bdva
21:46:43miprithe problem is the space before the parameters to Client, on line 35
21:47:01mipri!eval echo(1, 2)
21:47:04NimBot12
21:47:06mipri!eval echo (1, 2)
21:47:09NimBot(1, 2)
21:47:21mipriif there's a space you're passing a single tuple
21:47:59mipriah that error message makes a lot more sense now
21:48:28nixfreakwow very cool thanks
21:48:42nixfreaki'm using nvim didn't even see it
21:52:18FromDiscord<j-james> @Imperatorn My use case is to go through an HTML document and replace `` and `_` with their respective tags
21:52:28FromDiscord<j-james> Because there could be a stray `` in a chunk of text, the straightforward method of `replace(html, re(" \"), " <strong>"` and similar doesn't work
21:52:47FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2FtJ
21:53:27FromDiscord<j-james> (sorry, poor timing for me to go afk earlier btw)
21:59:53*nixfreak_ joined #nim
22:03:20*nixfreak quit (Ping timeout: 260 seconds)
22:11:14*nixfreak_ quit (Quit: leaving)
22:18:06*hmmm joined #nim
22:20:29FromDiscord<For Your Health> Can someone explain to me the reason to use a semicolon in a proc argument list? I can't seem to find any info on that.
22:23:29hmmmoh nice if we asking things why we define procs with the "="
22:23:58disruptekbecause to omit it is to define a prototype.
22:24:06hmmm:o
22:24:22disruptekhealth: semicolons cannot be mistaken for , by humans or computers.
22:25:04disruptekso proc foo(a, b: string; c: int) is easier to parse than foo(a, b: string, c: int)
22:25:16miprithere are only 9 occurrences of 'semicolon' in the manual; look at those and you'll find two reasons to use it.
22:25:46disrupteksee `using`, for one.
22:28:04FromDiscord<For Your Health> I see, thanks! I hadn't seen that section in the manual.
22:28:42*natrys quit (Quit: natrys)
22:50:44*lritter joined #nim
23:14:16*Vladar quit (Quit: Leaving)
23:33:43*leorize quit (Ping timeout: 240 seconds)
23:51:25*leorize joined #nim
23:55:30*hmmm quit ()
23:55:31*vicfred quit (Quit: Leaving)
23:55:50*bung joined #nim
23:57:51FromDiscord<cabboose> Hey @ElegantBeef turns out you were right; the issue was that my dev computer had MySQL with all its dependencies for the libmysql installed which included the ssl and crypt libraries
23:58:30FromDiscord<cabboose> Nim wouldn’t have any complaints since libmysql was dynamically linked and nim has its own ssl
23:59:25FromDiscord<cabboose> I used an application called Dependency Walker to see which dependencies were not available on the client computers compared to the dev computer and packaged the missing dependencies
23:59:29FromDiscord<cabboose> Thanks for your help!