<< 13-10-2020 >>

00:06:22*NimBot joined #nim
00:08:47*luis quit (Quit: luis)
00:21:44*krux02 quit (Remote host closed the connection)
00:28:12FromGitter<gogolxdong> Did something change in db_mysql , query in rawExec escape punctuation like `@` and `.`.
00:29:32FromGitter<gogolxdong> which got nothing from query.
00:31:25leorize[m]nope, db_mysql code for rawExec hasn't been changed in 3 years
00:35:23FromGitter<gogolxdong> after inserting into sql ? placeholder , [email protected], became `cloudfastnet\64cncarecc\46com`
00:35:24*luis joined #nim
00:35:45*hyiltiz joined #nim
00:35:45*hyiltiz quit (Changing host)
00:35:45*hyiltiz joined #nim
00:35:59*hyiltiz quit (Client Quit)
00:41:05*luis quit (Quit: luis)
00:46:19*hyiltiz joined #nim
00:46:20*hyiltiz quit (Changing host)
00:46:20*hyiltiz joined #nim
00:47:01*TomDotTom joined #nim
00:47:43FromDiscord<exelotl> Term rewriting macros and converters go hand in hand. A cool use case I found on the GBA: I have two very similar types (one with padding which is used by the hardware, one without padding which I do my useful work with)↵I can use a converter + custom assignment operator to make the two types interchangeable, and then use term a rewriting macro to eliminate the cost of the implicit function calls
00:48:03FromDiscord<exelotl> (edit) 'Term rewriting macros and converters go hand in hand. A cool use case I found on the GBA: I have two very similar types (one with padding which is used by the hardware, one without padding which I do my useful work with)↵I can use a converter + custom assignment operator to make the two types interchangeable, and then use ... term' => 'Term rewriting macros and converters go hand in hand. A cool use case I found on the GBA: I ha
00:49:01disruptekterm rewriting macros can do ridiculous stuff. they just don't make any sense, imo.
00:49:31disrupteki mean, i think it's the wrong way. too magical to work with.
00:49:31*luis joined #nim
00:55:18FromDiscord<exelotl> They're ripe for misuse but i'm happy they exist
01:01:51FromDiscord<exelotl> As in they allow me to do some (legitimately useful) low-level GBA things that I previously thought were impossible because it would require a {.writeonly.} pragma or break the semantics of the `=` operator
01:03:50FromDiscord<exelotl> So if term rewriting macros were to go away I would start asking for weird one-off features
01:13:13FromDiscord<juan_carlos> term rewriting is cool, used it for compile time translations.
01:13:18*Tanger joined #nim
01:24:01*luis quit (Quit: luis)
01:32:01*TomDotTom quit (Ping timeout: 264 seconds)
01:32:42*apahl_ joined #nim
01:35:38*apahl quit (Ping timeout: 256 seconds)
01:36:08*rockcavera joined #nim
01:39:32*luis joined #nim
01:41:10PrestigeCan someone shed light on why this can't be invoked without converting Player to AnimatedActor? https://i.imgur.com/tNyKgbu.png
01:41:34PrestigeI thought since Player extends AnimatedPlayer, and I'm using a method, it would work
01:47:50*luis quit (Read error: Connection reset by peer)
01:52:34FromDiscord<Elegant Beef> Actor is accessible from that file right?
01:53:30FromDiscord<Rika> oh yeah, the base classes have to be exported and accessible in all files
01:53:41FromDiscord<Elegant Beef> It seems it is, but just double checking
01:53:42FromGitter<gogolxdong> Author: Bung <[email protected]> ⏎ Date: Fri Sep 4 17:04:27 2020 +0800 ⏎ ⏎ ```Fix #15219 SQL escape in db_mysql is not enough (#15234)``` [https://gitter.im/nim-lang/Nim?at=5f8508a607361f0cc64a34e3]
01:53:44disbothttps://github.com/nim-lang/Nim/pull/15234 -- 6Fix #15219 SQL escape in db_mysql is not enough
01:54:22FromGitter<gogolxdong> I think this causes some regression about special punctuation escape.
01:55:32*mnafees joined #nim
01:55:49mnafeesIs https://nim-lang.github.io/ the docs for the upstream git repo?
01:56:09FromDiscord<Elegant Beef> Prestige i believe the issue is the `var` removing it makes it work
01:56:10Prestige@Elegant Beef yeah I'm importing it in player.nim
01:56:26Prestigehm
01:56:29mnafeesI want to use https://nim-lang.github.io/Nim/bitops.html#bitsliced%2CT%2CSlice%5Bint%5D but it does not exist in the Nim system install I have rn (ver 1.2.6)
01:57:09Prestigeinteresting - it was originally a proc so it needed var, but doesn't as a method. Pretty neat actually
01:57:13Prestigety beef
01:57:18FromDiscord<Elegant Beef> Well no it's a reference type
01:57:20FromDiscord<Elegant Beef> https://nim-lang.org/docs/bitops.html
01:57:24FromDiscord<Elegant Beef> Actual docs mnafees
01:58:28FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2AxS See prestiege reference types are currently(atleast for now) mutable inheritely https://play.nim-lang.org/#ix=2AxS
01:58:31FromDiscord<Elegant Beef> I'm dome
01:58:44FromDiscord<Elegant Beef> Pasting the link twice, big brain
01:58:52FromDiscord<Rika> hello dome
01:58:52Prestigehaha
01:58:57mnafeesThanks @Elegant Beef
01:59:04FromDiscord<Elegant Beef> No problem
01:59:21FromDiscord<Rika> elegant beef beef
01:59:27mnafeesI got overjoyed when I found that bitops proc but I guess I'll have to make do without it for now :/
01:59:47FromDiscord<Elegant Beef> It's cause my name has a space in it and ircord isnt done in a way to remove any redundancies
02:00:03FromDiscord<Elegant Beef> I mean you could always `choosenim devel`
02:00:32mnafeesSee, I was thinking about something on those lines. Thanks! (Nim newbie here)
02:00:56FromDiscord<Elegant Beef> I still consider myself a nim newbie so... 😛
02:01:00FromDiscord<Rika> beef i know i was making a joke
02:01:03FromDiscord<Elegant Beef> But yea those are docs for 1.3.7
02:01:05FromDiscord<Rika> ok noob
02:01:14FromDiscord<Elegant Beef> I wasnt certain if you knew why they were doing it
02:01:17FromDiscord<Elegant Beef> One name person here
02:01:31FromDiscord<Rika> would you like me to add spaces in my name
02:01:40FromDiscord<Elegant Beef> I mean you do you
02:01:49FromDiscord<Rika> how lewd
02:02:03*mnafees quit (Remote host closed the connection)
02:02:40FromDiscord<Elegant Beef> *Opens up reddit sees a "Nim is just amazing" post, nods head*
02:02:57FromDiscord<Rika> 👌
02:03:14FromDiscord<Elegant Beef> https://www.reddit.com/r/nim/comments/ja3umq/nim_is_just_amazing/ If anyone is interested in reading the praise 😛
02:04:39*luis joined #nim
02:05:48Prestige"and don't get me started on Rust and its syntax" yep lol
02:07:14FromDiscord<Rika> rust syntax be *pain*
02:07:31FromDiscord<Elegant Beef> I've never wrote rust, i've seen the symbol laden nature and never really wanted to
02:08:41FromDiscord<Rika> "praise the turbofish" xd
02:09:57FromDiscord<Elegant Beef> The `addr` and `ptr` keywords make me happy for that reason, but i'm sure if i actually attempted to learn something that used `*` or `&` i might not regret my existance 😄
02:12:05*luis quit (Quit: luis)
02:12:18*luis joined #nim
02:15:06*Senketsu quit (Quit: WeeChat 2.9)
02:21:23*Senketsu joined #nim
02:28:59*vicfred_ joined #nim
02:31:36*vicfred quit (Ping timeout: 272 seconds)
02:42:27*luis quit (Quit: luis)
02:42:41*luis joined #nim
02:43:25*muffindrake quit (Ping timeout: 240 seconds)
02:45:50*muffindrake joined #nim
02:53:37*Senketsu quit (Quit: WeeChat 2.9)
02:57:36*luis quit (Read error: Connection reset by peer)
03:35:01*bunbunbunbunny quit (Quit: Lost terminal)
03:37:02*luis joined #nim
03:50:57*rockcavera quit (Remote host closed the connection)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:34*supakeen joined #nim
04:12:42FromGitter<gogolxdong> @ehmry are you there
04:13:56FromGitter<gogolxdong> What's the name of this ⣶⢖⠻⡜⡄⡄⢡⣚⠁⠾⣠⡷⠁⢬⣸⢥⠰⣄⠿⡳⣘⠤⡤⢛ or something like that?
04:14:50FromDiscord<Rika> braille
04:17:03FromGitter<gogolxdong> How to calculate and print?
04:19:40*vicfred_ quit (Quit: Leaving)
04:20:23*opal quit (Ping timeout: 240 seconds)
04:23:01FromGitter<gogolxdong> Why uses braille as file identifier?
04:23:24*opal joined #nim
04:32:22*luis quit (Quit: luis)
04:57:09*luis joined #nim
05:10:36*solitudesf joined #nim
05:14:46*waleee-cl quit (Quit: Connection closed for inactivity)
05:14:49FromGitter<gogolxdong> Is there a way to get filename from a AsyncFile variable?
05:25:08leorize[m]I don't think so
05:28:47*vicfred joined #nim
05:32:24FromGitter<gogolxdong> seems so.
05:35:09*luis quit (Ping timeout: 272 seconds)
05:45:45*vicfred quit (Ping timeout: 256 seconds)
05:49:49*narimiran joined #nim
05:59:18*arecacea1 quit (Remote host closed the connection)
06:00:05*arecacea1 joined #nim
06:05:56*PMunch joined #nim
06:08:04PMunchPrestige, you on?
06:08:54Prestigehey PMunch
06:09:25PMunchHi, I see you had some trouble getting colours to work with my PR
06:09:31PMunchHow did you try to set them?
06:10:17PrestigeI was attempting to set the status with the ansi codes inside the string, using xsetroot
06:10:31PMunchAh yes, that doesn't work
06:10:38PMunchYou need to do something like this: xsetroot -name "$(echo "Hello \e[31mworld\e[0m")"
06:10:46Prestigeah I see
06:10:52PrestigeI'll try that out
06:10:53PMunchxsetroot by itself doesn't treat \e as the escape character
06:12:02*luis joined #nim
06:12:05PrestigePMunch: works, that's pretty neat :)
06:13:09PMunchYay :) And yeah, it's a pretty neat feature
06:13:33PMunchYou can also use the 8-bit and 24-bit versions
06:14:35PrestigeI wonder if there's a way we could make it easier for users to generate the status with colors
06:14:44Prestigemaybe a tool exists already
06:14:59PMunchCurrently the 3/4 bit versions are based on the xterm colours, I was thinking about actually reading .Xresources to get the correct colours from your shell, but I didn't know if you wanted that or not
06:15:10PMunchWhat do you mean?
06:15:58Prestigehave xresources support would be pretty awesome. I mean a way for people to easily generate colors by name, or something
06:16:12PrestigeI think polybar allows hex or color names
06:16:20PMunchAh right
06:16:36Prestigemaybe outside the scope of the PR
06:17:08PMunchI based it off-of the ANSI colours as they are sort of ubiquitous in terminal applications, so piping something to xsetroot should preserve colours
06:17:40PMunchAnd since it has 24-bit support it's much easier to generate than hex colours from a bash script..
06:18:31PrestigeYeah - I'll approve it. I think I should add a section in the readme giving examples and resources
06:19:32PrestigePMunch: btw, did you see I recently added support for tags? You can now view multiple tags at once, and can assign a window to multiple tags
06:20:26PMunchFeel free to add the hacktoberfest-accepted label to the PR or the hacktoberfest topic to your repo as well by the way :) I'm only missing a single PR to get the tshirt :P
06:20:46PMunchYou can view multiple tags at once?
06:20:49PMunchHow does that work?
06:21:17PrestigeIt will find all windows of the selected tags, and they are processed by the layout
06:21:23PMunchAnd what happens if you watch two tags with the same window in it?
06:21:36PrestigeIt only shows once
06:21:38PMunchAah right, so they all get put in the same layout
06:22:03*opal quit (Ping timeout: 240 seconds)
06:25:52*opal joined #nim
06:26:36PMunchPrestige, see the variables section here: https://codeburst.io/colorize-your-shell-commands-without-any-libraries-or-plugins-2cd4a264a17e
06:26:44PMunchThat's one way to make it easier
06:28:14PrestigeI think I'll write something similar on the wiki, and link to it from the readme. Thanks
06:28:39*user0 joined #nim
06:43:57PMunchA simple script like this can also help convert hex colours into an ansi escape sequence: http://ix.io/2AyH
06:44:27PMunch(Might not work in your terminal if it doesn't have 24-bit colour support, but it should work with my nimdow colour patch)
06:47:00PrestigeI wrote up https://github.com/avahe-kellenberger/nimdow/wiki/Setting-the-status hopefully that will be enough to get the point across
06:47:22Prestigeoh I need to change that
06:54:45PMunchWhy are you setting 1 there?
06:54:54PMunchThat is bold, which is not (currently) supported
06:57:00PMunchNow I just need to update nimdow on this machine :P
06:57:16PMunchDoes the refresh use the new binary if I replace it?
06:57:33Prestigenah it just reloads the config
06:57:54PMunchHmm okay
06:57:59PMunchGuess it's time for a reboot then
06:59:13PMunchDid you add the floating window default for certain windows by the way?
06:59:50PrestigeNot per user configuration, just based on window properties
07:01:06PrestigeI forgot if that's something you'd requested, I track everything through github issues
07:01:13PMunchHmm, based on windows properties?
07:02:17PrestigeYeah, like if it's a dialog or if the window requests the same min and max size
07:02:55*apahl_ quit (Ping timeout: 240 seconds)
07:03:18PMunchHmm
07:03:35PMunchSame min and max as what?
07:03:54*apahl joined #nim
07:04:42PMunchProblem is that I use xlunch in a windowed mode as a system menu and I need it to float when it is opened
07:04:48PrestigeI call XGetWMNormalHints and check if min_width and max_width are the same, and same for the height
07:05:23Prestigeah hmm I wonder what it is doing to try to be floating
07:05:43PrestigeI added logging, so we should be able to figure it out
07:06:25PMunchWell it does set a class hint
07:06:34PMunchWhich is how I detected it in i3
07:06:55Prestigeah so i3 didn't handle it either?
07:07:07PrestigeMaybe we should submit a pr to xlunch
07:07:25PMunchwell I'm a maintainer, so no need for me to PR :P
07:08:10PMunchWell i3 will force every window to stack, unless you've specified otherwise in the config
07:08:13Prestigeif you set _NET_WM_WINDOW_TYPE_DIALOG or have min/max sizes the same, it will be floating
07:08:21Prestigeah interesting
07:09:10PMunchI have this rule in my i3 config: for_window [class="xlunch-windowed"] floating enable border none
07:09:14Prestigehttps://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L774 and line 786
07:09:27PMunchIt's not really a dialog though..
07:09:46Prestigecan request a specific size?
07:09:50PrestigeThat's what most do
07:10:06PMunchWell I can (and do) request a specific size
07:13:08Prestigehm how are you setting it? I think you could use https://tronche.com/gui/x/xlib/ICC/client-to-window-manager/XSetWMNormalHints.html
07:13:21PMunchHmm, xlunch doesn't set WM_SIZE_HINTS at all it seems
07:14:00PMunchCurrently it just specifies size by its call to XCreateWindow https://tronche.com/gui/x/xlib/window/XCreateWindow.html
07:14:23Prestigeah okay, yeah I just look at the size hints
07:14:50PMunchDo you consider x and y position when placing floats?
07:15:10PrestigeYeah, if it's 0,0 I center the window though
07:15:12Prestigeiirc
07:15:38PMunchHmm, okay
07:15:48Prestigehm I lied, I think I always center it
07:15:55PMunchAh..
07:16:07PMunchThen having floating for xlunch wouldn't help anyways
07:16:52Prestigewell, I'll look into it tomorrow if you want. I should change that behavior, but I know some floating windows aren't centered...
07:17:02Prestigeah probably the dialogs
07:17:23PrestigeIf you implement the size hints I'll fix the centering issue tomorrow
07:18:33PrestigeIt's actually going to be a single if statement on line 791 I think
07:18:43PrestigeAnyway, gn PMunch thanks for the PR :)
07:21:02*luis quit (Read error: Connection reset by peer)
07:21:53PMunchNo problem :)
07:27:43*ehmry joined #nim
07:50:36FromDiscord<neow> what is the general solution when you need type a to have a field of type b, but you need type b to have a field of type a
07:52:29FromDiscord<Rika> you need one of the types to be a ref type in that case
07:52:48FromDiscord<Rika> putting them in the same type block will make them able to reference each other
07:54:52FromDiscord<neow> yes, one of them is indeed a ref, but I'd like to avoid putting them into the same type block
07:55:10FromDiscord<neow> I'm really weighing inheritance or generics, but I'd like to hear from more experienced people
07:55:25FromDiscord<Rika> they must be in the same type block
07:56:14FromDiscord<neow> but if I make it generic, and use the one single type in every single use case, I wouldn't
07:56:31FromDiscord<neow> but it'd feel hacky
07:56:33FromDiscord<Rika> yes, but i dont see the reason to do so
07:56:40FromDiscord<neow> I want to keep them in different modukes
07:56:44FromDiscord<neow> (edit) 'modukes' => 'modules'
07:57:00FromDiscord<Rika> is there no way to make them not dependent on each other
07:57:21FromDiscord<neow> probably create a base class and every time I access the field convert back?
07:57:25FromDiscord<neow> or generics
07:58:00FromDiscord<haxscramper> Or is it really necessary to put this in different modules? I'd recommend putting all types in once place anyway, especially when you have case like this - e.g. file organization should not really affect program design so much
07:58:03FromDiscord<Rika> do you have more details on what kind of types these are?
08:00:27FromDiscord<neow> yes, statement and expression types for syntax
08:01:19FromDiscord<neow> statement heavily depends on expression, but I was about to add anonymous functions as expressions... which would have a block of statements as one of the fields
08:01:44FromDiscord<neow> > Or is it really necessary to put this in different modules? I'd recommend putting all types in once place anyway, especially when you have case like this - e.g. file organization should not really affect program design so much↵@haxscramper probably not a bad idea to have a types.nim module
08:01:46FromDiscord<haxscramper> You are writing programming language (something similar) and decided to use separate types/inheritance?
08:02:04FromDiscord<neow> two separate types for expr and stmt
08:02:13FromDiscord<neow> for a parser
08:02:58FromDiscord<haxscramper> I **highly** recommend using heterogeneous AST instead, based on single case object. I found it much easier to work with in the long run - works with pattern matching, you get very uniform tree operations etc. A little more runtime checks for node types but that is probably not that bad.
08:03:44FromDiscord<neow> a single node object, and code modelled as a list of nodes?
08:04:18FromDiscord<haxscramper> Basically yes, for example look at how `NimNode` is defined - I usually do the same for all AST-like types
08:04:40*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:10:04FromDiscord<neow> I see
08:10:22FromDiscord<neow> I'm looking at Nim/doc/astspec.txt
08:11:56*lum quit (Quit: WeeChat 2.9)
08:12:39*lum joined #nim
08:14:49*bung joined #nim
08:15:14*leorize quit (Remote host closed the connection)
08:15:35FromDiscord<mratsim> @neow you might find this repo interesting: https://github.com/mratsim/compute-graph-optim I explore step by step my own custom AST (note that i wanted it to work at both runtime and compile-time which prevented me from using inheritance/methods for example)
08:15:48*leorize joined #nim
08:15:53*leorize quit (Remote host closed the connection)
08:16:13bunghow to pass a string by offset to a proc accept openArray[byte], need copy ?
08:16:35*leorize joined #nim
08:16:57FromDiscord<mratsim> no
08:16:59bungthe string is not need anymore
08:17:21FromDiscord<mratsim> I think toOpenArray works on string no?
08:18:06*luis joined #nim
08:18:45FromDiscord<mratsim> otherwise cast[ptr byte](foo[0].addr).toOpenArray(foo.len-1).toOpenArray(offSetStart, offsetStop) 😄
08:19:08FromDiscord<mratsim> and then open a RFC to make openarray/slicing more sane
08:19:47FromDiscord<mratsim> anyway not sure it's exactly that but this gives you the general idea, cast t, convert ptr to openarray, slice the openarray
08:20:06lumitalic
08:20:43lumitalic
08:23:38*lum quit (Quit: WeeChat 2.8)
08:25:54*lum joined #nim
08:26:22bungok , thanks ! let me try
08:27:48*luis quit (Quit: luis)
08:28:01*luis joined #nim
08:37:44*lum quit (Quit: WeeChat 2.8)
08:44:25FromDiscord<tomck> Hello - do exceptions have any performance implications when not using them? or do I need to explicitly disable?
08:46:28bungI need put the cast directly to the proc param?
08:47:02bungError: invalid type: 'openArray[byte]' for var
08:47:07FromDiscord<Elegant Beef> I could be wrong but i believe a release build doesnt have exceptions or assertions enabled
08:47:17bungseems cant store it to a variable
08:51:28*Vladar joined #nim
08:53:47FromDiscord<Rika> @Elegant Beef exceptoins are enabled
08:53:59FromDiscord<Elegant Beef> Ah my bad 😄
08:54:18FromDiscord<Rika> you must turn on panics (--panics:on) and even then only defect exceptions are disabled; catchables can still be caught
08:54:50FromDiscord<Elegant Beef> Yea now that i actually think about it, it'd be pretty dumb to toggle off exceptions
08:55:13FromDiscord<Rika> you can only avoid exceptions by using functions that do not use them
08:55:31FromDiscord<Rika> (afaik.)
08:55:56FromDiscord<Rika> maybe not catching them at all will also yield negligible performance loss
08:56:07FromDiscord<Rika> but when you do catches your performance dies
08:57:57*luis quit (Read error: Connection reset by peer)
09:04:08FromGitter<gogolxdong> Flutter supports desktop now.
09:04:44FromGitter<gogolxdong> I think Google will buy Nim and discard dart.
09:08:33*lum joined #nim
09:09:38FromDiscord<Elegant Beef> Hope not google's bad with languages
09:10:05FromDiscord<tomck> Google will buy nim in favour of dart? for flutter?
09:10:26FromDiscord<tomck> Can you use nim w/ flutter currently?
09:11:13*lum quit (Client Quit)
09:11:34*lum joined #nim
09:11:48*fredrikhr8 joined #nim
09:14:08FromGitter<gogolxdong> No, so it's I think(hope). We need to run IPFS server on mobile phone, better with a GUI to add file.
09:15:20*fredrikhr quit (Ping timeout: 260 seconds)
09:15:21*fredrikhr8 is now known as fredrikhr
09:16:55FromDiscord<mratsim> @Bung you should be able to store a ptr in a variable but I would need more code to help you debug
09:19:31*luis joined #nim
09:20:55bungI declare it as var b:openArray[byte]
09:22:00*lum quit (Quit: WeeChat 2.8)
09:22:18*lum joined #nim
09:23:48*Tanger quit (Quit: Leaving)
09:24:41*lum quit (Client Quit)
09:26:34*lum joined #nim
09:28:39*lum quit (Client Quit)
09:31:22bungI pass casting directly it works
09:32:39*luis quit (Read error: Connection reset by peer)
09:32:59*lum joined #nim
09:36:41FromDiscord<mratsim> you can store an openarray
09:36:49FromDiscord<mratsim> but you can store the cast to ptr
09:36:56FromDiscord<mratsim> can't
09:44:21FromDiscord<Recruit_main707> where does that cant go though :p
09:44:51*arecacea1 quit (Ping timeout: 265 seconds)
09:47:44bunghmm, hard to implement mysql protocol compression, never use that feature..
09:48:02Oddmongeri have an array of objects , and i'd like to initialize only some members of each object, is it possible on a one-liner ?
09:51:43Oddmongersomething like this: https://play.nim-lang.org/#ix=2Azf
09:52:58Oddmongerotherwise, i'll have to make a loop to fill
09:54:38FromDiscord<Rika> if you wanted one line, its going to be a really really long line
09:54:43FromDiscord<Rika> go with the loop imo
09:55:21*noonien joined #nim
09:55:30*lum quit (Ping timeout: 256 seconds)
09:57:05*lum joined #nim
09:58:00Oddmongerok that's clear speak :)
09:58:25Oddmongergo for the loop then, thank you
10:04:34*lum quit (Quit: WeeChat 2.8)
10:04:45*PMunch quit (Quit: Leaving)
10:04:52*lum joined #nim
10:17:35*PMunch joined #nim
10:18:36*newUser joined #nim
10:19:43*opal quit (Ping timeout: 240 seconds)
10:20:37*narimiran quit (Ping timeout: 264 seconds)
10:23:00*PMunch quit (Quit: Leaving)
10:23:30newUserHi, I have an include folder with .h and .nim (.h with c2nim converted) files. My project in another folder should import the header and the nim files from include. I have set the --cincludes: and for searching the nim files --path:. It works, but is it the correct way?
10:23:49*PMunch joined #nim
10:25:11newUserif I not use --path: gcc will not find the converted files and I must copy them into the project file.
10:25:25newUserfolder
10:29:48*luis joined #nim
10:38:53*luis quit (Quit: luis)
10:52:36*opal joined #nim
10:54:54*luis joined #nim
10:58:07bungdoes your .h all convert to pure nim ?
10:58:24bungif yes , I dont think you need .h anymore
11:00:52bungif you wraps .h you just use `{.importc: "printf", varargs, header: "<stdio.h>".}`
11:01:48bungwhere header: you can put your .h path as const string
11:03:14federico3fragmenting the community even further? Meh https://forum.nim-lang.org/t/6915
11:04:33*luis quit (Read error: Connection reset by peer)
11:04:39FromDiscord<Rika> its inevitable if you want to become large
11:06:04newUserbung: I must {.importc the header files
11:07:15newUserbung: ups, no I don't import them, I didn't saw the '#'
11:10:52bungin any case you can just do that in code put absolute file path
11:11:09newUserbung: I have converted with c2nim the header files, so get a nim file. In the nim file I have: {.push importc, header: "****.h", discardable.}
11:11:55newUserand in the project folder I import only the nim files, which I have left in the include folder
11:11:58*mmohammadi981266 joined #nim
11:12:04*mmohammadi981266 quit (Client Quit)
11:12:46bungyou can just put constant file path to header:
11:12:52*luis joined #nim
11:13:25newUserin --path: (I have a build.sh) I have the include path for the nim files
11:13:49newUser'you can just put constant file path to header:', how?
11:14:08*mmohammadi981266 joined #nim
11:14:22bunglike this https://github.com/bung87/zstd/blob/master/src/zstd/common.nim
11:14:26*mmohammadi981266 quit (Client Quit)
11:19:50FromDiscord<neow> > @neow you might find this repo interesting: https://github.com/mratsim/compute-graph-optim I explore step by step my own custom AST (note that i wanted it to work at both runtime and compile-time which prevented me from using inheritance/methods for example)↵@mratsim Thanks a lot! I'll take a look a it! You mention Laser, is Laser a big deal?
11:19:58FromDiscord<neow> I've seen it pop up several time
11:20:02FromDiscord<neow> (edit) 'time' => 'times'
11:20:44FromDiscord<neow> also, the code is divided into episodes? Is this a blog/vid series? I'll have to find the link
11:23:24*mmohammadi981266 joined #nim
11:23:53*mmohammadi981266 quit (Client Quit)
11:25:07*lum quit (Ping timeout: 246 seconds)
11:27:33newUserbung: If I understand it correct, I don't need c2nim, but a nim file with compile commands?
11:30:00*luis quit (Quit: luis)
11:30:09*luis joined #nim
11:32:07*rockcavera joined #nim
11:32:58bungyou can do it without c2nim, c2nim convert and wraps automanticlly ? I dont remenber, never use it
11:35:16*lum joined #nim
11:35:58*dv-^_^6193923289 quit (Ping timeout: 246 seconds)
11:36:27newUserI have added to the converted file: at start {.push importc, header: include_path, discardable.} and at the end {.pop.}
11:38:02newUserand have to look for some bad converted lines, for example c2nim convert a division sign '/' to '//', that's all for me
11:38:36newUseryour solution will compiles every time the c files?
11:39:06newUserI have forgotten, I have a lib file to the c include files.
11:41:37*krux02 joined #nim
11:41:43newUsermy solution works, but I only wanted to know if the --path:include_path the correct way is, to search for nim files
11:42:05FromDiscord<mratsim> > @mratsim Thanks a lot! I'll take a look a it! You mention Laser, is Laser a big deal?↵@neow It's my research repo on high performance computing
11:42:29newUserI must have additional: --cincludes:include_path for the header files
11:42:53*luis quit (Ping timeout: 246 seconds)
11:45:09*luis joined #nim
11:54:52*lum quit (Ping timeout: 265 seconds)
11:56:25*newUser quit (Remote host closed the connection)
12:03:20*kwilczynski quit (Ping timeout: 260 seconds)
12:04:23*kwilczynski joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:37*supakeen joined #nim
12:08:17*Kaivo joined #nim
12:09:22bung@newUser it works indeed, for project that's fine, as you have build.sh
12:10:33FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2AzU
12:10:39bungfor a lib you'll need note your comple flags somewhere
12:10:50*luis quit (Read error: Connection reset by peer)
12:10:59*luis joined #nim
12:11:09FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2AzV
12:12:01bung@newUser nim has compiled file cache dont worry about it
12:12:25*lum joined #nim
12:12:28FromDiscord<Clyybber> @flywind generates invalid C for me
12:12:34FromDiscord<Clyybber> can you open an issue for it?
12:12:45FromDiscord<flywind> I will report it.
12:20:01*luis quit (Quit: luis)
12:20:14*luis joined #nim
12:26:22*TomDotTom joined #nim
12:36:36*luis quit (Quit: luis)
12:36:45*luis joined #nim
12:40:39*mmohammadi981266 joined #nim
12:46:19*mmohammadi981266 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
12:49:20*mmohammadi981266 joined #nim
12:52:09*rockcavera is now known as Guest18463
12:52:09*tiorock joined #nim
12:52:09*Guest18463 quit (Killed (card.freenode.net (Nickname regained by services)))
12:52:09*tiorock is now known as rockcavera
12:59:00*lum quit (Quit: WeeChat 2.8)
13:20:39*mmohammadi981266 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
13:21:16*luis quit (Quit: luis)
13:32:51*luis joined #nim
13:51:00*mmohammadi981266 joined #nim
13:52:50*lritter joined #nim
14:03:08FromDiscord<Ricky Spanish> can you use multiple getheader() with nimterop?
14:05:13*PMunch quit (Quit: Leaving)
14:11:02*mmohammadi981266 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
14:13:50FromDiscord<lqdev> yeah
14:13:52*mmohammadi981266 joined #nim
14:13:55FromDiscord<lqdev> why wouldn't you?
14:16:38FromDiscord<Ricky Spanish> iv no idea i just didnt see any examples of doing it
14:17:06FromDiscord<Ricky Spanish> i seen only 1 header to 1 dll example basically
14:17:38FromDiscord<Ricky Spanish> anyway thanks @lqdev
14:26:44*mmohammadi981266 quit (Quit: Ping timeout (120 seconds))
14:27:37*mmohammadi981266 joined #nim
14:35:39FromDiscord<Ricky Spanish> getting a few type issues when using nimterop with vcc code basically ```# const 'ORT_API_CALL' has unsupported value '_stdcall'↵# const 'ORTCHAR_T' has unsupported value 'wchar_t'``` it doesent like these types for obvious reasons, is there a simple way to pattern match and replace _stdcall with __cdecl? like this ``` proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =↵ sym.name = sym.name.strip(chars={'_'}).replace("__",
14:35:54FromDiscord<Ricky Spanish> (edit) removed '```' | 'proc' => '```proc' | '"_")```?' => '"_")``` ?'
14:36:20FromDiscord<Ricky Spanish> (edit) '=↵ ' => '='
14:39:32*luis quit (Quit: luis)
14:46:32*lum joined #nim
14:46:34*luis joined #nim
14:49:42*mmohammadi981266 quit (Read error: Connection reset by peer)
14:58:49*waleee-cl joined #nim
15:10:02*hnOsmium0001 joined #nim
15:12:54*gmaggior joined #nim
15:16:01*luis quit (Quit: luis)
15:19:06*narimiran joined #nim
15:23:14Zevvhello hello @treeform
15:25:57Yardanicohello hello can you hear me
15:25:59Yardanicohttps://www.youtube.com/watch?v=wJnBTPUQS5A
15:29:08FromGitter<ynfle> > Objects that have no ancestor are implicitly final and thus have no hidden type field. ⏎ Can someone tell me what *no hidden type field* means?
15:30:52Yardanicoruntime type for methods
15:30:57Yardanicofor dynamic dispatch
15:33:54*user0 quit (Remote host closed the connection)
15:36:28*lum quit (Quit: WeeChat 2.8)
15:41:54FromDiscord<exelotl> ynfle: taking a look at the generated C code, you can see that inheriting from RootObj produces a struct with runtime type info (the "Sup" field): https://pastebin.com/raw/zvXwGNmn
15:44:13FromDiscord<Noobi> Hey, so what are some projects to start learning Nim?
15:44:54FromDiscord<exelotl> advent of code is a good one, but that's a couple of months away :(
15:46:14*lum joined #nim
15:47:52Yardanico@Noobi you can try exercism
15:48:14disrupteki've tried it many times, but the demon remains.
15:48:14Yardanicoalso check https://nim-lang.org/learn.html
15:49:37FromDiscord<exelotl> No disruptek. You are the demons
15:50:40FromGitter<ynfle> @exelotl +1
15:50:52disruptekrude.
15:51:40FromGitter<Knaque> (https://files.gitter.im/5602f03e0fc9f982beb19f61/hGpZ/image.png)
15:51:42disruptekwe need someone to impl ndoc.
15:51:46disruptek!repo ndoc
15:51:48disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more...
15:51:49FromGitter<Knaque> Whoops, I thought I had a link copied...
15:51:54disruptekno, not that one.
15:51:57disruptek!repo disruptek/ndoc
15:51:58disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴
15:52:37FromGitter<Knaque> Take two: Does Nim/Nimble have an existing equivalent of https://github.com/jgillick/python-pause? I'm considering making it myself but I wouldn
15:52:46FromGitter<Knaque> *'t want to if someone has already done so.
15:53:00FromGitter<Knaque> Wow, me and my keyboard are not getting along today apparently.
15:53:57disruptekpause doesn't seem to add anything over stdlib.
15:54:36FromGitter<Knaque> Let me rephrase the question then. Does Nim already provide a convenience procedure for waiting until a date/time?
15:54:49*lum quit (Ping timeout: 264 seconds)
15:55:02Yardanicowell, os.sleep
15:56:21FromGitter<Knaque> No, `os.sleep` just sleeps for `x` milliseconds. I mean something like passing a `DateTime` object.
15:56:26FromGitter<ynfle> @exelotl, ⏎ ⏎ > *<FromDiscord>* <exelotl> ynfle: taking a look at the generated C code, you can see that inheriting from RootObj produces a struct with runtime type info (the "Sup" field): https://pastebin.com/raw/zvXwGNmn ⏎ ⏎ so *hidden type field* means a `super` type [https://gitter.im/nim-lang/Nim?at=5f85ce296e1aa94de7f8e898]
15:57:12*oculuxe joined #nim
15:58:02*oculux quit (Ping timeout: 244 seconds)
15:58:25Yardanico@Knaque but you can convert DateTime into seconds
15:58:33FromDiscord<Rika> yeah
15:58:48Yardanicojust os.sleep((getTime() - futureTime).inMilliseconds)
15:58:50FromDiscord<Rika> i dont see whats so hard about importing times and using the values and conversions there
15:58:50disruptekwell, that's not what pause is, either.
15:59:36FromGitter<Knaque> @disruptek see the last example in the README.
15:59:57disrupteksure.
16:00:09disruptekso it's two lines instead of one.
16:00:27disruptekno one has implemented it because it's nonsensical.
16:01:10Yardanicohttps://github.com/jgillick/python-pause/blob/master/pause/__init__.py#L59
16:01:12Yardanicoit uses sleep as well
16:01:13FromGitter<Knaque> I've heard enough then.
16:01:14YardanicoI see no differences :P
16:01:25Yardanicowell it also does some "smarter" logic
16:01:32Yardanicobecause sleep isn't 100% accurate
16:01:54*lum joined #nim
16:02:03FromDiscord<treeform> Zevv, hello.
16:02:37FromGitter<Knaque> Pause exists for convenience more than anything else.
16:02:52disruptekyeah, that's why i put my cock on the front.
16:03:56disruptekAraq: does this ic3 mean that i need to wait before impl my name cache across bmodulelist?
16:06:40disruptekknaque: do you really want nim project ideas?
16:06:59FromGitter<Knaque> Yes, yes I do. Clearly I'm looking in the wrong places.
16:07:38disrupteki have tons of stuff that needs work. so does shashlick.
16:07:59disruptekyou could impl graph algos for
16:08:01disruptek!repo gram
16:08:01disbothttps://github.com/disruptek/gram -- 9gram: 11Generic graphs in Nim 15 11⭐ 1🍴 7& 4 more...
16:09:31*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:09:32disruptekyou could remove recursion from
16:09:34disruptek!repo frosty
16:09:34disbothttps://github.com/disruptek/frosty -- 9frosty: 11Serialize native Nim objects to strings, streams, or sockets ⛄ 15 15⭐ 0🍴
16:10:48disruptekyou could move a couple remaining encodings from runtime to compiletime in
16:10:50disruptek!repo jason
16:10:50disbothttps://github.com/disruptek/jason -- 9jason: 11JSON done right 🤦 15 30⭐ 1🍴
16:11:27FromGitter<Knaque> I'm probably gonna fuck something up, but I guess that's better than being yelled at over a sleep procedure.
16:11:38Zevvhello treeform. I would like to use typography together with sdl
16:12:13disruptekknaque: criterion needs a maintainer and it's written by my favorite nim programmer.
16:12:20disruptek!repo criterion
16:12:20disbothttps://github.com/LemonBoy/criterion.nim -- 9criterion.nim: 11Statistic-driven micro-benchmark framework 15 38⭐ 4🍴 7& 1 more...
16:12:51disruptekgolden needs a complete reimpl using frosty and gram and it's written by my second favorite nim programmer:
16:12:54disruptek!repo golden
16:12:54disbothttps://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 🏆 15 22⭐ 0🍴
16:13:33disruptekgully is mostly fleshed out structurally but needs many more small operations impl'd:
16:13:36disruptek!repo gully
16:13:36disbothttps://github.com/disruptek/gully -- 9gully: 11a code comment formatter 15 3⭐ 0🍴
16:14:38disruptekmy testes have issues
16:14:40disruptek!repo testes
16:14:43disbothttps://github.com/disruptek/testes -- 9testes: 11a small unittest framework with decent support 🔴🟡🟢 15 16⭐ 0🍴 7& 29 more...
16:15:03FromGitter<Knaque> Oh no, my worst enemy, choice! I'll poke around those and see if I can even begin to understand them.
16:15:47disruptekshashlick will weigh in with a longer list, i'm sure.
16:16:24YardanicoZevv: ping him first :)
16:16:50FromDiscord<Vindaar> sent a long message, see http://ix.io/2ABC
16:16:57ZevvI did, he responded
16:17:14Zevvanyway, my question is what would be the most painless way to do that
16:18:12disruptekhere's another one: openapi needs a v3 impl and you can simply copy and modify the schema from the v2 impl
16:18:15disruptek!repo openapi
16:18:16disbothttps://github.com/disruptek/openapi -- 9openapi: 11OpenAPI Code Generator for Nim 15 34⭐ 3🍴 7& 5 more...
16:19:16disruptekbump needs github api support embedded into it using the github package.
16:19:18disruptek!repo bump
16:19:19disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 17⭐ 2🍴 7& 1 more...
16:23:23FromGitter<Vindaar> @Knaque: sorry, my ping in my last message didn't make it. This was aimed at you http://ix.io/2ABC
16:24:40FromDiscord<reilly> @Vindaar No, that's fair actually. Coming (pretty much) straight from Python to Nim, I've never thought about it that way before. I've been a little bit spoiled.
16:25:20FromDiscord<Vindaar> That's fine and why I wanted to highlight it in case it came off as rude 🙂
16:26:00FromDiscord<shashlick> i'm honestly wondering what to work on
16:26:03disruptekthere's an unreasonable amount of contempt for imports.
16:26:20disruptekprobably because package management isn't all that slick.
16:26:38Zevvi have nothing against imports
16:26:41FromDiscord<shashlick> well, i did what i had to there - chilling out since 1.4 is out any minute
16:26:48Zevvas long as its stdlib or my local project im importing
16:26:55FromDiscord<shashlick> too dumb to fix compiler bugs
16:27:03*leorize quit (Ping timeout: 240 seconds)
16:27:51FromDiscord<reilly> Too obsessed with convenience to think about why something is dumb and pointless.
16:28:11FromDiscord<reilly> "But it looks cleaner!!!!"
16:29:03FromDiscord<Vindaar> Happens to the best of us 😉 Also many things are not obvious until one sees an alternative
16:29:09disruptekZevv: so you don't trust your own work enough to reuse it?
16:29:44*leorize joined #nim
16:30:04*njoseph quit (Read error: Connection reset by peer)
16:30:36Zevvi dont have much work
16:30:42Zevvand most of it kind of sucks
16:30:48Zevvso, yeah
16:30:48*njoseph joined #nim
16:30:52*leorize quit (Remote host closed the connection)
16:31:16*leorize joined #nim
16:31:32Zevvwe don't all make one new cool project a week, you know
16:32:06*abm joined #nim
16:35:38disrupteki'd say only about 10% of my work is decent.
16:36:13disruptekthe point is, sharing it gives everyone something to work with and improve.
16:37:07disruptekif we resist imports because imports, then we don't build this beneficial ecosystem.
16:37:32disrupteki don't feel bad about written the first poor implementation.
16:37:41disrupteks/written/writing/
16:38:26FromDiscord<Vindaar> that is precisely the point I accepted a couple of years ago and just started pushing my code. If people don't like it, not like I hurt anyone (maybe their eyes)
16:38:58ZevvI've always shared most of my stuff
16:39:20disrupteki would personally rather have the inspiration. i tried to use grim but i couldn't; it inspired gram.
16:39:21FromDiscord<Vindaar> and you know, a library that works, but has ugly code is still better than no library of the kind
16:39:32Zevvsometimes it surprises me; like getting HN #1 for a day after 3 years, or finding your software in the debian repository one day
16:40:03disrupteki am willing to submit issues in the hopes that someone will fix their code for me.
16:40:40disruptekit hasn't worked with yardanico, but it usually works with shashlick.
16:47:32*qeeg quit (Ping timeout: 260 seconds)
16:56:36*NimBot joined #nim
17:09:52*user0 joined #nim
17:15:36ZevvHm why can't I GC_ref() a string with ar
17:15:37Zevvc
17:23:49YardanicoZevv: because they can be constant and stuff
17:24:15Zevvyeah but *are* they
17:24:33Zevvhow can I make sure it's not going away now then?
17:24:37Yardanicoidk :P
17:24:56disruptekwhy would it go away?
17:25:02Yardanicodisruptek: get destroyed
17:25:06disruptekwhy would it go away?
17:25:11Yardanicoget destroyed
17:25:13*nature joined #nim
17:25:14disruptekwhy would it go away?
17:25:16Yardanicoacross nim and C boundaries
17:25:18Yardanicoor DLL boundaries
17:25:21disruptekwhy would it go away?
17:25:30Yardanicowhy disruptek is slow?
17:25:38ZevvI have a binary blob that I readFile() into a const. I want to pass this blob to C code so it needs to stay around.
17:25:38disruptekit's scope-based mm. if it doesn't leave scope, it doesn't get destroyed.
17:25:44Yardanicodisruptek: but it leaves the scope
17:25:49ZevvI did this by putting it into a var, taking the addr[0], and GC_reffing the var
17:25:51*vesper11 joined #nim
17:25:57*nikki93 joined #nim
17:26:11disruptekhow could a const get destroyed?
17:26:23Zevvnot the const, because I can't take the address of that
17:26:26Zevvnot even the unsafeAddress
17:26:30Zevvso I copy it into a var first
17:26:35Zevvand use the address of that
17:26:39disruptekin an outer scope.
17:26:53Zevvno in a local scope
17:27:03disruptekwhy use a const at all?
17:27:10Zevvbecause I want the asset to go into my binary
17:27:14disruptekcompile-time vars are available at runtime for stupid reasons.
17:27:15Zevvit's a .ttf font
17:27:26Zevvis this a stupid reason?
17:27:32*natrys joined #nim
17:27:35disruptekthis is an exploit of that stupidity.
17:27:43Zevvisn't everything in life
17:27:53disruptekwelcome to my stupid life.
17:28:38disruptekZevv: btw
17:28:45disruptekbentley pees like a bitch.
17:28:48Zevvanyway, I just moved the 'let' to a global and now it's ok. but I just wondered _whyy_
17:28:57disruptekwhy what?
17:29:11disruptekGC_ref was never a "good idea."
17:29:32Zevvsure
17:29:41Zevvbut that still doesn't answer my question
17:29:49Yardanicodisruptek: but it was the least evil idea :)
17:30:02disrupteka single compile-time var seems less evil to me.
17:30:18disruptekit does what you want and doesn't duplicate anything.
17:51:59natureHow do I get the reference of a variable ?
17:52:44naturewhen I do `x = ref myVar` it gives me an error
17:54:05Yardaniconature: you want to create a "ref type" from your "type"?
17:54:19natureyes
17:54:20Yardanicovar myRef = new(mytype); x[] = myVar
17:54:33Yardanicobut if you modify myRef it won't modify existing myVar of course
17:55:10natureI ended doing `x = cast[ref myType](myVar)`
17:55:14Yardanicono
17:55:15Yardanicodon't
17:55:18Yardanicoit won't work properly
17:55:23Yardanicowhat is myVar anyway
17:55:39natureit's an XmlNode
17:55:52Yardanicoit's already a ref
17:56:01naturereally ?
17:56:01YardanicoXmlNode = ref XmlNodeObj
17:56:03Yardanicoyes
17:56:07natureoh ok then
17:56:08Yardanicohttps://nim-lang.org/docs/xmltree.html#XmlNode
17:56:11naturethanks :)
17:56:25natureso if I walk a node tree
17:56:54natureand assigns one of the XmlNode I'll be able to modify it later right ?
17:57:14natureand the tree will end up modified
17:57:30natureOr am I misunderstanding something here ?
17:57:56Yardaniconature: I think you're right, yes
17:58:14natureThanks for your help Yardanico
18:04:04Zevvhow would I propagate the version string from a .nimble into my code?
18:04:14disruptek!repo bump
18:04:15disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 17⭐ 2🍴 7& 1 more...
18:04:19disruptekbump has a safe routine for this.
18:04:23Zevvta
18:04:47YardanicoZevv: const NimVersion {.strdefine.} = ""
18:05:08Yardanicosorry
18:05:11Yardanicoconst NimblePkgVersion {.strdefine.} = ""
18:05:51Zevvand then manually cut and paste this into the nimble task?
18:05:56Yardanicono?
18:06:01Yardaniconimble sets it automatically
18:06:08Zevvoh I didnt know
18:06:11disrupteknimble is for chumps.
18:06:24Zevvand pussies
18:06:34Yardanicoand people who just want to get the job done ;)
18:06:34ZevvI had a make file first
18:06:42disruptekmakes sense.
18:06:57disruptekbecause it's wise to tie the success of your software to nimble.
18:08:00Zevvright
18:08:33FromDiscord<dom96> /ban disruptek,Zevv
18:08:42FromDiscord<Rika> mod abuse
18:08:43FromDiscord<Rika> smh
18:08:53ZevvYeah, we prepared for that. We have our own fork read
18:08:55Zevvready
18:09:26disrupteknimble is approaching its 1,000th issue.
18:09:31disruptekyou can't buy that kind of reliability.
18:09:44FromDiscord<aooo> what is the C equivalent for static with regard to local variables in nim?
18:10:09Yardanico{.global.} pragma I guess
18:10:10disruptekhave you heard johannes linstead?
18:10:25Yardanicowell disruptek you make good stuff, but you are also criticizing existing stuff too much :)
18:10:36Yardanicoalso you're not right about 1000 issues
18:10:47Yardanicoit has 102 open, 469 closed issues
18:10:50disruptekoh, is it more?
18:10:53Yardanicoand 10 open and 276 closed PRs
18:11:06disrupteki see an issue counter approaching 900.
18:11:11disruptekwhich repo are you looking at?
18:11:17Yardanicoyeah, because GitHub counts both PRs and issues as issues
18:11:27Yardanicodisruptek: https://github.com/nim-lang/nimble/
18:11:31disruptekyou think PRs are a sign of reliability?
18:11:41disruptekinteresting.
18:11:47YardanicoI didn't say
18:11:51disruptekno, that's a theory i had not contemplated.
18:11:51Yardanicobut the opposite is also not true
18:12:08Yardanicoit doesn't mean that something isn't reliable if it has a lot of PRs and/or issues
18:12:08*Zevv slides out of here
18:12:10disruptekokay buddy, i don't give a shit. you can spin it any way you want.
18:12:30Yardanicoyeah I know that you like criticism a lot :)
18:12:40disruptekfeel free to criticize my code.
18:12:43disruptekit might improve it.
18:12:45Yardanicocriticising other projects*
18:12:49FromDiscord<Rika> bruh
18:13:48FromDiscord<dom96> dayuum
18:13:56*lum quit (Quit: WeeChat 2.8)
18:14:22FromDiscord<aooo> In C, a local variable is limited to the function by default. is that the case in nim?
18:14:29disruptekyes.
18:14:30Yardanicoyes of course
18:14:42Yardanicoand as I said you can use {.global.} pragma to do the same as you do with static in C
18:14:47Yardanicobut it's better to just create a global then
18:14:53Yardanico{.global.} pragma doesn't always work the right way
18:15:40FromDiscord<aooo> thank you 😄
18:18:27disrupteki criticize because i care.
18:18:52disruptekif you don't criticize, it's because you don't care or you don't want to share your opinion with others to the benefit of all.
18:18:55disruptekwhich is it?
18:19:18disruptekmaybe you just aren't critical.
18:19:19Yardanicodisruptek: criticizing is good, but not when you don't provide a universally better option
18:19:30Yardanicoor at least try to properly criticize
18:19:32Yardanicoby making issues
18:19:36Yardanicoreporting them
18:19:40disruptekexcuse me, are you for real right now?
18:19:57disrupteki'm not going to engage with such an absurd statement.
18:20:02disrupteki've PR'd nimble, have you?
18:20:05Yardanicoyes
18:20:13Yardanicowhat's the point in criticizing stuff if you don't help improving it? I know you have nimph, but even you have issues with it
18:20:23Yardanicoand I see you criticizing nimble almost every time someone mentions it
18:20:41disruptekbecause it's an almost universal deficiency.
18:20:53disruptekalmost everyone uses it, so any flaw there hurts almost everyone.
18:20:54Yardanicoand you're confusing people who are new to nim
18:21:03disrupteki'm done here.
18:21:07Yardanicome too
18:21:37idfsame, im out of popcorn
18:21:42disruptekfeel free to resurrect my PR to nimble and resubmit it.
18:22:34*ehmry joined #nim
18:22:41voidpiYardanico: I'm new to nim and I'm not confused, disruptek is high
18:24:58FromDiscord<shashlick> I don't believe it is possible to create bug free software
18:25:11FromDiscord<Rika> disruptek is our resident genius maniac
18:25:40disruptekbullshit. nothing i write is particularly complex or ambitious.
18:25:46FromDiscord<Rika> i believe that software cannot be bug free and that more issues in the repo != more bugs in your software
18:25:47voidpialso nim, nimble or anything for that matter are not free to critique
18:25:53FromDiscord<Rika> just means the bugs have been discovered
18:26:03FromDiscord<Rika> i'd be worried if there were barely any issues
18:26:11Zevvit is obviously possible
18:26:23Zevv"Write a program printing all numbers from 1 to 5, inclusive"
18:26:29ZevvI bet you can make that, bug free
18:26:34*xioren joined #nim
18:26:40FromDiscord<aooo> Why does more combined issues mean more problems when a lot of those issues could have been nothing and was closed?
18:26:47disruptekthe point was that the software is not a reliable basis for a requirement because it locks the user into an ecosystem that undergoes quite a bit of churn and hasn't demonstrated stability.
18:26:52voidpithere is qmail
18:27:41FromDiscord<shashlick> Edge cases don't negate the fact
18:28:08FromDiscord<shashlick> I don't walk around with the illusion that my code is some immaculate conception
18:28:19FromDiscord<shashlick> There will always be smarter people who can piss all over it
18:28:30FromDiscord<shashlick> Make it 5000x faster or some other metric
18:28:33disrupteknot the point.
18:29:04disruptekwhich looks more stable to you? https://github.com/nim-lang/nimble/graphs/code-frequency or https://github.com/disruptek/bump/graphs/code-frequency
18:29:20Yardanicohow is that a metric of "being stable"
18:29:36disruptekyardanico: i don't believe you have anything to contribute here.
18:29:49FromDiscord<shashlick> Nim's crap too by that metric
18:29:57disruptekwell, it's not stable.
18:30:01FromDiscord<shashlick> Any position can be defended by sound logic
18:30:02disrupteki'm not claiming it is.
18:30:15disruptekyou're right: i'll provide the sound logic.
18:30:26FromDiscord<shashlick> Irrefutable logic is not hard to come by
18:30:34FromDiscord<shashlick> It makes no difference to the status quo
18:30:42disrupteksounds great, dude.
18:30:44*Vladar quit (Quit: Leaving)
18:30:49disruptekalso: what the fuck are you talking about?
18:31:17disruptekit cannot be refuted that bump is stable. i believe it has seen one significant change -- a code reorder -- in the last year.
18:31:35FromDiscord<shashlick> What's the comparison between bump and nimble
18:31:43disruptekscroll back.
18:31:59FromDiscord<shashlick> Like me comparing nimterop with Nim, or even c2nim for that matter
18:32:22disruptekyeah, i can't trust you not to break nimterop in a patch version. no, it's not stable, either.
18:32:32FromDiscord<shashlick> Some times people drive into dead ends
18:32:36disruptekwe're talking about sourcing code to determine a project's version at compile-time.
18:32:52disrupteki suggested bump. someone else suggested nimble.
18:33:02disruptektell me again how i'm a maniac.
18:34:06FromDiscord<shashlick> Feel free to provide alternatives
18:34:24FromDiscord<shashlick> And challenge the status quo
18:34:25disruptekyou want me to create a new library for this because bump is too unstable?
18:34:57disruptekwe are waiting for a staticGetCurrentDir, basically, and it has been approved in concept but no impl has been provided yet.
18:35:03FromDiscord<Rika> i dont understand, isnt there a clear difference in complexity between the programs?
18:35:09disruptekof course.
18:35:26disruptekbump is a shell-script-turned-into-code that i made for shashlick.
18:35:35FromDiscord<shashlick> You're comparing your implementation with nimble's implementation which has not changed in years
18:36:07disrupteki don't believe there's any useful comparison, honestly.
18:36:15FromDiscord<Rika> ah i see, i misunderstood
18:36:17FromDiscord<shashlick> Anyway, feel free to propose your alternatives
18:36:23disruptekyou're talking about demanding that the user use nimble in order to use zevv's software.
18:36:43*opal quit (Ping timeout: 240 seconds)
18:36:45disruptekwhy do you keep asking me for alternatives? i've already proposed bump.
18:36:55FromDiscord<shashlick> Bump is your alternative
18:37:04disruptekokay, well i've already replaced nimble with nimph.
18:37:18disruptekwhat exactly do you want an alternative for? zevv's software?
18:37:41disrupteki also proposed staticGetCurrentDir.
18:37:53FromDiscord<shashlick> Not every great idea is going to succeed
18:38:00*nature quit (Quit: WeeChat 2.9)
18:38:08disruptekshashlick: put down your book of koans and answer the question.
18:38:21disruptekwho the fuck is this? confucious say shashlick need to get a fucking grip.
18:38:24FromDiscord<shashlick> Promote your stuff all you want, don't piss on the status quo as marketing
18:38:34FromDiscord<shashlick> No one buys such stuff
18:38:36disruptekokay buddy.
18:38:53FromDiscord<shashlick> It does a disservice to your hard work
18:39:16disrupteki have no idea what you're talking about.
18:39:48disrupteki guess you're offended because i explained why nimble would not be my first choice.
18:39:56disrupteki think you guys should grow some fucking balls.
18:39:59FromDiscord<shashlick> I'm not offended
18:40:06disruptekif you don't want criticism for your software, don't share it with others.
18:40:21FromDiscord<shashlick> If there are legitimate alternatives then advertise them for their pros/cons
18:40:27disruptekdon't tell me i need to provide alternatives. the onus is on you to provide alternatives.
18:40:33disrupteki already have.
18:40:33*opal joined #nim
18:40:38FromDiscord<shashlick> you already have a variety of alternatives
18:40:45FromDiscord<shashlick> That's what I'm talking about
18:40:49disruptekSO WHY DO YOU KEEP ASKING ME FOR ALTERNATIVES?
18:40:54disruptekwhat the actual fuck.
18:41:04FromDiscord<shashlick> I'm talking about advertising your already existing alternatives
18:41:12disruptekwhat?
18:41:20disruptekyou don't want me to share code?
18:41:20FromDiscord<shashlick> Is it really so confusing?
18:41:22disruptekyes.
18:41:30disruptekit absofuckinglutely is.
18:41:48supakeenWhat are we fighting about?
18:41:53disruptekyou want me to write a new library that produces compile-time versions for projects?
18:41:57disruptekthat isn't bump, right?
18:42:08FromDiscord<shashlick> Communication
18:42:12disruptekthat's the alternative you want me to provide instead of suggesting bump in contrast to nimble.
18:42:16disruptekis that right?
18:44:09FromDiscord<shashlick> Bump is a fine alternative, which already exists and you are proposing to Zevv
18:44:49disruptekyou don't want me to speak of nimble, then.
18:44:57disruptekthat's your criticism of my criticism, right?
18:45:02FromDiscord<shashlick> it would be better to argue the pros/cons in principal
18:45:24disruptekwell, i have, but i'm happy to reiterate so you don't think this is a nimble attack:
18:45:25FromDiscord<shashlick> You don't see me trashing potential every user of c2nim now do you
18:45:47FromDiscord<shashlick> Ok cool then I may have misunderstood
18:45:48disruptekbump is stable. it's a common requirement. it works. it's small.
18:46:01disruptekit works at compile-time without regard to the user's package manager.
18:46:29disruptekthese are all contrasts to nimble; that's why i'm sharing them here.
18:54:31FromDiscord<Xephobia> hello, i'm learning nim after learning c++ as my first language and its really great! But is there something like atexit() from cstdlib in nim?
18:54:47disruptekyep.
18:54:48FromDiscord<Xephobia> it execute a function when we close the program
18:55:06disrupteksee the exitprocs module.
18:55:08FromDiscord<Xephobia> a bot answered me? how?
18:55:15FromDiscord<Xephobia> are you a bridge to irc?
18:55:24FromDiscord<Xephobia> thanks you
18:55:54disruptekyeah, i'm the bot that provides objectivity to a channel that desperately needs it.
18:56:27FromDiscord<Xephobia> is thre an human behind you or you are powered by AI?
18:56:28FromDiscord<ache of head> hahahahaha
18:56:33FromDiscord<ache of head> yes disruptek is an IA
18:56:35FromDiscord<ache of head> AI*
18:56:37FromDiscord<Rika> He's powered by a crazy AI
18:56:44FromDiscord<Xephobia> darn
18:56:51FromDiscord<Xephobia> in pure nim?
18:57:04FromDiscord<ache of head> yea
18:57:05disrupteki wouldn't call it `pure`.
18:57:09FromDiscord<ache of head> the project is managed with nimph
18:57:11FromDiscord<ache of head> remember
18:57:36FromDiscord<Xephobia> what is nimph
18:57:48FromDiscord<ache of head> https://tenor.com/ubVM.gif
18:57:51FromDiscord<ache of head> https://github.com/disruptek/nimph
18:58:12FromDiscord<Xephobia> sorry
18:58:18FromDiscord<Xephobia> i'm new to the nim
18:58:36FromDiscord<Xephobia> i'm getting you a headache?
18:58:52disruptekno, i think i got that before you arrived.
18:59:36FromDiscord<ache of head> i've always been one.
18:59:42FromDiscord<ache of head> so no harm done
19:00:02FromDiscord<Xephobia> darn that's a really good AI, could it answer me how many messages were you trained on?
19:00:10FromDiscord<Xephobia> if you use deep learning of course
19:00:11disruptekno.
19:00:24FromDiscord<Xephobia> you use if else?
19:00:28disruptekyes.
19:00:46FromDiscord<Xephobia> is your source opened?
19:00:48disruptekno.
19:01:00FromDiscord<Xephobia> ok
19:01:12*qeeg joined #nim
19:01:44FromDiscord<Xephobia> can you give me your ping in milisseconds?
19:01:48disruptekno.
19:02:07FromDiscord<Xephobia> why?
19:02:10disruptekno.
19:02:18Yardanicoyes.
19:02:35disruptekby the time you receive it, it will already be out-of-date.
19:02:35FromDiscord<ache of head> maybe???
19:02:50FromDiscord<Xephobia> that logic
19:02:57disruptekif/else ftw.
19:03:03voidpiif you break disruptek you pay for it
19:03:16FromDiscord<Xephobia> wait there is two bots,
19:03:18FromDiscord<Xephobia> ?
19:03:21FromDiscord<ache of head> and he's actually fairly easy to break so take it easy
19:03:24FromDiscord<ache of head> yeah, most people on here are bots
19:03:49FromDiscord<Rika> Xepho in all seriousness they're not bots
19:03:56FromDiscord<Xephobia> bruh
19:03:59FromDiscord<ache of head> https://tenor.com/ubVM.gif
19:04:01FromDiscord<ache of head> did someone ask you
19:04:05FromDiscord<Xephobia> there are irc bridge?
19:04:05FromDiscord<ache of head> how could you break the joke
19:04:07FromDiscord<ache of head> yeah
19:04:08Yardanico@Xephobia yes
19:04:10Yardanico!repo ircord
19:04:11disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 9⭐ 1🍴
19:04:17FromDiscord<Xephobia> darn
19:04:26FromDiscord<Rika> M8 the dude looked seriously confused
19:04:26FromDiscord<Xephobia> :GWaobloChildPepeCry:
19:04:29FromDiscord<ache of head> lmao
19:04:31FromDiscord<ache of head> ok
19:04:52FromDiscord<Xephobia> sorry for spamming and being a morron, but i'm still enjoying nim!
19:04:57FromDiscord<Rika> Dw
19:05:32FromDiscord<Xephobia> why is thre 2/more irc bridge ?
19:05:48Yardanicowdym?
19:07:28FromDiscord<ache of head> iiuc, there's one bridge, but you see a different pfp and display name for each user that takes part in the bridge
19:07:59FromDiscord<Yardanico> @Xephobia The bridge uses webhooks and random "robohash" avatars from Gravatar (based on the nickname).
19:08:13FromDiscord<Yardanico> So that there's clear separation of different people from IRC
19:08:29FromDiscord<Xephobia> ho i see
19:13:34xiorenhow might one implement this: [[proc, proc,..], [proc, func,...],...]
19:13:35FromDiscord<neow> hey im enjoying nim too
19:13:49Yardanicoxioren: and what would this do?>
19:14:03xioreni need to iterate over a bunch of procs that all check something and return a boolean
19:14:54FromDiscord<Rika> So a list of procs, or a 2d list?
19:15:44xiorenso im checking magic numbers and it would be something like: all_procs = [[archive procs], [image_procs], [etc]]
19:15:55xiorenso 2d
19:16:44FromDiscord<neow> seq[seq[proc(arg: type): bool]] ?
19:17:05xiorenlemme try that
19:17:18FromDiscord<neow> ofc replace type with a proper type
19:21:16Yardanico@neow also add {.nimcall.} if you specifically don't want closures
19:21:52FromDiscord<neow> what kinda closures?
19:22:23FromDiscord<neow> oh, like from type definitions
19:22:30FromDiscord<neow> proc definitions*
19:22:36FromDiscord<neow> right?
19:24:01FromGitter<matrixbot> `BarrOff` hello, how can I get the name of the proc that called the current proc?
19:24:15FromDiscord<neow> wait I'm confused
19:24:17FromDiscord<neow> https://play.nim-lang.org/#ix=2tgN
19:24:24FromDiscord<neow> I only found this from nimcall
19:25:04Yardanico@neow "nimcall" means that the proc has default nim calling convention
19:25:28*abm quit (Quit: Leaving)
19:26:29narimiranYardanico: maybe add what checks are kept with -d:release
19:26:37Yardaniconarimiran: well, there's a lot of them :P
19:27:02narimiranok, just two-three most important? :P
19:27:29Yardanicohttps://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55 for the full list (https://nim-lang.org/docs/nimc.html "Runtime checks (see -x):")
19:27:46Yardanicowell I guess bound checks, overflow checks, nil checks
19:28:04narimiransounds good
19:28:05xiorenhere is a rough example of what i would need to do...this gives type errors: proc test1(x: string): bool =
19:28:08xioren result = false
19:28:10xiorenfunc test2(x: string): bool =
19:28:13xioren result = true
19:28:15xiorenproc test3(x: string): bool =
19:28:16Yardanico"-d:danger disables all runtime safety checks including bound checks, overflow checks, nil checks and more"
19:28:18xioren result = false
19:28:20xiorenlet
19:28:23xioren a: seq[proc(x: string): bool] = @[test1, test2]
19:28:25xioren b: seq[proc(x: string}: bool] = @[test3]
19:28:28xiorenvar
19:28:28narimiranYardanico: thumb up
19:28:30xioren x: seq[seq[proc(x: string): bool]]
19:28:33xiorenwoops
19:28:35xiorenthat was supposed to be a link
19:28:57xiorenhttps://play.nim-lang.org/#ix=2ACM
19:29:31FromDiscord<neow> you forgot to close a (
19:29:34FromDiscord<neow> on line 12
19:29:45FromDiscord<neow> oh you typed } instead of )
19:29:48*natrys quit (Quit: natrys)
19:29:58FromGitter<matrixbot> `BarrOff` is there something similar to C's *FUNCTION* macro in Nim?
19:30:25xiorengood catch
19:30:38xiorenstill get a type error though
19:31:16Yardanicoxioren: maybe you want something like https://play.nim-lang.org/#ix=2ACP ?
19:31:18FromDiscord<neow> yeah, I see
19:32:08Yardaniconarimiran: pushed the update
19:32:34*abm joined #nim
19:32:53Yardanico@BarrOff I don't think so
19:32:58Yardanicoand you probably mean __func__ right ?
19:33:24Yardanicoyou can get the function name of the callee with stack traces I think (if the're not disabled which happens in release modes)
19:33:39xiorenthats seems to work yardanico, at least with the example. thanks
19:34:34FromDiscord<neow> I don't understand why that type error happens @xioren, but this: https://play.nim-lang.org/#ix=2ACS seems to work
19:34:42FromDiscord<neow> maybe someone more experienced can help
19:36:17xiorenyeah that seems to work too, thanks. although in my code it doesnt seem to want to let me have a seq with both func and procs. oh well i'm half way there.
19:36:28Yardanicoxioren: because funcs and procs are different types :)
19:36:38Yardanicofuncs are procs with a {.noSideEffect.} pragma
19:36:45Yardanicobut of course you can circumvent that by casting funcs to procs
19:36:48xiorenyeah i guess the pragma make them unique
19:37:24FromDiscord<neow> I wonder how to fix the original solution so that it works
19:37:32FromDiscord<neow> the error seemed to be in the pragmas to me
19:38:06xiorenyeah the type error i get refers to the .noSideEffect. pragma
19:38:44xioreni guess i could just turn all me func to procs lol
19:38:44FromDiscord<neow> https://play.nim-lang.org/#ix=2ACU
19:38:51xiorenmy*
19:39:10FromDiscord<neow> I think .add's got it to work, which is weird considering, I haven't changed the type
19:39:50Yardanicowell, because nim compiler can automatically convert between nimcall and closure procs :)
19:40:00Yardanicobut not with the @[] list of procs
19:40:32FromDiscord<Xephobia> what does the block statements actually goes? i should know because i'm from c++ but
19:40:38FromDiscord<neow> what is the differnece between nimcall and closure procs? damn I should really read the manual, yet it is kinda intimidating
19:40:56Yardanico@Xephobia https://nim-lang.org/docs/manual.html#statements-and-expressions-block-statement
19:41:08Yardanicofor statements - mostly for breaking out of blocks
19:41:16Yardanico*as a statement
19:41:20Yardanicoas an expression - https://nim-lang.org/docs/manual.html#statements-and-expressions-block-expression
19:41:20FromDiscord<Xephobia> i deleted it because i figured it out but maybe the bot don't do that
19:41:29Yardanicoyou can't delete messages in IRC
19:41:51FromDiscord<Xephobia> darn
19:41:56Yardanico@neow see https://nim-lang.org/docs/manual.html#types-procedural-type
19:42:04Yardanicoscroll a bit down and you'll see "nimcall" and "closure"
19:44:30FromDiscord<neow> nimcalls are ones that do not access the local environment, only the topmost one if I understood it correctly
19:46:27FromDiscord<neow> I got it woow
19:46:28FromDiscord<neow> https://play.nim-lang.org/#ix=2ACW
19:46:39FromDiscord<neow> Thanks a lot Yardanico, I learned something today
19:47:18Yardanicobut as my I showed in my example, type annotations in Nim are completely optional if you have a value for your variable :)
19:47:45Yardanicobut they can be useful if you're learning the language, although editors with nim plugins who have advanced features (based on nimsuggest) can show you the types
19:48:07*luis joined #nim
19:49:01*luis quit (Client Quit)
19:49:21Yardanicobtw narimiran, isn't https://opencollective.com/nim considered the main way of donating to Nim right now?
19:49:25FromDiscord<neow> yeah, I always try to write the type description out, also because I find it makes my code cleaner
19:49:27Yardanicoopposed to https://salt.bountysource.com/teams/nim
19:50:15FromDiscord<neow> the donation page descriptions are also kinda old, still talking about 1.0
19:50:33Yardanicoyou mean bountrysource?
19:50:37Yardanicoyeah it wasn't updated in a long time
19:50:37xiorenbrb
19:50:54narimiranYardanico: yeah, opencollective is the main one AFAIK
19:50:59Yardanicook, will PR that as well
19:53:13*xioren left #nim (#nim)
19:55:44bunghow to declare a variable store ptr array[4,char] and ptr array[4,char]?
19:56:14Yardanicoyou want to store two pointers?
19:56:39bungjust one , it may be 4 or 7
19:56:52Yardanicoyou said two ptr array[4, char]
19:57:01*xioren joined #nim
19:57:18bungstore into one
19:57:34Yardanico??
19:57:45Yardanicocan you please show some code? :)
19:58:02bunghdr: array[4, char] | array[7, char
19:58:17bungpass the variable to the proc param like this
19:59:10Yardanicoas a proc argument that will work, yes
19:59:14Yardanicohttps://play.nim-lang.org/#ix=2ACZ
19:59:17Yardanicoso not sure what's your issue
19:59:45bunghttps://github.com/bung87/amysql/blob/3785f05de95a8e9617c9495c9d8c8f2cf2434680/src/amysql/private/protocol.nim#L389
20:00:31Yardanicoyes, and why do you need it as ptr array[4, char] ?
20:00:50YardanicoI don't see b used in that proc
20:00:59Yardanicoyou make the variable, but don't use it
20:01:12bunglet payloadLen = conn.processHeader(b[])
20:01:30Yardanicoand what's your current issue?
20:01:49Yardanicobut I don't think it will be easily possible with arrays
20:01:57Yardanicosince you want to dispatch different array types based on runtime length
20:02:00Yardanicowhich is not possible
20:02:28Yardanicowhy do you need an array exactly? you can access chars of a cstring just as easily
20:02:47bungyeah, I may not need array of char
20:02:51Yardanicoand then do different runtime stuff based on the length of that string
20:03:03bungI just follow old implementation
20:03:08Yardanicoso what's the problem? :P
20:03:52xiorenso does the compiler automatically assign a .noSideEffect. pragma to a proc if it detects no side effects?
20:04:20Yardanicousually yes
20:04:35FromDiscord<Avatarfighter> cant you force that by making a proc a func?
20:04:42FromDiscord<Avatarfighter> well not force it
20:04:44FromDiscord<Avatarfighter> rather ensure
20:05:08Yardanicoyou can as well just use a pragma
20:05:10bungI mean can I declare b upon of when defined(mysqlx_compression_mode)?
20:05:27Yardanicobung: yes, if you have a compile-time condition, then you can differentiate
20:05:45Yardanico@Avatarfighter func has always been an alias to proc with a {.noSideEffect.} pragma
20:05:48Yardanicoand it's true even with strictFuncs
20:05:57FromDiscord<Avatarfighter> yeah ik
20:06:26xioreni see, any way to bypass as its giving me a type error with some procs being assigned .noSideEffect. implicitely and others not, when trying to put multiple procs into a seq.
20:06:49Yardanicocan you show the code?
20:07:04bungor maybe declare it as 7 then casting to 4 in that condition ?
20:07:24Yardanicobung: why not just use cstring?
20:07:29YardanicoI don't see why do you need arrays in that case at all
20:07:30*narimiran quit (Ping timeout: 256 seconds)
20:07:52Yardanicoor even simple strings, without cstrings
20:08:03xiorenhttps://play.nim-lang.org/#ix=2AD4
20:08:14xiorenall the matchers are just simple procs that return boolean
20:08:27Yardanicoxioren: well I meant a self-contained code which shows you an error :P
20:08:45bungyeah, that may simpler which easy parse numbers
20:08:57xiorenlol let me see if i can come up with an example
20:09:34Yardanicoor if it's open source you can give me a link to the repo
20:09:59xiorenhttps://play.nim-lang.org/#ix=2AD5
20:11:12Yardanicowell, in that case the error happens because nim infers the type of the seq by the first element if you initialize it with @[
20:11:17Yardanicoand the types don't match
20:12:11xiorenhmm
20:12:14Yardanicoxioren:
20:12:25Yardanicohttps://play.nim-lang.org/#ix=2AD6
20:13:39xiorenlemme give that a shot
20:15:54xiorenunfortunately still get the mismatch when implemented in my code D:
20:16:38xiorenvexing
20:16:39YardanicoI think I'll go for now, please make a repo or at least a gist with code to reproduce the same :) if it's not proprietary of course
20:16:53Yardanicoyou can also post the question on the forum
20:17:07xiorenthnx for help
20:21:23FromDiscord<neow> xioren, you can get the type of a proc by typing for example isTar.type.name
20:21:35FromDiscord<neow> if you import typetraits
20:21:41Yardanicobut why would that be needed?
20:22:00FromDiscord<neow> maybe to check if all those filters are really of the same type
20:22:40Yardanicowell, I don't think that he needs all filters to be *exactly* of the same type (I mean tags/effects)
20:29:12xioreni got around it for now but putting all the procs with side effect into their own seq. ill deal with finding a more eloquent solution at a later time lol.
20:29:22xiorenby*
20:38:33*nature joined #nim
20:39:10*lritter quit (Quit: Leaving)
20:46:54FromDiscord<dom96> oh, I missed some nice fighting
20:49:00*luis joined #nim
20:49:39*luis quit (Client Quit)
20:49:48*luis joined #nim
21:01:02*bung quit (Ping timeout: 265 seconds)
21:19:10disruptekyeah, great; willful ignorance and stubborn lack of ambition.
21:19:18disruptekreally nice stuff.
21:31:29*solitudesf quit (Ping timeout: 265 seconds)
21:49:29*luis quit (Quit: luis)
21:49:46*luis joined #nim
22:09:46*bung joined #nim
22:11:12*tiorock joined #nim
22:11:12*tiorock quit (Changing host)
22:11:12*tiorock joined #nim
22:11:12*rockcavera quit (Killed (verne.freenode.net (Nickname regained by services)))
22:11:12*tiorock is now known as rockcavera
22:14:40*bung quit (Ping timeout: 272 seconds)
22:17:37*rockcavera quit (Ping timeout: 264 seconds)
22:29:25*rockcavera joined #nim
22:39:05*nature quit (Ping timeout: 240 seconds)
22:46:07*disruptek is now known as asd
23:17:21*TomDotTom quit (Quit: Leaving)
23:21:18*Onionhammer quit (Quit: Ping timeout (120 seconds))
23:21:24*screens_ quit (Quit: No Ping reply in 90 seconds.)
23:21:35*Onionhammer joined #nim
23:23:12*screens_ joined #nim
23:24:08*TomDotTom joined #nim
23:24:13*lain quit (Ping timeout: 260 seconds)
23:24:48*voidpi quit (Ping timeout: 260 seconds)
23:26:58*lain joined #nim
23:30:22*voidpi joined #nim
23:34:10*voidpi quit (Client Quit)
23:39:48*luis quit (Quit: luis)
23:46:52*luis joined #nim
23:49:48*landerlo joined #nim
23:51:08landerloHi, looking into Nim for a compiler, I was very happy that the stdlib already includes performant sparse int sets
23:51:32asdyeah, they are nice.
23:51:37*asd is now known as disruptek
23:52:36landerloHowever, I miss the genericity to be able to use other ordinals like distincts of ints. I plan to have many different sets and I want to enforce some type safety by having different distinct opaque int types for ids mainly
23:53:05disruptekyou can use the sets module.
23:54:05landerloYes, but I like the performance of IntSets, I created a PR to extend IntSets to allow other ordinals https://github.com/nim-lang/Nim/pull/15564
23:54:06disbotMake IntSet a generic ordinal set OrdSet[A]
23:54:58disruptekso why doesn't it pass tests?
23:56:12FromDiscord<Elegant Beef> Tests are just suggestions
23:56:37disruptekwhy not [A: Ordinal]?
23:57:49landerloWould A: Ordinal also include the distinct types? I think opaque ints are a more interest case than other enums
23:58:31disrupteki agree.
23:58:34landerloIt's my first nim code, so probably should had asked here before having a stab at that, but I found the experience very smooth.
23:58:59disruptekwell, you have my +1. i think we should make it work one way or another.
23:59:28disruptekie. i think the Ordinal class should match anything with .ord, .succ, .prev or w/e.
23:59:55disruptekso why doesn't it pass tests?