| 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:12 | FromDiscord | <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:33 | FromDiscord | <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:46 | FromDiscord | <Quantum> what does it do? it doesn't seem to generate anything when I call it |
| 03:55:10 | disruptek | nim --fullhelp | grep app |
| 03:55:20 | disruptek | --app:console|gui|lib|staticlib |
| 03:55:21 | disruptek | generate a console app|GUI app|DLL|static library |
| 03:56:02 | FromDiscord | <Quantum> I saw that, I doesn't really do much when calling ↵> nim --app:gui↵returns an error |
| 03:56:56 | disruptek | it'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:26 | FromDiscord | <Quantum> ohhhhh, I thought is was like a project generation command |
| 03:57:28 | disruptek | you need to use it along with another compilation command, like `c`. |
| 03:57:37 | FromDiscord | <Quantum> ok that makes more sense |
| 04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
| 04:06:35 | * | supakeen joined #nim |
| 04:11:20 | FromDiscord | <ProfessorEevee> Is there a way to implement like a "Press any key to exist" in Nim? |
| 04:11:53 | FromDiscord | <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:56 | FromDiscord | <ElegantBeef> for a CLI? |
| 04:21:22 | FromDiscord | <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:45 | FromDiscord | <cabboose> Both are 64 bit systems with 64 bit dyn library |
| 04:22:04 | FromDiscord | <cabboose> My dev is amd and the client is intel |
| 04:22:07 | FromDiscord | <ElegantBeef> @ProfessorEevee you probably want to use `getCh` from the `terminal` module if that's the case |
| 04:22:19 | FromDiscord | <cabboose> However I tried compiling on a intel dev computer with the same outcome |
| 04:23:29 | FromDiscord | <ProfessorEevee> Yep, this is exactly what I was looking for. Thank you! |
| 04:23:34 | FromDiscord | <ElegantBeef> No problem |
| 04:26:02 | FromDiscord | <ElegantBeef> @cabboose you are copying the .dll over and it's next to the exe? |
| 04:26:09 | FromDiscord | <cabboose> Yes |
| 04:26:41 | FromDiscord | <cabboose> Added the dir to the user path manually too |
| 04:28:07 | FromDiscord | <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:28 | FromDiscord | <cabboose> Hmmm but the odd thing is that when I compile it on another system it fails again |
| 04:30:42 | FromDiscord | <cabboose> Could there be requirements that aren’t fulfilled for the dynamic library? |
| 04:31:12 | FromDiscord | <ElegantBeef> What modules are you using? |
| 04:32:25 | FromDiscord | <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:29 | FromDiscord | <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:46 | FromDiscord | <cabboose> Ah that could be it |
| 04:34:41 | FromDiscord | <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:44 | FromDiscord | <ElegantBeef> It should complain about missing stuff |
| 04:34:48 | FromDiscord | <cabboose> I’ll have a crack at that |
| 04:34:55 | FromDiscord | <ElegantBeef> Have you not ran it in terminal to see the output? |
| 04:35:16 | FromDiscord | <cabboose> Yeah; just says “can not load libmysql|libmariadb” |
| 04:35:42 | FromDiscord | <ElegantBeef> Then afaik the SSL isnt the issue 😛 |
| 04:36:40 | FromDiscord | <cabboose> Looking at MySQL documentation for the library, the issue might be as simple as not having the correct Visual C redistributable |
| 04:39:21 | FromDiscord | <shad0w> i am gonna get some time on my hands the coming days |
| 04:40:01 | FromDiscord | <shad0w> i was looking into start contributing to the compiler. it'll be a good learning experience i reckon |
| 04:40:39 | FromDiscord | <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:30 | FromDiscord | <shad0w> what would some good resources to get started here? i prefer books over videos if that's relevant ? |
| 04:42:42 | FromDiscord | <cabboose> Well the Visual C redistrib didn’t work |
| 04:42:54 | FromDiscord | <cabboose> I’m just going to chuck every bloody library in the file until it opens |
| 04:42:57 | disruptek | read the source. |
| 04:43:04 | FromDiscord | <cabboose> Brute force |
| 04:45:33 | disruptek | shad0w: https://inf.ethz.ch/personal/wirth/CompilerConstruction/CompilerConstruction1.pdf |
| 04:45:46 | disruptek | and https://inf.ethz.ch/personal/wirth/CompilerConstruction/CompilerConstruction2.pdf |
| 04:46:00 | FromDiscord | <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:32 | FromDiscord | <shad0w> disruptek: just read the introduction and chapter 1 |
| 06:07:57 | FromDiscord | <shad0w> this should be fun |
| 06:08:15 | FromDiscord | <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:54 | bonoboking | is there a reason that slice does not have low/high defined? |
| 06:30:57 | mipri | !eval let r = 1..10; echo (r.a, r.b) |
| 06:31:02 | NimBot | (1, 10) |
| 06:35:49 | * | audiofile joined #nim |
| 06:52:15 | * | a_chou joined #nim |
| 06:52:38 | bung | can I add method to object variant depends on its kind compile time? |
| 06:55:53 | * | a_chou quit (Client Quit) |
| 06:56:34 | mipri | no, you've gotta take the whole object. |
| 06:56:45 | * | narimiran joined #nim |
| 06:57:50 | bung | ok, I guess I may construct a new type for it |
| 07:04:40 | * | bonoboking quit (Ping timeout: 245 seconds) |
| 07:05:37 | FromDiscord | <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:51 | FromDiscord | <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:00 | FromDiscord | <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:16 | FromDiscord | <ElegantBeef> underscores cannot be used as the first token of an identifier |
| 07:06:36 | FromDiscord | <ElegantBeef> Explain what you're doing more |
| 07:07:42 | FromDiscord | <inv> last tokens does not work also |
| 07:07:52 | FromDiscord | <ElegantBeef> What? |
| 07:08:25 | narimiran | yes you cannot have `_foo` nor `foo_` |
| 07:08:27 | FromDiscord | <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:43 | FromDiscord | <ElegantBeef> That's easy, you dont export it |
| 07:08:49 | FromDiscord | <inv> (edit) "obfuscard" => "obfuscated" |
| 07:08:59 | FromDiscord | <ElegantBeef> Nim doesnt have a convention of "dont use" we dont let you use what we dont want you to |
| 07:09:16 | FromDiscord | <inv> I cannot not export - it is not Nim, it is nimpy export |
| 07:09:30 | FromDiscord | <ElegantBeef> If it's not nim i cannot help |
| 07:09:50 | FromDiscord | <inv> ok, it is Nim, but it is export from nimpi |
| 07:09:55 | FromDiscord | <inv> (edit) "nimpi" => "nimpy" |
| 07:10:00 | FromDiscord | <inv> (edit) "ok, it is Nim, but it is export from nimpy ... " added "🙂" |
| 07:10:14 | FromDiscord | <inv> (edit) "ok, it is Nim, but it is export from nimpy 🙂 ... " added " ... into python's module" |
| 07:10:18 | FromDiscord | <nikki> just use some prefix or suffix like "internal" if you really need to? |
| 07:10:36 | FromDiscord | <ElegantBeef> `dontFuckingTouch_ThisProc` |
| 07:10:44 | FromDiscord | <nikki> pretty much |
| 07:46:57 | FromDiscord | <lqdev> i just add a prefix IMPL_ and add a `## Do not use this.` doc comment |
| 07:48:44 | * | PMunch joined #nim |
| 08:14:11 | FromDiscord | <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:05 | FromDiscord | <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:42 | FromDiscord | <inv> did not know about the name for export, looks perfect. Thank you! |
| 09:17:48 | FromDiscord | <inv> Strange, it works, but does not work for fn 🙂 |
| 09:18:12 | FromDiscord | <inv> (edit) "works," => "works for fn," |
| 09:18:34 | FromDiscord | <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:43 | FromDiscord | <inv> (edit) "https://play.nim-lang.org/#ix=2Fpl" => "https://play.nim-lang.org/#ix=2Fpn" |
| 09:20:10 | FromDiscord | <pietroppeter> just tried and works for me |
| 09:23:37 | FromDiscord | <pietroppeter> https://gist.github.com/pietroppeter/5c6f24ddaf2d7bdcac23fcfdbede3067 |
| 09:23:50 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
| 09:35:27 | FromDiscord | <inv> hm |
| 09:37:23 | hmmmmm | yes? |
| 09:37:31 | FromDiscord | <ElegantBeef> No |
| 09:56:16 | ForumUpdaterBot | New 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:50 | FromDiscord | <ProfessorEevee> Is there a way to clear a terminal in Nim? |
| 09:59:10 | PMunch | This should work: https://nim-lang.org/docs/terminal.html#eraseScreen.t |
| 10:00:52 | FromDiscord | <ProfessorEevee> it did, but... not exactly how I wanted |
| 10:02:05 | FromDiscord | <ProfessorEevee> Never mind, I forgot to set the cursor pos to 0,0 |
| 10:02:08 | FromDiscord | <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:09 | FromDiscord | <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:43 | FromDiscord | <ProfessorEevee> I keep getting `Error: undeclared identifier: 'addExitProc'` :c |
| 10:36:48 | Zevv | import std/exitprocs |
| 10:37:58 | FromDiscord | <lqdev> we really gotta start adding std/ to all imports in docs |
| 10:38:27 | Zevv | it was never clear to me what goes in std and what does not |
| 10:40:37 | FromDiscord | <ProfessorEevee> ah, I had tried importing std directly but that did not work |
| 10:40:54 | FromDiscord | <ProfessorEevee> I couldn't find that anywhere in the docs, I was so confused |
| 10:42:13 | Zevv | you should be |
| 10:45:01 | FromDiscord | <ProfessorEevee> Well at first I thought it was by default imported because `import std` didn't work |
| 10:45:17 | FromDiscord | <ProfessorEevee> which I only got from looking at the source code |
| 10:46:03 | FromDiscord | <ProfessorEevee> Then I thought "Hey, maybe it's a nimble package". That wasn't it either |
| 10:46:35 | Zevv | Usually 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:57 | FromDiscord | <ProfessorEevee> also for some reason, I can't do `addExitProc(showCursor)` |
| 10:48:59 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FpH |
| 10:56:20 | FromDiscord | <lqdev> @ProfessorEevee please read zevv's message again and rethink what you're doing. |
| 10:56:27 | FromDiscord | <lqdev> > import std/exitprocs |
| 10:56:36 | FromDiscord | <ProfessorEevee> Oh, I already got that part working |
| 10:56:44 | FromDiscord | <ProfessorEevee> I should've clarified, sorry |
| 10:56:48 | FromDiscord | <lqdev> ah right |
| 10:57:07 | FromDiscord | <lqdev> now, i suppose showCursor is a template? |
| 10:57:33 | FromDiscord | <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:48 | FromDiscord | <lqdev> oh righty |
| 10:57:56 | FromDiscord | <lqdev> showCursor is a template in the terminal module |
| 10:58:03 | FromDiscord | <lqdev> https://nim-lang.org/docs/terminal.html#showCursor.t |
| 10:58:15 | FromDiscord | <lqdev> you'll need to do `addExitProc proc () = showCursor()` |
| 10:59:57 | FromDiscord | <ProfessorEevee> Hmm, that works, although I have no clue how it works lol |
| 11:00:23 | FromDiscord | <lqdev> you see, the `addExitProc` procedure accepts either a `proc () {.closure.}` or `proc () {.noconv.}` |
| 11:00:41 | FromDiscord | <lqdev> so basically it expects a proc without arguments |
| 11:00:53 | FromDiscord | <lqdev> `showCursor` is the only callable without arguments that matches |
| 11:01:02 | FromDiscord | <lqdev> but it seems that the compiler tries to do something weird :p |
| 11:01:07 | FromDiscord | <lqdev> most likely due to a bug |
| 11:01:25 | FromDiscord | <lqdev> anyways, the compiler seems to match `showCursor`, but it's not a proc |
| 11:01:28 | FromDiscord | <lqdev> which trips it up |
| 11:01:36 | FromDiscord | <ProfessorEevee> So what is `proc ()`? Is that some sort of type casting? |
| 11:01:47 | FromDiscord | <lqdev> that's syntax for closures |
| 11:02:03 | FromDiscord | <ProfessorEevee> Ah, yeah I haven't learned about those either |
| 11:02:08 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2FpN |
| 11:02:20 | FromDiscord | <lqdev> a closure is basically a local proc that closes over any enclosing local variables |
| 11:02:39 | FromDiscord | <lqdev> closures are also known as lambdas |
| 11:03:07 | FromDiscord | <ProfessorEevee> I see, how.. confusing and weird |
| 11:03:35 | FromDiscord | <lqdev> well we need that because addExitProc expects a proc and showCursor without arguments is a template |
| 11:03:47 | FromDiscord | <lqdev> so we pass it a proc that simply calls showCursor |
| 11:04:07 | FromDiscord | <ProfessorEevee> Ah I see |
| 11:04:25 | FromDiscord | <ProfessorEevee> So it basically creates a proc from the template? |
| 11:04:33 | FromDiscord | <ProfessorEevee> like a sort of wrap? |
| 11:04:56 | FromDiscord | <lqdev> yeah kind of |
| 11:05:13 | FromDiscord | <lqdev> to be more precise, it creates a proc that calls the template |
| 11:05:49 | FromDiscord | <ProfessorEevee> Yeah, that's what I was thinking |
| 11:06:14 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FpO |
| 11:06:31 | FromDiscord | <ProfessorEevee> I assume it's a similar concept |
| 11:06:38 | FromDiscord | <lqdev> that effectively does the same thing |
| 11:06:47 | FromDiscord | <lqdev> it's just that the closure form is shorter |
| 11:06:56 | FromDiscord | <lqdev> and doesn't pollute your scope with an extra proc |
| 11:07:05 | FromDiscord | <ProfessorEevee> Yeah, makes sense |
| 11:07:14 | FromDiscord | <ProfessorEevee> this of course was just as concept and understanding |
| 11:07:25 | FromDiscord | <lqdev> sure |
| 11:07:42 | FromDiscord | <ProfessorEevee> Alright, that's cool. Weird, but cool |
| 11:11:02 | FromDiscord | <ProfessorEevee> Thank you, by the way |
| 11:15:59 | FromDiscord | <exelotl> on the GBA toolchain (based on gcc) it seems that there's no difference between {.nimcall.} / no annotation, and {.noconv.} |
| 11:16:36 | ForumUpdaterBot | New thread by Domogled: Wonderfully prologue, see https://forum.nim-lang.org/t/7153 |
| 11:16:50 | FromDiscord | <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:54 | FromGitter | <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:02 | FromDiscord | <exelotl> I might be wrong about that though... I haven't tested it thoroughly |
| 11:22:19 | FromDiscord | <lqdev> @HJarausch_gitlab have you tried doing `mapIt(s, it.origin)`? |
| 11:26:38 | FromGitter | <Vindaar> Yep, or just `s.mapIt(it.origin)` of course. `mapIt` does not take an argument for the type |
| 11:27:48 | FromDiscord | <exelotl> I think they looked at the docs and thought "typed" meant a type is expected 😅 |
| 11:29:55 | FromDiscord | <lqdev> oh i didn't notice they added an extra arg |
| 11:31:44 | FromGitter | <HJarausch> Thanks exelotl. It came from a code example from 2014 |
| 11:40:09 | FromGitter | <HJarausch> Sorry; many thanks to lqdev and Vindaar |
| 11:58:10 | FromDiscord | <exelotl> https://media.discordapp.net/attachments/371759389889003532/781126578431197194/90f.png |
| 12:02:20 | FromDiscord | <exelotl> so... confirmed that fastcall doesn't exist on ARM. Should I just remove {.nodecl.} from my code? |
| 12:03:11 | FromDiscord | <exelotl> hypothetically, if there was an x86 GBA, my code would break |
| 12:03:34 | FromDiscord | <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:53 | hmmmmm | hey 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:26 | PMunch | NimLsp and the VSCode plug-in should both have this capability |
| 12:27:33 | PMunch | But it's a bit, uhm, wonky |
| 12:27:51 | hmmmmm | hmm |
| 12:28:02 | hmmmmm | and how do you do it munchie |
| 12:28:31 | hmmmmm | you just go to the source of nigui and poke stuff around? |
| 12:30:14 | PMunch | Uhm, normally it's just tab |
| 12:30:19 | hmmmmm | oh |
| 12:32:23 | FromDiscord | <inv> stupid question: how to get only one value from iterator? Smth like next(it) |
| 12:32:44 | PMunch | Zevv, one feature which would be neat in npeg is passing an enum as a pattern |
| 12:32:54 | Zevv | like how |
| 12:33:20 | PMunch | So I don't have to write ("One" | "Two" | "Three") for enum One, Two, Three |
| 12:34:07 | Zevv | Hmm but then you'd like to capture the enum insteda of the string I guess |
| 12:34:13 | Zevv | and you want to match style-insensitive? |
| 12:34:55 | FromDiscord | <inv> + how to make it.take(10) ? |
| 12:34:58 | hmmmmm | tab didn't work |
| 12:35:07 | PMunch | I 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:08 | hmmmmm | but I see there is a thingy called nimsuggest |
| 12:35:08 | FromDiscord | <inv> (edit) "+ how to make it.take(10) ? ... " added "any package ?" |
| 12:35:59 | PMunch | And I wouldn't want it style-sensitive (at least not by default), but use the stringified value of the enum |
| 12:37:42 | FromDiscord | <Rika> @inv call the iterator to get the next value |
| 12:37:50 | PMunch | @inv you can quite easily do that with closure iterators |
| 12:37:55 | PMunch | A tad harder with normal iterators |
| 12:38:19 | PMunch | hmmmmm, yeah nimsuggest is what the plug-in for VSCode wraps and what nimlsp uses as a library |
| 12:38:49 | Zevv | hm I'm not sure if npeg has access to the enum type, let me see |
| 12:39:02 | hmmmmm | hmm |
| 12:39:13 | hmmmmm | I already have the extension installed |
| 12:39:16 | Zevv | I find this confing |
| 12:39:23 | Zevv | the guy called hmmmmm saying hmm |
| 12:39:31 | FromDiscord | <Rika> hmm |
| 12:39:32 | hmmmmm | :3 |
| 12:45:39 | FromDiscord | <inv> Just found iterutils, but I think `[range]` would be perfect in iterators |
| 12:45:53 | FromDiscord | <inv> (edit) "Thank you.Just found iterutils, but I think `[range]` would be perfect in iterators ... " added "too" |
| 12:45:56 | PMunch | Isn't it annoying to be called hmmmmm? People have to end up highlighting you from time to time :P |
| 12:46:00 | FromDiscord | <inv> (edit) "iterutils," => "iterutils.slice," |
| 12:46:15 | FromDiscord | <inv> hmm |
| 12:47:10 | Zevv | PMunch: I don't know if this can work; npeg is untyped so it does not know about MyEnum being an enum |
| 12:48:45 | PMunch | Ooh, that's unfortunate |
| 12:49:06 | PMunch | How do you do Digit/Alpha/Whitespace and all those? |
| 12:49:22 | FromGitter | <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:18 | PMunch | break? |
| 12:50:19 | hmmmmm | oh we are making progress, with ctrl + t, and @ I can find all the symbols I used in my file |
| 12:51:27 | PMunch | @HJ, that was for you by the way :P |
| 12:51:29 | Zevv | PMunch: https://github.com/zevv/npeg/blob/master/src/npeg/lib/core.nim |
| 12:51:32 | FromDiscord | <Rika> How else would you terminate an iterator early |
| 12:53:02 | PMunch | @Rika, with a block and `break blockname`? |
| 12:53:07 | PMunch | Or wrap it in a proc |
| 12:53:46 | FromDiscord | <Rika> Ah, I see, you mean within an iterator |
| 12:54:02 | FromGitter | <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:30 | Zevv | no, I don't think it can be done. MyEnum is just an ident |
| 12:55:46 | hmmmmm | even more progress if I start typing "set" it lists all the procs that start with "set" that I can use |
| 12:56:07 | PMunch | Oh from within an iterator! |
| 12:56:10 | PMunch | https://play.nim-lang.org/#ix=2Fqd <- this wroks |
| 12:56:12 | PMunch | works* |
| 12:56:25 | PMunch | And if you make it a closure iterator you can use return instead IIRC |
| 12:56:42 | PMunch | Zevv, well that's a shame |
| 12:57:23 | Zevv | so, who are you mad at now. Me? Nim? Ar4q? Or shall we just shame disruptek? |
| 12:57:31 | Zevv | I like that option, because he's not here |
| 12:57:53 | FromGitter | <HJarausch_gitlab> @PMunch Yes, this works, thanks! Though I wouldn't call this this ⏎ principle of least surprise. |
| 12:57:59 | PMunch | Well I mean it's not impossible to do, just impractical |
| 12:58:48 | PMunch | I 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:12 | PMunch | Or just something I could do to create a subparser from an enum before I create the pattern |
| 12:59:40 | PMunch | @HJ, yeah it might look a bit odd. But that whole iterator is a bit odd.. |
| 13:01:29 | hmmmmm | yay got it, I just need to write the start of it like "inputcontainer." and it will suggest the right stuff |
| 13:01:30 | PMunch | I mean you could of course also do it like this: https://play.nim-lang.org/#ix=2Fqk |
| 13:02:04 | Zevv | PMunch: you should be able to make a sub-parser easily |
| 13:02:09 | Zevv | let me show that |
| 13:11:12 | hmmmmm | woa F12 opens the definition in the source |
| 13:11:16 | Zevv | PMunch: https://play.nim-lang.org/#ix=2Fqo |
| 13:12:30 | PMunch | Oh I was more thinking if I could create it outside of `peg`. That way I could write a macro which does it |
| 13:15:45 | FromGitter | <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:06 | Zevv | https://play.nim-lang.org/#ix=2Fqq :) |
| 13:16:49 | PMunch | Hmm, I guess that kinda works.. |
| 13:19:55 | * | hmmmmm quit (Remote host closed the connection) |
| 13:24:48 | FromDiscord | <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:10 | FromDiscord | <ProfessorEevee> Is there an alternative proc for `+`? |
| 14:01:39 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqC |
| 14:02:01 | FromDiscord | <ProfessorEevee> (edit) "https://play.nim-lang.org/#ix=2FqC" => "https://play.nim-lang.org/#ix=2FqD" |
| 14:04:03 | PMunch | Uhm, no |
| 14:04:09 | PMunch | What exactly do you need that for? |
| 14:04:35 | PMunch | I mean you can do "x.`+`(10)" |
| 14:04:50 | PMunch | Oh, that probably looks weird on Discord |
| 14:04:57 | PMunch | That plus is meant to be in backticks |
| 14:05:41 | FromDiscord | <ProfessorEevee> Well, I want to basically override \`x` |
| 14:05:57 | FromDiscord | <ProfessorEevee> but if I do that, I'll run into recursion |
| 14:07:25 | * | Kaivo quit (Ping timeout: 240 seconds) |
| 14:07:26 | FromDiscord | <Rika> What do you mean |
| 14:07:33 | FromDiscord | <Rika> Override? |
| 14:08:31 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqG |
| 14:09:34 | FromDiscord | <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:56 | FromDiscord | <ProfessorEevee> It does, I had tried it |
| 14:10:11 | * | Kaivo joined #nim |
| 14:10:49 | FromDiscord | <Rika> We don’t have an add, we just strop + if we need an “add” |
| 14:11:38 | FromDiscord | <ProfessorEevee> I confused myself a bit |
| 14:12:21 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2FqL |
| 14:15:02 | FromDiscord | <Clyybber> because system.\`+\` matches better |
| 14:16:09 | FromDiscord | <Clyybber> @ProfessorEevee you can try import system except \`+\` :D |
| 14:16:10 | FromDiscord | <Rika> Any is unspecific, system has a proc that is more specific (int, int) than yours (any, any) |
| 14:16:24 | FromDiscord | <Rika> You can? Isn’t system automatically imported |
| 14:16:40 | FromDiscord | <Clyybber> it is, but afair that works |
| 14:16:56 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2FqM |
| 14:17:17 | * | nixfreak joined #nim |
| 14:17:20 | FromDiscord | <exelotl> (edit) "https://play.nim-lang.org/#ix=2FqM" => "https://play.nim-lang.org/#ix=2FqN" |
| 14:17:56 | FromDiscord | <Clyybber> @Rika yep just tested, it works :D |
| 14:18:30 | FromDiscord | <Rika> Interesting |
| 14:18:44 | FromDiscord | <Clyybber> and exelotls works too |
| 14:21:40 | * | nixfreak quit (Ping timeout: 256 seconds) |
| 14:29:12 | FromDiscord | <ProfessorEevee> Ohh, that's great |
| 14:29:19 | FromDiscord | <ProfessorEevee> Thank you guys for the help |
| 14:51:05 | Araq | x.inc(10) |
| 14:53:07 | FromDiscord | <Quantum> when trying to run "nake build" in a project I get the following error |
| 14:53:08 | FromDiscord | <Quantum> Error: cannot open file: os/nim |
| 14:53:33 | FromDiscord | <Quantum> The project is the godot stub for nim |
| 14:53:39 | PMunch | Are you trying to import os.nim? |
| 14:53:45 | FromDiscord | <Quantum> ya |
| 14:54:14 | PMunch | Change that to `import os` |
| 14:54:20 | PMunch | Without the .nim part |
| 14:54:22 | FromDiscord | <Quantum> ok |
| 14:54:29 | Zoom[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:18 | FromDiscord | <Quantum> now I get ↵> Error: cannot open file: std/private/miscdollars |
| 14:55:46 | FromDiscord | <Quantum> wait actually |
| 14:56:25 | FromDiscord | <Quantum> nvm doesn't work |
| 14:57:58 | PMunch | That is more strange |
| 14:58:03 | PMunch | What is your nim version? |
| 14:59:08 | narimiran | Zoom[m]: i wouldn't hold my breath |
| 14:59:11 | FromDiscord | <Quantum> sent a long message, see http://ix.io/2Fr4 |
| 15:01:23 | Zoom[m] | narimiran: I won't, just interested in status and overall thoughts. I'll go read on RFCs on GH first, though |
| 15:01:55 | PMunch | @Quantum, that file didn't exist in 1.2 |
| 15:01:58 | PMunch | Try upgrading your Nim |
| 15:02:09 | PMunch | But why are you trying to import that anyways? |
| 15:03:04 | FromDiscord | <Quantum> I'm currently at the newest version in the ubuntu repos so I'll have to build from source one sec |
| 15:03:30 | PMunch | You should try choosenim |
| 15:04:13 | FromDiscord | <lqdev> ^ |
| 15:04:20 | FromDiscord | <lqdev> ubuntu repos suck tbh |
| 15:04:29 | * | waleee-cl joined #nim |
| 15:04:36 | FromDiscord | <zetashift> @Zoom[Matrix] https://github.com/nim-lang/Nim/pull/15251#issuecomment-726113404 |
| 15:04:37 | disbot | ➥ new-style concepts implementation, WIP |
| 15:05:06 | FromDiscord | <Quantum> What's choosenim? |
| 15:05:20 | narimiran | i thought ubuntu had 1.4.0? |
| 15:05:44 | FromDiscord | <Quantum> I'm on pop os which uses the ubuntu repos, at least I thought it did |
| 15:06:26 | Zoom[m] | @zetashift, thanks, missed that one, there's a bunch of interesting stuff in #13, #167 and #12048 also. |
| 15:06:29 | disbot | https://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:36 | PMunch | Choosenim is a program that allows you to quickly and easily update Nim and switch between versions |
| 15:06:58 | PMunch | I think it is in the Ubuntu repos |
| 15:07:04 | narimiran | https://repology.org/project/nim/versions |
| 15:07:11 | narimiran | debian has 1.4, ubuntu doesn't |
| 15:07:23 | FromDiscord | <lqdev> the ubuntu state of mind, folks. |
| 15:07:44 | FromDiscord | <lqdev> `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` |
| 15:08:39 | FromDiscord | <Quantum> thanks |
| 15:08:45 | FromDiscord | <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:13 | ForumUpdaterBot | New 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:58 | hmmmmm | hallo :> |
| 15:50:26 | * | filpAM quit (Remote host closed the connection) |
| 15:54:32 | leorize | hi :) |
| 15:56:31 | FromDiscord | <zetashift> hiya |
| 16:01:41 | * | junland joined #nim |
| 16:02:48 | * | aenesidemus joined #nim |
| 16:03:32 | FromGitter | <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:36 | narimiran | !matrix |
| 16:21:44 | narimiran | ~matrix |
| 16:21:44 | disbot | matrix: 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:17 | narimiran | ah, 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:58 | FromDiscord | <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:23 | FromDiscord | <zetashift> also ironically it has one of the most views haha |
| 16:41:43 | * | vicfred joined #nim |
| 16:42:24 | FromDiscord | <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:58 | FromDiscord | <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:15 | FromDiscord | <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:10 | Zoom[m] | Hm, why does rand overflow on int64? |
| 17:31:20 | Zoom[m] | If I use a slice as an arg |
| 17:31:53 | narimiran | Zoom[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:11 | Zoom[m] | I look at the source of rand (line 366) and I don't see much difference |
| 17:35:45 | Zoom[m] | https://play.nim-lang.org/#ix=2FrS |
| 17:35:55 | * | bung joined #nim |
| 17:37:47 | narimiran | Zoom[m]: hint: what does this output? `echo high(int64) - low(int64)` |
| 17:40:05 | Zoom[m] | Same? |
| 17:40:12 | narimiran | yep |
| 17:40:31 | * | junland joined #nim |
| 17:41:16 | narimiran | Zoom[m]: use `rand(int64)` if you want the whole int64 range |
| 17:42:27 | hmmmmm | is there some vscode thingy to call nimpretty |
| 17:42:49 | narimiran | hmmmmm: yes, integrated terminal |
| 17:43:07 | hmmmmm | :| |
| 17:43:24 | hmmmmm | something like call nimpretty on save? |
| 17:43:55 | narimiran | probably. i don't use vscode, but somebody might know how to do it |
| 17:44:05 | hmmmmm | ok thanks nari :> |
| 17:52:58 | FromDiscord | <ProfessorEevee> narimiran: If not VSCode, what do you use? |
| 17:57:37 | narimiran | neovim |
| 17:58:04 | narimiran | with this great plugin by leorize: https://github.com/alaviss/nim.nvim |
| 18:01:33 | Zoom[m] | narimiran: Could you take a look at my reverse iterator for BTree? |
| 18:01:46 | Zoom[m] | https://play.nim-lang.org/#ix=2Fs2 |
| 18:02:01 | Zoom[m] | I posted a version yesterday but it was utterly broken |
| 18:21:03 | narimiran | Zoom[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:04 | Zevv | just move the st |
| 18:27:23 | Zevv | uff into a seq, call reversed() and iterate. much easier |
| 18:27:33 | Zevv | all that hard work! |
| 18:28:25 | FromDiscord | <ProfessorEevee> So uh. How does one append to a list? |
| 18:28:41 | Zevv | .add() |
| 18:29:25 | Zoom[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:19 | Zoom[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:45 | narimiran | but then i need to read rust code |
| 18:31:15 | * | junland joined #nim |
| 18:31:23 | Zoom[m] | Nah, it explains the basic reasoning in designing it pretty well |
| 18:31:59 | FromDiscord | <ProfessorEevee> sent a code paste, see https://play.nim-lang.org/#ix=2Fsc |
| 18:32:07 | FromDiscord | <ProfessorEevee> Is this not how it works? \🤔 |
| 18:32:31 | narimiran | yes |
| 18:32:42 | narimiran | but your `people` is an array, not a seq |
| 18:32:51 | FromDiscord | <ProfessorEevee> uhhh |
| 18:32:53 | narimiran | `var people = @[j, m]` -- notice `@` |
| 18:33:18 | Zoom[m] | I couldn't write a better version than what you have, of course, but I can theorize a bit :) |
| 18:33:54 | narimiran | Zoom[m]: i think there is a large room for improvement in my version |
| 18:34:51 | FromDiscord | <ProfessorEevee> Ayy that worked. thanks for the help |
| 18:35:03 | Zoom[m] | Should I prepare a PR to fusion if this iter works? |
| 18:38:19 | disruptek | smells like someone needs a shower. |
| 18:39:12 | disruptek | do we really need the forum updater bot in #nim? |
| 18:39:27 | narimiran | i like it |
| 18:39:46 | disruptek | aren't you in news? |
| 18:40:03 | disruptek | ~news |
| 18:40:04 | disbot | news: 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:12 | narimiran | nope |
| 18:40:30 | disruptek | alright. i can ignore it. |
| 18:42:35 | Zoom[m] | narimiran: isn't `if not child.isNil: while not child.isNil:` redundant? |
| 18:43:15 | narimiran | where's that? |
| 18:43:19 | disruptek | check for else and change it to a named block. |
| 18:44:53 | Zoom[m] | It's in your code, Next |
| 18:45:14 | disruptek | narimiran's getting an audit. 🍿 |
| 18:45:26 | Zoom[m] | Line 636 |
| 18:45:33 | narimiran | remember when i said: "Zoom[m]: i think there is a large room for improvement in my version"? :) |
| 18:45:52 | Zoom[m] | Yeah, I just checking if I don't get something. |
| 18:45:59 | narimiran | yeah, that line looks redundant |
| 18:46:49 | Zoom[m] | As you could have noticed, I'm pretty capable of not understanding simple thing |
| 18:47:04 | narimiran | that makes two of us |
| 18:47:16 | disruptek | wait, let's get dom96 in here. |
| 18:50:34 | Zoom[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:23 | Zoom[m] | And that p0 is only complicating things, as it needs to be treated separately throughout the code |
| 18:52:57 | Zoom[m] | * And that p0 is only complicating things, as it needs to be treated conditionally throughout the code |
| 18:56:30 | hmmmmm | hey what is the inverse of $ |
| 18:56:35 | hmmmmm | from number to string |
| 18:56:55 | narimiran | parseInt |
| 18:58:11 | hmmmmm | that looks like it |
| 18:58:13 | hmmmmm | ty nari |
| 19:03:19 | disruptek | hmm, maybe the forum updater only posts new threads here. that makes some kinda sense. |
| 19:03:33 | narimiran | disruptek: it is exactly like that |
| 19:03:44 | * | lritter quit (Ping timeout: 260 seconds) |
| 19:08:10 | ForumUpdaterBot | New 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:52 | FromDiscord | <inv> newSeq[int]().foldl(a+b) => Exception. WTF? |
| 19:14:33 | FromDiscord | <inv> (edit) removed "WTF?" |
| 19:14:46 | FromDiscord | <inv> Ah, no monoids here |
| 19:24:55 | disruptek | Zoom[m]: if you can make SortedTable.getOrDefault() faster than a Table.getOrDefault() then i'll be very happy. |
| 19:26:19 | Zoom[m] | I very much doubt it, unless there's some low-hanging fruit there, but then why would you need me? |
| 19:27:38 | disruptek | what, you think i'm smarter than you? |
| 19:28:09 | disruptek | shouldn'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:55 | Zoom[m] | I'm not even 100% sure which tables you're talking about, so I'm pretty sure about it :P |
| 19:38:20 | FromDiscord | <AmjadHD> Hi, Is it a good idea for inim to use nimscript instead of compiling and running statements every time ? |
| 19:39:05 | disruptek | i thought you were working on miran's sorta package. |
| 19:41:35 | leorize | @AmjadHD no, nimscript is limited in terms of what you can do |
| 19:41:55 | leorize | basically anything C FFI won't work |
| 19:42:45 | FromDiscord | <AmjadHD> Yeah I'm aware of that, but I'd argue that typically you'll not use such things in a REPL |
| 19:42:49 | j-james | Is there a nice way to regex replace strings one at a time? |
| 19:43:10 | FromDiscord | <AmjadHD> Text editor |
| 19:43:13 | FromDiscord | <AmjadHD> ? |
| 19:43:31 | leorize | @AmjadHD apparently you do, which is why inim exists. For the nimscript-only case we got `nim secret`. |
| 19:44:01 | FromDiscord | <Imperatorn> Binary search is always faster if sorted? |
| 19:45:14 | j-james | Imperatorn: I'll take a look at that |
| 19:45:19 | hmmm | hey 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:50 | narimiran | yeah, omitting `: int` part will be faster |
| 19:46:09 | disruptek | omit the value, too. |
| 19:46:25 | FromDiscord | <AmjadHD> WOW, wasn't aware of that, it's even faster than inim. so that's using the VM (and not compiling) ? |
| 19:47:04 | leorize | yes |
| 19:47:27 | FromDiscord | <AmjadHD> why is it called `secret` |
| 19:47:30 | FromDiscord | <AmjadHD> ? |
| 19:47:37 | disruptek | we're not supposed to tell you. |
| 19:48:17 | * | j-james quit (Remote host closed the connection) |
| 19:48:36 | mipri | because giving it any name that drew attention to it would draw nothing but complaints about how it isn't more like inim |
| 19:49:06 | FromDiscord | <Imperatorn> What do you mean replace regex one at a time? @j-james |
| 19:49:14 | FromDiscord | <Imperatorn> Like in groups or just sequential? |
| 19:49:29 | Zoom[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:45 | narimiran | Zoom[m]: it is the same as `sorta` |
| 19:50:01 | disruptek | fusion is for chumps. |
| 19:50:04 | narimiran | only generic names are changed to be more like it is for stdlib Table |
| 19:52:56 | FromDiscord | <AmjadHD> So is this `nim secret` a prototype ? that is meant to be improved and eventually exposed to the public ? |
| 19:53:30 | mipri | no. otherwise it would given a name that would draw nothing but complaints, so that the complaints could be addresse.d |
| 19:56:46 | Prestige | How can I pass an iterator to a function? |
| 19:56:59 | disruptek | supply it as a parameter. |
| 19:57:12 | FromDiscord | <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:17 | Prestige | I was trying something like this: https://play.nim-lang.org/#ix=2FsW |
| 19:57:49 | disruptek | well, that's not the correct signature for the values iterator. |
| 19:57:54 | mipri | inim works very well and nim secret doesn't at all. I think any but the most trivial interaction should show that. |
| 19:58:48 | leorize | import times; let time = getTime() <- run that on nim secret |
| 19:59:11 | Prestige | disruptek: you mean proc foo's signature is incorrect? |
| 19:59:18 | disruptek | yes. |
| 19:59:28 | Prestige | Idk what's incorrect about it |
| 19:59:35 | narimiran | x |
| 19:59:50 | disruptek | pretty sure values takes a table. |
| 20:00:22 | disruptek | immaculate iteration is something that only happens in stories of faith. |
| 20:03:15 | Prestige | Well I tried changing it, but can't figure out what's missing: https://play.nim-lang.org/#ix=2FsZ |
| 20:03:33 | disruptek | what are you trying to do? |
| 20:03:49 | Prestige | I want foo to be given an iterator it can use |
| 20:03:58 | narimiran | Prestige: this works: https://play.nim-lang.org/#ix=2Ft0 |
| 20:06:07 | Prestige | So 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:22 | disruptek | you can, chucklehead. |
| 20:06:23 | narimiran | you need closure iterator. `values` is not that |
| 20:06:36 | disruptek | yes, but he can wrap it. |
| 20:07:03 | Prestige | Yeah, 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:03 | Prestige | Unfortunate if that's the case |
| 20:09:23 | disruptek | why? |
| 20:09:27 | disruptek | who gives a shit? |
| 20:09:32 | Prestige | Me |
| 20:09:41 | mipri | that's the case. closure iterators are first class; inline iterators are inline. Most iterators that you run into will be inline. |
| 20:09:42 | disruptek | i mean, important people. |
| 20:10:32 | Prestige | Would be nice if there were a simple way to create a closure iterator from an inline iterator |
| 20:10:44 | disruptek | how much simpler could it be? |
| 20:10:53 | Prestige | Keep running into this issue, it's cumbersome |
| 20:11:19 | disruptek | well, +1 to separating them with a keyword, but that won't happen. |
| 20:11:26 | disruptek | so just write the macro. |
| 20:14:19 | ForumUpdaterBot | New 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:26 | Zoom[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:53 | planetis[m] | wtf !? https://play.nim-lang.org/#ix=2Fto |
| 21:05:59 | planetis[m] | am i using assert wrong? |
| 21:06:51 | planetis[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:49 | mipri | that'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:38 | nixfreak | Error: type mismatch: got <tuple[socket: AsyncSocket, netAddr: string, id: int, connected: bool]> but expected 'Client = ref Client:ObjectType' |
| 21:36:52 | nixfreak | getting error , going though nim in action |
| 21:40:32 | mipri | please 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:24 | nixfreak | I post the code |
| 21:42:37 | nixfreak | any paste works ? |
| 21:43:26 | mipri | https://play.nim-lang.org/ is pretty good |
| 21:43:45 | mipri | the share link at the bottom left is what I mostly see in here |
| 21:44:57 | nixfreak | http://sprunge.us/p3bdva |
| 21:46:43 | mipri | the problem is the space before the parameters to Client, on line 35 |
| 21:47:01 | mipri | !eval echo(1, 2) |
| 21:47:04 | NimBot | 12 |
| 21:47:06 | mipri | !eval echo (1, 2) |
| 21:47:09 | NimBot | (1, 2) |
| 21:47:21 | mipri | if there's a space you're passing a single tuple |
| 21:47:59 | mipri | ah that error message makes a lot more sense now |
| 21:48:28 | nixfreak | wow very cool thanks |
| 21:48:42 | nixfreak | i'm using nvim didn't even see it |
| 21:52:18 | FromDiscord | <j-james> @Imperatorn My use case is to go through an HTML document and replace `` and `_` with their respective tags |
| 21:52:28 | FromDiscord | <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:47 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=2FtJ |
| 21:53:27 | FromDiscord | <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:29 | FromDiscord | <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:29 | hmmm | oh nice if we asking things why we define procs with the "=" |
| 22:23:58 | disruptek | because to omit it is to define a prototype. |
| 22:24:06 | hmmm | :o |
| 22:24:22 | disruptek | health: semicolons cannot be mistaken for , by humans or computers. |
| 22:25:04 | disruptek | so proc foo(a, b: string; c: int) is easier to parse than foo(a, b: string, c: int) |
| 22:25:16 | mipri | there are only 9 occurrences of 'semicolon' in the manual; look at those and you'll find two reasons to use it. |
| 22:25:46 | disruptek | see `using`, for one. |
| 22:28:04 | FromDiscord | <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:51 | FromDiscord | <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:30 | FromDiscord | <cabboose> Nim wouldn’t have any complaints since libmysql was dynamically linked and nim has its own ssl |
| 23:59:25 | FromDiscord | <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:29 | FromDiscord | <cabboose> Thanks for your help! |