<< 16-08-2020 >>

00:00:02*junland quit (Quit: %ZNC Disconnected%)
00:00:27*vicfred_ quit (Remote host closed the connection)
00:00:47*vicfred_ joined #nim
00:01:45*bung quit (Ping timeout: 240 seconds)
00:01:45*vicfred quit (Ping timeout: 240 seconds)
00:01:48*junland joined #nim
00:03:36*vicfred_ quit (Client Quit)
00:08:07*abm quit (Quit: Leaving)
00:22:18FromGitter<ynfle> Whats the channel for these videos?
00:23:56Yardanicothe same name :)
00:24:11Yardanicohttps://www.youtube.com/user/kiloneie/videos
00:28:35FromGitter<ynfle> šŸ‘
00:30:54*bung joined #nim
00:34:25silvernode[m]2 weeks of paid vacation starting today.
00:34:35disruptekyou're sick, huh?
00:37:03silvernode[m]Finally, I can work on learning more Nim
00:38:26*bung quit (Ping timeout: 260 seconds)
00:40:35disrupteki hope you live long enough to use it.
00:43:48FromGitter<ynfle> How can I split an `openarray` into chunks of specific size?
00:43:53Yardanicodistribute
00:44:13Yardanicoah hm it's only for seqs
00:44:19Yardanicoso you'll have to convert your openarray into a seq
00:44:20Yardanicohttps://nim-lang.org/docs/sequtils.html#distribute%2Cseq%5BT%5D%2CPositive
00:44:32Yardanicoyou can do it like distribute(@myopenar, 5)
00:44:32*FromDiscord quit (Remote host closed the connection)
00:44:48FromGitter<ynfle> I have a string
00:44:50*FromDiscord joined #nim
00:44:56Yardanicoyou can still use that
00:45:03Yardanico@ will convert your string into a seq
00:45:07Yardanico!eval echo @"hello"
00:45:09NimBot@['h', 'e', 'l', 'l', 'o']
00:45:23FromGitter<ynfle> Thanks
00:46:17silvernode[m]So when I use echo to display error messages in my programs, I always feel like there is some built in error proc that I should be using instead and I wanted to check with all of you and find out.
00:46:27Yardanicoraise an exception?
00:46:31Yardanicoor use doAssert
00:46:40silvernode[m]yeah, with a message
00:46:47Yardanicowell, exceptions can contain messages
00:46:58Yardanicothey all do
00:47:55silvernode[m]I have just never learned how I should be handling errors in any programming language I have every used so I figured it's time to learn some best practices instead of just doing things my own ways.
00:48:07silvernode[m] * I have just never learned how I should be handling errors in any programming language I have ever used so I figured it's time to learn some best practices instead of just doing things my own ways.
00:48:10Yardanicofor actual *errors* you should use exceptions
00:48:25silvernode[m]I recently started using try: except
00:48:32silvernode[m]does that count?
00:48:44Yardanicowell, yes, but using a generic "except" is not the best idea
00:48:55Yardanicoand that's for catching exceptions
00:48:57Yardaniconot raising them :P
00:49:01silvernode[m]<Yardanico "well, yes, but using a generic ""> This is what I need to hear
00:49:43silvernode[m]I want to learn what most Nim programmers do to raise and handle exceptions.
00:49:59Yardanicoraise newException(Exception, "message)
00:50:21Yardanico"
00:50:44silvernode[m]is the "Exception" before the comma a placeholder or what I would actually write there?
00:50:58Yardanicoyou would either use one of the exception types in the stdlib
00:51:00Yardanicoor create your own
00:51:08Yardanicohttps://nim-lang.org/docs/tut2.html#exceptions
00:51:09silvernode[m]ah ok
00:51:26silvernode[m]Now that I have time off I can actually get through the entire tutorial
00:51:34silvernode[m]thanks Yardanico
00:51:35Yardanicohttps://nim-lang.org/docs/manual.html#exception-handling
00:56:17silvernode[m]now I just need to learn when to bother raising exceptions. The tutorial states that things like opening a file are common and not really somewhere you would generally want to raise an exception.
01:00:11Yardanicowell, it's up to you as a library author to decide
01:10:34*bung joined #nim
01:15:13*bung quit (Ping timeout: 264 seconds)
01:16:47FromGitter<ynfle> Is there something like `mapWhile`?
01:16:56Yardanicowhat would that do?
01:17:11FromGitter<ynfle> Map until a condition is reached
01:17:18Yardanicoand how would that "map" work?
01:17:24Yardanicoanyway, I think a simple for loop will work just fine for you
01:17:33Yardanicoor check https://github.com/zero-functional/zero-functional, maybe it has something you need
01:17:46Yardanicoit has takeWhile and map
01:19:24FromGitter<ynfle> So I guess we don't have takewhile in stdlib
01:19:49Yardanicoyes, but isn't it pretty simple to implement anyway? :)
01:19:50Yardanicoyou can add it
01:22:24FromGitter<ynfle> In what way is it easy?
01:23:22Yardanicouse sequtils.cycle and check for condition
01:23:36Yardanicoah sorry not that cycle
01:23:53Yardanicosomething like https://github.com/narimiran/itertools/blob/master/src/itertools.nim#L46 but with the check for condition
01:23:55Yardanicoand in a proc
01:23:57Yardanicoseems pretty easy for me
01:24:07disruptekdude, you should totally do that.
01:24:25disrupteki'm worried that Yardanico isn't writing enough nim.
01:24:31*bung joined #nim
01:24:35Yardanicoi am writing enough nim
01:24:52YardanicoI just don't like using functional style for anything :P
01:24:58YardanicoI'd rather use traditional loops in more complex cases
01:25:00Yardanico+ collect
01:29:18*bung quit (Ping timeout: 260 seconds)
01:38:27FromGitter<ynfle> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f388e1260892e0c69747c64]
01:38:53FromGitter<ynfle> Stolen from `sequtils.filterIt`
01:44:36disruptekYardanico: why won't you fix the quoting?
01:44:44Yardanico???
01:44:57Yardanicofirst of all, I don't have control over FromGitter
01:44:58Yardanicoit's not mine
01:45:12disrupteknot gitter, chucklehead, discord.
01:45:17Yardanicoand what's the issue here?
01:45:27Yardanicoyes, when people paste code into play.nim-lang.org, I paste the whole message
01:45:32Yardanicobecause only parsing the ``` blocks might be harder
01:45:35Yardanicobut I might do something later
01:45:41disrupteklater?
01:45:44Yardanicolater
01:45:46disrupteklater today?
01:45:50Yardanicolater soon
01:45:59disrupteksoon today?
01:46:13disruptekdude.
01:46:17disruptekit makes my balls throb.
01:46:29Yardaniconot today
01:47:11disruptekyes, even today.
01:47:40FromDiscord<Elegant Beef> If you want it done today disruptek, go get it done šŸ˜„
01:53:36*apahl_ quit (Ping timeout: 244 seconds)
01:55:44*apahl joined #nim
02:03:32*awe001 quit (Ping timeout: 256 seconds)
02:04:57*waleee-cl quit (Quit: Connection closed for inactivity)
02:19:38disrupteki'm working on dust.
02:19:44disruptekangel dust.
02:19:57disruptekit's not really conducive to bot hacking.
02:20:26disruptekit's more of a fight-a-coywolf-with-your-bare-hands kinda drug.
02:25:40FromDiscord<Hearthstone> ~~From Hazbin Hotel?-~~
02:25:52disruptekyou know it?
02:35:22*muffindrake quit (Ping timeout: 260 seconds)
02:37:39*muffindrake joined #nim
02:41:05FromDiscord<Hearthstone> Oh damn-
02:41:10FromDiscord<Hearthstone> Someone actually knows-
02:41:42FromDiscord<Hearthstone> Yes I've watched all of the pilots so far and read the comic that's out on the site
02:41:59disruptekwe've got a real lunatic here.
02:42:10FromDiscord<Hearthstone> Nice-
02:42:31FromDiscord<Hearthstone> My favourite character is Alastor :)
03:02:31*endragor joined #nim
03:12:36*bung joined #nim
03:13:03*filcuc_ joined #nim
03:13:55*filcuc quit (Ping timeout: 246 seconds)
03:16:45*bung quit (Ping timeout: 240 seconds)
03:17:34*arecacea1 quit (Remote host closed the connection)
03:17:53*arecacea1 joined #nim
03:22:20FromDiscord<Varriount> Yardanico: Where's the source code for the discord bridge?
03:22:30YardanicoI posted it quite a few times
03:22:30Yardanicohttps://github.com/Yardanico/ircord/
03:25:35Zevvpost it again!
03:25:40Zevv~discord
03:25:40disbotno footnotes for `discord`. šŸ™
03:25:48Yardaniconono
03:25:51Yardanicodiscord should be a link
03:26:02Yardanico~ircord is https://github.com/Yardanico/ircord/
03:26:02disbotircord: 11https://github.com/Yardanico/ircord/
03:26:16Zevvno we dont want people to *use* it right, we wan them to use irc like good netizins
03:27:16FromDiscord<Varriount> Zevv: I'll happily use IRC, if someone is willing to host a bouncer with a web interface for me.
03:27:56FromDiscord<Varriount> Zevv: By the way, have you considered using asciidoc for the NPeg readme? You'd be able to get a nice table of contents from it.
03:27:57FromDiscord<Elegant Beef> Cmon let's meet half way, use matrix
03:28:54Zevvvarriout: yeah I did, but then it wouldnt render proprely on the github readme
03:29:33ZevvI dont find the current rendering to bad actually.
03:34:15Zevvdisruptek: how the hell can that be? I have stuff that does not work for you, and you have stuff that does not work for me
03:34:21Zevvand we use the same stuff?!
03:40:03FromDiscord<Varriount> @zevv What do you mean?
03:46:02Zevvoh this cps stuff. Disruptek was able to dig up a handful of new Nim compiler bugs, which Clyybber is mostly trying to get fixed. But now we have this cps code that works for me, but does boom for disruptek, and the other way around
03:46:10Zevvwe verified nim compiler versions, cps repo versions
03:46:14Zevvit's cumbersome
03:51:04FromDiscord<Hearthstone> Hoping I don't get banned for this
03:51:09FromDiscord<Hearthstone> ~discord is https://discord.gg/A3HUdcM
03:51:09disbotdiscord: 11https://discord.gg/A3HUdcM
03:51:15FromDiscord<Hearthstone> Coolio
03:51:42FromDiscord<Hearthstone> Just a permanent link for anyone who wants to join the discord from irc, gitter, or matrix
03:52:03Yardanicodon't use this one
03:52:15Yardanico~discord is https://discord.gg/ezDFDw2
03:52:15disbotdiscord: 11https://discord.gg/A3HUdcM
03:52:16disbotdiscord: 11https://discord.gg/ezDFDw2
03:52:24FromDiscord<Hearthstone> Oh-
03:52:24Yardanicodisruptek: delete the old entry please :P
03:52:30Yardanicohttps://discord.gg/ezDFDw2 is the "main" one
03:52:35YardanicoI created it back when I created the discord server
03:52:37FromDiscord<Hearthstone> Oh-
03:52:43FromDiscord<Hearthstone> :P
03:52:53Yardanicoand anyway when the discord server verification applications reopen dom will apply for it
03:52:55Yardanicoso we get a nice link
03:52:56FromDiscord<Hearthstone> Why doesn't the bot automatically remove entries?-
03:53:02FromDiscord<Hearthstone> Oo
03:53:04FromDiscord<Hearthstone> Coolio
03:53:12Zevvbecause a bot is no smarter then its maker
03:53:50FromDiscord<Hearthstone> Oh so my bots get discontinued early-
03:53:51FromDiscord<Hearthstone> Wait-
03:54:00FromDiscord<Hearthstone> I'm gonna get discontinued early-
03:54:03FromDiscord<Hearthstone> OH NO-
03:54:22Zevvone can never tell, right. In the end it's all about statistics
03:54:26Zevvp = 0.01 and the like
03:54:53FromDiscord<Hearthstone> :P
03:57:10*bung joined #nim
03:59:20FromDiscord<Varriount> @zevv No, I mean the asciidoc rendering
04:02:26Zevvoh right
04:02:50Zevvwhat's not clear? I don't hate the MD rendering on github, and if I would do asciidoc, I would not be able to put the whole manual in the top level github readme
04:02:54Zevvwhich I kind of like
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:45*supakeen joined #nim
04:16:55FromDiscord<Varriount> Why though? Doesn't GitHub support asciidoc?
04:17:07FromDiscord<Varriount> @zevv ^
04:25:15*icyphox left #nim ("WeeChat 2.8")
04:25:56shashlickHearthstone just remove your entry
04:26:12shashlickEach user gets their own
04:33:13*leorize joined #nim
04:41:31Yardanicoshashlick: you can't remove with disbot
04:41:52Yardanicoonly manually in the db by disruptеk himself
05:15:39leorize!repo disbot
05:15:41disbothttps://github.com/atomicptr/disbot -- 9disbot: 11Hubot Adapter for discord.js 15 2⭐ 2šŸ“ 7& 29 more...
05:16:53leorize!repo disruptek/disbot
05:16:53disbothttps://github.com/disruptek/disbot -- 9disbot: 11disbot data 15 0⭐ 0šŸ“
05:17:04leorize^ that one doesn't seem to be updated any more though
05:17:50Yardanico~nameisjohn
05:17:51disbotnameisjohn: 11It's john :)
05:18:19Yardanico~!eval
05:18:20disbot!eval: 11command to evaluate snippets on IRC
05:20:38*arecacea1 quit (Remote host closed the connection)
05:21:04*arecacea1 joined #nim
05:40:19ForumUpdaterBotNew thread by Jiro4989: GitHub Actions: workflow to generate documents with ``nimble doc`` and release to GitHub Pages, see https://forum.nim-lang.org/t/6683
06:15:02*solitudesf joined #nim
06:22:09Zevvvarriout:oh does it? I thought they only do markdown for hte top level readme
07:02:50bungin openssl.nim some procs without dynlib specified, some have, why is that ?
07:38:35*Vladar joined #nim
08:33:26*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:41:29*vsantana joined #nim
08:43:22*vsantana quit (Client Quit)
08:45:57*krux02 joined #nim
09:03:52*drewr quit (Ping timeout: 260 seconds)
09:05:47*drewr joined #nim
09:14:17FromDiscord<Varriount> Zevv: https://github.com/asciidoctor/asciidoctor
09:14:46FromDiscord<Varriount> That repo seems to be using asciidoc in the readme
09:37:46FromDiscord<iWonderAboutTuatara> bit of a project iw ould noramlly write in py
09:38:00*hyiltiz quit (Ping timeout: 256 seconds)
09:38:08FromDiscord<iWonderAboutTuatara> how would I take the rgba value of each image and store it in an array?
09:39:10FromDiscord<Recruit_main707> I think there is a module to do that
09:39:26FromDiscord<Recruit_main707> !repo npeg
09:39:28disbothttps://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 110⭐ 5šŸ“
09:39:29FromDiscord<Recruit_main707> ?
09:39:47FromDiscord<Recruit_main707> Nope
09:39:54FromDiscord<Recruit_main707> Not this one :p
09:40:47FromDiscord<iWonderAboutTuatara> that looks powerful
09:40:56FromDiscord<iWonderAboutTuatara> I should take a look at that
09:41:05FromDiscord<iWonderAboutTuatara> if anyone finds the module let me know
09:41:10FromDiscord<iWonderAboutTuatara> i want to try this in a non py language
09:44:42FromDiscord<Recruit_main707> https://github.com/SolitudeSF/imageman↵Check this one out and see if it fits your task, I have never used it so idk
09:45:02FromDiscord<iWonderAboutTuatara> (((framework)))
09:45:12FromDiscord<iWonderAboutTuatara> why the ((()))?
09:45:16FromDiscord<iWonderAboutTuatara> does that mean something?
09:47:25FromDiscord<Recruit_main707> Shouldn’t worry you
09:47:41FromDiscord<iWonderAboutTuatara> good to hear
09:47:52FromDiscord<iWonderAboutTuatara> are there docs of some form?
09:48:13*hyiltiz joined #nim
09:48:25FromDiscord<Recruit_main707> Check the examples, but that’s it I think
09:48:28FromDiscord<iWonderAboutTuatara> I don't need anything particularly complex, just need to read rgb of each pixel
09:48:35FromDiscord<iWonderAboutTuatara> oh none of them do that i dont think
09:52:09*NimBot joined #nim
09:52:59leorizebung: some proc doesn't have dynlib because they're either: translation of C macros or that they abstract the interface so that it's compatible with both OpenSSL 1.0.2 and 1.1
09:54:03leorize!repo flippy
09:54:04disbothttps://github.com/treeform/flippy -- 9flippy: 11Flippy is a simple 2d image and drawing library. 15 41⭐ 6šŸ“
09:54:36leorize@iWonderAboutTuatara ^
09:56:38FromDiscord<iWonderAboutTuatara> i wouldn't be drawing the images in ninm
09:56:49FromDiscord<iWonderAboutTuatara> looks like turtle for nim
09:56:51FromDiscord<iWonderAboutTuatara> maybe it isnt
09:57:06FromDiscord<iWonderAboutTuatara> oh its perfect
09:57:10FromDiscord<iWonderAboutTuatara> getRgba(
09:57:24leorizeyep :p
09:57:47*awe001 joined #nim
09:58:41FromDiscord<iWonderAboutTuatara> thank you so much!
09:59:17leorizeyw
09:59:23*xet7 joined #nim
10:03:30*casaca quit (Ping timeout: 256 seconds)
10:04:29FromDiscord<iWonderAboutTuatara> hey how do you install it?
10:10:39FromDiscord<iWonderAboutTuatara> i installed via nimble
10:11:07FromDiscord<iWonderAboutTuatara> @leorize it doesn't seem to realize that the datatype image exists though
10:11:21FromDiscord<iWonderAboutTuatara> meaning i can't pass image as a param to a proc or func
10:11:55*filcuc_ quit (Remote host closed the connection)
10:12:52leorizewdym?
10:13:04leorizeyou have a seq[byte] and you want to construct an image out of it?
10:15:35leorizeoh and... did you `import flippy`? :P
10:28:45FromDiscord<iWonderAboutTuatara> I did
10:28:57FromDiscord<iWonderAboutTuatara> Isn't there an image datatype?,
10:29:03leorizeyes?
10:29:10FromDiscord<iWonderAboutTuatara> I couldn't use that
10:29:15FromDiscord<iWonderAboutTuatara> I'm not at my computer anymore
10:29:29FromDiscord<iWonderAboutTuatara> But I needed to pass an image to a proc and it didn't let me
10:30:44leorizethat's weird then. Once you get back to your computer, can you post the error messages and the snippet so that we can debug this further?
10:33:22FromDiscord<iWonderAboutTuatara> Will do
10:43:47*Vladar quit (Quit: Leaving)
10:44:58*casaca joined #nim
11:25:44*awe001 quit (Read error: Connection reset by peer)
11:28:09*awe001 joined #nim
12:02:42*lritter joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:37*supakeen joined #nim
12:06:48FromDiscord<Recruit_main707> does nimprof work with gc:none?
12:09:03leorizeyou should probably not use it :P
12:09:16leorizeuse gprof, it works
12:10:30FromDiscord<XxDiCaprioxX> I got a program saying "unable to find zlib1.dll" is there a fix? Reinstalling did not work
12:11:17FromDiscord<Recruit_main707> leorize, yeah, i was checking it, it just seems a little bit less friendly
12:14:14leorize@XxDiCaprioxX https://nim-lang.org/download/dlls.zip <- I think this dll pack might have it
12:14:25FromDiscord<XxDiCaprioxX> Ah now it works nvm lol
12:15:23FromDiscord<Recruit_main707> ah dlls & paths
12:30:25FromDiscord<krisppurg> @XxDiCaprioxX if you are using v1.0.1 of my library and you don't want compression you can install the head branch basically `nimble install dimscord@#head`, I will release v1.0.6 containing new fields then v1.1.0 or v1.2.0 supporting api v8, if you do want compression do `-d:discordCompress`
12:30:51FromDiscord<XxDiCaprioxX> Okay
12:30:58FromDiscord<XxDiCaprioxX> Good to know
12:31:23FromDiscord<krisppurg> šŸ‘
12:54:25*leorize quit (Quit: WeeChat 2.8)
14:06:32FromDiscord<Joe-23> sent a long message, see http://ix.io/2ul6
14:07:48FromDiscord<Joe-23> (edit) 'http://ix.io/2ul6' => 'http://ix.io/2ul7'
14:09:05Yardanico1. yes, but with ARC it's just simple reference counting (+ move semantics and destructors) 2. yes. but there's compiler type inference and you can specify the integer type for integer literals with suffixes
14:09:11Yardanico3. yes, there was a 1.0 release already
14:09:19*FromDiscord quit (Remote host closed the connection)
14:09:35*FromDiscord joined #nim
14:09:46Yardanico6. yes, you can absolutely go as low-level as you want
14:10:15Yardanico7. well, it might be a little bit slower than C/C++, it all depends on your programming style. But performance isn't really an issue, it's comparable to other native languages
14:10:29Yardanico5. I'd say so, yes, basic concepts are easy to grasp
14:11:09Yardanico4. there are bindings for godot, and quite a lot of other game frameworks (not engines though)
14:11:30FromDiscord<Joe-23> > 4. there are bindings for godot, and quite a lot of other game frameworks (not engines though)↵@Yardanico[IRC]#0000 So there is a GDNative Nim?
14:11:36Yardanicoyes
14:11:36*arecacea1 quit (Remote host closed the connection)
14:11:40Yardanicohttps://github.com/pragmagic/godot-nim
14:11:53FromDiscord<Joe-23> > https://github.com/pragmagic/godot-nim↵@Yardanico[IRC]#0000 Thanks šŸ™‚
14:12:16*arecacea1 joined #nim
14:12:22FromDiscord<Joe-23> > 7. well, it might be a little bit slower than C/C++, it all depends on your programming style. But performance isn't really an issue, it's comparable to other native languages↵@Yardanico[IRC]#0000 Is there some benchmarks that have been performed?
14:12:40Yardanicobenchmarks are a bad way to check stuff really, since most of the time you're not comparing the language, but comparing the stdlib
14:13:14FromDiscord<Recruit_main707> but essentially, nim can be as fast as c/c++, sometimes faster, sometimes slower, but the difference is always small
14:13:40Yardanicoyeah, as I said it always depends on your programming style
14:13:57FromDiscord<Rika> its almost negligible compared to the gains in productivity you might have šŸ˜›
14:13:58Yardanicoa bad algorithm written in C can be beated by a fast algorithm written in Python
14:14:04FromDiscord<Rika> beaten
14:14:07FromDiscord<Joe-23> > but essentially, nim can be as fast as c/c++, sometimes faster, sometimes slower, but the difference is always small↵@Recruit_main707 That is good to know šŸ™‚
14:14:11Yardanicoyeah sorry for a typo
14:14:24FromDiscord<Joe-23> > a bad algorithm written in C can be beated by a fast algorithm written in Python↵@Yardanico[IRC]#0000 Yes true šŸ™‚
14:14:28YardanicoI had beaten in my mind but my fingers typed another word
14:14:38FromDiscord<Rika> that happens to me so often
14:14:52FromDiscord<Joe-23> I get plenty of typos lol šŸ˜‰
14:17:07FromDiscord<Joe-23> Just quickly, say if I want to declare a variable that is unsigned a bit integer
14:17:11FromDiscord<Joe-23> how would I do it?
14:17:26FromDiscord<Rika> a bit?
14:17:38Yardanico8 bit int you mean?
14:17:40Yardanicoso 1 byte?
14:17:48FromDiscord<Rika> `var something: uint8 = 0`?
14:17:49Yardanicolet a = 1'u8 or let a = 1u8
14:17:54FromDiscord<Rika> depends
14:17:54FromDiscord<Rika> yeah
14:17:56Yardanicoor the Rika's way
14:17:57Yardanicoboth work
14:18:15FromDiscord<Rika> let for immut, var viceversa
14:18:29FromDiscord<Rika> the 'u8 vs : uint8 is a style preference
14:18:43FromDiscord<Rika> if you like rust more than python
14:19:22FromDiscord<Joe-23> > `var something: uint8 = 0`?↵@Rika Thanks
14:20:10Yardanicothat's for a mutable variable, yes
14:20:16Yardanicolet for immutable runtime, const for compile-time
14:20:44FromDiscord<Joe-23> > 1. yes, but with ARC it's just simple reference counting (+ move semantics and destructors)↵Sorry one thing about this, does this run during runtime?
14:21:01Yardanicoreference counting is at runtime, yes, but all destructors are injected at compile time, they have no overhead
14:21:07Yardanicoand reference counting isn't really a GC
14:21:12Yardanicoso arc can be used for hard realtime
14:21:56FromDiscord<Recruit_main707> yes, you could even go with no gc if you felt to, but it is not worth it really, arc does the thing, and its getting better with every update
14:22:58Yardanicopeople just usually don't like GCs because they associate them with some stop-the-world monstrosity from JVM
14:23:23FromDiscord<Joe-23> > so arc can be used for hard realtime↵@Yardanico[IRC]#0000 Does Rust have something like this? I heard it has reference counting?
14:23:34FromDiscord<Rika> rust has ref counting too yes
14:23:39FromDiscord<Joe-23> > yes, you could even go with no gc if you felt to, but it is not worth it really, arc does the thing, and its getting better with every update↵@Recruit_main707 So what does arc exactly do?
14:23:46Yardanicoyes, you can have reference counting in Rust too when you need multiple pointers to refer to same data
14:23:50Yardanico@Joe as I said
14:23:52FromDiscord<Joe-23> > rust has ref counting too yes↵@Rika What about C/C++?
14:23:56FromDiscord<Rika> yes
14:23:59Yardanicoin C you can have reference counting too
14:24:02FromDiscord<Recruit_main707> https://docs.elementscompiler.com/Concepts/ARCvsGC/
14:24:05Yardanicoit's not dependent on the language
14:24:20FromDiscord<Joe-23> > @Joe-23 as I said↵@Yardanico[IRC]#0000 Thanks
14:24:29Yardanico@Recruit there's a better resource than that
14:24:36Yardanicohttps://www.youtube.com/watch?v=aUJcYTnPWCg
14:24:54FromDiscord<Joe-23> > https://docs.elementscompiler.com/Concepts/ARCvsGC/↵@Recruit_main707 Interesting
14:25:00Yardanicostraight from the source
14:25:01FromDiscord<Recruit_main707> well, i dont doubt its better, but for a quick definition
14:25:08Yardanicobut for deeper understanding
14:25:16FromDiscord<Recruit_main707> yes, then sure
14:26:07FromDiscord<Joe-23> One last question, is Nim suited to develop an operating system?
14:26:20Yardanicoyes, you can do that for sure
14:26:24Yardanicothere have been some toy kernels made
14:26:29Yardanicobut no one's stopping you from making a full OS
14:26:43FromDiscord<Joe-23> > there have been some toy kernels made↵@Yardanico[IRC]#0000 Oh wow interesting.
14:26:50FromDiscord<Joe-23> > but no one's stopping you from making a full OS↵@Yardanico[IRC]#0000 Cool šŸ™‚
14:26:57Yardanicoyou can do everything in Nim that you can do in C
14:27:18Zevveven the undefined behaviour, my favorite part
14:27:24Yardanicoexactly
14:27:40FromDiscord<Rika> just know that, naturally, some things are harder or easier to do on nim
14:27:42Yardanicoeven the 30-year old manual memory allocations
14:27:51Yardanicojk about the age
14:27:54FromDiscord<Joe-23> > yes, you could even go with no gc if you felt to, but it is not worth it really, arc does the thing, and its getting better with every update↵@Recruit_main707 Wait, when you say gc, were you referring to arc?
14:28:05FromDiscord<Joe-23> As in I can disable arc?
14:28:08FromDiscord<Rika> yes
14:28:09FromDiscord<Joe-23> Is that what you meant?
14:28:11FromDiscord<Joe-23> Ah I see
14:28:13Yardanicoyou can, but it's quite useless
14:28:17YardanicoI mean it's not
14:28:21Yardanicobut you'll be missing a lot of the stdlib
14:28:22FromDiscord<Recruit_main707> yes, you can go full manual memory management
14:28:31FromDiscord<Recruit_main707> ah, and that too
14:29:09FromDiscord<Recruit_main707> are there plans on making the stdlib independent of the gc?
14:29:30Yardanicono, why?
14:29:35Yardanicoarc is not a real GC anyway
14:29:38Yardanicoand stdlib works nice with arc
14:30:22FromDiscord<Joe-23> > yes, you can go full manual memory management↵@Recruit_main707 So avr does automatic memory management for you so its the same speed if I write the code the same equivalent manual memory management code?
14:30:26FromDiscord<Recruit_main707> yes, its just that i think i read it somewhere, it actually was 4raq who said it iirc
14:30:43Yardanico@Joe with arc - usually yes
14:30:51Yardanicoif you really write the SAME code
14:31:09FromDiscord<Joe-23> Makes perfect sense
14:31:34Yardanicoalso see https://forum.nim-lang.org/t/6549
14:31:43FromDiscord<Joe-23> Thanks
14:40:56*azed joined #nim
14:41:24*azed quit (Max SendQ exceeded)
14:47:40*azed joined #nim
14:48:17*azed quit (Max SendQ exceeded)
14:48:59*azed joined #nim
14:49:36*azed quit (Max SendQ exceeded)
14:50:24*azed joined #nim
14:51:04*azed quit (Max SendQ exceeded)
15:05:52*vycb[m] joined #nim
15:11:05*Vladar joined #nim
15:13:26*s4mu3lbk joined #nim
15:13:26*s4mu3lbk quit (Read error: Connection reset by peer)
15:14:37*s4mu3lbk joined #nim
15:20:22*s4mu3lbk quit (Quit: Leaving)
15:29:25*endragor quit (Remote host closed the connection)
15:41:51*endragor joined #nim
15:43:06*bung quit (Quit: Lost terminal)
15:50:04FromDiscord<Avatarfighter> Does anyone have an example of using shared libraries that works with ARC/ORC?
15:50:19*waleee-cl joined #nim
15:50:35disruptekall shared libs should work with arc.
15:51:08FromDiscord<Avatarfighter> sorry I should’ve clarified, i meant in a plugin/hot reload scenario.
15:51:30disruptekdo you have an example that doesn't work?
15:51:52FromDiscord<Avatarfighter> well no, I just don’t know how I would approach making plugins or hot reloading lmao
15:52:06disruptekso this has nothing to do with arc.
15:52:28FromDiscord<Avatarfighter> Yeah I guess so
15:52:37disruptekhave you looked on github?
15:53:01FromDiscord<Avatarfighter> Im still looking for an example of such a system though, Ive looked on github
15:53:09disruptekreally.
15:53:25disruptek!repos plugins
15:53:27disbothttps://github.com/genotrance/plugins -- 9plugins: 11Plugin system for Nim 15 22⭐ 2šŸ“
15:53:27disbothttps://github.com/ThomasTJdev/nimwc_plugins -- 9nimwc_plugins: 11Plugin repository for Nim Website Creator 15 5⭐ 0šŸ“
15:53:27disbothttps://github.com/bunkford/wChart -- 9wChart: 11Chart plugin for wNim 15 7⭐ 0šŸ“ 7& 27 more...
15:54:37FromDiscord<Avatarfighter> From what I understand the plugin repo by genotrance utilizes the boehm gc
15:54:56disruptekyou just told me this has nothing to do with arc.
15:55:27FromDiscord<Avatarfighter> I feel betrayed and confused no
15:55:29FromDiscord<Avatarfighter> now*
15:55:39disruptekhow do you think /i/ feel?
15:55:44FromDiscord<Rika> lol
15:55:50FromDiscord<Avatarfighter> less betrayed and confused than I
15:55:58disruptekrika: i will get to you in a minute.
15:56:26FromDiscord<Rika> loooool
15:56:27FromDiscord<Avatarfighter> @Rika yeah, I want my minute of disruptek time 😠
15:56:48FromDiscord<Rika> please take him xd
15:56:56FromDiscord<Avatarfighter> So like I was saying disruptek where those ARC compatible plugin systems at thoooo
15:57:06disruptekfile a bug report.
15:57:34FromDiscord<Avatarfighter> looks like my minute is up @Rika I’m going to go cry now
15:57:49disruptekplugins is what you want.
15:58:01shashlickArc has many bugs still
15:58:55FromDiscord<Avatarfighter> shashlick: im aware it still had bugs I was just curious to see if someone had a working example of a plugin/hot reload system that was compatible with ARC/ORC
15:58:58FromDiscord<Avatarfighter> Has*
15:59:31shashlickIt's not a compatibility issue
15:59:54disrupteki think zachary has something that might work with arc, but it's c-based.
16:01:01FromDiscord<Avatarfighter> Disruptek: ah ok thanks
16:01:21FromDiscord<Avatarfighter> shashlick: i meant compatible as in works lmao
16:01:37shashlickThere's issues when you pass data between the exe and dll in some cases
16:01:37FromDiscord<Avatarfighter> As in it compiles and runs
16:02:11FromDiscord<Avatarfighter> pass data how? Through a channel? A global variable?
16:02:33shashlickPlugins compiles and runs but fails tests due to memory issues
16:02:44FromDiscord<Avatarfighter> ah ok thank you shashlick
16:02:49shashlickSee the test cases
16:03:00shashlickExe calls dll which calls exe proc
16:03:15shashlickIf you don't do crazy things like that, it might work
16:03:24FromDiscord<Avatarfighter> ill go check them out, thanks for the explanation
16:03:39FromDiscord<Avatarfighter> Im only doing exe calls dll afaik
16:03:43shashlickMaybe there's more fixes in arc
16:08:46*epfnair joined #nim
16:16:23disruptektoo funny... /A Nim library for making MIDI music. It uses TinySoundFont underneath. A musical score is modelled as a simple hierarchy of tuples. There are probably bugs...or maybe your music just sounds bad. It could be that. Think about it./ https://github.com/paranim/paramidi
16:29:18disrupteki think this is what i want to use for my "listen to code" project.
16:39:47Zevvi tried a hadful of variants a few years back
16:40:08Zevvbut its hard to make something consistent that is able to convey information in sound
16:40:11Zevvfrom code
16:40:25disruptekwhat is it that you want to convey?
16:40:32disrupteki just want to convey novel structures.
16:41:00Zevvnot sure, things like structure, scope. Good code should sound more pleasand or right than bad code
16:41:17disruptekah, i don't agree.
16:41:33disrupteki just want to hear changes.
16:41:56disrupteknovelty and timing is what i'm after.
16:42:06Zevvfair enough
16:42:39disruptekyou could probably contribute a lot in terms of the sound composition angle, though.
16:42:50disrupteki imagine you think midi is too limited.
16:43:43Zevvi do use sound for debugging quite often though. i have thi tiny script that gives a blip for every line passing through, frequency is length of the line, nothing more. great for piping logging output of processes, I can tell my current project like i can tell my apple //e disk drive
16:44:08Zevvmidi might be ok if your sound source allows for a lot of modulations
16:45:16*hnOsmium0001 joined #nim
16:45:21Zevvstuff im working on now is a handful of things all interacting, androdi booting, opegl stuff happening. I just know how a "good" run sounsd
16:45:33disruptekit seems more structured and easier to analyze or record.
16:45:47disruptekthat's exactly it: you know what sounds right.
16:45:56disrupteknot that it sounds nice, but that it sounds correct.
16:46:05Zevvright.
16:46:28Zevvfor code maybe generating from AST would bring a whole new prespective. I always just went from source
16:46:42disruptekimagine that your trampoline plays the continuation and doesn't bounce until the playback is complete.
16:46:59disruptekthe ast-as-midi can just be embedded in the continuation.
16:47:16Zevvwell, for anything event-like, it works great in general
16:47:25disruptekyeah, that's my experience.
16:47:29Zevvalso very nice for network debugging.
16:47:56disruptekthat's what our paper was on, but i think it's more broadly applicable.
16:48:11disruptekwe just don't have any good libraries yet.
16:48:57Zevvi madet this project 15 years a go or so, we had a server farm doing ssh, pop, imap, http, dns, icmp, all kind of things. i created a forest out of that. a small brook if the load was low, rising into a torrent of a overflowing river at 100%. Failed ssh logins was ravens crawing, tocking of a flock of chicken for all imap connects, etc
16:49:17disruptekthat's peep.
16:49:46disruptekhttps://www.usenix.org/legacy/publications/library/proceedings/lisa2000/full_papers/gilfix/gilfix_html/index.html
16:50:31disruptekgilfix was my roommate and employee when i was the sysadmin at tufts.
16:50:46Zevvmine predated peep i guess :)
16:53:51Zevvi guess not, 2006
16:53:54Zevvwell it was fun
16:55:48disruptekpeople loved the concept but the impl was way too low-level simply because we didn't have the libraries we have now.
16:57:47*superbia2 joined #nim
16:58:00Zevvoh was this made by a mate of yours then?
16:58:14disruptekyeah.
16:58:21Zevvthats cool :) when ws that?
16:58:37disruptek2000, apparently.
16:58:40Zevvdamn
17:00:02Zevvwow i made this in *ruby*?!
17:00:06Zevvi never knew i wrote ruby
17:00:07disruptekit was a really fun talk, too. we played some network meltdowns and stuff to the audience.
17:00:25*superbia1 quit (Ping timeout: 240 seconds)
17:00:47Zevvsometimes i feel sorry that i hate writing papers or giving talks
17:02:20disruptekpractice helps, but i agree, it's challenging.
17:03:00disrupteki used to give a seminar to grads each semester and it was always hard to organize.
17:03:08disruptekgrad students, i mean.
17:03:12Zevvi'm always put off by the amount of work ine
17:03:17Zevvit needs to do it *right*
17:03:37Zevvi'm perfectly fine to do something ad hoc for a small audience if i know what i'm talking about
17:03:49Zevvbut doing something proper is just so much work
17:04:47Zevvwe'll do one on cps if it gets done. you talk and i flip the transparants on the overhead projector
17:05:28disruptekit's useful to know what you're talking about.
17:05:32disrupteki dare say it's critical.
17:05:39Zevvsure otherwise i will not do it at all
17:06:00disrupteki think cps can be boiled down and delivered as a talk today.
17:06:16Zevvi had a 10 out of 10 for my final presentation for my study thing, no clue whats its called in english
17:06:27Zevvi just spent a year digging into this one topic, surea I cna tlak about that
17:06:46Zevvand then on my first job some sales guy put me up for a presentation at a huge conference
17:06:55Zevvabout something firewall something. stuff I knew shit about
17:07:00Zevvso I bailed out on the day
17:07:06Zevvgap in the program
17:07:08disrupteklol really?
17:07:16Zevvyeah. I was *so* mad
17:07:49Zevvwas this linux conference thing, a few hndred neckbeards in a room, and 23 yo me telling somthing about ipchains
17:07:55Zevvwhat did i know
17:08:41Zevvi could do it now though, I spent the last 13 years working on a pretty advanced router thing, everything from scratch on a bare linux kernel. I know my mark/matches, route policyes, xfrm tables and vlan tags
17:09:01disrupteki'm never going back there. i hope.
17:09:07Zevvbut myabe that was the event that kept me from ever doing presentations after that
17:09:11Zevvwhy you hope
17:09:23disruptekit just makes me tired simply thinking about it.
17:09:24Zevvthey are still waiting for you with pitch forks?
17:10:01disruptekwhen i was a network eng, it was a pretty painful era i guess.
17:10:23Zevvfair enough
17:10:35disrupteki know how little i know these days, but i also know that there are people that know even less.
17:10:48disruptekand we certainly can explain a thing or two for those people.
17:11:39Zevvevery year my new years resolution is not to get into any layer of management or team lead or whatever
17:11:54ZevvI see them all go there, and it makes me cry
17:12:28disrupteksee, i like management because i find the constant churn exhausting.
17:12:38Zevvi still keep up with the fresh kids somehow, probably only because i type faster and hate a lot of things
17:12:42disruptekas araq says, "i don't care"
17:12:52disrupteki don't care about package management.
17:12:52Zevvyeah he knows shit
17:13:10disruptekso very many things i don't care about which i'd have to learn if i wasn't a manager.
17:13:23Zevvvery true, that
17:13:49ZevvI made a very deliberate decision 15 years ago
17:13:56Zevv to stick with embedded and C
17:14:24Zevvthats what i loved and was good at. never cared about most of the other stuff, but just enough to know what people aretalking about
17:14:50Zevveasy moneym to be made doing LAMP or java or micrsoft stuff, but never had to
17:15:09disrupteki basically gave up C around 2000.
17:15:24disruptekpython was just so very much more productive.
17:15:38Zevvi dont care about python :)
17:15:43epfnairdepends on what you are doing
17:15:45ZevvI had my Lua!
17:15:57disrupteki would do really low-level stuff in C if i had to, but... i rarely had to.
17:16:08Zevvlua runs in the same niche ecosystems as embedded and C
17:16:29Zevvand that again is my story all about how
17:16:33Zevvi ended up at nim
17:16:44disruptekyeah, that wasn't my area. i was doing progressively larger networks.
17:16:54FromDiscord<Rika> lua's wild
17:17:19ZevvRika: only reason i'm doing this cps stuff, to make nim more like lua
17:17:30Zevvnetwork stuff is great, but the "larger" is not my thing I guess
17:17:53ZevvI know networking pretty deep and I'm reasonably ok at diagnosing funny stuff
17:18:37FromDiscord<Rika> why would cps make nim more like lua?
17:18:42Zevvcoroutines!
17:19:04FromDiscord<Rika> i know those and i still dont see how
17:19:18Zevvas I have been saying for years and years: anyone who can't explain to a 5yo what at TCP SYN is, should keep his dirty hands off the internet!
17:19:34Zevvbut hey, that's not what happened
17:20:03Zevvso here we are, with family members I love dearly living their lives through facebook only
17:20:33disruptekcreepy.
17:20:41Zevvwith the Web As We Know It finally being replaced by Googletech only
17:21:05Zevvexit mozilla, enter chrome
17:21:08Zevvexit http, enter amp
17:21:27disruptekmmm i don't think amp can actually win.
17:23:16Zevvits not about the technology story
17:23:25Zevvits about the monetization
17:23:28disruptekyou neglected to explain coro to rika.
17:23:40Zevvrika knows. he said lua is wild
17:23:45Zevvso he knows
17:23:58disruptekrika is a sheit.
17:24:10disruptekalso, rika just asked why cps begets coro.
17:24:19Zevvah i see
17:24:20disruptekthat's your department, naturally.
17:25:08Zevvi forgot. why do i want this again
17:25:42Zevvwell, it doesnt make nim more lua of course
17:25:50FromGitter<jorjun_twitter> Getting lots of "undefined reference to xxxā€ at nim compilation, trying to refer to bin/my_c_libray.o {.importc, header: ā€œmy_c_libray.hā€} any tips?
17:25:58Zevvbut coros is the second thing I missed when moving from lua to nim
17:26:06Zevvthe first was lpeg, and that has been fixed
17:26:38Zevvundefined reference is usually a linker error
17:26:48FromDiscord<Rika> i know what coros are but i dont know how cps would make nim more like lua as you said before but have now taken back it seems
17:26:57Zevvso you refer to symbols and use them, but probably forget to add them to your final link stage?
17:27:21disrupteklol
17:27:22FromGitter<jorjun_twitter> yep.. I have a nim.cfg with --clibdir:bin. (bin is a folder with .o files from a c project I am trying to leverage)
17:28:02FromDiscord<lqdev> @jorjun_twitter https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-link-pragma
17:28:17Zevvrika: lua coroutines is a very simple concept with a very simple api, which allows for building a number of powerful things that you can not build without coroutines.
17:28:27Zevvnim has iterators, which bring a tiny bit of that
17:28:30FromGitter<jorjun_twitter> thanks so much @ lqdev
17:28:43Zevvnim has async, which also brings a tiny bit of that
17:28:51disruptekcps simply lets us write "normal" code which is converted into continuations.
17:29:08disruptekcontinuations are painful to write by hand.
17:30:01FromGitter<jorjun_twitter> ah not like this it seems: proc DEV_Module_Exit*(): void {.importc, header: "DEV_Config.h", link: "bin/DEV_Config.o" .}
17:30:12Zevvso lua is able to do this because its running on a vm. its trivial and lightwieght to switch stacks and do non-linear code flow
17:30:39Zevvbut nim, built on C, has constraints. CPS can offer the same kind of flexibility, the same building blocks as lua coroutines
17:31:13FromDiscord<Rika> ok
17:31:48Zevvproblemy with iterators in nim for example, is that it hsa to be an *iterator* to be able to yield.
17:32:03Zevvyou cant call into another proc and have that proc do the yielding
17:32:09Zevvso its pretty limited in what it can do
17:32:32disruptekyou can't recurse in a nim iterator, for example.
17:32:43Zevvalso it goes one way only: you produce with the yield, and consume with the iterator user
17:32:43disruptekcps can unroll recursion, if that makes any sense.
17:33:04Zevvanyway, were again doing the talk talk talk
17:33:10FromDiscord<Rika> ah yeah i remember lua being able to yield from any function depth
17:33:26FromDiscord<Rika> was funky to understand that
17:33:54Zevvrike: if youre interested, there's an excellent article somewhere called something like "what color is your code"
17:34:05disruptekwhat color is your function.
17:34:34Zevvhttp://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
17:34:53FromDiscord<Rika> i already have read that
17:35:23Zevvwith disruptek you never know what colors it might be, his terminal looks like a dyslesbian rave outfit
17:35:47Zevvfor me its simple, all my functions are green, just like they should
17:36:02FromDiscord<Rika> i'm colorblind so i dont color my functions
17:36:16disruptekliar.
17:36:30disruptekthis is the problem with async/await.
17:36:42disruptekeveryone thinks they have monochrome functions but they don't.
17:36:50FromDiscord<Rika> well i cant tell either way
17:37:37FromDiscord<Hearthstone> Are you actually colour blind Rika?
17:38:07FromDiscord<Rika> i am, but not truly like my messages implied
17:38:38FromDiscord<Hearthstone> Oh
17:38:50FromDiscord<Rika> deuteranomalic
17:38:57FromDiscord<Hearthstone> Oooh okay
17:39:01FromDiscord<Rika> or protanomalic, i was never tested
17:39:18FromDiscord<Rika> and those shoddy tests online suggest i am protan or deutan but never definitely one of the two
17:39:21disruptekactually, you were tested and found wanting.
17:40:26FromDiscord<Hearthstone> O
17:44:57*Prestige quit (Quit: Prestige)
17:45:17*Prestige joined #nim
17:46:19*kungtotte quit (Read error: Connection reset by peer)
17:46:48FromDiscord<krisppurg> Hey guys, is there a way to have nim docs in json?
17:47:13FromDiscord<Hearthstone> There should be
17:47:20FromDiscord<Hearthstone> (It's Nisha btw-)
17:47:33FromDiscord<Rika> "who's nisha"
17:47:36FromDiscord<krisppurg> oh hi
17:47:40FromDiscord<Hearthstone> @Technisha (LGBTQIAP+)-
17:47:42FromDiscord<Hearthstone> xD
17:47:51FromDiscord<Rika> why the new account
17:47:52FromDiscord<krisppurg> well anyways what's the module for it?
17:47:57FromDiscord<Technisha (LGBTQIAP+)> Hi-
17:48:03FromDiscord<Hearthstone> Eh, just-
17:48:05disruptekdafuq
17:48:16FromDiscord<Technisha (LGBTQIAP+)> No idea, a quick search should help
17:48:22FromDiscord<Rika> šŸ‘€ let's not comment on the username
17:48:25*kungtotte joined #nim
17:48:58FromDiscord<Hearthstone> What?-
17:49:11FromDiscord<Hearthstone> Technisha -> Nisha
17:49:13FromDiscord<Hearthstone> :P
17:49:19FromDiscord<Rika> no, your username
17:49:25FromDiscord<Rika> probably what made dis say "wtf"
17:49:28FromDiscord<Rika> anyway
17:49:38FromDiscord<Hearthstone> O-
17:49:44disruptekno, i'm confused as to why nisha has three different names.
17:50:33FromDiscord<Rika> two?
17:50:42FromDiscord<Rika> theres the new account and the old
17:50:44FromDiscord<Rika> whats the third
17:51:03FromDiscord<Hearthstone> Third?
17:51:09FromDiscord<Hearthstone> I only have 2
17:51:20FromDiscord<Hearthstone> Nisha and Technisha are the same account :P
17:51:29disruptekwell, i guess i have my own name for them, then.
17:51:34FromDiscord<Hearthstone> I just use Nisha as a quick way to refer to myself-
17:52:01disruptekyou mean because `me` is too much to type?
17:53:28FromDiscord<Hearthstone> No, i mean as a nickname-
17:54:09FromDiscord<krisppurg> > well anyways what's the module for it?
17:54:14disruptekyou gave yourself a nickname?
17:54:25FromDiscord<Rika> someone help poor krisppurg here
17:54:50FromDiscord<Hearthstone> @krisppurg depends what you mean exactly
17:55:01FromDiscord<Hearthstone> You want to write docs in JSON and have then parsed?
17:55:11FromDiscord<Hearthstone> Or do you want to turn the docs into Json
17:55:17FromDiscord<krisppurg> into json
17:55:23FromDiscord<Hearthstone> Lemme see
17:55:45FromDiscord<krisppurg> I think I may have told you this.
17:55:46FromDiscord<Hearthstone> https://nim-lang.org/docs/docgen.html
17:55:50FromDiscord<Hearthstone> Docgen
17:56:06FromDiscord<krisppurg> o
17:56:20FromDiscord<krisppurg> ty
17:56:24FromDiscord<Hearthstone> No worries :P
17:59:02FromDiscord<krisppurg> hm I wonder if there is a way to parse `&quot;` as `'` for example.
17:59:27FromDiscord<krisppurg> (edit) '`'`' => '`"`'
18:00:04*epfnair quit (Quit: Leaving)
18:02:52FromDiscord<lqdev> https://nim-lang.org/docs/parsexml.html
18:02:53FromDiscord<Hearthstone> Maybe
18:02:55FromDiscord<Hearthstone> Oo
18:04:27FromDiscord<krisppurg> oh
18:04:42FromDiscord<krisppurg> ty
18:08:16planetis[m]nim is on hacker news' frontpage :)
18:08:47Zevvdisruptek: do we know yet if these idents are supposed to be gensymmed?
18:08:57ZevvI mean, yeah probably, but mr c was not assured of that yet?
18:09:34disrupteki'll assure him if you want.
18:09:38Oddmongerhow can i convert a pointer to an object ?
18:09:51Oddmongeri tried a cast[object](myptr)
18:09:57disruptektry myptr[]
18:10:16*Jesin quit (Quit: Leaving)
18:11:19Oddmongerah
18:11:27Oddmongerthank you disruptek
18:11:30*endragor quit (Remote host closed the connection)
18:11:41disrupteksure.
18:11:58*endragor joined #nim
18:12:40Oddmongerwell that doesn't solve the problem, but [] is interesting
18:13:29Oddmongerare ptr and pointer the same thing ?
18:13:32*arecacea1 quit (Remote host closed the connection)
18:13:46disruptekone is typed and the other isn't.
18:14:27*arecacea1 joined #nim
18:14:31ZevvNim is just right down ugly and borrowed the worst from Pascal and Python. The multi-paradigm concept is a mess. Tried it a couple of years ago and moved on to better, more simple tools.
18:14:34disruptekpointer is like a typeclass for ptrs while ptr is only sensical in relation to a variable.
18:15:02Oddmongerok i think i understand
18:15:11FromDiscord<Rika> zevv who wrote that lmao
18:15:45Zevvbottom comment on the HN thread. fair enough, move along folks, nothing to see here
18:16:14*endragor quit (Ping timeout: 246 seconds)
18:16:25ZevvOddmonger: http://zevv.nl/nim-memory/
18:16:33disrupteklockfiles for nimble are due in october. great. this is a feature that i impl in nimph in an afternoon. 🤦
18:16:42Zevvyawn
18:16:55FromDiscord<Rika> ah bottom comment lol
18:18:50ZevvI aways read the 3 star reviews for the best information, and the 1 star reviews just for fun
18:19:19Oddmongerthank you Zevv , that's what i was searching
18:19:26Zevvskip the 5 stars, thats's from fanbois or people who realized they spent a lot of money on crap but don't dare te admit that to themselves
18:19:32ZevvOddmonger: yw
18:19:33*Jesin joined #nim
18:19:36Oddmongerbut disruptek is nice too, of course :þ
18:19:44Zevvdisruptek is nice too
18:19:46Zevvsure
18:20:26Zevvthat's why we decided to keep him
18:20:26*bung joined #nim
18:20:30Oddmongerhe redefines the type of niceness
18:20:50Zevvwe take the occasional bad mouthing and newbe-scaring for granted
18:20:55bungI got ` var procCb = getAst createCb(retFutureSym, iteratorNameSym,`
18:20:59bung var procCb = getAst createCb(retFutureSym, iteratorNameSym,
18:21:18bungsorry wrong copy
18:21:23bungasyncmacro.nim(248, 33) Error: can have an unlisted effect: RootEffect
18:21:25Zevvdont copy, pastebin
18:21:42*endragor joined #nim
18:22:01bungit does not point out where cause this
18:22:36bungmaybe async with tags will lead to this ?
18:22:41Zevvthat's a funny one indeed
18:25:33*endragor quit (Remote host closed the connection)
18:25:48*endragor joined #nim
18:32:51*endragor quit (Remote host closed the connection)
18:33:20*endragor joined #nim
18:43:14bungcreated a issue for it
18:46:59*endragor quit (Ping timeout: 240 seconds)
18:53:46shashlickhttps://news.ycombinator.com/item?id=24178438
18:57:36Zevvlook who just found the part :)
18:57:39Zevvparty
18:57:49Zevv'evening, shashlick.
18:57:59Zevvhow is life today
19:02:36*bung quit (Quit: Lost terminal)
19:02:43FromDiscord<Kiloneie> Whats up with people complaining about Nim's lack of IDE support, when it has a ton of support!?
19:02:58FromDiscord<Rika> people not knowing about it
19:02:58disruptekask them.
19:12:16FromDiscord<Kiloneie> Ive read the same when googling Nim a few days ago... Such missinformation.
19:13:47FromDiscord<Recruit_main707> tbh its not the best
19:14:13FromDiscord<Kiloneie> But still, it has many choices
19:15:09FromDiscord<Kiloneie> They complain about things every unpopular language faces, but won't do anything about it themselves. Meh.
19:15:32FromDiscord<Rika> well its hard to do something for a language you dont really love enough
19:16:49FromDiscord<Kiloneie> Sure, but when they write online they like the language then write about such nitpicks... It's just, they don't even know what they want.
19:18:23*endragor joined #nim
19:23:19Zevvat least complaint #1 is no longer the style insensitive casing :)
19:23:36*endragor quit (Ping timeout: 256 seconds)
19:26:42FromDiscord<Kiloneie> Wasnt that "not yet 1.0"? On slant where i first discovered Nim that was the #1 complaint, and now that it is over 1.0, the complain is not many libraries and poor documentation... Well, 5 more years i guess...
19:35:22Zevvits a fair complaint
19:35:51Zevvcompared to some other languages it really is.
19:36:02*tane joined #nim
19:36:12Zevvbut its unfair given the size of the team working on it
19:36:35Zevvnim cant juts open a can of technical writers and get that done in a few months
19:37:00FromDiscord<Kiloneie> Well... Nim has really easy FFI though... You add that into equation and it becomes a non problem
19:38:56Zevvanyway, over all the thread seems mostly positive, so let's see if we get new inflow over the next few days
19:39:10*Zevv
19:39:16Zevvwaves to all the HN visitors
19:58:55disruptekwhatever. the language isn't so inconsistent that it needs a lot of docs and there's a fair amount of code out there available for inspection.
19:59:09disruptekit's not like there aren't resources for people who are motivated.
19:59:19disruptekpeople just aren't that motivated because there's no money in it.
20:00:17disruptekif you're in a position to choose nim, you aren't going to pass because of the docs. you're going to pass because you don't need what nim offers.
20:03:04Zevvor, as I have now seen happen a few times from nearby, you didn't get the full picture of what it offers and decided to let it go by
20:03:16Zevvthat's still a marketing issue probably
20:03:25Zevvbut then again, there's already dozens of us
20:04:02disrupteksomeone seems to care about lockfiles but i don't spam about nimph, so... nah.
20:04:19Zevvyou should
20:06:22disruptekthere you go.
20:06:41disruptekit's pretty obvious to me that this isn't the problem.
20:10:59*endragor joined #nim
20:12:40disruptekit's more likely that the reasons /not/ to use nim are still numerous enough or broad enough that people feel they can make a good excuse on giving it a pass.
20:13:16shashlick@Zevv mostly out, am reviving my old music days
20:13:47Zevvgood man
20:14:04Zevvdont forget to share the fruits of your labour
20:14:46shashlickAbsolutely
20:15:42shashlickWhere do kids post their music these days
20:15:59Zevvha good question
20:16:24Zevvi decided to pick up upright bass and the bow a few months ago
20:16:34Zevvi plan to start sharing in 15 years or so
20:18:19Zevvregular bass playing is fine, i get along with it in my band settign. but bowing is a totally different skill
20:18:22Zevvhow alien to me
20:18:35*endragor quit (Ping timeout: 240 seconds)
20:18:58disruptekyou just bend at the waist.
20:19:08disruptekkeep your legs straight and lean forward.
20:19:11Zevvyou have no clue, do you
20:19:20disruptekno, i've done it.
20:19:27Zevvoh you did! :)
20:20:02Zevvi plan to play 1 bach celo suite when i hit 65
20:20:32Zevvand they are harder on the bass than on the cello
20:20:43disruptekwell, i dunno where i'll be in 3 years, but i'll try to show up.
20:20:57Zevv\o/
20:21:20disruptekit's harder than it should be to embed the compiler.
20:22:07Zevvjust make a tarball, slurp that into a nim const, write it out at run time and call it
20:22:25Zevvno one will notice
20:22:25disruptekthat's quite a stutter.
20:22:44Zevvyea i wonder where that came from
20:23:09disrupteki have it working, but i don't have it hooked the way i want, and it was more involved than it should have been.
20:23:14*Vladar quit (Quit: Leaving)
21:00:30FromDiscord<krisppurg> where is the nim benchmark comparison between go rust etc?
21:18:05*tane quit (Quit: Leaving)
21:24:07FromDiscord<brainproxy> I have an array of bytes and I'd like to read (let's say from the start) 64 bits from it and ultimately have a `uint64`
21:24:23disruptekyou're blowing my mind right now.
21:37:53FromDiscord<Rika> @brainproxy in what order? LSB or MSB
21:38:35FromDiscord<brainproxy> I'm not sure, I'm trying to figure out as I go along
21:38:44FromDiscord<brainproxy> I can try LSB and then MSB if it doesn't work
21:39:02FromDiscord<Rika> they both will "work" as in compile, but the values will just be wrong
21:40:05FromDiscord<brainproxy> I understand, I don't know the answer yet, guessing somewhat at what I need to do
21:40:58FromDiscord<brainproxy> see: https://github.com/status-im/status-go/blob/develop/protocol/identity/alias/generate.go#L28↵↵basically I want to `truncate the public key to the least significant 64 bits` for the byte array returned by https://github.com/status-im/nim-secp256k1/blob/master/secp256k1.nim#L281-L283
21:40:59FromDiscord<Rika> for LSB you make the uint64 buffer variable and store the first byte (index 0) into it, then store the next index shifted left by 8, then next by 16, then next by 24↵i think. its late for me and i might not be thinking right right now
21:41:17FromDiscord<Rika> that's dangerous, fiddling with crypto code
21:41:34FromDiscord<brainproxy> I understand, but there's a test suite to ensure it conforms, so a bit of a seat belt
21:41:55FromDiscord<brainproxy> also, I'm not really changing anything, just reading bits from a pubKey
21:42:20FromDiscord<Rika> for msb it's the reverse, index 0 shifted by 24 gets stored, then 1 shifted by 16, then 2 by 8, then 3 by 0
21:42:36FromDiscord<brainproxy> okay, I'm so raw that I don't know the syntax how to do it
21:42:42FromDiscord<brainproxy> what you said to do, I mean
21:42:59FromDiscord<brainproxy> something with bitwise operators, obviously
21:43:07FromDiscord<brainproxy> and getting array members with []
21:44:47FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2un6
21:45:29FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2un7
21:45:45FromDiscord<brainproxy> thanks!
21:46:06FromDiscord<Rika> note: as ive said above its late for me and i might be severely wrong somewher
21:46:07FromDiscord<Rika> (edit) 'somewher' => 'somewhere'
21:46:14*solitudesf quit (Ping timeout: 256 seconds)
21:54:04FromGitter<ynfle> Why is this invalid? https://play.nim-lang.org/#ix=2un9 The first parameter has a default parameter
21:57:54*awe002 joined #nim
21:59:27*awe001 quit (Ping timeout: 260 seconds)
22:01:18FromDiscord<Rika> because that's not how parameters work
22:01:28FromDiscord<Rika> the first parameter is still the first parameter
22:01:44FromDiscord<Rika> if this is desired behavior, use overloads
22:02:09FromDiscord<Doongjohn> I guess unnamed parameter is always positional?
22:02:16FromDiscord<Rika> or make the string parameter the second
22:02:21FromDiscord<Rika> yes
22:02:29FromGitter<ynfle> Why can't that be inffered?
22:02:42FromDiscord<Rika> because it could be a bug
22:02:47FromGitter<ynfle> Doesn't acutally make a difference, just wondering
22:02:49FromDiscord<Rika> actually no clue
22:02:54FromDiscord<Rika> i think it could be a bug though
22:03:07FromDiscord<Rika> (^ an opinion)
22:03:07FromGitter<ynfle> Meaning if it's allowed?
22:03:12FromDiscord<Rika> wdym?
22:03:40FromDiscord<Doongjohn> I think c# has the same rule and it maybe critical?
22:04:05FromDiscord<Rika> ah i think its because it would be confusing if you DID have an overload
22:04:10FromDiscord<Rika> which would it overload to?
22:04:17FromGitter<ynfle> The bug is to be an error or in case of error it's not allowed
22:04:39FromGitter<ynfle> No difference if it's the first or second argument
22:04:45FromGitter<ynfle> ie. ```
22:05:00FromDiscord<Rika> like if you had a proc(string=default, int) and a proc(int), what would nim overload into then?
22:05:18FromGitter<ynfle> ie. āŽ āŽ ```proc t(s: string, y = "") āŽ proc t(s: string)``` [https://gitter.im/nim-lang/Nim?at=5f39ad9ea1190a2e95f81948]
22:05:44FromDiscord<Rika> hm
22:06:19FromDiscord<Rika> i dont know, i'm tired, i'll leave it to someone else to think about it
22:06:29FromGitter<ynfle> Thanks
22:08:10FromDiscord<Doongjohn> what about this?↵proc test(a: int = 0, b: int) = discard↵test(10)↵positonal or optional first?
22:09:02FromDiscord<Rika> if nim had what yn proposed, b would be 10 since it would fail otherwise
22:09:57FromGitter<ynfle> > *<FromDiscord>* <Doongjohn> what about this?↵proc test(a: int = 0, b: int) = discard↵test(10)↵positonal or optional first? āŽ āŽ Why would it not be `a = 0` & `b = 10`?
22:11:11disruptekit's not a bug because named parameters are valid even when they don't have defaults.
22:11:57FromDiscord<Doongjohn> I think positional arg passing is more straightforward
22:12:51disrupteki sometimes name positional params when there are a lot of them and either some have defaults or some knucklehead may add defaults later.
22:13:07disruptekit's just easier to understand.
22:14:20FromGitter<ynfle> > *<disruptek>* it's not a bug because named parameters are valid even when they don't have defaults.
22:14:26FromGitter<ynfle> Why is this relavent?
22:15:04disruptekbecause otherwise the compiler cannot disambiguate.
22:15:13FromGitter<ynfle> Which case?
22:16:25disruptekproc (a: int, b: int, c: int)(c=3, b=2, a=1)
22:16:45FromGitter<ynfle> What's the issue?
22:16:53disruptekhow should i know?
22:19:09FromGitter<ynfle> My point is if one arg is given and there are 2 with one default, why should it make a difference if the default is first or second to infer which arg is given?
22:20:11disruptekthe idea behind defaults is that you can omit the argument. dispatch is performed on name first and then on position. so you're setting yourself up for failure if a new proc is invented that merely takes an int. this is why such dispatch should never be allowed, and it's wise to name your arguments when they have defaults.
22:21:12disruptekin some languages, you're not even allowed to have a named argument ahead of a positional.
22:22:22FromGitter<ynfle> That is true if the default arg is first to second
22:22:39FromGitter<ynfle> (to your second last comment)
22:23:07disrupteki don't know what you're talking about.
22:31:58*apahl quit (Ping timeout: 244 seconds)
22:32:57*apahl joined #nim
22:40:16*NimBot joined #nim
22:51:33*leorize joined #nim
23:11:28FromGitter<bung87> can I turn off effect system check ?
23:12:54FromGitter<bung87> I got `Error: can have an unlisted effect: RootEffect` everywhere , I thought tags: just a annotation right?
23:20:01*lritter quit (Ping timeout: 264 seconds)
23:35:09*skelett quit (Quit: WeeChat 2.8)
23:36:31*skelett joined #nim
23:48:07*krux02_ joined #nim
23:51:07*krux02 quit (Ping timeout: 260 seconds)