<< 24-08-2020 >>

00:12:21FromDiscord<dk> choosenim 0.6.0 on Window is broken and trying to build devel from source causes a nimterop assertion error
00:12:21FromDiscord<dk> lmao
00:14:20*tauplus joined #nim
00:14:31FromDiscord<dk> @dom96 a new release would be cool even if just to include a fix for this bug https://github.com/dom96/choosenim/issues/199
00:14:32disbotβž₯ Nimarchive cannot overwrite existing extraction? ; snippet at 12https://play.nim-lang.org/#ix=2mZw
00:14:35*tauplus quit (Remote host closed the connection)
00:25:40shashlickWhat's the issue you are seeing with build
00:28:31shashlick@dk ^^
00:28:47shashlick@disruptek what substitutions are you thinking of
00:30:16FromDiscord<dk> https://gist.github.com/dawkot/9806d2689f4596a3ed93c6c741cfc3ef
00:30:48FromDiscord<dk> @shashlick
00:39:39FromDiscord<dk> Also, I'm just guessing that `C:\Users\97daw\.nimble\pkgs\httpbeast-0.2.2\httpbeast.nim(183, 36) Error: undeclared identifier: 'EWOULDBLOCK` means I need a devel compiler?
00:40:48*Zectbumo joined #nim
00:40:50*Zectbumo quit (Remote host closed the connection)
00:41:13*Zectbumo joined #nim
00:50:06ForumUpdaterBotNew thread by Salient: Set global response header for Jester when serving static files, see https://forum.nim-lang.org/t/6716
00:51:48shashlick@dk: is there no other output
00:51:56shashlickCan you run toast on the command line
00:53:56FromDiscord<flywind> `httpbeast` doesn't support windows.
00:55:34FromDiscord<dk> @flywind πŸ˜”
00:56:58FromDiscord<flywind> I have made a fork version of `httpbeast` and add windows support. https://github.com/xflywind/httpx
00:58:04FromDiscord<dk> Nice, I'll try it instead
00:59:16FromDiscord<flywind> By the way now you need devel compiler indeed. 😜
01:00:02*Tanger joined #nim
01:00:08*Tlangir joined #nim
01:00:25FromDiscord<dk> Fine, I'll build it without choosenim
01:00:35*Tlangir quit (Client Quit)
01:01:59FromDiscord<flywind> You don't need `choosenim devel` if you have ever installed some versions, just download devel from night builds.
01:02:24FromDiscord<flywind> And move them into devel directory.
01:02:48FromDiscord<flywind> https://github.com/nim-lang/nightlies/releases
01:06:55FromDiscord<dk> I'll try to do that
01:09:40FromDiscord<dk> What do you mean "move them into devel directory"?
01:10:14FromDiscord<flywind> Download `devel` version and move them into `toolchains` directory. C:\Users\blue\.choosenim\toolchains\nim-#devel
01:10:38FromDiscord<flywind> C:\Users\blue\choosenim\toolchains\nim-#devel
01:11:30FromDiscord<dk> Am I supposed to do `choosenim devel` after that?
01:13:32FromDiscord<dk> That causes the same choosenim error I had earlier, but I can just use the version without choosenim then
01:13:42FromDiscord<dk> Thanks for the nightlies, I didn't know about them
01:13:58FromDiscord<flywind> np
01:14:04FromDiscord<flywind> Maybe you can try previous version of `choosenim` in windows? I think they work fine?
01:14:55FromDiscord<dk> doesn't sound like less trouble
01:15:07FromDiscord<dk> than just using nim manually
01:23:52*krux02_ quit (Remote host closed the connection)
01:28:27FromGitter<viencokhi> Does anyone know any http package that support ssl-pining?
01:38:14disruptekAHAH!
01:38:29*stefantalpalaru_ joined #nim
01:38:35disruptekhttps://nim-lang.org/docs/manual_experimental.html#concepts-concept-diagnostics -- CALLSITE PRAGMA USE!
01:41:22*stefantalpalaru quit (Ping timeout: 260 seconds)
01:44:25*apahl quit (Ping timeout: 244 seconds)
01:46:17*stefantalpalaru_ is now known as stefantalpalaru
01:46:20*stefantalpalaru quit (Changing host)
01:46:20*stefantalpalaru joined #nim
01:46:38*apahl joined #nim
01:49:08FromDiscord<Elegant Beef> That's not supposed to work is it?
01:52:05disruptekmy head says "no" but my balls say "yes".
01:55:35FromDiscord<Elegant Beef> Have you went to a ball doctor, your balls seem to be constantly on your mind
01:55:48disrupteknah, they're constantly on my lap.
01:56:01FromDiscord<Elegant Beef> Didnt realize you were that old
01:56:07disruptekyep.
02:00:07*waleee-cl quit (Quit: Connection closed for inactivity)
02:10:17*Zectbumo quit (Remote host closed the connection)
02:12:16*smitop quit (Quit: Connection closed for inactivity)
02:23:41*rockcavera joined #nim
02:26:25*muffindrake quit (Ping timeout: 240 seconds)
02:26:33*Zectbumo joined #nim
02:28:39*muffindrake joined #nim
02:30:10*endragor joined #nim
02:34:18shashlick@dk - can you run toast on the command line
02:34:28shashlickDoes it work
02:38:46*Zectbumo quit (Remote host closed the connection)
02:40:24*Zectbumo joined #nim
02:48:25FromDiscord<Admin> are the dark mode search results broken only for me ?
02:48:32FromDiscord<Admin> that contrast hurts my eyes
02:50:00*endragor quit (Remote host closed the connection)
02:50:08*endragor joined #nim
02:50:12leorizefixed in devel
02:51:04*thomasross quit (Ping timeout: 258 seconds)
03:08:03*DamionDreggs joined #nim
03:13:03FromDiscord<Admin> how would i remove the last letter from a string ?
03:16:28DamionDreggsIs there a primary purpose driving NIM? I'm trying to decide if this is something I should spend time learning.
03:16:41leorize@Admin s.setLen(s.len - 1)
03:17:22leorizeDamionDreggs: I'm not sure what do you mean by primary purpose
03:18:08DamionDreggsIs this language designed as a general purpose tool, or is it designed for some specific problem scope?
03:18:38leorizea general purpose tool
03:19:01DamionDreggsGotcha, thank you. :)
03:20:01leorizewelcome to nim :)
03:21:10FromDiscord<Admin> how should i format paramstrings ?0
03:21:11FromDiscord<Admin> (edit) '?0' => '?'
03:21:30leorizeDamionDreggs: just curious, where did you pick up the "NIM" spelling? I noticed a lot of newcomers use full caps even though all of our reference material and even the home page use "Nim".
03:21:38leorize@Admin paramstrings?
03:22:31DamionDreggsLeorize: the channel name is all uppercase for me
03:22:55DamionDreggsThat's probably my client though
03:23:08FromDiscord<Admin> sent a code paste, see https://play.nim-lang.org/#ix=2v3W
03:23:10leorizeprobably :P I think freenode is not even case-sensitive
03:23:34FromDiscord<Admin> but when i echo the options right after the first replace its only {url
03:23:45DamionDreggsI was just browsing channels before I joined, I haven't heard of Nim before.
03:25:05FromDiscord<Admin> (edit) '{url' => '"{url"'
03:25:35leorizeDamionDreggs: you can find our learning materials here: https://nim-lang.org/learn.html
03:25:59leorizehopefully they'll be interesting enough to keep you around :)
03:26:46leorize@Admin well you typically would use an param parser for that
03:27:23leorizein stdlib we got parseopt, but these 3rd-party packages are usually recommended over the stdlib's parser:
03:27:25leorize!repo cligen
03:27:26disbothttps://github.com/c-blake/cligen -- 9cligen: 11Nim library to infer/generate command-line-interfaces / option / argument parsing; Docs At 15 205⭐ 14🍴 7& 1 more...
03:27:34leorize!repo argparse
03:27:35disbothttps://github.com/iffy/nim-argparse -- 9nim-argparse: 11Argument parsing for Nim 15 41⭐ 4🍴 7& 1 more...
03:27:48FromDiscord<Admin> aha ok thanks
03:28:18FromDiscord<j$> is there a way to have object variants but w/ generics
03:28:32leorizewhat's stopping you from that?
03:28:37DamionDreggsYes, I was browsing through briefly before I spoke. I'm mildly interested. The syntax reminds me a lot of the first language I ever learned. I like the compile-to-javascript concept. I haven't had the chance to browse core libraries yet
03:29:43FromDiscord<j$> leorize was that directed towards me?
03:29:50leorizeyep
03:30:11FromDiscord<j$> one second lemme write a code thingy
03:34:49FromDiscord<j$> https://play.nim-lang.org/#ix=2v3Y
03:35:16FromDiscord<j$> this is obviously not the correct way to do this but...
03:35:27FromDiscord<j$> can it be done
03:35:31leorizehttps://play.nim-lang.org/#ix=2v3Z
03:35:55FromDiscord<j$> oh
03:36:38leorizehttps://play.nim-lang.org/#ix=2v40
03:37:13leorizenim is a bit too flexible :P
03:37:23FromDiscord<j$> lol
03:38:57FromDiscord<j$> https://play.nim-lang.org/#ix=2v41
03:39:03FromDiscord<j$> so why is this not functional
03:39:18FromDiscord<j$> wait
03:39:19FromDiscord<j$> nvm
03:39:47leorizenim assignments are not expressions
03:39:56FromDiscord<j$> yeah, I missed the echo
03:41:14FromDiscord<j$> so typedesc is used exclusively for ast gen, macros, etc
03:41:17FromDiscord<j$> ?
03:41:30FromDiscord<Varriount> > Yes.
03:41:46leorizetypedesc are compile-time values
03:42:01leorizethey refer to a (declared) type
03:42:41FromDiscord<j$> yeah im still struggling to understand macros and what not, but I'll figure that out at some point
03:43:03FromDiscord<j$> side note what is an empty object in memory look like?
03:43:26leorizeit looks like nothing
03:43:57leorizean empty object is empty, so it doesn't occupy space
03:44:47FromDiscord<j$> does an empty object have a use other than being a type?
03:45:01leorizebeing a type is a big deal :P
03:45:38FromDiscord<j$> lol yeah for some reason I just assumed it be some other keyword that makes a type, but this makes sense
03:47:56leorizeyou don't really need to understand macros to use nim, though it's handy to know how they work
03:48:08*rockcavera quit (Remote host closed the connection)
03:49:14FromDiscord<j$> yeah that's why I'm putting it off, I've written a few but it's mostly trial and error and shots in the dark and I don't like guess work
03:50:33leorizethat's pretty much how you write macros tbf :P
03:51:06FromDiscord<j$> haha
03:52:43*DamionDreggs quit (Quit: I Quit!)
03:54:11FromDiscord<j$> what editor/tools do you use to write nim code?
03:54:55leorizeI use neovim with nim.nvim
03:57:30PrestigeI use the same + nimlsp with coc-nvim
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:45*supakeen joined #nim
04:15:18*solitudesf joined #nim
04:23:45FromDiscord<Admin> undeclared identifier: 'newContext'
04:23:51FromDiscord<Admin> what do i have to import ?
04:23:57FromDiscord<Rika> net i think
04:24:08FromDiscord<Rika> https://nim-lang.org/docs/net.html#newContext%2Cstring%2Cstring%2Cstring%2Cstring%2Cstring
04:24:48FromDiscord<Rika> @Admin module needed is `net` if you havent seen my message above
04:24:56FromDiscord<Admin> yep got it thanks
04:30:56FromDiscord<Admin> weird
04:31:03FromDiscord<Admin> vsc still gives me the error but i compile just fine
05:03:20*NimBot joined #nim
05:37:52Zevvleoi
05:38:20Zevvleorize: of course its use-after-free, thats what it sais, right
05:38:37Zevvit sais, now, anyway :)
05:51:32leorizeyou might want a coffee or two before continuing lol
05:53:46Zevvwell cmon i just slept for 8 hours
05:54:06Zevvill probably continue in 2 or 3 monhts
05:57:46*narimiran joined #nim
06:00:03narimiranwaazzuuuuuup
06:20:26*r4vi quit (Ping timeout: 240 seconds)
06:22:20*r4vi joined #nim
06:28:01lbartI'm pretty sure that this code worked some versions ago (1.0.6? with a tiny difference about the struct cpoint if i'm not wrong). But i'm facing this crash, don't know really why. Is I have to manage the memory now?
06:28:01lbarthttps://gist.github.com/lbartoletti/8516303ea15cd9d2234e7767a64ca13e#file-main-c-L17 Any ideas? Thanks
06:34:01*PMunch joined #nim
06:38:43Zevvnarimiran: hows life
06:39:18narimiranrecharged now, after 2-week holidays :)
06:39:26Zevvgood work!
06:39:55narimiraneeerrrrm, exactly the opposite of work
06:40:08Zevvgood holidays!
06:41:01narimiranyeah
06:41:08narimiranhow bout you?
06:45:34Zevvhaving good holidays
07:09:57ForumUpdaterBotNew thread by Lbart: Nim to C, see https://forum.nim-lang.org/t/6717
07:23:30*PMunch quit (Quit: leaving)
07:24:06ForumUpdaterBotNew thread by Lutins: For-fun medieval rebranding, see https://forum.nim-lang.org/t/6719
07:26:06*PMunch joined #nim
07:26:27FromDiscord<Rika> thats fun
07:54:02*hnOsmium0001 quit (Quit: Connection closed for inactivity)
07:54:43*floppydh joined #nim
07:57:26PMunchHmm, damn
07:57:51PMunchI updated my computer, which apparently must've updated some part of the GCC/Arduino toolchain..
07:58:42PMunchNow getting "lto1: internel compiler error: bytecode stream: expected tag identifier_node instead of LTO_UNKNOWN" error when compiling for the Arduboy.. http://ix.io/2v4F
08:04:03PMunchAha, apparently it was because it tried to compile in some sources that was built with an older compiler: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62083
08:04:14PMunchSimply deleting the nim cache and recompiling fixed the issue
08:15:56*fredrikhr1 joined #nim
08:16:54*fredrikhr quit (Ping timeout: 258 seconds)
08:16:54*fredrikhr1 is now known as fredrikhr
08:18:46*Vladar joined #nim
08:41:36*solitudesf quit (Remote host closed the connection)
08:42:12*solitudesf joined #nim
08:47:48*krux02 joined #nim
09:17:35*abm joined #nim
09:19:19*Zectbumo quit (Remote host closed the connection)
09:39:19*floppydh quit (Quit: WeeChat 2.7.1)
09:52:05*FromDiscord quit (Remote host closed the connection)
09:52:19*FromDiscord joined #nim
09:53:03*gangstacat quit (Ping timeout: 272 seconds)
09:58:41*gangstacat joined #nim
09:59:14Zevvnimcache is baaaad then. it should take in account compiler fingerprints like ccache does
10:01:55*FromDiscord quit (Remote host closed the connection)
10:02:12*FromDiscord joined #nim
10:11:26*Northstrider[m] quit (Quit: killed)
10:12:51*Northstrider[m] joined #nim
10:31:03*apahl quit (Ping timeout: 272 seconds)
10:31:55*apahl joined #nim
10:52:34*arecacea1 quit (Remote host closed the connection)
10:52:53*arecacea1 joined #nim
11:02:15Yardanico45=YHG[]'
11:02:19Yardanicosorry wrogn chat
11:10:08FromDiscord<Recruit_main707> xD
11:14:44FromDiscord<maiagallo> For what it's worth, I've spent the weekend checking nim, kotlin and rust and nim was my favourite by FAR
11:15:16FromDiscord<ache of head> Rust is cool but I feel like it complicates stuff that doesn't have to be
11:15:54Yardanicoalso I heard that Rust's ownership gets in your way too much when you start making your own data structures
11:15:57Yardanicoinstead of using stdlib ones
11:16:03FromDiscord<ache of head> Despite many people liking it, I feel likeborrowing system does more damage than it prevents it
11:16:08FromDiscord<ache of head> (edit) 'likeborrowing' => 'like the borrowing'
11:16:59FromDiscord<ache of head> I'm not saying it's bad
11:17:02FromDiscord<Rika> rust people would probably say that its hard to judge how many issues it would save you from since you dont get them
11:17:04FromDiscord<ache of head> I just don't like it
11:17:19FromDiscord<ache of head> It's weird to work with
11:17:30FromDiscord<maiagallo> I'm a bit sad now that nim's ecosystem is lagging behind comapred to them
11:17:45Yardanicowell rust was pushed by mozilla quite a lot
11:17:47FromDiscord<Rika> yeah its most likely the fact that nim isnt backed by a large corp
11:18:08FromDiscord<ache of head> I feel like many people work differently, but this is how I do: I hate writing code that doesn't have to be there and that doesn't benefit to the project in any way directly.
11:18:27FromDiscord<ache of head> That's why implementing `Debug` for every single new struct I make is just the most annoying thing in the world to me.
11:19:42FromDiscord<ache of head> Shamelessly plugging myself in: I wrote an article on the differences between Nim and Rust once: https://dev.to/aachh/nim-v-rust-4kh5
11:20:11FromDiscord<ache of head> Probably everything is wrong with it but it's a first time, eh?
11:20:19FromDiscord<maiagallo> Nice, I'm going to read it later πŸ™‚ Btw I think I will end up trying nim, even though it won't help me find a new job anytime soon
11:21:58FromDiscord<Rika> reading it right now
11:22:07FromDiscord<Recruit_main707> @ache of head this is wrong https://media.discordapp.net/attachments/371759389889003532/747415436626493551/unknown.png
11:22:22FromDiscord<ache of head> Yeah, I know there's a return keyword
11:22:26FromDiscord<ache of head> I don't know why I wrote that
11:22:32FromDiscord<ache of head> I'm still not sure if it returns values
11:22:33FromDiscord<ache of head> Does it?
11:22:36FromDiscord<Recruit_main707> ofc
11:22:39FromDiscord<lakmatiol> it works like normal return
11:22:40FromDiscord<ache of head> I only know it exists procs.
11:22:42FromDiscord<Recruit_main707> its a normal return
11:22:43FromDiscord<ache of head> Ah, okay
11:22:48FromDiscord<ache of head> (edit) 'exists' => 'exits'
11:22:55FromDiscord<ache of head> *why did i send this*
11:22:57FromDiscord<lakmatiol> just that you often use result instead or just neither
11:23:06FromDiscord<ache of head> Yeah, that's true
11:23:09FromDiscord<ache of head> Okay, going to correct that now
11:23:41FromDiscord<Rika> also again, nim isnt necessarily a gc'd language
11:23:46FromDiscord<ache of head> Yep, I put an edit there
11:23:59FromDiscord<ache of head> I didn't know about planned ARC when I was writing it
11:24:02FromDiscord<Rika> i dont think "oh an edit" when i see a footnote
11:24:09FromDiscord<Rika> i think "oh a reference"
11:24:15FromDiscord<ache of head> it's explicitly named "edit"
11:24:22FromDiscord<ache of head> and it's not numbered
11:24:22FromDiscord<Rika> oh, so its not the [1] things
11:24:23FromDiscord<Rika> ok
11:24:32*waleee-cl joined #nim
11:25:10FromDiscord<Rika> also nim has the same implicit return w/o return keyword or result assignment as rust
11:25:11FromDiscord<Recruit_main707> its pretty good overall
11:26:05FromDiscord<ache of head> I mean, I definitely got to know Nim much better since I wrote it
11:26:11*aachh joined #nim
11:26:51FromDiscord<ache of head> Thanks for the feedback!
11:27:51FromDiscord<Rika> i think nim needs more generics in the stdlib, stuff like `streams` has a lot of `readType` style names for its procs and i think it could be better
11:28:35FromDiscord<Ricky Spanish> theres some interesting things that would be worth adding imo like outputing c from nim which iv not seen from rust but maybe im wrong on that one
11:28:43FromDiscord<Ricky Spanish> good read tho πŸ‘
11:28:43Yardanicowell, rust has a variant of an HM type system
11:28:58Yardanicoso let data: u32 = parse("15") is same as let data = parse<u32>("15")
11:29:09Yardanico(roughly, not exact Rust's syntax)
11:29:21FromDiscord<Recruit_main707> lets just leave the readers some surprises just in case they get to know nim better :p
11:29:55FromDiscord<ache of head> You're all right, Nim surely has many more features, but I didn't want to feel like the article was biased πŸ˜†
11:30:11FromDiscord<ache of head> More like an objective comparison.
11:30:33FromDiscord<ache of head> Or subjective? Most of what I wrote were only my opinions after all.
11:30:50FromDiscord<Ricky Spanish> true, im just zealous about the features i found in nim i suppose, since for me the ability to turn gc on and off was a huge part and getting to read the c was like willy wonka handing the keys to charlie and telling him to take what he likes
11:31:19FromDiscord<Rika> though nim's c output is not exactly readable perse
11:31:21FromDiscord<Ricky Spanish> yeh all true, dont wanna start a flame war online about programming languages...
11:31:51FromDiscord<ache of head> I mean, as long as you're on Nim's side, I think you can spark all the wars you want here. xD
11:32:28FromDiscord<ache of head> AND
11:32:37FromDiscord<ache of head> One big feature I realized I haven't touched upon are macros.
11:32:48FromDiscord<ache of head> I just kind of mushed them into "I like Nim's more"
11:32:57FromDiscord<ache of head> But now I see I should've wrote some more about them
11:33:19*rockcavera joined #nim
11:33:39FromDiscord<Rika> you'll need to compare them with rust macros though
11:33:46FromDiscord<Rika> good luck with that if you know neither
11:33:48FromDiscord<ache of head> Yp
11:33:50FromDiscord<ache of head> (edit) 'Yp' => 'Yep'
11:34:08FromDiscord<ache of head> I haven't done anything with Rust, let alone macros, for some time now
11:34:17FromDiscord<ache of head> (edit) 'I haven't done anything with Rust, let alone ... macros,' => 'I haven't done anything with Rust, let aloneRust'
11:35:27aachhfromdiscord: yardanico
11:35:35aachhsorry sorry accident
11:35:40FromDiscord<Rika> wonder how dumb reader macros would be on nim
11:35:49*aachh quit (Remote host closed the connection)
11:49:14*luis_ joined #nim
11:53:27FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2v5K
12:05:28*FromDiscord quit (Remote host closed the connection)
12:05:44*FromDiscord joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:43*supakeen joined #nim
12:06:50*superbia quit (Quit: WeeChat 2.9)
12:17:20*kinkinkijkin quit (Ping timeout: 244 seconds)
12:21:29*endragor quit (Quit: Leaving...)
12:23:51*endragor joined #nim
12:25:16*luis_ quit (Quit: luis_)
12:25:54*luis_ joined #nim
12:28:09FromDiscord<dom96> > Nice, I'm going to read it later πŸ™‚ Btw I think I will end up trying nim, even though it won't help me find a new job anytime soon↡@maiagallo most languages are similar, knowing and contributing to a "new" programming language will give you far more knowledge/experience than simply writing Python and copy and pasting solutions from StackOverflow. And good companies do understand that.
12:30:32FromGitter<alehander92> one can learn both (popular tech and more experimental stuff)
12:30:42*kinkinkijkin joined #nim
12:31:34FromDiscord<dom96> Curious what everyone's thoughts are on the conversation I'm having here with a package maintainer: https://github.com/c-blake/hldiff/issues/1#issuecomment-678832853 (it's related to how Nimble handles package directory structures).
12:31:34disbotβž₯ Add `installExt` to `hldiff.nimble`
12:33:13FromDiscord<dom96> (And you can tell me here instead of spamming that issue :))
12:33:22ForumUpdaterBotNew thread by Alexeypetrushin: How to convert tuple to JSON?, see https://forum.nim-lang.org/t/6720
12:34:15FromDiscord<maiagallo> @dom96 true, but having some experience with a specific language definitely helps if it's the one the company's using πŸ™‚
12:36:18*lritter joined #nim
12:43:51*thomasross joined #nim
12:46:33FromDiscord<maiagallo> Dependencies have to be added manually to the nimble file, right?
12:47:06FromGitter<alehander92> dom96 what do you think about nix
12:47:39FromGitter<alehander92> a bit offtopic, just wondering if it's getting popular outside of haskell/enthusiasm people
12:47:56FromDiscord<dom96> > Dependencies have to be added manually to the nimble file, right?↡@maiagallo yes
12:48:22FromDiscord<dom96> > dom96 what do you think about nix↡@alehander92[Gitter]#0000 haven't used it, so not much thoughts on it.
12:49:17FromDiscord<Rika> i like nix and nixos, the thought of a consolidated config for everything is nice
12:49:26FromDiscord<Rika> means the syntaxes for everything is mainly the same
12:51:11FromDiscord<maiagallo> Thanks! Just to understand if I'm missing something: I can search for stuff in the stdlib from the docs page, but on nimble I have to navigate to the package since it doesn't seem to index packages' docs, right?
12:51:25FromDiscord<dom96> yep
12:51:35FromDiscord<maiagallo> great thanks!
12:51:48FromDiscord<maiagallo> And there's nothing like `nimble build --file-watch`
12:52:14FromDiscord<maiagallo> (Sorry for the obvious questions, I just want to be sure I'm not doing unnecessary things πŸ˜„ )
12:52:28solitudesfno, there isn't
12:53:23FromDiscord<maiagallo> Thanks a lot guys!
12:54:20FromDiscord<maiagallo> I'm following some examples (the nim days right now) and there's a lot of deprecated/broken code. It could be a nice project to learn the language better
12:54:39Yardanicoin nim days?
12:54:44YardanicoI think it's still working
12:55:35FromGitter<alehander92> @dom96 thanks :)
12:55:38FromDiscord<maiagallo> the URL shortening is not working for me now
12:55:54FromDiscord<maiagallo> I think I had some other issues here and there, deprecated functions for sure
12:57:51*Senketsu joined #nim
13:03:28*Senketsu quit (Ping timeout: 256 seconds)
13:06:10FromDiscord<krisppurg> hey guys, do you know how to remove an item in a json array or at least change a json array?
13:08:26FromDiscord<Rika> does `delete` (supplying the json array and the index) not work
13:09:11FromDiscord<krisppurg> hold on
13:10:40*Senketsu joined #nim
13:11:09FromDiscord<krisppurg> nope
13:11:29FromDiscord<krisppurg> @Rika
13:12:59FromDiscord<Rika> let me read the docs then
13:14:30FromDiscord<Rika> @krisppurg try `jsonarr.elems.delete(idx)` (tho im not sure how safe or correct this is)
13:14:56FromDiscord<krisppurg> Okay
13:15:22*Senketsu quit (Ping timeout: 256 seconds)
13:16:44FromDiscord<ache of head> Can macros recur?
13:16:56FromDiscord<Rika> you mean recurse?
13:16:59FromDiscord<ache of head> yes
13:17:00Yardaniconot infinitely, but yes
13:17:01Yardanicowhy not?
13:17:12FromDiscord<ache of head> How would I recur with a static parameter?
13:17:28FromDiscord<ache of head> I have a static[seq[string]] and I want to pass a modified version of it every time I recur
13:18:45FromDiscord<ache of head> As in, when I try to recur the error I get a type error, that a seq[string] was received where a static[seq[string]] was expected
13:18:53FromDiscord<ache of head> (edit) 'error,' => 'error'
13:18:57FromDiscord<krisppurg> oh it worked thank you @Rika
13:19:27*leorize quit (Quit: WeeChat 2.8)
13:19:42FromDiscord<Rika> πŸ‘
13:20:38*thomasross quit (Ping timeout: 260 seconds)
13:21:17FromGitter<alehander92> macros dont return
13:21:27FromGitter<alehander92> they expand
13:21:39FromGitter<alehander92> compile time functions return
13:21:53Zevvreal men dont return, the expand
13:21:56FromGitter<alehander92> ah sorry, i read return instead of recur
13:22:09FromGitter<alehander92> hm, so yeah, they can recur
13:22:18Zevvreal men dont retcur, they expand
13:22:22FromGitter<alehander92> haha
13:22:23Zevvdamn typos
13:22:32Zevvtyping is hard
13:22:40FromGitter<alehander92> real man use real numbers
13:23:12Zevvi'm a very integer person, tho
13:23:25FromGitter<alehander92> integerman!
13:23:32Zevvdisruptek, he's a complex dude
13:23:33FromGitter<alehander92> inte german??
13:24:09FromGitter<alehander92> at least we're not double persons
13:24:14FromDiscord<ache of head> xDD
13:25:57*luis_ quit (Quit: luis_)
13:28:30FromDiscord<ache of head> Oh wait
13:28:39FromDiscord<ache of head> I think there's such a thing as `static()`
13:28:45*Kaivo quit (Quit: WeeChat 2.9)
13:28:45FromDiscord<ache of head> Will this work?
13:29:11FromDiscord<ache of head> Nope, can't evaluate at compile time
13:29:11FromDiscord<ache of head> makes sense
13:30:26FromGitter<alehander92> what are you trying to do
13:30:59*luis_ joined #nim
13:32:09FromDiscord<ache of head> Hmmm, how can I put this
13:32:49FromGitter<alehander92> just tell us as it is man
13:32:58FromGitter<alehander92> we're here to help you
13:33:00FromGitter<alehander92> and make bad puns
13:33:04FromGitter<alehander92> and zevv is out of puns
13:33:04FromGitter<alehander92> maybe
13:33:06*awe00 joined #nim
13:33:17FromDiscord<ache of head> xD
13:33:19FromDiscord<ache of head> Okay, so:
13:33:50FromDiscord<ache of head> For every seq[string] the macro gets, it should generate something like this:
13:36:40FromDiscord<maiagallo> is it possible to call a macro from another macro?
13:36:55FromDiscord<ache of head> Okay, wait
13:36:59FromDiscord<ache of head> I think I solved my problem
13:37:02FromDiscord<ache of head> I don't need to recur
13:37:40*endragor quit (Remote host closed the connection)
13:38:21FromGitter<alehander92> real man!
13:38:26FromDiscord<lqdev> @maiagallo sure
13:38:37FromGitter<alehander92> you can expand a macro from another macro
13:38:38FromDiscord<lqdev> it's even possible to generate a call to a macro from a macro
13:41:28*endragor joined #nim
13:41:33FromGitter<alehander92> yes, very useful ^
13:44:32FromDiscord<maiagallo> does it need some special syntax? How do I call it?
13:44:58Yardanicoyou just generate code which calls another macro in your macro
13:45:13Yardanicocompiler will expand everything over and over until it's fully expanded
13:45:29Yardanicoor at least until the recursion depth limit wasn't reached :)
13:45:52FromDiscord<ache of head> how many ritual sacrifices have been made in order to create the Nim compiler?
13:46:15Yardanicoit was initially written in Free Pascal
13:46:26Yardanicothen translated to nim with pas2nim
13:47:08FromDiscord<ache of head> Wait, really?
13:47:12Yardanicoof course?
13:47:19FromDiscord<Hearthstone> O
13:47:50Yardanicohttps://github.com/nim-lang/Nim/blob/devel/compiler/readme.md
13:48:33Yardanicohttps://github.com/nim-lang/Nim/tree/405b86068e6a3d39970b9129ceec0a9108464b28/nim
13:49:18FromDiscord<ache of head> This is like
13:49:19FromDiscord<ache of head> mindblowing
13:49:54FromDiscord<ache of head> I didn't know it was translated
13:50:15Yardanicowell since then it has been developed in nim
13:50:16FromDiscord<dom96> Other fun fact: Nim used to live in Canonical's launchpad and use Bazaar πŸ˜„
13:50:27Yardanicoah yeah I saw the bug tracker
13:51:08FromDiscord<dom96> Took me some time to convince Araq to move to GitHub. Good times.
13:55:12FromDiscord<Hearthstone> Lmao
13:55:28FromDiscord<Hearthstone> Why not make a mirror to GitLab btw
13:55:36FromDiscord<Hearthstone> A one way mirror
13:55:43Yardanicoit was there
13:55:48Yardanicobut then was abandoned, not sure why :P
13:55:55Yardanicoask @dom96 about it :D
13:55:56FromDiscord<Hearthstone> Oh?
13:56:07FromDiscord<dom96> https://gitlab.com/nim-lang/nim
13:56:13Yardanicoyep
13:56:16FromDiscord<dom96> > Repository mirroring has been paused due to too many failed attempts, and can be resumed by a project maintainer.
13:56:17FromDiscord<dom96> lol
13:56:23Yardanico" Pull mirroring failed 2 years ago."
13:56:30YardanicoI thought you knew :P
13:56:45FromDiscord<dom96> Seems nobody cares otherwise they'd complain
13:56:48FromDiscord<Hearthstone> Oof
13:56:53Yardanicono one knows*
13:57:29FromDiscord<lqdev> >5 stars
13:57:34FromDiscord<lqdev> yeah pretty mcuh
13:57:36FromDiscord<lqdev> (edit) 'mcuh' => 'much'
14:06:24*superbia joined #nim
14:08:43*endragor quit (Remote host closed the connection)
14:08:54FromDiscord<ache of head> Okay, turns out I need the macro
14:09:00FromDiscord<ache of head> the recursion*
14:09:11*endragor joined #nim
14:10:54FromDiscord<ache of head> Basically for every `seq[string]` the macro gets, it should generate this. For this case the `seq[string]` is `@["me", "location", "city"]`
14:11:31FromDiscord<ache of head> https://media.discordapp.net/attachments/371759389889003532/747458066072600697/Zrzut_ekranu_2020-08-24_o_16.11.01.png
14:11:44FromDiscord<ache of head> So it would always start with `globalObject`
14:11:59FromDiscord<ache of head> And in the bracket expression there would go the first element of the seq
14:12:36FromDiscord<ache of head> and then repeat `.value` with the next element in brackets
14:13:14FromDiscord<ache of head> I think I got the macro right but I don't know how I can pass a `static[seq[string]]` down
14:18:13*endragor quit (Ping timeout: 264 seconds)
14:24:32ForumUpdaterBotNew thread by Doongjohn: Generic vs static parameter, see https://forum.nim-lang.org/t/6721
14:27:22*narimiran quit (Ping timeout: 265 seconds)
14:28:02Zevvping @clyybber
14:31:44*endragor joined #nim
14:36:05*endragor quit (Ping timeout: 240 seconds)
14:38:41*Vladar quit (Quit: Leaving)
14:44:38ZevvI am surprised by some things I learn from inspecting what happens under ARC
14:44:44Yardanicolike?
14:44:53*thomasross joined #nim
14:45:04ZevvI get COW behaviour when copying strings around
14:45:09ZevvI was not aware nim did that
14:45:14Yardanicoyes it does that now :)
14:45:56Zevvdude
14:46:00Zevvwho made up that shit
14:46:06Yardanicowat
14:46:22Zevvwell, I just realized I know this
14:46:28Zevvit was the bad performance in base64.nim
14:47:38Zevvevery mutation of a string makes nim go out to NimPrepareStrMutationV2()
14:47:57ZevvI hadn't put 1&1 together yet that this means strings get COWed
14:49:05ZevvI'm trhing to create some small, obvious test programs to illustrate what ARC does under the hood
14:49:08Zevvbut's not easy
14:49:13*hnOsmium0001 joined #nim
14:52:36*hzx joined #nim
14:58:00*krux02_ joined #nim
14:58:25*solitudesf- joined #nim
15:01:30*euantorano_ joined #nim
15:02:05*hnOsmium0001_ joined #nim
15:02:29*drewr` joined #nim
15:03:16*hnOsmium0001 quit (Ping timeout: 240 seconds)
15:03:16*krux02 quit (Ping timeout: 240 seconds)
15:03:16*euantorano quit (Ping timeout: 240 seconds)
15:03:16*solitudesf quit (Ping timeout: 240 seconds)
15:03:16*drewr quit (Ping timeout: 240 seconds)
15:03:16*dddddd quit (Ping timeout: 240 seconds)
15:03:17*euantorano_ is now known as euantorano
15:03:18*hnOsmium0001_ is now known as hnOsmium0001
15:03:38*kwilczynski quit (Ping timeout: 240 seconds)
15:03:39*jwm224 quit (Ping timeout: 240 seconds)
15:03:40FromGitter<ynfle> Is it a bug that https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L361 doesn't have `[T: object | tuple]`? It would work for both
15:04:13*Mortir joined #nim
15:05:05*jwm224 joined #nim
15:05:21Mortirhello
15:06:02*muffindrake quit (Ping timeout: 240 seconds)
15:06:02*schurig quit (Ping timeout: 240 seconds)
15:06:07*solitudesf- is now known as solitudesf
15:06:27MortirWas taking a look at this example: https://gist.github.com/zacharycarter/846869eb3423e20af04dea226b65c18f, it mentions the possibility of using C libraries.
15:06:54Yardanicoyes
15:07:04*muffindrake joined #nim
15:07:05FromGitter<ynfle> Was that to me?
15:07:15Yardanicono :) i don't know
15:07:25Yardanicotry changing it by adding "tuple" and see if it works
15:07:25*schurig joined #nim
15:07:34Yardanicoalso check anonymous tuples
15:07:40FromGitter<ynfle> I will
15:07:58MortirBut, is it possible to use the OS version of a library or it has to be included among the compiled binary?
15:08:05YardanicoMortir: yes, it is
15:08:11Yardanicoyou'll have to use the dynlib pragma
15:08:22*thomasross quit (Ping timeout: 256 seconds)
15:08:36Yardanicohttps://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
15:09:56*endragor joined #nim
15:09:58*stefantalpalaru_ joined #nim
15:09:59*stefantalpalaru quit (Remote host closed the connection)
15:10:03*kwilczynski joined #nim
15:10:05MortirYardanico: thank you
15:11:13*Mortir left #nim (#nim)
15:11:43FromDiscord<Clyybber> Zevv: Ayy
15:11:59FromDiscord<Clyybber> Zevv: The solution to your mutating thing is that its now inlined
15:12:08FromDiscord<Clyybber> the COW behaviour is just cursor inference
15:13:53FromDiscord<Clyybber> HA! I just realized one problem with shadow scopes is not a thing, because compiles has a scope
15:13:56FromDiscord<Clyybber> which is great
15:14:09*arecacea1 quit (Remote host closed the connection)
15:14:17*dddddd joined #nim
15:15:03*arecacea1 joined #nim
15:15:10Zevvno way cursor inference. I have an object F with a string in there. I do 'let a = F(s: "foo")` and then `let b = a`. Now a and b share the same string data.
15:15:17*hzx quit (Quit: Going offline, see ya! (www.adiirc.com))
15:15:49ZevvOh waaait it's a constant initially
15:15:56Zevvthat's the strv2 doing that
15:16:20Zevvand what's my mutated thing?
15:16:44*schurig_ joined #nim
15:17:24*schurig quit (Ping timeout: 240 seconds)
15:17:49*apahl_ joined #nim
15:17:55*apahl quit (Ping timeout: 240 seconds)
15:17:56*supakeen quit (Ping timeout: 240 seconds)
15:18:27*supakeen joined #nim
15:20:35*endragor quit (Ping timeout: 240 seconds)
15:21:32disrupteki think he's talking about your kids.
15:22:40*gangstacat quit (*.net *.split)
15:22:41*silvernode[m] quit (*.net *.split)
15:22:41*darrion_oakenbow quit (*.net *.split)
15:22:42*MTRNord[m] quit (*.net *.split)
15:22:42*alfabetacain[m] quit (*.net *.split)
15:22:42*D_ quit (*.net *.split)
15:22:43*LyndsySimon quit (*.net *.split)
15:22:43*Hotbees quit (*.net *.split)
15:22:43*hpyc9 quit (*.net *.split)
15:22:43*crem quit (*.net *.split)
15:22:43*alehander92 quit (*.net *.split)
15:22:43*zielmicha__ quit (*.net *.split)
15:22:44*GitterIntegratio quit (*.net *.split)
15:22:51Zevvoh is that it. I already wondered where these little people came from
15:23:12Zevvwell there has been some considerable mutation going on from my genes, I'm sure of that
15:23:42Zevvthese are some bad mouthed pricks with an attention span of about 4 seconds each
15:25:27*leorize[m] quit (Ping timeout: 240 seconds)
15:25:36*jklhyd[m] quit (Ping timeout: 246 seconds)
15:25:36*ee7[m] quit (Ping timeout: 246 seconds)
15:25:36*skrylar[m] quit (Ping timeout: 246 seconds)
15:25:36*vycb[m] quit (Ping timeout: 246 seconds)
15:25:36*planetis[m] quit (Ping timeout: 246 seconds)
15:25:44*torbencarstens[m quit (Ping timeout: 244 seconds)
15:26:21Zevvis 'owned' still relevant these days?
15:26:37*ee7[m] joined #nim
15:26:37*vycb[m] joined #nim
15:26:38*jklhyd[m] joined #nim
15:26:39*planetis[m] joined #nim
15:27:25*torbencarstens[m joined #nim
15:27:49*leorize[m] joined #nim
15:29:36FromDiscord<Clyybber> not yet
15:29:47FromDiscord<Clyybber> its in limbo
15:30:00*alfabetacain[m] joined #nim
15:30:29FromDiscord<Clyybber> but I have an idea, replacing owned by nocopy
15:30:50FromDiscord<Clyybber> doesn't even need to be implemented in the compiler I think
15:31:10FromDiscord<Clyybber> nocopy[T] is T but with `=` {.error.}
15:31:23FromDiscord<Clyybber> Then lent and cursors/views can be united
15:31:42FromDiscord<Clyybber> and if you explicitly want a lent that you want to prevent copies from
15:31:47FromDiscord<Clyybber> you can do nocopy lent T
15:32:50Zevvhmm i need to let that sink in I guess :)
15:33:54ZevvI think my writeup ends up simplere then I expected it to be
15:33:56*gangstacat joined #nim
15:33:56*silvernode[m] joined #nim
15:33:56*D_ joined #nim
15:33:56*LyndsySimon joined #nim
15:33:56*Hotbees joined #nim
15:33:56*hpyc9 joined #nim
15:33:56*crem joined #nim
15:34:08FromDiscord<Clyybber> destructors.md is simple itself
15:34:14*MTRNord[m] joined #nim
15:34:14*darrion_oakenbow joined #nim
15:34:14*skrylar[m] joined #nim
15:34:14*alehander92 joined #nim
15:34:14*zielmicha__ joined #nim
15:34:14*GitterIntegratio joined #nim
15:34:27Zevvit's now telling what a GC is. How nim got smarter so it does no longer need a GC. How it does refcounting and restructors. And the rest will be examples of the smarts it can do to allow moves, sinks, rvos and the like
15:34:37*skrylar[m] quit (Changing host)
15:34:37*skrylar[m] joined #nim
15:34:38*MTRNord[m] quit (Changing host)
15:34:38*MTRNord[m] joined #nim
15:34:38*darrion_oakenbow quit (Changing host)
15:34:38*darrion_oakenbow joined #nim
15:34:50Zevvhmm, i like that word. restrutctor. I will have to find a use for it
15:35:00*abm quit (Ping timeout: 256 seconds)
15:35:29*luis_ quit (Quit: luis_)
15:36:35*hyiltiz quit (Ping timeout: 258 seconds)
15:37:43*endragor joined #nim
15:41:59FromDiscord<Clyybber> can I see it
15:42:57FromDiscord<Clyybber> ah, found it
15:43:06FromDiscord<Clyybber> nice introduction
15:44:29Zevvit should take the fear away and try to answer the recurring questions here on #nim
15:44:50Zevvyou can't send people to ar4qs "destructors and move semantics" doc. they will cry and run away
15:45:01disruptekthat's the idea.
15:50:39*endragor quit (Ping timeout: 246 seconds)
15:56:48*endragor joined #nim
15:59:25*PMunch quit (Quit: leaving)
15:59:28*hyiltiz joined #nim
15:59:28*hyiltiz quit (Changing host)
15:59:28*hyiltiz joined #nim
16:05:36ForumUpdaterBotNew thread by Clonk: Nim - Julia bridge , see https://forum.nim-lang.org/t/6723
16:15:09*endragor quit (Ping timeout: 265 seconds)
16:16:36*endragor joined #nim
16:22:45FromGitter<Knaque> Am I stupid? `let x = letters[rand(letters.len-1)].string`, where `letters` is `('a'..'z').toSeq`, throws `Error: type mismatch: got <char> but expected 'string'`.
16:22:48shashlick@leorize - have we finally moved to the new nightlies?
16:24:28*awe00 quit (Ping timeout: 246 seconds)
16:26:19FromGitter<Knaque> The first thing I came up with to get around that was doing `x & ""`, but that seems janky. What was I doing wrong?
16:27:50ForumUpdaterBotNew thread by Dsrw: Pause/resume the Nim VM, see https://forum.nim-lang.org/t/6724
16:29:12FromDiscord<Rika> @Knaque use $ instead
16:30:12FromGitter<Knaque> Well now that you mention it, I've literally had that *exact* issue before, and came to that *exact* solution, and apparently just forgot. Guess I'm way too used to casting numbers with `.int` and `.float` that I forget `$` exists.
16:31:39FromGitter<Knaque> Thank you for reminding me that I am, in fact, stupid.
16:32:33*awe00 joined #nim
16:35:35*endragor quit (Remote host closed the connection)
16:35:41*endragor joined #nim
16:42:32FromDiscord<lqdev> Knaque: also `('a'..'z').toSeq` is inefficient, you're better off using a set `{'a'..'z'}`
16:42:45FromDiscord<lqdev> and then just `sample(letters)`
16:42:47FromDiscord<Rosen> is casting numbers with `.int` etc considered proper practice over `toInt` etc or is it personal preference
16:43:40FromDiscord<Rosen> (edit) 'preference' => 'preference?'
16:43:49*endragor quit (Remote host closed the connection)
16:49:22FromDiscord<Rika> its conversion, not casting, and im pretty sure its preference
16:58:23*superbia1 joined #nim
17:00:49*superbia quit (Ping timeout: 264 seconds)
17:04:28FromDiscord<Rosen> oh that's right, my b
17:08:47FromDiscord<haxscramper> When wrapping C `{.pure.}` annotation on enums is necessary only to avoid name clashes, not for compatibility with C code?
17:10:00disruptekcorrect.
17:14:16*endragor joined #nim
17:18:44disruptekZevv: s/more work then/more work than/
17:18:58FromGitter<alehander92> disruptek
17:19:01FromGitter<alehander92> give me cool project
17:19:32disrupteki have so many blockers.
17:19:49FromGitter<alehander92> so inventing a new os
17:19:52FromGitter<alehander92> is not the solution
17:20:01FromGitter<alehander92> ok, something small
17:20:18FromGitter<alehander92> do you want a different editor
17:20:22FromGitter<alehander92> or vcs
17:20:28FromGitter<alehander92> or a different LETTER
17:20:43disruptekdo you want a real project?
17:20:51FromGitter<alehander92> something small
17:21:15disruptek!repo ndoc
17:21:17disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more...
17:21:22disrupteknot that one.
17:21:25disruptek!repo disruptek/ndoc
17:21:26disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴
17:21:30disrupteki always make that mistake.
17:21:31FromDiscord<dom96> !repo nim-lang/needed-packages
17:21:31disbotno results 😒
17:21:46FromDiscord<dom96> !repo nim-lang/needed-libraries
17:21:47disbothttps://github.com/nim-lang/needed-libraries -- 9needed-libraries: 11This repository contains a list a needed libraries. 15 82⭐ 2🍴
17:21:50FromGitter<alehander92> i created the needed libs
17:21:51FromGitter<alehander92> repo
17:21:59FromGitter<alehander92> and still i forget about it
17:22:04FromDiscord<dom96> lol
17:22:10FromDiscord<dom96> time for you to resolve its issues πŸ˜„
17:22:18FromGitter<alehander92> noo
17:22:26FromDiscord<Clyybber> disruptek: Wait, so a smart doc?
17:22:31FromGitter<alehander92> i can write down some rfc-s tjo
17:22:34FromGitter<alehander92> tho*
17:22:36FromDiscord<Clyybber> basically, you ask a question and it answers you?
17:22:51FromDiscord<Clyybber> since when does pydoc do that
17:22:59FromDiscord<dom96> Surprised you're looking for projects though
17:23:01disruptekthe stories are examples of questions you want to use ndoc to answer.
17:23:03FromDiscord<dom96> I have sooooo many ideas
17:23:04FromGitter<alehander92> we need to stop relying on google
17:23:08FromGitter<alehander92> dom96 me too
17:23:15FromGitter<alehander92> but that's exactly the reason
17:23:24FromGitter<alehander92> i burn out from the choice
17:23:42FromDiscord<Clyybber> make music
17:23:55disruptekgimme a link to some good chants.
17:25:25*endragor quit (Ping timeout: 240 seconds)
17:25:42disruptektestes doesn't work in c due to a nim codegen bug in inheritance.
17:25:51disruptekdon't get me started on cps.
17:25:54FromDiscord<Clyybber> heh
17:26:01disruptekand now nimph is blocked by truly insane concepts bugs.
17:26:07FromDiscord<Clyybber> bugs?
17:26:17FromDiscord<Clyybber> i saw your groups thing
17:26:17disruptekno two ways about it.
17:26:36FromDiscord<dom96> Why use concepts when they're up for a redesign at this point?
17:26:49disruptekthey've been "up for a redesign" for ages.
17:26:52FromDiscord<Clyybber> they are not
17:27:04disruptekand i've been promised repeatedly that they are stable enough to use.
17:27:12disruptekso i finally said, fuck it.
17:27:55disruptekthey've worked for me in the past but admittedly, i'm starting to lean in.
17:28:10disruptekclyybber: also, adding .explain causes an apparent hang.
17:28:23disruptekso that's extra fun.
17:29:17FromDiscord<dom96> clyybber: what makes you so sure?
17:29:41FromGitter<alehander92> disruptek : https://www.youtube.com/watch?v=TvoVuOC_KKE
17:29:47Yardanicolol
17:30:00FromDiscord<Clyybber> disruptek: Nice
17:30:01FromGitter<alehander92> dom96 : concepts have their place
17:30:18FromDiscord<Clyybber> @dom96 I think a redesign should be build around them
17:30:20disruptekalehander92: thanks.
17:30:23FromDiscord<Clyybber> so more like sugar
17:30:25FromGitter<alehander92> iirc even if their impl changes, their existence would be useful
17:30:26disruptekthis stuff is great.
17:30:31FromGitter<alehander92> it is.
17:31:03FromDiscord<dom96> clyybber: I'm sure you've seen Araq's RFC https://github.com/nim-lang/RFCs/issues/168
17:31:05disbotβž₯ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
17:31:20FromGitter<alehander92> it helps the soul
17:31:24FromDiscord<Clyybber> yeah
17:31:25FromDiscord<Clyybber> I have
17:31:30disruptekafaic, the problem isn't the design but the impl. really unclear what these RFCs are addressing.
17:31:34FromDiscord<dom96> alehander92: I'm not suggesting we should remove them, but I've been for changing how they work for a while.
17:31:44FromGitter<alehander92> but you can still use them
17:32:10FromGitter<alehander92> i think Araq's point in one issue was that using existing concepts (if they work fine) should be good
17:32:16disruptekdom96: what don't you like?
17:32:24bungtestament errormsg: matchs substring ?
17:32:33FromGitter<alehander92> the syntax which is used for writing might change
17:32:50FromDiscord<dom96> disruptek: that the concept body needs to be evaluated by the VM as if it's a compile-time procedure
17:32:52disruptekclyybber: also, testes is really nice to use.
17:33:03FromDiscord<Clyybber> @dom96 thats the power
17:33:20disrupteki can't imagine giving that up.
17:33:50FromDiscord<dom96> That power is entirely unnecessary as Araq has demonstrated in his RFC
17:33:55FromGitter<alehander92> what do you use them for
17:34:14FromDiscord<Clyybber> except that it wasn't demonstrated
17:34:17FromDiscord<dom96> Also, I would argue that what is far more important are runtime interfaces
17:34:27FromDiscord<Clyybber> fair
17:34:32FromDiscord<Clyybber> but those can be built today
17:34:34FromDiscord<dom96> So that I don't have to merge things like this https://github.com/nim-lang/irc/pull/20/files :/
17:34:35disbotβž₯ Added TOR support
17:34:36FromDiscord<Clyybber> via macros
17:35:02FromDiscord<Clyybber> all of this stuff can be build ontop of concepts and case objects via macros
17:35:12FromDiscord<dom96> yes, that has been the message since I started using Nim
17:35:14FromGitter<alehander92> yep
17:35:15disruptekwe need to take better advantage of types and types are compile-time. there's just no way around that.
17:35:21FromGitter<alehander92> we should just include them in stdlib
17:35:28disruptekruntime is never the weak link ime.
17:35:29FromGitter<alehander92> something like a default interface macro
17:35:30FromDiscord<dom96> We need runtime interfaces in the stdlib, whether those are implemented in the compiler or via macros (I don't really care which)
17:35:45disruptekit can be a library.
17:35:53FromDiscord<Clyybber> !repo interfaced
17:35:55disbothttps://github.com/andreaferretti/interfaced -- 9interfaced: 11 15 24⭐ 4🍴 & 29 more...
17:35:58FromGitter<alehander92> too much fragmentation
17:36:10FromDiscord<dom96> The stdlib needs to use them.
17:36:12FromDiscord<Clyybber> yeah
17:36:12FromGitter<alehander92> i start to turn back to not small stdlibs
17:36:53FromDiscord<Clyybber> alehander92: https://www.youtube.com/watch?v=01SOLEftSOA
17:37:07disruptekstdlib shouldn't adopt this stuff until it is much more polished.
17:37:14bungdoes testament errormsg matchs substring ?
17:37:36disruptekdunno, but something tells me you have the source.
17:37:44*jdorr joined #nim
17:37:51FromDiscord<dom96> > stdlib shouldn't adopt this stuff until it is much more polished.↡yes, it's time for it to be polished
17:38:23disruptekwell, 3 years, no update. not even proper docs.
17:38:54disruptekYardanico: how often is interfaced referenced in .nimble files?
17:38:59FromDiscord<Clyybber> this is newer https://github.com/xflywind/shene
17:39:03Yardanicodisruptek: lol
17:39:19FromDiscord<dom96> It's a chicken and egg problem
17:39:42FromDiscord<dom96> I've got little reason to use interfaced because I don't know if others will abide by it
17:40:01Yardanicodisruptek: as far as I can see - in 0 modules :)
17:40:04disruptekthis attitude is infuriating to me, honestly.
17:40:26disruptekit's just a general distrust of dependencies that makes growth impossible.
17:40:26FromDiscord<dom96> And actually, the one thing I want to use interfaced for I cannot
17:40:30jdorrHello, anyone got time for what I suspect is an very basic Nim question?
17:40:32FromDiscord<dom96> because it's in the stdlib...
17:40:36Yardanicojdorr: sure, ask away
17:40:40FromDiscord<dom96> jdorr: don't ask to ask, just ask
17:40:46Yardanicodontasktoask.com :)
17:41:49jdorrIf I declare a table with `var tbl = initTable[int, int]()`, whats the syntax for when I want to pass it as a parameter?
17:41:49jdorrI've tried `proc doStuff(tbl2:[int, int])` and some other permutations, but no luck
17:41:53*tane joined #nim
17:41:58Yardanico Table[int, int]
17:42:18Yardanicohttps://nim-lang.org/docs/tables.html#Table you can see the "Table" type has two generic types
17:42:25Yardanicowell, uses two of them
17:42:32Yardanicoso you just use the same syntax
17:43:22ZevvI just realized someting thats source for confusion in the arc discussion
17:43:25Yardanicoso proc doStuff(tbl2: Table[int, int])
17:43:35Zevvwe start rambling about refs first
17:43:47Zevvand then all this move semantics complexity to avoid copies
17:44:11Zevvbut when using refs, there is no copying because we just have a ref thing
17:44:20FromDiscord<Clyybber> yeah :P
17:44:23Zevvthats mostly relevant with non-ref things
17:44:29FromDiscord<Clyybber> you could talk about seqs and strings
17:44:33Zevvso why the hell is all that in one document
17:44:49FromDiscord<Clyybber> because it makes sense
17:44:59Zevvyes but no but yes
17:45:10FromDiscord<Clyybber> seqs and strings are the kind-of-value-but-ref types
17:45:14FromDiscord<Clyybber> that arc enables
17:46:35FromDiscord<haxscramper> If I have `typedef struct Impl* Api` but the `Impl` is not defined anywhere and C api uses `Api` for function parameters is it ok to map `type Api = distinct pointer` or it is better to do something like `type Impl = object` - no implementation and `type Api = ptr[Impl]`.
17:46:56FromDiscord<haxscramper> E.g defined dummy `Impl` type and use `ptr[Impl]`
17:47:10jdorrThanks, Yardanico!
17:48:00Zevvclyybber: yeah maybe that is the bridge i need to go from one subject to the next
17:48:45FromDiscord<haxscramper> `Api` is just 'opaque pointer' according to documentation, so I assume it is safe to use either of these alternatives
17:48:45disrupteki still think you have to start with manual mm.
17:48:55FromDiscord<Clyybber> @haxscramper I prefer the distinct pointer way
17:49:28FromDiscord<Clyybber> prevents people from accidently dereffing your pointer and then causing bugs
17:50:37*jdorr quit (Quit: Leaving)
17:53:12Zevvdisruptek: I tried that, but I don't think there's a gap there
17:53:29Zevvits pretty obvious how stuff works in a few lines.
17:54:09Zevvbut the problem is brining up move semantics after that. Because why the hell do I need to move things if I just learned that stuff is reffed anyway
17:54:42disruptekmoves are about the rc.
17:55:04Zevvyeah but rcs are about refs, I just explained
17:55:08Zevvits a *ref* count
17:55:19disruptekso what?
17:55:57ZevvI have an object called `Thing` and `var a = Thing()`. Now `a` is not a ref.
17:56:02ZevvI do `var b = a`
17:56:04Zevvb is not a ref
17:56:14*Zectbumo joined #nim
17:56:21Zevvso how the hell should I explain that these move tricks are related to refcounts
17:56:28Zevvthere are no refs :)
17:57:00disruptekalso there are no moves.
17:57:58Zevvfair enough, bad example :)
17:58:23Zevvbut clyybber is right, strings and seqs are important
17:58:46disrupteksure. and people understand their weight.
17:58:52*narimiran joined #nim
17:58:54disruptekso moves and copies have some kind of value to them.
17:58:57Zevvclyybber is walking on thin ice. he's right more often then i am. he should learn to watch his back.
17:59:53FromDiscord<Clyybber> *hides
18:03:50*awe001 joined #nim
18:05:50*awe00 quit (Ping timeout: 265 seconds)
18:06:02*superbia1 is now known as superbia
18:08:32FromDiscord<dom96> 13watiopam
18:08:42Yardanicowhat
18:08:46disruptekdragons123
18:09:04FromDiscord<dom96> the name of my new project
18:09:11FromDiscord<dom96> can you guess what it is?
18:09:30disrupteka password manager.
18:09:46Zevvcorrect horse battery staple
18:15:17disrupteki've long wanted to write a password generator that was respectful of mnemonics and hand position.
18:15:31disruptekthere's your tiny project, alehander92.
18:17:26ZevvI got a nasty look from my local sysop the other day. The usual crap rules about "at least 12 chars, so much capital, so much digits, so much special chars"
18:17:29Zevvso i do 123qwe!@#QWE
18:17:38Zevvand all his rules were green
18:17:46Zevvso that's my default password now, everywhere.
18:17:53Zevvoops
18:18:22disrupteki still use passwords from servers i admin'd 20+ years ago.
18:18:23Yardanicohey, look, if you type your password out it's replaced! *******************
18:18:39ZevvDude. Are you new to irc?
18:18:49Yardanicoactually comparatively yes
18:18:57YardanicoI've known it for ~4 years
18:19:01Zevvok, fair enough
18:22:16*NimBot joined #nim
18:22:52*endragor joined #nim
18:22:57*solitudesf quit (Remote host closed the connection)
18:23:00narimiranZevv: nobody said it yet, so i need to: nice xkcd reference!
18:23:22*solitudesf joined #nim
18:23:52FromGitter<martinium> hello everyone
18:24:35FromGitter<martinium> I am parsing a bunch of json objects where a specific key is in one and it isn't in the others.
18:25:00FromGitter<martinium> I am trying to iterate through and ignore that key when it exists and include it's output when it does
18:25:20FromGitter<martinium> I tried using .hasKey() but there is no pass keyword to skip?
18:25:44FromGitter<martinium> hasKey() == false then inside of conditional I wish to skip or pass. Is there any way to do that
18:25:49FromDiscord<dom96> `continue`?
18:26:47narimiranusually, python's pass is nim's discard
18:26:59*endragor quit (Ping timeout: 240 seconds)
18:31:11*stefantalpalaru_ is now known as stefantalpalaru
18:31:14*stefantalpalaru quit (Changing host)
18:31:14*stefantalpalaru joined #nim
18:34:17FromGitter<martinium> I thought continue keyword didn't exist in Nim
18:34:21FromGitter<martinium> usually gives me erros
18:34:24FromGitter<martinium> errors*
18:34:53disruptekwe decided it should only be allowed in loops.
18:35:37FromDiscord<martinium> needs to get added to index on site
18:35:54FromDiscord<martinium> also, when dark mode is enabled search results box is pretty unreadable
18:36:04Yardanicofixed in devel
18:36:07FromDiscord<martinium> have to make a conditional to adjust the CSS to match dark mode
18:36:17disruptekhttps://nim-lang.org/docs/manual.html#statements-and-expressions-continue-statement
18:36:20Yardanicoyes it's already fixed :)
18:36:26FromDiscord<martinium> ok good
18:36:46FromDiscord<martinium> 1.2.6 doesn't have this fix then I need to upgrade to latest nightly correct?
18:37:18Yardanicoabout CSS? yes
18:37:36FromDiscord<Rika> disruptek: wait python allows for continue outside of loops?
18:37:52Yardanicono
18:38:13*bung quit (Ping timeout: 265 seconds)
18:38:35FromDiscord<martinium> sent a long message, see http://ix.io/2v7N
18:38:47FromDiscord<martinium> spot the error
18:38:59FromDiscord<martinium> getting node.kind == JObject` [AssertionError]
18:39:25Yardanicowell, does data["resources"] exist?
18:39:26FromDiscord<Rika> scan is probably a json object
18:39:35FromDiscord<Rika> wait
18:39:37FromDiscord<Rika> misread
18:39:43Yardanicoalso you can really just use https://nim-lang.org/docs/json.html#getOrDefault%2CJsonNode%2Cstring
18:39:50*apahl_ quit (Ping timeout: 246 seconds)
18:39:53FromDiscord<Rika> data["resources"] is prolly tje json object
18:40:06FromDiscord<martinium> correct and it exists
18:40:21FromDiscord<martinium> the key that exists sometimes and other times doesn't is called scanName
18:41:02FromDiscord<martinium> so python's pass == discard in Nim
18:41:12FromDiscord<martinium> discard was my first choice and what I had before
18:41:16Yardanicoyes, but discard can also be used to discard stuff
18:41:32Yardanicobut with "discard" you'll be getting an error, yes
18:41:41Yardanicobecause it'll try to check the "elif" then
18:41:46Yardanicoah nvm sorry
18:42:02*apahl joined #nim
18:42:16FromDiscord<martinium> funnnn
18:42:18FromDiscord<martinium> πŸ˜„
18:42:24FromDiscord<martinium> btw, I love this language
18:42:29FromDiscord<martinium> it really is best of all worlds
18:42:39FromDiscord<martinium> looks heavily influenced by OCaml
18:42:50FromDiscord<martinium> option types included here is a fantastic thing
18:42:52Yardanicobut it's not :P
18:42:56FromDiscord<Rika> in what way?
18:43:05FromDiscord<Rika> option types are pretty common elsewhere isnt it
18:43:08FromDiscord<martinium> simplifies code
18:43:16FromDiscord<martinium> go doesn't have option types
18:43:25FromDiscord<martinium> let alone proper error handling
18:43:26FromDiscord<martinium> lol
18:44:00FromDiscord<martinium> also working with json is annoying since it requires marshaling into custom structs
18:44:07FromDiscord<Rika> go is like python but with all the downsides of static typing with less of its upsides
18:44:08FromDiscord<martinium> instead of direct key access
18:44:37FromDiscord<martinium> makes you go around by marshalling but its not the end of the world
18:44:54FromDiscord<Rika> you should probably get back to programming πŸ˜›
18:45:12FromDiscord<martinium> yeah, still a noob hehe
18:45:26FromDiscord<martinium> (edit) 'yeah, ... still' => 'yeah,I'm'
18:47:28FromDiscord<martinium> changed code to this and no output
18:47:40FromDiscord<martinium> do I need to specify to alone discard the iteration?
18:47:44FromDiscord<martinium> aka discard scan?
18:47:57FromDiscord<martinium> trying
18:48:14FromDiscord<martinium> no output either
18:48:25Yardanicono
18:48:28Yardanicoyou just "discard"
18:48:34Yardanico"discard scan" will discard the value of "scan"
18:48:42Yardanicowe need more context of what exactly fails, and on what line :)
18:49:43FromDiscord<martinium> just noticed something
18:49:52FromDiscord<martinium> its complaining about a function called before it
18:51:37FromDiscord<martinium> jeez found the error
18:52:13FromDiscord<martinium> iterator variable matched name of a returned table's key
18:54:59FromDiscord<martinium> actually error still there argh
18:55:23Yardanicowe can't help if you only complain :P
18:55:51FromDiscord<martinium> sent a long message, see http://ix.io/2v7T
18:56:00*FromDiscord quit (Remote host closed the connection)
18:56:16*FromDiscord joined #nim
18:56:19FromDiscord<martinium> line 49 is teh one that begins with sitesMap
18:57:03Yardanicohow is sitesMap defined?
18:57:15FromDiscord<martinium> > sitesMap = newTable[int, string]()
18:57:21FromDiscord<martinium> using var keyword
18:57:47Yardanicoand on what line it fails in that code snippet?
18:57:59FromDiscord<martinium> sitesMap[item["id"].getInt()] = item["name"].getStr()
18:58:25kinkinkijkintrying to figure out how to pass glesHandle.symAddr() as a proc, the compiler considers that a LibHandle for some reason, the GLAD automated gl loader requires a proc to load symbols from the gles library to be passed to it...
18:59:17kinkinkijkintry to wrap it in another proc and i can't get it to accept the return value of symAddr
18:59:24Yardanicokinkinkijkin: you need to cast it to a proc tpye
18:59:25Yardanicotype*
18:59:36Yardanico@martinium so try doing "echo item" before that line?
18:59:48Yardanicoto see if stuff actually exists
19:00:09kinkinkijkinjust a cast? easier than i thought then
19:00:34Yardanicokinkinkijkin: yeah, if what you get is a function pointer, you can "cast" it to a proc
19:01:06FromDiscord<martinium> that's part of diff function where I get all the IDs I need of type int into a seq called idList
19:01:12kinkinkijkinoh no, I need to pass the proc itself
19:01:17kinkinkijkinit does that casting on its end
19:01:29Yardanicopass it where?
19:02:08kinkinkijkin"assert gladLoadGLES2([here])"
19:02:17Yardanicoyou just pass the proc as it is
19:02:34kinkinkijkinyes, but then it doesn't find the loaded GLES2 library since it doesn't have the handle
19:02:45kinkinkijkinthe loader just sets the functions
19:04:02kinkinkijkinhttps://dpaste.org/UjP0 loader code generated by GLAD, and glesHandle.symAddr in the spot of load doesn't compile
19:04:14Yardanico"load: proc" nonono
19:04:30Yardanicoyou need to specify the exact proc type
19:04:42Yardanico"proc" might work, but might not
19:04:59Yardanicokinkinkijkin: oh, maybe you misunderstood
19:05:04kinkinkijkinit's auto-generated code from a code generator with alpha nim support
19:05:04YardanicoglesHandle.symAddr returns a pointer
19:05:08Yardanicowhich you need to cast to a proc type
19:05:16Yardanicoso you can call it
19:06:11kinkinkijkinyes, but again, the loader runs the given proc itself to load the library, and there is no built-in loader for nim in the generated code
19:06:32YardanicoI don't think I understand, sorry :)
19:06:42kinkinkijkinit needs to run symAddr, not the result of symAddr
19:07:32kinkinkijkinGLAD generates a complete loader in C, C++, and Volt, but not for Nim, as Nim support in GLAD is experimental right now
19:07:59kinkinkijkinthis loader you have to pass your own loader, all it does is run it against all the things it has to
19:08:21kinkinkijkinwould you like the full GLAD-generated .nim file I'm compiling against?
19:10:59disrupteknew bot feature lets you scan for package usage:
19:11:02disruptek!requires irc
19:11:04disbotirc: 11Yardanico[witchrelay,3ircord,3nimeventer], 11Xe[3nagios,3hbot], 11nim-lang[3nimbot,3irc], 11cderwin/3ircc, 11blandcr/3coriolis, 11disruptek/3xs, 11smt923/3tinytwitch, 11moon-chilled/3Goodbot, 11Heartmender/3sobot, 11mateodif/3irc_nim, 11GoogleBot42/3NimBot 715 total
19:11:21Yardanico!requires dimscord
19:11:21disbotdimscord: 11ire4ever1190[occat,3disjoke], 11Yardanico/3ircord, 11broad-well/3dimscommander, 11snus-kin/3hemulen, 11krisppurg/3dimscord 76 total
19:11:28kinkinkijkinhttps://dpaste.org/7HdW in case you're curious
19:11:33Yardanicodisruptek: cool, how?
19:11:38Yardaniconimble.directory ?
19:11:45disruptekpure magic.
19:11:57disruptek!requires shene
19:11:58disbotshene: 70 total
19:12:04disruptek!requires interfaced
19:12:04disbotinterfaced: 70 total
19:12:18disruptekso apparently, no one but dom96 cares about runtime interfaces.
19:12:57Yardanicokinkinkijkin: okay, and what do I call to test it?
19:13:18kinkinkijkingladLoadGLES2 is the loader, it's at the bottom of the file
19:13:28YardanicoI mean to test :)
19:14:05kinkinkijkinoh, just glEnable(GL_DEPTH_TEST) or something similar, if loading failed that'll crash
19:14:28*awe002 joined #nim
19:14:50Yardanicobut wait, that way it won't work because load_GL_ES_VERSION_2_0 isn't called?
19:15:09FromDiscord<dom96> disruptek: people care about interfaces when they're first class citizens in the language/stdlib
19:15:11YardanicoI see gladLoadGLES2, but as you said it needs a loader proc, so I'm asking which one :P
19:15:17disruptekdom96: who?
19:15:17kinkinkijkinooooh
19:15:23kinkinkijkinthere's no loader proc included
19:15:35FromDiscord<dom96> otherwise Go's interfaces wouldn't be as popular
19:15:39kinkinkijkinand all the loader proc does in this case is load symbols
19:15:39FromDiscord<dom96> !requires jester
19:15:41disbotjester: 11emekoi/oker, 11alextanhongpin/3nim-jester, 11Rakesh243/3loginform-nim, 11iris-contrib/3third-party-benchmarks, 11NabeKz/3nim-buildpack, 11dalinim/3dalim, 11zurs/3url-shortener, 11Tangdongle/3TangBlog, 11vic/3nim-heroku-example, 11nim-lang/3Nim, 11itsumura-h/3Nim, 11the-benchmarker/3web-frameworks, 11MagnificentPako/3RoyalNim, 11sharkguto/3teste_carga, 11dsrw/3en
19:15:57Yardanicowell honestly, I've seen that interface{} in Go is sometimes horribly abused
19:16:00FromDiscord<dom96> Nim requires Jester? lol
19:16:06Yardanicopeople use it as "void*" in C
19:16:08FromDiscord<martinium> is there a way to cast a jsonNode to a JObject?
19:16:08Yardanicosometimes
19:16:11FromDiscord<haxscramper> Is it possible to dereference pointer to variable without copying? Or just some to convert `var T` to `ptr T` and then back again and don't create any new objects in the process. I want to make similar to C++'s capture by reference in order to work with C library that heavily relies on callbacks
19:16:14*awe001 quit (Ping timeout: 258 seconds)
19:16:15Yardanico@martinium there's no need to "cast"
19:16:23YardanicoJsonNode itself might be of kind JObject
19:16:31Yardanicoif it's not - then that's the problem of the original jsonm
19:16:32Yardanico*json
19:16:42Yardanicoso did you get it to output, and if so, what's the output of "echo item"?
19:17:06FromDiscord<haxscramper> Ideally it would be just some annotation on `var obj = p[]` that makes `obj` and `p` still point to the same memory
19:17:07Yardanico@haxscramper would https://nim-lang.org/docs/decls.html#byaddr.t%2C%2C%2C work for you?
19:17:12FromDiscord<martinium> that function works fine
19:17:29FromDiscord<martinium> seems to be the assertion of jsonNode and JObject per the error
19:17:41Yardanicoyes, this means that the JsonNode you're trying to access as a map isn't one
19:17:47YardanicoJObject is a kind used for key: value json objects
19:18:03Yardanicoecho the json node before the line where the assertion happens
19:18:08FromDiscord<martinium> JObject is {} in json no?
19:18:13FromDiscord<martinium> json Objects
19:18:24Yardanico{"a": {"b": 3}}
19:18:30Yardanico{"a": {"b": 3}} and {"b": 3} here are both JObject
19:19:21Yardanicoalso, are you using --gc:arc on devel or not? just so it's not an arc issue :)
19:19:32FromDiscord<martinium> am not
19:19:40FromDiscord<martinium> doubt its a GC issue
19:19:43FromDiscord<martinium> but lets try it
19:19:46Yardanicononono
19:19:53Yardanicoif it's not arc, don't try right now :)
19:19:59FromDiscord<martinium> πŸ™‚
19:20:12Yardanicobut yeah, as I said, if that assertion happens - you're trying to use something as a map (JObject is essentially a map) when it's not
19:20:24FromDiscord<martinium> so data["resources"] is an array that contains json objects
19:20:40FromDiscord<martinium> some of these objects have a key named "scanName" and some do not
19:20:53FromDiscord<martinium> If I don't try to filter I get all the output no problem
19:21:04Yardanicowait
19:21:05kinkinkijkinYardanico, basically im trying to figure out how to make the loader proc that the GLAD generated code wants
19:21:13FromDiscord<martinium> but I am trying to use the conditional to only output the objects that have that key
19:21:23kinkinkijkinim testing glesHandle.symAddr but that's not compiling
19:21:23Yardanicoyes, but maybe some objects which don't have that key are not maps at all?
19:21:34FromDiscord<martinium> that's the thing
19:21:38FromDiscord<martinium> am not using the map at all
19:21:42YardanicoJObject is a map
19:21:45Yardanicothat's what I meant
19:21:47FromDiscord<martinium> I am calling a seq called idList
19:21:59Yardanicotry changing
19:22:00Yardanico if scan.hasKey("scanName") == false:
19:22:00Yardanicoto
19:22:19Yardanico if scan.kind != JObject or scan.hasKey("scanName") == false:
19:23:38Yardanicokinkinkijkin: well I'm not really accustomed with OpenGL and stuff so if you have time, please make kinda self-sufficient code to reproduce the error you're having :)
19:23:42FromDiscord<martinium> still fails
19:23:47disruptekdom96: i think it's stupid that nim requires jester, too.
19:23:58FromDiscord<martinium> sent a long message, see http://ix.io/2v81
19:24:16Yardanicowhat's on line 59 ?
19:24:34FromDiscord<martinium> elif "Internal" in scan["scanName"] == true:
19:24:58FromDiscord<dom96> disruptek: how does it though? What is the Nimble file there?
19:25:21Yardanico@martinium well I honestly can't help like that, do you might sharing the code or not? or at least the JSON data
19:25:29disruptekdom96: Tweeter.nimble
19:25:30FromDiscord<martinium> yeah 1 sec
19:25:35FromDiscord<haxscramper> Yes, `{.byaddr.}` works just as expected. And another question - it is possible to cut off access to all variables not defined in current scope?
19:25:50Yardanicowdym?
19:25:55YardanicoI don't think you should worry about that in callbacks
19:26:10FromDiscord<dom96> disruptek: ahh. Nice. I like that it finds these
19:26:12FromDiscord<haxscramper> I'm interfacing with C and I had to explicitly capture all variables
19:26:24disruptekdom96: yeah, it should be useful.
19:26:37FromDiscord<haxscramper> In order to pass pointers to variables via ` void* client_data`
19:26:41Yardanicolet's check how disruptek handled this edge-case
19:27:03Yardanico!requires treesitter
19:27:03disbottreesitter: 11genotrance[imtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter,3nimtreesitter] 720 total
19:27:06Yardanico:P
19:27:27FromDiscord<dom96> So here is a query that the new NimForum uses: https://gist.github.com/dom96/4c73f7a2a341b2710ce6bf7d31d27bdf. Any SQL experts know why it would hang? (it doesn't hang if I remove `c.id = 0`)
19:27:37FromDiscord<dom96> er wait
19:27:40FromDiscord<dom96> why's it `==`
19:28:04FromDiscord<dom96> oh nvm, it still hangs with `=`
19:28:28kinkinkijkinhttps://dpaste.org/T41p yadarnico if the loader worked, you will get "true" followed by the application not crashing.
19:28:46disruptekYardanico: what do you think it should say?
19:29:16kinkinkijkinGLAD is not a nimble library btw, in this specific implementation you have to have the GLAD-generated gl.nim in a subdirectory called "GLAD"
19:29:19FromDiscord<haxscramper> Oh, nvm `{.cdecl.}` callback already gives adequate error message about captures, sorry
19:30:37FromDiscord<martinium> how can you quote text here in discord?
19:30:53Yardanicotriple single quote code triple single quote
19:30:59FromDiscord<martinium> thanks
19:31:06FromDiscord<martinium> sent a long message, see http://ix.io/2v83
19:31:37Yardanicokinkinkijkin: and what's the signature for a loader supposed to be?
19:31:46FromDiscord<martinium> (edit) 'http://ix.io/2v83' => 'http://ix.io/2v84'
19:32:05FromDiscord<martinium> sent a long message, see http://ix.io/2v85
19:32:05Yardanico@martinium well stuff looks fine there
19:32:11kinkinkijkinit has to be the symbol loader
19:32:14FromDiscord<martinium> see the scanName key
19:32:21FromDiscord<martinium> sometimes it doesn't exist
19:32:38kinkinkijkinhttps://glad.dav1d.de/ this is the website used to generate the glad/gl.nim file
19:32:39FromDiscord<martinium> I was trying to implement a check with hasKey()
19:32:41Yardanicokinkinkijkin: I mean what's the signature for it in C for example ?
19:33:04kinkinkijkinoh sec, there's good documentation for c which doesn't work in nim for reasons unknown
19:33:57kinkinkijkinhttps://github.com/Dav1dde/glad readme has some documentation on how this us usually run in c
19:33:57Yardanicooh found it
19:33:58Yardanicotypedef void* (* GLADloadproc)(const char *name);
19:34:27*Guest41431 quit (Remote host closed the connection)
19:35:16kinkinkijkinmy issue is that I don't know enough plain C to translate C memory shenanigans into nim
19:35:20kinkinkijkinin this case
19:35:22FromDiscord<dom96> argh, the legacy db design strikes again
19:35:30*superbia quit (Quit: WeeChat 2.9)
19:35:36*snowolf joined #nim
19:35:52FromDiscord<dom96> silly not to put the author of a thread in the thread table...
19:36:07Yardanicokinkinkijkin: I think I almost figured it out
19:37:03kinkinkijkinI'll be grateful even if you get close and just dump the close code on me
19:37:39kinkinkijkincause right now I'm stuck, never done much with others' libraries
19:38:19disruptekdom96: normalization at its finest.
19:38:27disruptek!requires treesitter
19:38:27Yardanicokinkinkijkin: https://play.nim-lang.org/#ix=2v8a
19:38:28disbottreesitter: 11genotrance/imtreesitter 71 total
19:38:33disrupteki guess this is what you want.
19:38:38Yardanicoit currently fails on " var glVersion = cast[cstring](glGetString(GL_VERSION))"
19:38:43Yardanicoactually on the next one, but yeah
19:38:45YardanicoI'll check why
19:38:51Yardanicoit loads glGetString successfully
19:40:36FromDiscord<martinium> I FIXED IT
19:40:46FromDiscord<martinium> dude
19:40:58FromDiscord<martinium> was missing .getStr()
19:41:05FromDiscord<martinium> on scan["scanName"]
19:41:10FromDiscord<martinium> πŸ†˜
19:41:18FromDiscord<martinium> (edit) 'πŸ†˜' => '😭'
19:41:40FromDiscord<martinium> (edit) '😭 ... ' => '😭🀣'
19:42:10FromDiscord<dom96> Yay, fixed the SQL
19:44:35*Prestige quit (Ping timeout: 272 seconds)
19:45:15*Prestige joined #nim
19:45:24FromDiscord<martinium> I started a trenf
19:45:29FromDiscord<martinium> (edit) 'trenf' => 'trend'
19:47:49FromDiscord<martinium> what was the fix for the sql btw?
19:47:55Yardanicokinkinkijkin: I think there's another problem
19:47:57FromDiscord<martinium> curious
19:47:59Yardanicohttps://stackoverflow.com/questions/6288759/why-could-glgetstringgl-version-be-causing-a-seg-fault
19:48:04Yardanico"I doubt you can call even something as simple as glGetString without an OpenGL context."
19:48:37kinkinkijkinyes
19:48:46kinkinkijkinthat is correct
19:48:59kinkinkijkinoh crap i just realized the implication to that
19:49:21FromDiscord<martinium> what does the danger compiler flag do?
19:49:31Yardanicoeverything what -d:release does + disabling ALL runtime checks
19:49:35FromDiscord<martinium> does it make a release program even faster? How?
19:49:38Yardanicoit's what -d:release did before 0.20 release :)
19:49:41Yardanicoby disabling all runtime checks
19:50:04Yardanicooverflow, range, float range, asserts, etc
19:50:14Yardanicoah asserts are disabled with -d:release too I think
19:50:30Yardanicoanyway release - https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L72
19:50:34Yardanicoonly danger - https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55
19:50:46Yardanicoyeah -d:release still has asserts working, -d:danger disables them
19:51:23FromDiscord<dom96> One step closer to deploying the new forum https://github.com/nim-lang/nimforum/commit/e62ae672b30de239830526ce032f1a1f10427387
19:51:23FromDiscord<martinium> so without the asserts can be faster if you are 1000% your code is correct
19:51:41Yardanicoyeah, -d:danger is what you should use when you're 100% sure the code is correct :0
19:51:50Yardanicobut even then for a lot of cases it's better not to use it
19:51:55Yardanicounless you really want the MOST performance
19:52:11FromDiscord<martinium> so for benchmarking
19:52:12FromDiscord<martinium> lol
19:59:10FromDiscord<martinium> @dom96 https://media.discordapp.net/attachments/371759389889003532/747545554094915704/unknown.png
19:59:29FromDiscord<martinium> dark mode search box needs to get correct coloring
19:59:36Yardanico?
19:59:37FromDiscord<martinium> you prob already know this
19:59:44Yardanicocheck how it looks on devel
19:59:49FromDiscord<dom96> didn't someone already tell you that this was fixed on devel?
19:59:52YardanicoI did
19:59:56FromDiscord<martinium> ah did they
20:00:01FromDiscord<martinium> thought you meant continue keyword
20:00:01Yardanicoyes :P
20:00:04Yardanicoyou ignored it :D
20:00:04Yardanicohttp://nim-lang.github.io/Nim/manual.html
20:00:06Yardanicocheck how it looks there
20:00:08FromDiscord<martinium> 🀣
20:00:33FromDiscord<martinium> ah yeah its sexy/fixed in devel
20:00:44FromDiscord<martinium> nice
20:09:22FromDiscord<dom96> To this day I love the NimForum CI https://travis-ci.org/github/nim-lang/nimforum/builds/720776030
20:09:29*leorize joined #nim
20:11:35leorizeshashlick: it's in a PR but not merged yet
20:11:54FromDiscord<dom96> Sooo, get ready for me to update the forum
20:11:59FromDiscord<dom96> first time in two years
20:12:00FromDiscord<dom96> what can go wrong
20:12:48leorizedatabase migration failed :)
20:14:10shashlick@leorize who is it waiting on
20:14:30leorizeno idea, ask Araq and/or narimiran
20:16:44FromGitter<ynfle> How do I rebuild the compiler and run tests?
20:17:50disruptek./koch boot; ./koch tests
20:18:04disruptek./koch temp is generally the wiser option.
20:18:20FromGitter<ynfle> Why?
20:18:20disruptekbut then you get to mess with testing bin/nim_temp.
20:18:39disruptekit just depends on how extensive your changes are...
20:18:52FromGitter<ynfle> Fixing json encoding for tuples
20:19:08disruptekwhy would you need to rebuild the compiler for that?
20:19:20Yardanico@ynfle stdlib isn't in the compiler
20:19:25Yardanicoit's not "built into the compiler"
20:19:37Yardanicoif you modify the stdlib modules, you don't need to recompile the compiler
20:19:39Yardanicoyou can just check :P
20:19:42Yardanicostraight away
20:21:14FromGitter<ynfle> I don't understand? When the test `import json` I should just use `import ../../lib/pure/json`?
20:21:32FromGitter<ynfle> ie. it uses my nim installation's json.nim
20:23:44*lritter quit (Quit: Leaving)
20:26:25*narimiran quit (Ping timeout: 240 seconds)
20:29:07*quetzalb joined #nim
20:30:28FromGitter<ynfle> Ie. It fails on the CI and I want to do more investigation without having to push to my fork ever time
20:31:13leorizejust modify it in the source tree, then run `./koch tests`
20:31:32leorizenow if you know exactly which test fail, test it with: `./koch tests r <category>/<test>`
20:32:15*awe003 joined #nim
20:32:23*arecacea1 quit (Remote host closed the connection)
20:33:15*arecacea1 joined #nim
20:33:40*awe002 quit (Ping timeout: 258 seconds)
20:40:04*abm joined #nim
20:41:54FromGitter<ynfle> So `/tjson`?
20:42:05FromGitter<ynfle> stdlib/tjson?
20:44:26ForumUpdaterBotNew thread by Dom96: Nimforum 2.1.0 is here, see https://forum.nim-lang.org/t/6725
20:44:46FromDiscord<dom96> ^^^
20:49:53YardanicoFINALLLLLLLLLYYYYYYYYYYYYYYY
20:52:36FromDiscord<Hearthstone> What's up?
20:52:45FromDiscord<Hearthstone> What did you do?-
20:54:22FromDiscord<dom96> Deployed new Nimforum with support for categories
20:54:56FromDiscord<Hearthstone> Nice
20:57:06*bung joined #nim
21:00:05Yardanico@dom96 now create a new thread to discuss which categories we should add :P
21:00:10Yardanicofrom the top of my head - Off-topic, Bug Reports
21:03:15leorizeInstallation seems to be a category that would be useful :P
21:03:35leorizeand a section for Documentations please
21:03:38Yardanicoor give me moderation rights so I label all threads :P
21:03:59Yardanicowell not all, but it certainly would help with discovering older stuff
21:04:07Yardanico1
21:07:39leorizebug report for the forum: the login form should hook on "submit" event
21:10:33FromDiscord<dom96> yeah, can't wait for the bikeshedding
21:10:39bungany recommanded lib implemented Geometry Class ?
21:10:47FromDiscord<dom96> where everyone wants categories and we end up with overlapping categories
21:11:23Yardanicobut you know that nim forum's search isn't the best :(
21:12:45FromGitter<ynfle> What is this error? `Error: unknown trait: isNamedTuple`
21:13:14FromDiscord<Varriount> dom96: If bikeshedding generated power, I truly believe that the Nim issue tracker could power at least a couple of homes
21:18:11FromDiscord<Recruit_main707> @dom96 lovely the new style
21:36:18FromDiscord<dk> what's the name of the stdlib lib that gives you default values of fields if the object is nil etc?
21:37:57*thomasross joined #nim
21:38:34FromDiscord<Clyybber> wrapnils I think
21:38:48FromDiscord<Clyybber> @dk https://nim-lang.github.io/Nim/wrapnils
21:39:11*Kaivo joined #nim
21:40:26FromDiscord<dk> yes, thanks
21:40:27disruptekthat category label is thicc.
21:41:27Yardaniconow my https://forum.my-toolbox.xyz/ is finally (almost) obsolete :P
21:41:38Yardanicoone thing which it has is the hacky OpenGraph support
21:43:45disruptekthe wut
21:44:59Yardanicodisruptek: the thing most services use to generate previews
21:45:02Yardanicofor websites
21:45:09Yardanicohttps://ogp.me/
21:45:14Yardanicoit's just additional metadata in html
21:47:28*tane quit (Quit: Leaving)
21:47:40disrupteki'd settle for more metadata in html. i can't even fetch the fucking title to a forum thread.
21:48:19disruptekanyway, i don't mean to shit all over dom's work.
21:48:31disrupteki'm sure forum users are very happy to see improvements being made.
21:48:46disrupteki just have this stupid ticket from pmunch asking for this feature...
21:48:54Yardanicowell yeah, server-side rendering might be very good, but I don't think that Karax has proper support for it
21:48:58Yardanicoe.g. like JS frameworks do it
21:49:11disruptekwhich means absolutely no sense, since, y'know, it's all nim anyway.
21:49:15disrupteks/means/makes/
21:49:24Yardanicothey render the "initial" version (they also call this "hydration") on the server
21:49:34Yardanicoand then do state changes with JS in the browser
21:49:39FromDiscord<dom96> yeah, not my department
21:49:47FromDiscord<dom96> I just used what was there
21:50:03FromDiscord<dom96> The priority was shipping a product
21:50:26disruptekweird.
21:54:26kinkinkijkinYardanico, I got it working, just needed a context for it
21:54:46Yardaniconice
22:01:25*awe003 quit (Ping timeout: 240 seconds)
22:02:11FromDiscord<Clyybber> hmm, so shadowscopes are working fine now
22:02:20FromDiscord<Clyybber> only a small problem
22:02:25disruptekoh?
22:03:04FromDiscord<Clyybber> declaredInScope returns "wrong" results
22:03:16disruptekit so rarely works for me anyway.
22:03:25FromDiscord<Clyybber> chronos breaks because of that
22:03:52FromDiscord<Clyybber> I think we should be relatively pessimistic and say "yeah its declared in scope"
22:04:01FromDiscord<Clyybber> oh actually
22:04:06FromDiscord<Clyybber> that makes perfect sense
22:04:08FromDiscord<Clyybber> and isn't even wrong
22:04:09FromDiscord<Clyybber> :D
22:16:51*awe003 joined #nim
22:32:31disruptekadded some styling to testes.
22:32:35disruptek!repo testes
22:32:37disbothttps://github.com/disruptek/testes -- 9testes: 11a small unittest framework with decent support πŸ”΄πŸŸ‘πŸŸ’ 15 6⭐ 0🍴 7& 29 more...
22:32:51disruptekmuch easier to read stack traces now.
22:35:17disruptekclyybber: so this fix also might fix declaredInScope?
22:35:25disruptekbecause that would be awesome.
22:43:14FromDiscord<Clyybber> whats there to fix?
22:43:47shashlickWhat a name
22:44:04disruptekare you telling me chronos was already failing tests?
22:44:40disruptekit's the package with three balls, shashlick.
22:45:30FromDiscord<Clyybber> disruptek whats there to fix
22:45:45FromDiscord<Clyybber> aside from the regression from my pr
22:45:51disrupteki dunno, it's rare that declaredInScope works for me.
22:45:52disruptekmaybe it's me.
22:46:21disrupteki need to build a better code search tool.
22:46:39FromDiscord<Clyybber> disruptek wdym rare, gimme a snippet
22:46:44disruptekmaybe that's really what ndoc should be.
22:46:52FromDiscord<Clyybber> if i d0nt know whats broken
22:46:59FromDiscord<Clyybber> i can't know what to fix
22:47:08disrupteki will file a bug next time.
22:47:17disrupteki don't usually bother; i just work around stuff.
22:47:46FromDiscord<Clyybber> what do you think declaredInScope does?
22:48:03FromDiscord<Clyybber> mayhe you think of it as what declared does
22:48:16disruptekmaybe.
22:48:28disrupteki think it works for my check in nimph.. for ConfigRef.nimbleSubs.
22:48:49disruptekdo you want a bug report for my failing testes?
22:48:55disruptekinheritance codegen?
22:48:58FromDiscord<Clyybber> yeah
22:49:02disruptekdamnit.
22:49:06FromDiscord<Clyybber> always bug report
22:49:18FromDiscord<Clyybber> we need more bugs
22:49:20disruptekwell, what do you make of this one?
22:49:27disruptek!issue author:disruptek macro
22:49:28disbothttps://github.com/nim-lang/Nim/issues/15160 -- 3exceptions codegen broken inside macros 7& 1 more...
22:49:34FromDiscord<Elegant Beef> *stale bot says no more bugs* πŸ˜›
22:49:34shashlickDon't you call it pool then
22:50:02FromDiscord<Clyybber> hqven't l9oked at it yet
23:00:31disruptekwho here knows something about food?
23:00:56disrupteki found some soup called "cream of bacon". it's expired but i'm pretty hungry. does it actually have cream in it?
23:01:04disruptekhow do you get cream out of bacon, anyway?
23:02:51FromDiscord<Elegant Beef> Is it canned?
23:02:56FromDiscord<Elegant Beef> If so it's probably fine
23:03:17FromDiscord<Elegant Beef> Also i know reading is hard for you, but just read the ingredients
23:03:24disruptekyeah, how would i get uncanned soup out of a dumpster?
23:03:34disrupteki'm not a magician.
23:03:48disruptekit doesn't have all of the label.
23:04:04disruptekit does say something like whatsinmyfood.com
23:04:37disruptekah, that's a real site.
23:05:00disruptekmaybe it's not cream of bacon, though. no search results.
23:06:13disrupteki guess it does have cream in it.
23:06:22disruptekor, it did.
23:06:34disruptekwell, whatever. i like cheese, too.
23:07:01*awe00 joined #nim
23:08:55*awe003 quit (Ping timeout: 258 seconds)
23:11:52*abm quit (Quit: Leaving)
23:20:12*krux02_ quit (Remote host closed the connection)
23:21:57*solitudesf quit (Ping timeout: 258 seconds)
23:22:50*ptdel joined #nim
23:26:02disruptekthat was truly horrible.
23:27:27*vicfred quit (Quit: Leaving)
23:33:11FromDiscord<Elegant Beef> Going to be worse going out then in
23:38:24FromDiscord<martinium> My goodness β€œcream of bacon”? That sounds awful
23:38:47FromDiscord<martinium> Should name your next project cream of bacon lol
23:39:14disrupteki cannot recommend.