<< 25-01-2021 >>

00:01:41FromDiscord<Avatarfighter> Disruptek: whats the name of your fancy-schmancy benchmarking lib
00:01:55*Vladar quit (Quit: Leaving)
00:02:29*zidsal87 quit (Quit: Connection closed)
00:08:07FromDiscord<Zachary Carter> Disruptek: why won't you accept my twitter follower request you sob
00:17:07*sz0 quit (Ping timeout: 272 seconds)
00:17:09*sirn quit (Ping timeout: 244 seconds)
00:17:16*nikki93 quit (Read error: Connection reset by peer)
00:17:22*kinkinkijkin quit (Ping timeout: 260 seconds)
00:17:45*kwilczynski quit (Ping timeout: 272 seconds)
00:17:58*Evolver quit (Ping timeout: 260 seconds)
00:18:02*nikki93 joined #nim
00:18:02*fowl_ joined #nim
00:18:07*kinkinkijkin joined #nim
00:18:21*kwilczynski joined #nim
00:18:33*zielmicha__ quit (Ping timeout: 260 seconds)
00:18:33*rayman22201 quit (Ping timeout: 260 seconds)
00:18:33*fowl quit (Ping timeout: 260 seconds)
00:18:35*sirn joined #nim
00:18:46*fowl_ is now known as fowl
00:18:50*zielmicha__ joined #nim
00:19:14*Evolver joined #nim
00:19:26*hnOsmium0001 quit (Ping timeout: 265 seconds)
00:19:32*sz0 joined #nim
00:19:55*rayman22201 joined #nim
00:20:32*hnOsmium0001 joined #nim
00:26:05*madprops left #nim ("Leaving")
00:32:49*WilhelmVonWeiner joined #nim
00:50:33*WilhelmVonWeiner quit (Quit: leaving)
00:52:29*asdflkj joined #nim
01:03:55FromDiscord<Avatarfighter> !repo json
01:03:56disbothttps://github.com/status-im/nim-json-rpc -- 9nim-json-rpc: 11Nim library for implementing JSON-RPC clients and servers 15 42⭐ 6🍴 7& 29 more...
01:05:08FromDiscord<Recruit_main707> Not anymore I think
01:05:26FromDiscord<ElegantBeef> Yea i think you're right
01:05:28FromDiscord<ElegantBeef> I always forget
01:05:39FromDiscord<Recruit_main707> It’s 64bit
01:05:48FromDiscord<Recruit_main707> The same for floats, etc
01:05:54disruptekzachary carter: i'm not on twitter.
01:07:35disruptek!repo disruptek/criterion
01:07:35disbothttps://github.com/disruptek/criterion -- 9criterion: 11statistics-driven micro-benchmarking framework 15 15⭐ 0🍴
01:22:54*abm quit (Read error: Connection reset by peer)
01:23:42*j-james joined #nim
01:25:07*cornfeedhobo quit (Quit: ZNC - https://znc.in)
01:25:11*Tanger joined #nim
01:25:59*vicfred joined #nim
01:26:13*cornfeedhobo joined #nim
01:32:57*j-james quit (Quit: WeeChat 3.0)
01:53:02*asdflkj quit (Ping timeout: 260 seconds)
02:22:55*lritter joined #nim
02:52:55*lritter quit (Ping timeout: 265 seconds)
02:53:13*lritter joined #nim
02:55:46saemTook longer than I care to admit, but slight improvement for suggestions in type contexts: https://github.com/nim-lang/Nim/pull/16814
02:55:47disbotfixed nim-lang/nimsuggest#48 type aware sug
03:08:07*muffindrake quit (Ping timeout: 272 seconds)
03:09:48*muffindrake joined #nim
03:19:14disruptekuhhh is it me or does round() not work correctly?
03:19:42disruptek!eval import math; echo round(54.346, 2)
03:19:45NimBot54.35
03:20:36disruptekseems to be broken in 1.4+.
03:20:55disruptek!eval echo NimVersion
03:20:57NimBot1.4.2
03:21:07disruptekoookay, 1.4.3+
03:21:18FromDiscord<Rika> What broke?
03:21:22FromDiscord<Rika> About it I meM
03:21:24disruptekmath.round
03:21:26FromDiscord<Rika> Mean
03:21:30disruptekit truncates now.
03:21:53disrupteki thought i was losing my mind.
03:22:04FromDiscord<exelotl> oof
03:22:30*wasted_youth quit (Read error: Connection reset by peer)
03:22:38FromDiscord<exelotl> This reminds me of the time writeFile broke 😅
03:22:45disrupteklol
03:22:45*wasted_youth joined #nim
03:27:38*wasted_youth quit (Ping timeout: 264 seconds)
03:28:27disruptekthat was windows-only iirc.
03:36:24disruptekman, that's such a bad bug.
03:39:51FromDiscord<hamidb80> I think you should open an issue on Github
03:40:08disrupteki did.
03:48:56PrestigeAre there no tests?
03:51:09disruptekthe round tests all truncate because dumb.
03:51:32disruptekie. there are no tests of round-to-n-places.
03:51:45disruptekprestige: how did it go with your concepts experiments?
03:52:56PrestigeI tested a few basic things but haven't spent enough time yet
04:09:56*spiderstew_ joined #nim
04:11:30*spiderstew quit (Ping timeout: 264 seconds)
04:44:22*yumaikas quit (Remote host closed the connection)
05:39:00*narimiran joined #nim
06:16:39FromDiscord<hamidb80> I can't find documentation about `sequences`
06:21:27Tangerhamidb80: https://nim-lang.org/docs/manual.html#types-array-and-sequence-types (Manual) https://nim-lang.org/docs/tut1.html#advanced-types-sequences (tutorial) and https://scripter.co/notes/nim/#arrays-and-sequences might help
06:27:35*habamax joined #nim
06:35:19FromGitter<Araq> looks like I'll stay on gitter
06:35:58Prestigegitter over irc?
06:39:45*waleee-cl quit (Quit: Connection closed for inactivity)
06:39:57FromGitter<Araq> yeah, cannot be bothered to install irc clients on my newer machines
06:40:26disrupteklol that's awesome. 🤣
06:40:45Prestige:o
07:05:55FromDiscord<ElegantBeef> First you use matrix, next you'll be using encrypted messages engraved in stone mailed by carrier pigeon it's a gatewaydrug 😄
07:07:11Prestigedidn't the element team absorb gitter?
07:07:17FromDiscord<ElegantBeef> Yep
07:08:37FromDiscord<JSGRANT> They really NEED to stop rebranding; Element is what... their third attempt?
07:08:40PrestigeHopefully element's client will get a lot better
07:08:54PrestigeAll I know is Riot -> Element
07:08:59FromDiscord<ElegantBeef> Isnt it only their second
07:09:26FromDiscord<Rika> second
07:09:29FromDiscord<Rika> second?
07:09:30FromDiscord<Rika> first
07:09:33FromDiscord<Rika> first rename
07:09:34FromDiscord<ElegantBeef> I meant second name
07:09:37FromDiscord<Rika> yes
07:09:54PrestigeI dislike how generic the names are
07:10:39FromDiscord<JSGRANT> The reason for the rename is stupid; But legally I get it (Think riot games were waving their trademark at them) but I swear there was a name before riot
07:10:46FromDiscord<Rika> its the in thing apparently, prolly a boomer thing i feel; younger people would likely use more interesting names than "element"
07:10:55FromDiscord<JSGRANT> could be wrong; but thought it was like generic 'matrix client' or something?
07:11:04FromDiscord<Rika> thats worse than "element" is it not
07:11:09PrestigeI just dislike it because it's difficult to find
07:11:33Prestigeand not very memorable
07:11:49FromDiscord<ElegantBeef> I still need to continue my channelled voip implementation but havent got further than getting voip to work in there
07:12:27FromDiscord<JSGRANT> _tries for bed._
07:16:27saemwelp... looks like I can make the IC (rod query, I think) crash with an assertion error in nimsuggest... will have to debug that at some point.
07:18:15FromGitter<Araq> with the current default where IC is turned off?
07:18:24saemYeah, that's the weird thing
07:18:50saemthe repro is to run nimsuggest on `compiler/nim.nim` as the project, then `sug compiler/semstmts.nim:1324:34`
07:19:46saemnow it works... wtf, what did I change.
07:21:26FromDiscord<carpal> yo araq
07:21:30saemcrap, i lost my old log too. 🤦
07:23:14saemwhoops, I'm tired and making mistakes, the second repro step is not `sug`, it's `def`
07:36:40saemaraq: I need to still check if it's an issue with my specific nimsuggest build (unlikely, but who knows) but I've made some notes for myself here. https://gist.github.com/saem/91b487da989bb5f47a43a9af08b08dd1
07:38:18saemI'll see if I can do that tomorrow but weekdays are a gong show for me.
07:39:09saemI need to get to bed for now. :zzz
08:01:25FromGitter<Araq> good night
08:12:41FromDiscord<Avatarfighter> If you have a variable that is getting changed by async procs does said variable need to be a `{.threadvar.}` ?
08:15:38*antranigv_ joined #nim
08:16:17*antranigv quit (Ping timeout: 264 seconds)
08:28:42*PMunch joined #nim
08:30:26*lritter quit (Quit: Leaving)
08:41:39FromGitter<gogolxdong> Is there any api for creating temp file on Windows?
08:44:33PMunchhttps://nim-lang.org/docs/os.html#getTempDir
08:45:38planetis[m]https://einarwh.wordpress.com/2020/05/08/on-the-complexity-of-json-serialization/ 😗
08:46:13planetis[m]also hi all
08:51:31FromGitter<gogolxdong> means writeFile to the tempDir by yourself?
08:51:50PMunchYup
08:52:30ZevvPMunch, my man. Is yours really the only Nim talk at FOSDEM?
08:52:49PMunchAs far as I know, yeah..
08:52:55Zevvaw :(
08:53:18FromGitter<gogolxdong> there is a mkstemp api for posix.
08:54:52*Tanger quit (Remote host closed the connection)
08:55:05FromDiscord<ElegantBeef> So pmunch did you notice that i wasnt drawing the game centered to the square? realized today on the android build and laughed to myself since no one pointed it out
08:55:21PMunchWe haven't really talked much about FOSDEM this year
08:55:30FromDiscord<carpal> guys there's a problem
08:55:40PMunchProbably since no-one has to plan travel and accommodations
08:55:49PMunch@ElegantBeef, what do you mean?
08:55:55FromDiscord<carpal> in these two days I was using nim I wanted to write an object type for multi variable typing
08:56:11FromDiscord<ElegantBeef> The internal game window was drawn slightly closer to the left side of the frame than the right
08:56:24FromDiscord<carpal> but today I discovered that nim already supports object type ... 😐
08:56:24PMunchOoh :P
08:56:44PMunchIn the browser the whole game is also a bit taller than the box it is put in..
08:56:46FromDiscord<carpal> and someone merged my package request on github
08:56:53FromDiscord<carpal> should I delete it?
08:56:58FromDiscord<ElegantBeef> support object type?
08:57:01PMunchI can't see the bottom part of the border, and I have a black bar on the top
08:57:08FromDiscord<ElegantBeef> yea i fullscreen it though
08:57:21FromDiscord<carpal> in this moment my proj is useless
08:57:23FromDiscord<carpal> lol
08:57:34FromDiscord<ElegantBeef> What do you mean by "supports object type"?
08:57:47FromDiscord<carpal> var x: object = "dd"
08:57:51FromDiscord<carpal> (edit) ""dd"" => ""dd"↵x = 9"
08:58:15FromDiscord<carpal> (edit) "var x: object = "dd"↵x = 9" => "sent a code paste, see https://play.nim-lang.org/#ix=2Ngc"
08:58:36FromDiscord<carpal> these tests work but now the object is useless https://media.discordapp.net/attachments/371759389889003532/803187052116049930/unknown.png
08:59:12FromDiscord<ElegantBeef> You really should use assert or doAssert in tests 😄
08:59:13FromDiscord<carpal> ah okay, but I cannot use object in structs
08:59:20FromDiscord<carpal> yea lol
09:01:03FromDiscord<carpal> ok I replaced all echos with assert expression thank you
09:01:41FromDiscord<ElegantBeef> Sometimes i'm incapable of reading a sentence as anything but sarcastic 😄
09:02:19FromDiscord<carpal> ...
09:13:25FromDiscord<Clyybber> @carpal your project is still useful
09:13:58FromDiscord<carpal> how?
09:15:47*vicfred quit (Quit: Leaving)
09:15:59*vicfred joined #nim
09:18:28FromDiscord<carpal> but can I use concrete types in structs? https://media.discordapp.net/attachments/371759389889003532/803192051754991636/unknown.png
09:18:38FromDiscord<carpal> (edit) "concrete" => "nonconcrete"
09:18:43FromDiscord<carpal> (edit) "nonconcrete" => "non concrete"
09:18:48FromDiscord<carpal> (edit) "non concrete" => "non-concrete"
09:19:41FromDiscord<carpal> this happens only with vars
09:21:50FromDiscord<lqdev> you can't
09:21:55FromDiscord<lqdev> `object` is a type class, not a type
09:22:01FromDiscord<Clyybber> object is a type class. it doesnt exist at runtime
09:24:55*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:25:43FromDiscord<carpal> okay, but for local variable I can use it
09:25:52FromDiscord<carpal> ex: `var x: object = ""`
09:26:06FromDiscord<carpal> ok so my proj is still usable 😄
10:00:59*vicfred quit (Quit: Leaving)
10:03:51*vicfred joined #nim
10:04:15*abm joined #nim
10:13:19FromGitter<Araq> still usable, but still a bad idea
10:16:34FromDiscord<malfong> sent a code paste, see https://play.nim-lang.org/#ix=2Ngw
10:17:16FromGitter<Araq> use `sugar.capture`
10:18:44FromDiscord<malfong> ill try it, thanks!
10:19:55FromDiscord<carpal> rip
10:19:58FromDiscord<carpal> why?
10:28:55*Vladar joined #nim
10:30:58FromDiscord<lqdev> btw https://github.com/yglukhov/variant
10:36:41*xace quit (Remote host closed the connection)
10:44:11*xace joined #nim
10:56:30FromDiscord<konsumlamm> idk if youre aware, but responding doesnt work across platforms, like gitter
11:01:15*sagax quit (Quit: Konversation terminated!)
11:01:21FromDiscord<carpal> sure better than mine, it uses nim macros, but I need dynamic typing for the vm
11:02:36FromGitter<Araq> the Nim compiler has a VM, feel free to inspect its code
11:03:55FromGitter<Araq> if you can avoid VMs btw, you should, they suck. Bad interop with other code and new silly bugs are awaiting you. bugs that might take decades to fix
11:06:37FromDiscord<carpal> I'm talking about my own bytecode virtual machine...
11:10:06*habamax quit (Ping timeout: 256 seconds)
11:12:34FromDiscord<mratsim> Gitter? what are you doing on Gitter Araq?
11:12:47narimiranmidlife crisis
11:13:24*habamax joined #nim
11:13:45FromDiscord<konsumlamm> anyone bored and wants to review my PR (https://github.com/nim-lang/Nim/pull/16797) so that it can get merged? its pretty small
11:13:46disbotSmall changes to std/sums
11:14:13FromDiscord<konsumlamm> "yeah, cannot be bothered to install irc clients on my newer machines"
11:14:55FromDiscord<mratsim> For over a year, gitter gave me a black screen on Linux so I stopped using it.
11:15:20FromDiscord<mratsim> also they were bought (?) by Matrix so I assume it will see no updates in the foreseeable future
11:15:42narimiran@konsumlamm merged
11:28:51FromDiscord<Rika> I think he means to check the nim vm to learn from it for your vm
11:29:20FromDiscord<carpal> ah
11:29:45FromDiscord<carpal> but the nim vm doesn't run at compile time?
11:30:02FromGitter<Carpall> lol
11:30:03FromDiscord<Rika> It does? It’s what processes macros
11:31:28FromGitter<Carpall> why using gitter instead of discord?
11:33:24FromDiscord<Rika> Discord can be cumbersome as well
11:33:33FromDiscord<konsumlamm> why use discord instead of gitter?
11:33:55*krux02 joined #nim
11:34:10*Carpal joined #nim
11:34:50FromDiscord<konsumlamm> thats literally the only readon the VM exists lol, to run stuff at compile time
11:34:59FromDiscord<konsumlamm> (edit) "readon" => "reason"
11:35:05*Carpal quit (Client Quit)
11:35:07FromDiscord<Rika> It’s not really but it’s essentially the biggest reason
11:35:20FromDiscord<Rika> I mean I guess nimble uses it but I don’t like it
11:35:34FromDiscord<carpal> better graphics, functionalities, replies
11:35:50FromDiscord<Rika> Having a small core is nice for a language but I feel like it doesn’t work too well for a package manager
11:36:53FromDiscord<Rika> If someone already has a gitter account why would they move to discord, same for each combination of account driven websites in the same category
11:38:30FromDiscord<Rika> Maybe I should actually finally try nimph
11:42:49FromDiscord<carpal> ok, I've only asked 😂
11:46:12*tane joined #nim
11:49:36krux02Rika: it is the network effect.
11:49:48FromDiscord<Rika> Which?
11:49:59FromDiscord<Rika> The moving of services?
11:50:11krux02Discord has many other channels as well. If you use gitter only for things that you also can you discord for, you might drop gitter
11:50:19FromDiscord<Rika> Yeah
11:50:22FromDiscord<Rika> Makes sense
11:50:26krux02Discord is useful.
11:50:31FromDiscord<Rika> It is yes
11:50:38FromDiscord<Rika> Why do you think I’m here XD
11:50:40*wasted_youth joined #nim
11:50:55FromDiscord<Rika> I’m just trying to give an alternate view though if you can tell I’ve likely failed
11:51:07krux02It is just owned partially by Tencent.
11:52:10krux02There are companies out there that try to conquer and control the internet for reasons mostly unknown.
11:52:15krux02Tencent is one of them.
11:52:23FromDiscord<Rika> Basically anything gamer nowadays is partly owned by ten cent
11:52:26FromDiscord<mratsim> Tencent basically owns all game companies of the world
11:52:45krux02well that is not true.
11:52:58krux02I mostly buy indie games.
11:53:06FromDiscord<mratsim> all successful game companies of the world
11:53:11FromDiscord<Rika> Of
11:53:13FromDiscord<Rika> Oof
11:53:28krux02If your game runs on Linux, it is probably not owned by Tencent.
11:53:37FromDiscord<mratsim> I play Path of Exile for example, NZ game company, indie, it grew it grew, and now Tencent owns XX%
11:53:59krux02I don't play Free to Play, I dislike the business model.
11:54:20FromDiscord<Rika> Wangan midnight runs on Linux (arcade machine is Linux based) and I am guessing Tencent has partial ownership of Bandai Namco
11:54:33FromDiscord<Rika> 😛
11:54:45krux02I think the business model of free to play games is mostly to the disadvantage of the customer. Therefore I avoid it.
11:55:14krux02does it have a Linux release?
11:55:48FromDiscord<mratsim> PoE is free to play and you only pay for skins
11:55:55FromDiscord<mratsim> it's not pay-to-win
11:55:56FromDiscord<Rika> No, I was just making a joke of a response
11:56:06krux02ok
11:56:25krux02I also dislike "pay for skins" "pay for dances" "pay for cosmetics"
11:56:41krux02nothing of that is acceptable for me.
11:57:02FromDiscord<mratsim> Why?
11:57:08FromDiscord<Rika> How do you expect developers to earn money then?
11:57:33krux02The business model is still to make me invest as much time as possible into the game so that I eventually care about those cosmetics.
11:57:34FromDiscord<Rika> It makes it seem like anything that involves monetisation directly or indirectly is unacceptable to you
11:57:46krux02Effectively a business model that tries to maximize my time wasted.
11:57:54FromDiscord<Rika> Well, that’s the intent of any game is it not
11:57:54krux02I don't want to buy into that.
11:58:00krux02no it's nto
11:58:08FromDiscord<Rika> If you think you’re wasting time playing games then don’t ever play one
11:58:14FromDiscord<mratsim> Game != time wasted.
11:58:25krux02If you pay for a game, then the game owner doesn't care how long you play the game.
11:59:00krux02Therefore there is no business that requires to streach the playtime as much as possible.
11:59:04FromDiscord<Rika> That’s the thing, they made the game so you’re engaged in the game aka don’t want to stop, is it not like that for open world games or so?
11:59:35FromDiscord<mratsim> stretching the play time is your own decision
11:59:43FromDiscord<mratsim> Why would i play a game that is not engaging.
12:00:18FromDiscord<mratsim> For example, go is also free-to-play and you can pay for skins (luxury boards). I wouldn't play it if it was not engaging as well.
12:00:24FromDiscord<Rika> The issue in this argument is that the concept of wasted time is subjective, is it not
12:00:48FromDiscord<mratsim> The issue is assuming game dev can control how your spend your time.
12:00:58krux02all F2P games are essentially endless grinds into absurdity.
12:01:09FromDiscord<Rika> I’m here in the arcade right now, probably have sunk half a grand in this arcade game over two months, I don’t think I wasted time at all
12:01:13krux02Same btw with MMORPGs that you pay per month
12:01:39FromDiscord<Rika> Only thing game devs can do is influence
12:01:39krux02no go is not free to play, Go is entirely free
12:01:46krux02it is public domain.
12:01:54krux02there is nobody who own go.
12:02:14krux02and everybody is allowed to modify the game and improve it.
12:02:23krux02That is by the way how chess and go evolved.
12:02:37FromDiscord<Rika> Changing go would be making a different game
12:02:39FromDiscord<mratsim> it's also an endless grinds
12:02:57FromDiscord<Rika> Unless it becomes universally acceptable
12:03:35krux02Well I can't change your opinion. I don't consider go an endless grind, because winning the game doesn't give you anything except winning the game.
12:03:44FromDiscord<Rika> You two have fun, I’ll be playing now
12:03:51krux02Another story is tournament chess with badges and stuff
12:03:56krux02that is an endless grind again.
12:03:59FromDiscord<Rika> Winning the game can give skill can it not
12:04:15FromDiscord<Rika> The grind can be endlessly grinding to become better at the game
12:04:28krux02Well I don't play chess either.
12:05:02FromDiscord<mratsim> you don't need to win to get better
12:05:18krux02Board games also never try to lure you into playing the game with special weekend offers if you actually wanted to quit playing.
12:05:30FromDiscord<mratsim> The most significant thing Go and I assume chess can teach you is patience
12:05:47FromDiscord<mratsim> and also humility, because you lose half your games.
12:05:54krux02anyway, I don't want to spam this chat again with game related discussions.
12:06:08FromGitter<Araq> mratsim, I'm "about" to add a condition variable to your simple channel implementation
12:06:28FromGitter<Araq> so that `send` blocks when the queue is full
12:06:45FromGitter<Araq> anything I need to watch out for when I attempt to do this?
12:07:41FromDiscord<mratsim> I think having a standard channel interface is best, because they come in all kind of flavors
12:08:20FromDiscord<mratsim> We can have a ChannelConcept that just implements trySend and tryRecv, and a BlockingChannelConcept that "inherits" from is and has `send`, `recv`
12:08:48FromDiscord<mratsim> just make sure you have a while loop around your CV to handle spurious wakeups
12:09:36FromDiscord<mratsim> and if you deadlock on Linux, well you know that glibc CV may list a cv.signal()
12:10:03FromGitter<Araq> "may list", what do you mean? I know about spurious wakeups
12:10:12FromDiscord<mratsim> may lose
12:10:25FromDiscord<mratsim> sorry, somehow my thoughts/writing is all jumbled up today
12:11:08FromGitter<Araq> wait what? it may lose a `signal` call?
12:11:29FromGitter<Araq> what am I supposed to do then...
12:12:55FromDiscord<mratsim> This bug: https://github.com/mratsim/weave/issues/56
12:12:56disbot[Glibc] Condition variable lost wakeups
12:13:33*asdflkj joined #nim
12:13:58FromDiscord<mratsim> do it assuming there is no lost `signal`.↵One day I will reimplement, locks, CV, Semaphores on top of raw Futex.
12:14:12FromDiscord<mratsim> (and formally verified)
12:15:14FromDiscord<mratsim> seems like Intel used timedwait to workaround deadlocks: https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-deadlocks-for-long-running-jobs/td-p/1117723
12:15:24FromDiscord<mratsim> due to the condvar bug.
12:16:02FromDiscord<konsumlamm> a very general question, i know, perhaps i should make a thread on the forums: what's the planned future for parallelism in Nim?
12:16:13FromGitter<Araq> weave
12:16:23FromDiscord<mratsim> for compute bound workload there is Weave
12:16:40FromDiscord<konsumlamm> are there any plans to make threadpool stable?
12:16:45FromDiscord<mratsim> for IO bound workload there isnothing yet, though i plan to do weave IO
12:17:20FromDiscord<mratsim> for a basic threadpool I will need to write one anyway for high performance cryptography (Weave is likely too complex to audit).
12:17:35FromDiscord<konsumlamm> (threadpool as in the stdlib module)
12:17:43FromDiscord<mratsim> you can use yglukhov lib for threadpool: https://github.com/yglukhov/threadpools
12:18:12FromDiscord<konsumlamm> weave looks pretty cool though
12:18:25FromDiscord<mratsim> for interop between IO and CPU, CPS (continuation passing style) is the plan
12:18:41FromDiscord<mratsim> why do we need different scheduler for IO and Compute is explained here: https://github.com/weavers-guild/weave-io/blob/master/blog/multithreading_flavors.md
12:18:54*gator joined #nim
12:19:09FromDiscord<konsumlamm> i'm wondering, are there any plans to change the stdlub situation with regards to parallelism? will threadpool (with spawn & parallel) just always stay unstable?
12:19:30FromDiscord<mratsim> It's mostly a time problem.
12:19:45FromGitter<Araq> konsumlamm: I don't know yet.
12:20:23FromDiscord<mratsim> ideally we have a common type or at least concept for tasks and awaitables.
12:21:00FromDiscord<mratsim> and also a way to pack locals into closures that is flexible for memory management.
12:21:25FromDiscord<mratsim> so that Weave, threadpools, async are all interoperable.
12:21:31FromGitter<Araq> konsumlamm: one likely outcome: threadpool's basic `spawn` feature remains and the rest will be thrown away
12:21:32FromDiscord<mratsim> and composable.
12:21:42FromDiscord<konsumlamm> btw, speaking of spawn, is there any particular reason you chose to make it only accept proc calls, instead of just passing a proc? maybe to mimic go?
12:22:01FromDiscord<konsumlamm> (edit) i'm wondering, are there any plans to change the stdlib situation with regards to parallelism? will threadpool (with spawn & parallel) just always stay unstable?
12:22:04FromDiscord<mratsim> you need a proc + parameters anyway
12:22:05FromGitter<Araq> you need the proc call arguments for the marshalling
12:22:31gatorwhere does cps fit into all this plan? sorry new to nim, don't know much.
12:22:38FromDiscord<mratsim> Also this is how parallelism has been done since 1995 (the Cilk paper)
12:22:46FromDiscord<mratsim> fork-join parallelism
12:22:46FromGitter<Araq> konsumlamm: they won't stay "unstable" but most APIs in there are flawed beyond repair
12:22:48FromDiscord<konsumlamm> sounds like a good idea
12:23:40FromDiscord<konsumlamm> @Araq does that mean they'll be deprecated and removed eventually?
12:23:58FromGitter<Araq> yeah
12:24:55FromGitter<Araq> the APIs are bad and the implementation predates Nim's move semantics so there is not much to keep
12:25:19FromGitter<Araq> however, the `spawn` thing is the right idea and remains
12:25:25FromDiscord<mratsim> I prefer spawn/sync to spawn/`^` btw
12:26:02FromGitter<Araq> *shrug* we can rename it to `sync`, I won't lose sleep over that
12:26:11FromDiscord<mratsim> 😉
12:27:41FromDiscord<mratsim> also @konsumlamm createThread works very well if you just want to run threads as service.
12:28:08FromDiscord<mratsim> it deals nicely with the OS differences.
12:28:19*sagax joined #nim
12:28:27FromGitter<Araq> depending on your needs, threadpool also "works", the problem is who wants to debug it when it doesn't
12:28:43FromGitter<Araq> not me. ;-)
12:29:12*gator quit (Quit: Connection closed)
12:30:34FromGitter<Araq> bbl
12:30:39FromDiscord<konsumlamm> you mean the stdlib createThread proc? that uses OS threads though, right?
12:31:10FromDiscord<mratsim> yes
12:31:31FromDiscord<konsumlamm> also, i dislike that you have to pass a var instead of just returning it, but thats just a nit
12:32:29FromDiscord<mratsim> that's what the OS provides at a low-level. People can write a version with out parameter.
12:34:00FromDiscord<konsumlamm> sure, but wouldnt it be nicer if the stdlib would just provide it?
12:38:20FromDiscord<mratsim> PRs are open.
12:42:27FromDiscord<konsumlamm> i can try xd
12:42:50FromDiscord<konsumlamm> there are also still enough modules to fix documentation for
13:04:14*vicfred quit (Quit: Leaving)
13:06:27*antranigv joined #nim
13:09:42*antranigv_ quit (Ping timeout: 260 seconds)
13:27:20FromDiscord<konsumlamm> @mratsim what's the difference between weave-io and asyncdispatch?
13:32:31FromDiscord<flywind> How can I use `importc` to import c function in MacOSX?
13:32:40FromDiscord<flywind> for example
13:32:43FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2Nhr
13:32:47FromDiscord<flywind> https://git.privacyone.io/useful/macos-sdk/-/blob/a3892fa99785a8327cefa8d3a6b8ff449ab606e9/MacOSX10.13.sdk/usr/include/sys/random.h
13:33:43FromDiscord<haxscramper> I think that is correct `importc` for a given function
13:33:59FromDiscord<haxscramper> Can you show the error?
13:34:19FromDiscord<Clyybber> @konsumlamm Do you know whats the reasoning for wrapping the dump in an if false?
13:34:38FromDiscord<konsumlamm> so that theres no IO
13:34:44FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2Nhu
13:34:47FromDiscord<konsumlamm> when running the tests
13:34:58FromDiscord<flywind> and https://dev.azure.com/nim-lang/255dfe86-e590-40bb-a8a2-3c0295ebdeb1/_apis/build/builds/12454/logs/104
13:35:11FromDiscord<Clyybber> @konsumlamm But our tests can deal with that just fine
13:35:34FromDiscord<Clyybber> And a example that outputs something is better than a dead example
13:35:52FromDiscord<konsumlamm> ¯\_(ツ)_/¯
13:36:16FromDiscord<konsumlamm> ask @flywind
13:37:36FromDiscord<flywind> that's noisy in doc tests, you could test them with testament.
13:37:59FromDiscord<Clyybber> then doc tests should be fixed to swallow output
13:38:23FromDiscord<Clyybber> if false is just unneccessary convolution, and doesn't read particularily well
13:38:49FromDiscord<konsumlamm> speaking of, there is no test for `dump`...
13:39:15FromDiscord<flywind> I would prefer code-blocks in this situation.
13:40:04FromDiscord<Clyybber> why?
13:40:04FromDiscord<haxscramper> I'm not entirely sure, but to me it looks like the issue is unrelated to your proc wrapper (at least not directly)
13:40:06FromDiscord<Clyybber> theres no reason
13:40:59FromDiscord<haxscramper> My guess is that it is somehow broke C macro somewhere up translation unit, and not you are getting unrelated errors down the line
13:41:28FromDiscord<Clyybber> @flywind Our runnableExamples should really not be restricted to not doing IO
13:41:40FromDiscord<haxscramper> But for C function declared as `int getentropy(void buffer, size_t size);`, nim wrapper `proc getentropy(p: pointer, size: csize_t): cint {.importc: "getentropy", header: "<sys/random.h>".}` is correct one AFAIC
13:42:02FromDiscord<flywind> I see thanks
13:42:40FromDiscord<Clyybber> of course they shouldn't do actual file IO
13:42:46FromDiscord<Clyybber> but echo and the like is fine
13:44:31*clyybber joined #nim
13:46:52FromDiscord<konsumlamm> @Clyybber now i need to make another PR to fix the examples :p
13:47:01*clyybber quit (Client Quit)
13:47:11FromDiscord<Clyybber> oh why?
13:47:38FromDiscord<konsumlamm> the second example for `capture` should be changed or removed, since it's behaving the same without `capture`
13:47:55FromDiscord<Clyybber> ah, I see. I didn't grok that you wanted to do it in that pr too :D
13:48:37FromDiscord<konsumlamm> though i'm thinking about just dropping that example, since the issue doesn't really occur when using `mapIt` and the like...
13:54:22FromDiscord<konsumlamm> btw, i'd love to see https://github.com/nim-lang/Nim/pull/16634 getting merged
13:54:22disbotMake small text changes in the docs
13:59:29FromGitter<Araq> merged
14:03:01FromDiscord<konsumlamm> nice
14:35:57FromDiscord<carpal> yea 😄 mostly in vms, it is a bad idea. My vm has now terrible performance, I wrote a fibonacci algorithm, and it remains for a few minutes to perform code when recursion number is over 30:nimGlow:
14:36:45FromDiscord<mratsim> well fibonacci 30 is 2^30 operations
14:36:49FromDiscord<carpal> I think I'll use a classic pointer, so I've to leave the dynamic typing
14:37:13FromDiscord<carpal> 1073741824
14:38:02FromDiscord<mratsim> it's a great way to measure overheads.
14:38:29FromDiscord<carpal> doing fibonacci?
14:38:56*waleee-cl joined #nim
14:39:02FromDiscord<carpal> yea, it is less when you see you program remaining in pause for minutes 😂
14:39:47FromDiscord<carpal> my old written in c# was faster than this written in nim
14:40:05FromDiscord<carpal> despite of th eji
14:40:11FromDiscord<carpal> (edit) "th eji" => "the jiy"
14:40:14FromDiscord<carpal> (edit) "jiy" => "jit"
14:40:26FromDiscord<carpal> (edit) removed "of"
14:40:46FromDiscord<carpal> because .net object is not a dynamic object like that I wrote yesterday
14:41:56FromDiscord<lqdev> are you on -d:release or -d:danger?
14:54:50PMunchHmm, I'm guessing no-one here has tried to write an Add-on for Home Assistant in Nim?
14:55:29FromGitter<Araq> PMunch: is FOSDEM virtual this year?
14:56:04PMunchYes
14:56:09PMunchAll talks are pre-recorded
14:56:15FromGitter<Araq> (what a question...)
14:56:45PMunchWith a live QA session after that, and a "hallway discussion" that's live as well, but will overlap with the next talk
14:57:49PMunchSo my talk for example is 27 minutes, the slot is 30 minutes, so there will be a 3 minute QA and then people can join me for a hallway discussion while the next talk starts (well mine is the last for the day, but as an example).
14:58:01PMunchWould be wild if it was not virtual
14:58:08PMunchIn Belgium of all places
14:58:14FromGitter<Araq> yeah, it was a most stupid question
14:58:26PMunchHaha, well I guess they could have straight up cancelled it
14:58:33FromGitter<Araq> anyway, please share the discussion link here if you can
14:58:40FromGitter<Araq> once it's available of course
14:58:49PMunchWill do :)
14:59:03PMunchAll discussions and such are done on Matrix, but I think there's going to be an IRC bridge as well
14:59:54FromDiscord<carpal> -d:danger no
15:01:46FromDiscord<carpal> the same ri
15:01:47FromDiscord<carpal> (edit) "ri" => "rip"
15:01:52*haxscramper joined #nim
15:02:41FromGitter<Araq> PMunch: have you recorded your talk already?
15:02:48PMunchYup
15:02:51PMunchQuite a while ago
15:03:04haxscramperPMunch: in your third article for nimscipt embedding you mentioned you wrote a tool for tracing import dependencies, but repository for examples only contains code for second article. Maybe I missed something, but if not - could you please add it too?
15:03:19FromGitter<Araq> ah too bad, was about to suggest my help
15:03:47haxscramperBy the way, thanks for writing them - very good reference for getting started with
15:03:47haxscrampernimscipt as embedded scripting
15:06:53FromDiscord<carpal> why your username is araq?
15:07:15FromDiscord<carpal> (edit) "why your ... username" added "is" | removed "is"
15:07:19FromDiscord<carpal> (edit) "why ... your" added "is" | removed "is"
15:07:20PMunchhaxscramper, thanks :) I'll see if I can find the tool, it's a bit weird it's not linked in the article
15:07:43PMunch@Araq, any particular thing you wanted me to mention?
15:08:25FromGitter<Araq> no, I would add my unqualified remarks and questions to make the talk more entertaining
15:08:46PMunchhaxscramper, ah here it is: https://github.com/PMunch/libbuilder
15:08:57FromGitter<Araq> not that your talk isn't entertaining, you're a superb speaker
15:08:59FromDiscord<mratsim> "consistency is the hobgoblin of the mind" - Araq
15:09:27PMunchOh you wanted to do it like a QA-style talk?
15:09:31haxscramperPMunch: thanks a lot
15:09:36FromGitter<Araq> yeah, maybe
15:10:08FromGitter<Araq> mratsim, "consistency is an illusion"
15:11:21FromGitter<Araq> hundreds of natural languages exist, occasionally changing the grammar for more consistency. They evolve for thousands of years. They are all now "consistent" by now... right? no? how come...
15:13:15FromDiscord<lqdev> natural languages ≠ computer languages though
15:13:48Oddmongerconsistencey is the hobgobelin … houla
15:14:10Oddmongerwhat does that mean ?
15:20:12FromDiscord<mratsim> sent a long message, see https://paste.rs/YH8
15:22:40FromGitter<Araq> when you think something is "inconsistent with X" it's often "consistent with Y" instead ;-)
15:33:35FromDiscord<carpal> mhh
15:33:50FromDiscord<carpal> I could be something to object
15:39:05*asdflkj quit (Ping timeout: 264 seconds)
15:42:16*habamax quit (Quit: leaving)
15:49:56*krux02 quit (Ping timeout: 240 seconds)
15:50:35FromDiscord<carpal> @lqdev I installed the package 'variant', and I replaced all the Object types with Variant, but nothing changes
15:51:10FromDiscord<lqdev> have you profiled your interpreter yet?
15:51:30PMunchCan you cancel a future?
15:52:05narimiran^ message from 2019
15:52:12PMunchHaha :P
15:52:25PMunchI want to sleep until the next alarm, but if the alarm changes before the sleep is complete I want to stop the sleep
15:54:02FromDiscord<carpal> --profiler:on?
15:55:02FromDiscord<lqdev> and `import nimprof`
15:55:11FromDiscord<lqdev> you need `--stackTrace:on` for this btw
15:55:21PMunchI guess I could have check in the callback which would just make it do nothing..
15:55:46FromDiscord<carpal> nothing to add in the code?
15:55:51FromDiscord<lqdev> no
15:55:54FromDiscord<carpal> k
15:55:57FromDiscord<carpal> (edit) "k" => "ok"
15:57:36FromDiscord<carpal> with profiling and stack trace on, perfomed fibonacci(22) in 24767 ms
15:57:53FromDiscord<carpal> 24 s
15:59:01FromDiscord<carpal> ok now, it is the first time I'm using a profiler? https://media.discordapp.net/attachments/371759389889003532/803292852318109726/profile_results.txt
16:00:13*xigoi[m] quit (Quit: Idle for 30+ days)
16:00:15PMunchHmm, I can clear the callback..
16:01:18PMunchSo I can have a global "timer" variable which is a Future[void] from sleepAsync. Then I can clearCallback if the variable is set and create a new sleepAsync and set a callback on that
16:02:29PMunchOh, I can even call `complete` on it
16:06:55FromDiscord<lqdev> @carpal read that file and check which calls were the "hot spots"
16:07:03FromDiscord<lqdev> aka which procs were called the most
16:07:05FromDiscord<lqdev> and took the most time
16:07:28FromDiscord<carpal> ok so it is a proc call trace?
16:08:24*hnOsmium0001 joined #nim
16:08:35FromDiscord<lqdev> yeah, it shows you how much time it spent in each proc
16:08:49FromDiscord<lqdev> seems like there's a lot of `genericAssignAux`es
16:09:00FromDiscord<lqdev> quite a bit of time was spent in `pop`
16:09:36FromDiscord<carpal> what is the main in a language like nim? NimMain?
16:10:52*abm quit (Quit: Leaving)
16:11:05FromDiscord<lqdev> it ain't gonna show up in the trace here
16:11:23FromDiscord<carpal> ok
16:11:43FromDiscord<carpal> btw I can't find the problem in this file
16:17:01FromGitter<Araq> `genericAssignAux` is when you don't use --gc:orc :P
16:21:49*PMunch quit (Quit: leaving)
16:32:40*habamax joined #nim
16:41:06FromDiscord<carpal> should better diable them?
16:41:07FromDiscord<mratsim> I have nightmares about genericAssignAux
16:41:09FromDiscord<carpal> (edit) "diable" => "disable"
16:41:29FromDiscord<mratsim> hunting them in Arraymancer was a whack-a-mole in 2017
16:42:07FromDiscord<lqdev> is it GC-safe to cast a `ref T` to a `ref RootObj`? or will the refcount get desynced
16:42:18FromDiscord<lqdev> talking mostly about ARC here because default GC deems to work
16:43:29FromDiscord<mratsim> ref RootObj is OK I think, ref Something of RootObj is not unless that Something is tagged {.pure.} and so does not have the additional RTTI field
16:43:46FromDiscord<mratsim> here be dragons
16:44:04FromDiscord<mratsim> actually RootObj likely has a RTTI field as well so probably not
16:47:17haxscramperI couldn't find any discussion about this, but why does nim tooling uses colon for key-value pairs? Like `--cc:tcc` instead of `--cc=tcc`
16:47:55haxscramperI think I've seen it mentioned __somewhere__, but can't find it right now
16:48:16haxscrampers/__/_/g
16:49:05haxscramperAnd almost none other CLI tool (that I know of) has this convention
16:52:08FromDiscord<lqdev> it supports both syntaxes actually
16:52:37FromDiscord<lqdev> my guess is that it's a mix of windows and unix conventions, on windows you'd do `/cc:tcc`
16:53:37haxscramperNice, I didn't know it supports both. Didn't know about windows conventions though. Just thought there mighe be some other reason
16:58:38*zedeus joined #nim
17:08:15FromDiscord<lytedev> can I not `for i in countdown(index, 0:`?!
17:08:38FromDiscord<lytedev> (edit) "0:`?!" => "0):`?!"
17:08:52FromDiscord<konsumlamm> iirc the reasoning was that the default convention is bad and this is better
17:08:56FromDiscord<lytedev> nevermind I'm dumb
17:14:31disrupteknoted.
17:18:20*abm joined #nim
17:43:19*a_chou joined #nim
17:56:25*Gustavo6046 quit (Ping timeout: 240 seconds)
17:56:27*MyMind joined #nim
17:58:17*a_chou quit (Remote host closed the connection)
17:59:53*Sembei quit (Ping timeout: 246 seconds)
18:08:26*NimBot joined #nim
18:11:15*asdflkj joined #nim
18:11:52*vicfred joined #nim
18:17:04FromGitter<Araq> one reason was so that `--define:key=value` can look nice
18:18:32*rockcavera joined #nim
18:21:37*natrys joined #nim
18:42:20Oddmongeri'd be interested, in an object , to define a member which would be an array
18:42:35disruptekwhat?
18:42:37Oddmongereasy you say… yes, but i don't want to define a fixed length
18:42:45disruptekthen it's not an array.
18:42:55Oddmongeram i doom to use seq ?
18:43:03disruptekonly if you want variable-length arrays.
18:43:22Oddmongerno, it would be a fixed length buffer
18:43:26disruptekuse a ref.
18:43:31Oddmongerah
18:43:49Oddmongerwill it pass the marshalling ?
18:43:56*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
18:43:57disruptekhow the hell would i know?
18:44:06disrupteki marshall such garbage using frosty.
18:44:08disruptek!repo frosty
18:44:08disbothttps://github.com/disruptek/frosty -- 9frosty: 11serialize native Nim types to strings, streams, or sockets ⛄ 15 24⭐ 1🍴
18:44:23Oddmongerohhh you're so mean disruptek :')
18:44:31disrupteki know. i'm fucking toxic.
18:44:50Oddmongeranyway, thanks for the ref
18:44:59disruptekSURE THING ODD MONGER.
18:45:07Oddmongerat least you didn't answered: void *you = 0
18:45:16*cyraxjoe joined #nim
18:45:32disruptekone cannot assign nil to a void ptr.
18:45:39disruptekbelieve me, i've tried.
18:45:48Oddmongerreally?
18:45:52disruptekno.
18:46:05disrupteksuicide humor.
18:47:17Oddmongerit would be annoying to cannot use void as a pointer, anyway
18:47:21Oddmongerpooor void
18:47:28FromGitter<Araq> disruptek: little reminder to watch your words
18:47:45FromGitter<Araq> you should not be "f-ing toxic" ;-)
18:48:37disrupteksorry, i'll be less f-ing toxic.
18:49:48disruptekOddmonger: why don't you want to use a seq?
18:50:06Oddmongerisn't it slower than a array for accessing ?
18:50:20*disruptek sighs.
18:50:22FromGitter<Araq> it's one memory read either way
18:50:33disruptekyou are worried that your application will be too slow if you use a seq?
18:50:36Oddmongeryes, premature optimization, i know i know
18:50:41disruptekwhy don't you benchmark it?
18:50:53Oddmongerit was curiosity, too
18:51:09disrupteki'm curious why you wouldn't use the tools that were provided to you at great expense.
18:51:35disrupteki'm starting to really be frustrated with this mentality i see in the community.
18:51:36Oddmongerwhen i know the size of an array at construction, why would i use varying size container ?
18:51:51FromGitter<Araq> because hardware works this way
18:52:27disruptekuse whatever you want. but don't sacrifice abstraction in pursuit of performance you don't need.
18:52:32disruptekabstraction is much more valuable.
18:52:58Oddmongerit was kind of self doc too
18:53:03ForumUpdaterBotNew thread by Chris_st: Puzzling error (warning?) messages, see https://forum.nim-lang.org/t/7429
18:53:40disrupteki am fine with arrays. i use them, too. just, y'know, take my point.
18:53:50FromGitter<Araq> "self doc" is a fine argument
18:54:13FromGitter<Araq> but still, learn the implementations, don't "outsmart" them with your ignorance
18:54:34Oddmongerno joke, it's for storing a map : the map cannot grow, so it should be an array
18:54:44disrupteksure.
18:54:45Oddmongerfor the moment , i'm using seq anyway
18:55:47FromGitter<Araq> feel free to write a `StaticSeq` container that lacks the `add` operation
18:57:14FromGitter<Araq> but don't expect differences, a read from memory is a read from memory and `seq` has no additional indirection.
18:57:42Oddmongerok, so i keep the seq in my object
18:58:15Oddmongerthank you for explaining Araq && disruptek
18:58:45FromGitter<Araq> hmm now I want a `StaticSeq` myself :P
19:04:10*Gustavo6046 joined #nim
19:04:50FromDiscord<lqdev> there's no need to create a StaticSeq, we already have `newSeq[T](yourLen)` which does the same thing
19:04:58FromDiscord<lqdev> just remember to not `add` to it
19:11:43FromGitter<Araq> I know
19:12:49Oddmongerbut thanks for the reminding anyway ;) and bon appétit :)’
19:13:06ForumUpdaterBotNew thread by Recruit_main707: Threads are finishing without an error even though they shouldnt, see https://forum.nim-lang.org/t/7430
19:13:58FromDiscord<Recruit_main707> if someone has any clue, id like to know whats wrong
19:16:39FromDiscord<konsumlamm> i assume it's because you're not joining the threads?
19:16:43FromGitter<Araq> call `join`?
19:17:02FromDiscord<konsumlamm> currently the main thread exists and doesnt wait for the other threads to finish
19:18:36FromDiscord<Recruit_main707> welp, now im crashing even before any thread prints anything, xD
19:18:47FromDiscord<mratsim> welcome to multithreading
19:27:22FromDiscord<konsumlamm> https://github.com/nim-lang/Nim/pull/16820 if you're bored xD
19:27:23disbotSugar tests
19:30:03*asdflkj quit (Ping timeout: 260 seconds)
19:48:58FromDiscord<Recruit_main707> oh jeez im so retarded, i didnt initialize the references
19:49:58*hmmm joined #nim
19:51:40hmmmdudes why my variables won't persist after the if block finshes executing :|
19:52:04hmmmI'm dazed and confused :o
19:53:17disruptekfeature.
19:53:22hmmmwhaaat
19:53:48FromGitter<Araq> inside a nim proc there is more than one scope
19:54:10FromGitter<Araq> it's pretty common for programming languages, Python being a notable exception here
19:54:37hmmm b-but I'm a python scrub :|
19:54:48disrupteknoted.
19:55:11hmmmtek how do I keep my precious variables after the scope
19:55:17disruptekwell it looks like nim is stuck with me a little longer. elixir folks don't want to hire me, either.
19:55:22hmmmwhat is that enlightened nimions do in this case
19:55:31disruptekhmmm: lift your variable declaration.
19:57:56*hmmm quit (Quit: WeeChat 3.0)
19:58:24*hmmm joined #nim
20:01:50FromDiscord<konsumlamm> why does this segfault?
20:01:53FromDiscord<konsumlamm> sent a code paste, see https://play.nim-lang.org/#ix=2Njl
20:02:08*hyiltiz quit (Quit: hyiltiz)
20:03:11FromDiscord<konsumlamm> (it doesnt segfault if i just use the normal `createThread` directly
20:13:04*hyiltiz joined #nim
20:13:48FromDiscord<mratsim> maybe Thread does something weird to the stack?
20:16:17*habamax quit (Ping timeout: 264 seconds)
20:19:05*hyiltiz quit (Ping timeout: 240 seconds)
20:20:00*hyiltiz joined #nim
20:20:18FromGitter<RalzVeik> Hey, I'm pretty new to Nim, and I'm new here! ⏎ I am working on my first big project and I've encountered an obstacle. ⏎ I need to read a 32GB .txt file, and the "recommended" way to do it according to what I've gathered would be to send the text from the file to a `Channel[String]` ⏎ Of course, since it's going to be reading large files, this `proc` has to be asynchronous. ⏎ The problem is that I can't manage
20:20:18FromGitter... to get it to send the strings into the channel... ... [https://gitter.im/nim-lang/Nim?at=600f2802cf8b827734537077]
20:25:54FromGitter<RalzVeik> I'm getting a really long error on runtime, but the short version looks something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=600f29512cb18a437c3f84d2]
20:26:25FromGitter<RalzVeik> Any and all help is appreciated!
20:32:57*PMunch joined #nim
20:33:20PMunchHmm, why do callbacks for futures have to be closures?
20:34:34FromDiscord<konsumlamm> why not?
20:35:58PMunchSeems like a weird limitation that they can't be top level procedures
20:38:08FromDiscord<konsumlamm> can't you just pass a top level proc as a closure?
20:41:16FromDiscord<hamidb80> i'm so sorry for my newbie questions.↵can anyone give a link that can explain how to use `ref` & `ptr` correctly in `Nim` ?
20:41:47Prestigehttps://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
20:42:18*leorize joined #nim
20:43:01PMunch@konsumlamm, I mean I could do proc() = topLevelProc() but that's a bit verbose
20:43:31FromDiscord<konsumlamm> again, can't you just pass a top level proc as a closure directly?
20:43:34PMunch@hamidb80, shameless plug: https://peterme.net/nim-types-originally-a-reddit-reply.html
20:43:46PMunchPrestige, how are you? :)
20:46:41PMunchI really should get Nimdow installed on my main rig..
20:46:56PMunchMaybe I'll stream myself setting it up with notifishower and notificatcher
20:48:27Prestigehey PMunch I'm great man, how have you been?
20:48:40PMunchPretty good, all things considered
20:48:57PrestigeI've been working on a side project for some money, so haven't made many updates to Nimdow lately
20:49:00PMunchBeen busy recording my FOSDEM talk and recovering from Christmas/New years :P
20:49:12PMunchOh cool
20:49:14PrestigeOh cool, looking forward to the talk
20:49:17PMunchGot to use Nim? :P
20:49:49PrestigeWell I planned to originally, but it seemed that the backend web frameworks aren't mature yet? So I'm just using typescript
20:50:15PrestigeWas originally going to use Jester
20:50:22*zedeus quit (Ping timeout: 256 seconds)
20:52:44PMunchI've got a project with Jester in production at work
20:52:53PMunchSmall internal thing though
20:53:06PMunchAlthough the Nim forums, website, and playground run on Jester
20:53:44PrestigeI might look into using it in the future, wouldn't be hard to convert the code to Nim so long as the tools I need exist
20:54:24PMunchJester is really nice to work with actually
20:55:04PrestigeOne of the cool things I'm using is https://github.com/colinhacks/zod/tree/v3 for the project, would like something similar with nim
20:55:26Prestigenot sure if anything already exists, I might just have to make it myself
20:56:40*zedeus joined #nim
20:56:54PrestigeAlthough maybe json parsing would take care of this...
20:59:51PMunchWell, this exists: https://github.com/PMunch/jsonschema
21:05:59*zedeus quit (Quit: zedeus)
21:08:11*natrys quit (Quit: natrys)
21:12:45*krux02 joined #nim
21:18:33*narimiran quit (Ping timeout: 260 seconds)
21:22:55PMunchHmm, the websocket library is a bit unreliable..
21:36:47*kinkinkijkin quit (Read error: Connection reset by peer)
21:36:50*vicfred quit (Ping timeout: 256 seconds)
21:37:14*saem quit (Ping timeout: 264 seconds)
21:37:22*nikki93 quit (Ping timeout: 265 seconds)
21:37:24*sirn quit (Ping timeout: 240 seconds)
21:37:43*kwilczynski quit (Ping timeout: 272 seconds)
21:37:44*nikki93 joined #nim
21:38:08*kinkinkijkin joined #nim
21:38:17*sirn joined #nim
21:38:48*kwilczynski joined #nim
21:38:49*rayman22201 quit (Ping timeout: 265 seconds)
21:39:39*rayman22201 joined #nim
21:39:47*haxscramper quit (Remote host closed the connection)
21:40:32*saem joined #nim
21:45:15*PMunch quit (Quit: leaving)
21:48:47*Gustavo6046 quit (Read error: Connection reset by peer)
21:49:10*Gustavo6046 joined #nim
21:52:11FromDiscord<Avatarfighter> PMunch: what websocket library is unreliable?
22:07:50*tane quit (Quit: Leaving)
22:10:19*zidsal joined #nim
22:10:55zidsalquick question I want to slice a sequence from it's first index onwards. Is there a better way of writing typeData[1 .. ^0 ]
22:12:52Prestigethat way is good but you'll want ^1 not ^0
22:13:39Prestigeand if by first index you mean index 1 (which is the second index)
22:14:03Prestigehttps://play.nim-lang.org/#ix=2Nk1
22:14:32zidsalya I meant the second index. I thought 61 gave you the penultimate item not the final item? i.e #[1,2,3,4][1,^1] would return 2,3
22:14:54zidsalclearly Ia m wrong from the example you linked me :p
22:14:58Prestige^1 gives you the length of the seq - 1
22:15:09zidsaldoh, yes that wopuld give you the final element!
22:15:39PrestigeI usually have to double check every time lol
22:28:01*muffindrake quit (Quit: muffindrake)
22:29:11*^Q-Master^ joined #nim
22:29:36*Q-Master quit (Ping timeout: 240 seconds)
22:34:02*muffindrake joined #nim
22:42:45*j-james joined #nim
22:46:37*mbomba joined #nim
22:59:04*hmmm quit (Quit: WeeChat 3.0)
23:04:59*mbomba quit (Quit: WeeChat 3.0)
23:05:29*zidsal quit (Ping timeout: 264 seconds)
23:12:33*j-james quit (Quit: WeeChat 3.0)
23:16:37FromDiscord<gcao> I would like to create an allocator for a type that is created/destroyed often, in order to reduce memory allocation, how do I do it? anyone knows a good example that I can learn from?
23:17:08FromDiscord<ElegantBeef> Object pooling seems to be what you want, never destroy just return to a pool
23:17:15disruptekimpl in stdlib.
23:17:24FromDiscord<gcao> right, that's what I meant
23:18:07FromDiscord<ElegantBeef> The stdlib has a generic pool impl?
23:18:23disruptekyes.
23:18:59FromDiscord<gcao> can you please be more specific? I'm searching on the doc page but didn't find it
23:19:05disruptekit's in fusion.
23:19:09disruptek!repo fusion
23:19:09disbothttps://github.com/nim-lang/fusion -- 9fusion: 11Fusion is for now an idea about how to grow Nim's ecosystem without the pain points of more traditional approaches. 15 79⭐ 12🍴 7& 1 more...
23:19:45FromDiscord<ElegantBeef> It's always amazing what the stdlib has
23:20:13FromDiscord<gcao> thank you. I'll take a look at it!
23:21:58FromDiscord<gcao> how do you return to the pool? the pools module didn't say
23:22:27disruptekaraq asked me not to tell anyone.
23:22:27FromDiscord<konsumlamm> ~~fusion is not part of the stdlib technically, but yeah~~
23:22:39disruptekit technically /is/ part of the stdlib.
23:22:43disruptekthough, it shouldn't be.
23:24:59*Vladar quit (Quit: Leaving)
23:25:00FromDiscord<konsumlamm> it may be bundled with the nim installation but it isnt really part of the stdlib, is it
23:25:11disruptekyes. that is the definition of stdlib.
23:25:24FromDiscord<ElegantBeef> Yea being bundled with Nim practically means it's a stdlib
23:25:33FromDiscord<ElegantBeef> Just the "experimental" stdlib
23:26:07FromDiscord<konsumlamm> if you say so...
23:36:05*zidsal joined #nim
23:36:47disruptekare you calling beef a liar?
23:41:47ForumUpdaterBotNew thread by RainbowAsteroids: What is the difference between Nimble and Nake?, see https://forum.nim-lang.org/t/7431
23:42:38FromDiscord<ElegantBeef> I'm almost certainly a liar