<< 14-10-2020 >>

00:00:05Yardanicodisruptek: because it's just a new PR with 1 commit?
00:00:14Yardanicobelieve it or not, people can do multiple commits in a PR
00:00:24disruptekhey yardanico, why don't you piss off?
00:00:28landerloI don;t know about the tests, I made the tests generic to test the same logic with different types and it works, koch tests passes most tests except a few requiring a vagrant something so I thought they were not relevant
00:00:45Yardanicodisruptek: well, I don't want you to be so rude to people contributing to nim :)
00:00:47disruptekso it passes your local tests?
00:01:01disruptekYardanico: will you shut the fuck up? i'm trying to figure out why it fails, knucklehead.
00:01:14disrupteksubtext: if you read the fucking pr, it should not fail.
00:01:37landerloYes, the tests for tintsets and most of the whole suite. I'll see what's missing
00:01:46disrupteki guess you have to dig into the ci.
00:02:13landerloThe tests failing locally were also failing on devel so I thought were environmental
00:02:17FromDiscord<Elegant Beef> Why cant we be friends, why cant we be friiiiieeeends
00:02:28disruptekbecause some people are just jackasses.
00:02:47disrupteklanderlo: that cast won't be popular. why do you need it?
00:03:41disruptekto put that another way, can't you use ord()?
00:03:57FromDiscord<dom96> Yardanico: Your response does come off a little snarky. That said...
00:04:08FromDiscord<dom96> disruptek: Please don't tell people to piss off/fuck off
00:04:11*luis quit (Ping timeout: 246 seconds)
00:04:26disrupteki mean, you can ask...
00:04:38FromDiscord<Elegant Beef> never said anything about "fuck piss off" or "piss fuck off" πŸ˜›
00:04:46disrupteki dunno what yard's problem is. he's annoying as fuck today.
00:05:02Yardanicoi just don't understand why you are always so negative towards existing nim software
00:05:10Yardaniconothing is perfect as shashlick said
00:05:14disruptekwho is being negative, jackass?
00:05:21disrupteki'm trying to help a NEW pr get merged.
00:05:31disruptekthere's no criticism of existing software here.
00:05:31*luis joined #nim
00:05:34FromDiscord<Elegant Beef> In this case i interpreted it as "Should probably fix the tests", but eh quite silly to argue about
00:05:36disrupteknow, go the fuck away.
00:05:38landerlodisruptek, I imagined it would be risque, but would ord achieve the same performance?
00:05:38YardanicoI'm replying to "annoying as fuck today"
00:05:48disrupteklanderlo: it should.
00:08:07disrupteklanderlo: fwiw, lots of stuff fails locally for me too. i don't worry about testing spawn or node stuff. and there's something in there for dom's book that always fails. other than that, there shouldn't be many failures.
00:09:48*kinkinkijkin joined #nim
00:10:43*bung joined #nim
00:10:44*luis quit (Read error: Connection reset by peer)
00:11:48landerloI see, there is a failure trying an old version, how do you manage that? should I use since? I think old code should be source compatible IMO
00:12:08disruptektrying an old version of what?
00:12:34landerloFAILS: nim c --useVersion:1.0 -r tests/system/tuse_version.nim
00:12:48landerlowithoug the use version 1.0 succeeds
00:13:20disruptekhmm, i didn't see a conflict.
00:13:36disruptekproc initIntSet*: IntSet = initOrdSet[int]()
00:13:45disruptekοΏΌthis proc should have () for mere style reasons.
00:15:02disrupteki saw one or two uses of `int` in comments. i wonder what useVersion:1.0 is tripping over.
00:15:07*bung quit (Ping timeout: 246 seconds)
00:15:14*gmaggior quit (Quit: Leaving)
00:15:44*landerlo quit (Remote host closed the connection)
00:17:44disruptekcool contribution. i hope it goes in.
00:19:55kinkinkijkini forgot how to do this, and this is pretty simple, how exactly do i do stream-based interprocess communication where neither application is run by the other, and reading lines consumes them (no infinite line buildup over the course of runtime)
00:20:04kinkinkijkini did this twice years ago
00:20:22kinkinkijkinfinally using it again
00:20:35*abm quit (Quit: Leaving)
00:21:20disruptektwo processes share a stream?
00:21:53kinkinkijkinyeah, though one only consumes from it
00:21:53*landerlo joined #nim
00:21:58kinkinkijkinunidirectional, that is
00:22:04kinkinkijkinone consumes, other writes
00:22:15disruptekso, a pipe?
00:22:25kinkinkijkinthanks, exact word i was looking for
00:22:28landerloSorry, I dropped. It seems like a bootstrapping issue
00:22:54disruptekstdin on one side and stdout on the other? or some random fd?
00:23:31kinkinkijkini want to have one process create multiple streams, so stdout will not do
00:24:01disruptekoh, a parent creates the streams and the children read or write to them.
00:24:21kinkinkijkinparent creates two streams per child, one for reading and one for writing
00:24:27kinkinkijkinso yeah
00:24:50kinkinkijkinsocket i think is the word maybe?
00:24:53disruptekas long as the kids can agree on who is reading and who is writing, you won't have any trouble using sync or async file operations.
00:24:59*luis joined #nim
00:25:38disrupteki dunno how the support on windows is, but there's plenty of support for sockets on unix.
00:25:41kinkinkijkini forget the actual like... thing i have to do to make those streams, and have them be consumed instead of looked over
00:27:11disruptekif they have to be streams, it gets a little more complex to read infinitely.
00:28:16disruptekyou could use sockets and supply a stringstream that you periodically replace.
00:28:38kinkinkijkinthey don't *have to* really be anything, what im doing is making a sort of internal bouncer daemon for an irc client that is single-instance-per-channel
00:29:31disruptekthen i would use the simplest possible thing. sounds like a seq.
00:30:02disruptekit can be a deque if you want a more elegant api.
00:30:48kinkinkijkininternal bouncer collects from the servers in the correct and standard ways, then writes any new lines to a file that is opened for every new ui instance
00:31:38kinkinkijkinand i want to avoid forcing the opening of children directly from the daemon
00:32:47disruptekso basically, you are writing a logfile that the ui clients will open as a read-only stream and each have their own file position into.
00:33:05kinkinkijkinthey each have their own files entirely
00:33:30kinkinkijkinand when a line has been read by the ui clients, the line is to be consumed and destroyed, not just read
00:33:57disruptekif all the clients haven't read it, you cannot destroy it, yes?
00:34:28kinkinkijkinwell, it's to be a unique file for each client
00:34:38kinkinkijkinsingle-client-per-stream
00:35:01kinkinkijkinand each client opens only one channel
00:36:23kinkinkijkinor you could have one ui that pretends to be multiple clients, but every pipe from the daemon is single-reader, and every pipe into the daemon is single-writer
00:36:28disruptekwell, i wouldn't want to use files. it sounds like a ring buffer per each client on the server.
00:36:48kinkinkijkinwell yeah, im trying to figure the correct ipc for this, which ive done before
00:36:56kinkinkijkinbut i havent the correct terminology remembered
00:37:18disruptekdbus might be the nicest if you're on unix.
00:37:53kinkinkijkini can learn and use dbus but i'd prefer to avoid it if reasonable
00:38:01*krux02 quit (Remote host closed the connection)
00:38:02disruptek!repo swayipc
00:38:03disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 5⭐ 0🍴
00:38:14disruptekdemo of unix sockets within.
00:38:26disrupteki have a bunch of dbus-used projects.
00:38:32disruptekdbus-using, rather.
00:39:03landerloI see, it's because I misplaced the since tag putting it in the new method
00:39:12disruptekbut which is the new method?
00:41:18disruptekoh, you removed it from toIntSet?
00:41:29FromDiscord<notchris> Still learning nim! A basic attempt (unfinished) of a pokemon battle simulator https://github.com/notchris/pokenim
00:42:38disruptekneat.
00:43:04Yardanico@notchris nice :) "# This JSON takes a while to load...annoying" - you can try compiling with -d:release or at least --opt:speed (so all debugging stuff is still enabled ) to make it faster
00:43:15FromDiscord<Elegant Beef> Ah it's you, never did ask what the hell is your nim-buttons repo for? πŸ˜›
00:43:18FromDiscord<notchris> thank you!
00:43:30FromDiscord<Elegant Beef> I have no clue what it actually does based off just reading
00:44:10FromDiscord<notchris> @Elegant Beef Ah i just wanted to try to make something with sdl2, so it creates contextual buttons that calculate the text and fit it with properties like padding etc
00:44:11Yardanicoalso @notchris you don't have to call randomize() in every proc, it really has to be called once when you initialize your program (so before any random procs are used)
00:44:16landerlodisruptek toOrdSet is new, toIntSet delegates to toOrdSet, but I left the since pragma on toOrdSet
00:44:19*luis quit (Read error: Connection reset by peer)
00:44:26Yardanicoit sets the PRNG seed
00:44:35FromDiscord<notchris> @Yardanico At that is good to know!
00:45:01disrupteklanderlo: it probably needs to be .since: (1, 5) but i really dunno wtf is up with 1.4 release.
00:45:07FromDiscord<notchris> @Yardanico Thank you for the tip about the json too
00:45:18*TomDotTom quit (Ping timeout: 265 seconds)
00:49:07FromDiscord<notchris> Something I noticed when using sdl2, when using Software_Renderer, I had better visuals, but laggy performance. When using accelerated or presentvsync, it performed well but would flicker and antialiasing seemed incorrect. I'm on OSX Catalina, maybe its my gfx card
00:50:38landerloOk, I'll add the since 1.5 to the new method, now there is one local failure with g+ SFML/Graphics.hpp
00:50:55disruptekyeah, you can ignore that one.
00:51:54disruptekgood job, dude. you birdied your first pr.
00:59:13notchrisdoes anyone have a preference with rendering? i have been using the sdl2 package
00:59:25disrupteklanderlo: you're not going to use ord versus int?
01:00:33disruptekthe reason it matters is that i should be able to make a type that you can consume by merely making it look ordinal-like.
01:00:48landerloI don't think ord works with dintinct, it failed when I tried unless I've missed somethinf
01:01:09disruptekborrow it from the source type.
01:04:47*enthus1ast quit (Ping timeout: 240 seconds)
01:07:06landerloAh I see the problem, items needs to recover the type, but yes, I can make all the casts to ord, and only leave the types in items* unless you know how to work around that, in items we need to recover the A from the int
01:07:11FromDiscord<exelotl> @notchris cool! That JSON is horrible though, and you almost certainly don't need it :P↡Here's an example I made for someone a couple of years ago, of a type matchup table using enums:↡https://gist.github.com/exelotl/673d8258e697ddb2cd56af5bab9180bb
01:07:39notchrisoh my, that is indeed 100x better
01:07:42disrupteklanderlo: items* where?
01:07:56FromDiscord<notchris> thank you @exelotl
01:08:09FromDiscord<exelotl> Here's the same example with the array indexes labelled for clarity: https://gist.github.com/exelotl/dd79bdad5b2366ba7a94d27b9e861a34
01:08:30FromDiscord<exelotl> np :)
01:08:32notchris:O
01:09:06notchrisI'm definitely going to use this, I'll be sure to say my thanks in a comment
01:10:28disrupteklanderlo: if you mean the iterator, i don't see any int() in there.
01:10:57landerlothere are two A(...) as we need to recover the type of the ordinal
01:11:04disruptekyeah, that's fine.
01:11:40disruptekthose are conversions and probably completely optimized out in any event.
01:12:12*luis joined #nim
01:12:29FromDiscord<Elegant Beef> @exelotl hey clean it up! https://play.nim-lang.org/#ix=2AE4
01:12:35FromDiscord<Elegant Beef> Removed those `a..b`
01:13:10FromDiscord<exelotl> Yeah, I didn't know you could just use the type when I wrote this πŸ˜…
01:13:25FromDiscord<Elegant Beef> Yea it's a nice feature
01:13:53disrupteklanderlo: looks like just runnableExamples: failures.
01:17:00FromDiscord<Elegant Beef> Exelotl my next idea is to alias the the inner array to a `Matchup` type, but eh that's just to make that line a bit more readable
01:17:23landerloYes, fixed those, I saw how to run them, fixed now and with ord pushed again. I had to keep the new method with since 1.3 though, with 1.5 fails
01:17:37disrupteklol
01:17:43FromDiscord<Elegant Beef> It's ever so slightly more readable, but probably equally unreadable https://play.nim-lang.org/#ix=2AE5
01:19:21FromDiscord<exelotl> I guess it works if you're gonna use Matchup elsewhere, otherwise seems like pointless indirection to me x)
01:19:44FromDiscord<exelotl> Oh yeah the other thing I'd do differently nowadays: prefix the enum items
01:19:55disruptekyou're lucky yard is asleep. he HATES it when you criticize existing code.
01:20:08FromDiscord<Elegant Beef> Dont you insult type aliasing for slightly shorter lines πŸ˜›
01:20:12Yardanicodisruptek: yeah sure
01:20:17FromDiscord<exelotl> so it would be ptFire, ptWater, etc.
01:20:25disruptekoh you've awoken the dragon.
01:20:38FromDiscord<Elegant Beef> Yea i prefix them as the style guide suggests
01:20:57disrupteknot a fan of that.
01:21:20disruptekyou're not likely to mistake Fire for anything but Fire.
01:24:13FromDiscord<exelotl> Ok but say I add an overworld to my game with grass and water tiles. How do I distinguish the Water tile kind from the Water pokemon type?
01:24:33FromDiscord<Elegant Beef> By not importing the pokemon type
01:24:49disruptekmake it pure.
01:25:17*Tanger joined #nim
01:25:17FromDiscord<exelotl> Yep, pure is the solution and I don't like it haha
01:25:32FromDiscord<Elegant Beef> Well i'd argue that your overworld doesnt need the pokemon types, so if you have them in the scope you've designed it badly
01:25:41disrupteki tell all the girls that purity is overrated, but it has its uses.
01:29:55FromDiscord<exelotl> I mean its pretty common for projects to have a "types.nim", but ok sure my example was a stretch. I'd still say its pretty likely for a sizeable project to have two enun items with the same name in practise, and the prefix convention is really good at avoiding it
01:30:04FromDiscord<Avatarfighter> Elegant beef i would like you to know the idea you had is going well
01:34:55*apahl quit (Ping timeout: 240 seconds)
01:37:13disruptekfighter: don't fuck pumpkins, dude.
01:37:18*apahl joined #nim
01:39:01*luis quit (Quit: luis)
01:39:08*luis joined #nim
01:41:08FromDiscord<Avatarfighter> disruptek: who told you my halloween suprise smh
01:41:11FromDiscord<Avatarfighter> surprise*
01:41:25disruptekdude. trust me, it never ends well.
01:41:36kinkinkijkinhmm... in nim, do i need to create a socket file before connecting the socket with unix sockets?
01:41:53disruptekwell, unless you own the pumpkin. then you might be okay, legally speaking, if you stay in the dark.
01:42:32disruptekkinkinkijkin: the server creates the file, yes.
01:42:42kinkinkijkinalright
01:43:53FromDiscord<Elegant Beef> Disruptek idk they always have a smile on their face
01:44:09FromDiscord<Elegant Beef> @Avatarfighter i seriously dislike that you took my joke and are thinking it's a good idea
01:44:32FromDiscord<Avatarfighter> I'm not going to actually stream it stadia style lmfao
01:44:55FromDiscord<Elegant Beef> Sure you arent
01:45:03FromDiscord<Avatarfighter> psh yeah i'm not
01:45:10FromDiscord<Avatarfighter> *nervously hiding the rtsp code*
01:45:38FromDiscord<Avatarfighter> you've made me realize though I can have a majority of my code on the server which is good imo
01:47:26FromDiscord<Elegant Beef> Well that's good
01:49:46*user0 quit (Ping timeout: 256 seconds)
01:53:23FromDiscord<Avatarfighter> yeah
01:53:37FromDiscord<Avatarfighter> so now I can stream the program in 4k /s
02:11:33*enthus1ast joined #nim
02:11:36*bung joined #nim
02:15:45*bung quit (Ping timeout: 240 seconds)
02:16:01landerlothank you for your help guys! CI build is green now
02:16:20FromDiscord<Rika> congrats
02:16:42FromDiscord<Avatarfighter> Grats
02:18:08*user0 joined #nim
02:21:33*luis quit (Read error: Connection reset by peer)
02:30:16*bung joined #nim
02:36:51*luis joined #nim
02:38:23*landerlo quit (Remote host closed the connection)
02:43:05*muffindrake quit (Ping timeout: 272 seconds)
02:43:12*xioren quit (Quit: leaving)
02:45:02*muffindrake joined #nim
02:51:30*eburk joined #nim
02:51:58*voidpi joined #nim
02:58:20*Q-Master quit (Ping timeout: 256 seconds)
02:59:08*rockcavera quit (Remote host closed the connection)
02:59:21*Q-Master joined #nim
03:07:09*luis quit (Ping timeout: 272 seconds)
03:07:31*kinkinkijkin quit (Read error: Connection reset by peer)
03:09:53*luis joined #nim
03:20:10FromDiscord<nikki> has anyone made a nim repl that compiles to js and then use node.js or some other js engine or such?
03:20:17FromDiscord<nikki> (edit) 'use' => 'uses'
03:20:37FromDiscord<Rika> not yet
03:20:53FromDiscord<Elegant Beef> Why would you do that?
03:21:23FromDiscord<Rika> whats the issue with it?
03:21:30FromDiscord<Elegant Beef> I dont know why you would
03:21:57FromDiscord<Elegant Beef> Wouldnt it make more sense to just use the nim interpreter for a repl application?
03:22:25FromDiscord<Elegant Beef> Especially since you're compiling to JS so going to hit similar limitations to nimscript
03:22:31FromDiscord<Elegant Beef> Unless i misunderstood what they meant
03:25:17FromDiscord<nikki> i'm actually interested in usages where you say have a native engine core with nim->C->...; then you have modules that maybe do nim->JS or nim->C->WASM and are runtime executed but share data structures, and either edit shared memory or do cross thread messaging
03:25:36FromDiscord<nikki> esp. relevant on platforms like iOS where you can't JIT
03:26:10FromDiscord<Elegant Beef> So seems you interested in using nim as a scripting language?
03:26:26FromDiscord<nikki> half of the above involves using nim as the core non-scripting language
03:26:37FromDiscord<Elegant Beef> Ah misunderstood πŸ˜„
03:26:41FromDiscord<nikki> but, in any case, i was just curious if someone made a JS-using repl at the command line
03:27:03FromDiscord<Rika> not yet, we barely even have a repl itself
03:27:15FromDiscord<Elegant Beef> Yea sorry, just from my interpretation of what you said it seemed silly what you were proposing πŸ˜„
03:27:22FromDiscord<nikki> oh no worries at all
03:27:42FromDiscord<Rika> nim secret is a c-compiling repl (prolly gonna get deprecated)↡inim is a nimscript (nim VM) repl
03:27:50FromDiscord<Rika> or was it reverse
03:27:52FromDiscord<Rika> i dont remember
03:28:07Yardanicoit's the reverse
03:28:13Yardaniconim secret is the VM
03:28:28Yardanicoinim is a wrapper over "nim c" and saving code
03:28:36FromDiscord<nikki> JS jits are actually good and shared ArrayBuffers between the native and the scripted side could work interestingly (with shared types)
03:29:14FromDiscord<nikki> anyways; i just am beginning to dive into the language, and was curious if that existed. maybe i'll hack on one if i get there ^_^
03:30:22FromDiscord<Rika> hey i dont remember
03:30:27FromDiscord<Rika> i said that already
03:30:32FromDiscord<Rika> man i really dont remember things
03:30:44FromDiscord<Elegant Beef> sometimes
03:31:50FromDiscord<Elegant Beef> I still need to get around to making a more seemless interop of nimscript <-> nim
03:32:17FromDiscord<Elegant Beef> I really like the premise of being able to embed nimscript like lua πŸ˜„
03:32:29FromDiscord<Rika> a lot of us do
03:32:53FromDiscord<Avatarfighter> inim is pretty good repl
03:33:53*bung quit (Ping timeout: 260 seconds)
03:34:48*user0 quit (Ping timeout: 260 seconds)
04:02:21*luis quit (Quit: luis)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:33*supakeen joined #nim
04:16:28*vicfred joined #nim
04:18:19*luis joined #nim
04:19:23*opal quit (Ping timeout: 240 seconds)
04:20:06FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2AEs
04:21:06FromDiscord<brainproxy> (edit) 'https://play.nim-lang.org/#ix=2AEs' => 'https://play.nim-lang.org/#ix=2AEt'
04:21:50*opal joined #nim
04:21:57FromDiscord<Elegant Beef> same ar version?
04:22:13*FromDiscord quit (Remote host closed the connection)
04:22:29*FromDiscord joined #nim
04:22:55FromDiscord<brainproxy> possible... though not sure, guess I’ll need to add some `echo`s
04:23:22FromDiscord<Elegant Beef> Cause the issue isnt nim, it's that binary you're invoking πŸ˜„
04:23:29*a_chou joined #nim
04:24:01*FromDiscord quit (Remote host closed the connection)
04:24:17*FromDiscord joined #nim
04:24:59FromDiscord<brainproxy> Actually, it comes up when invoking $(CC)
04:25:29FromDiscord<brainproxy> which in practice on macOS comes down to invoking clang
04:25:58FromDiscord<brainproxy> Maybe there’s a subtle difference between Xcode versions on my laptop and those in GHA
04:26:32FromDiscord<brainproxy> But dang, both macOS versions are 10.15.7 and up-to-date as far as App Store tells me locally and what’s reported in GHA
04:27:50*FromDiscord quit (Remote host closed the connection)
04:28:05*FromDiscord joined #nim
04:28:15*FromDiscord quit (Remote host closed the connection)
04:28:32*FromDiscord joined #nim
04:32:00*a_chou quit (Remote host closed the connection)
04:37:59*luis quit (Read error: Connection reset by peer)
04:38:11*luis joined #nim
04:43:20*user0 joined #nim
05:05:01*user0 quit (Ping timeout: 264 seconds)
05:07:49*narimiran joined #nim
05:21:10*kinkinkijkin joined #nim
05:23:53*solitudesf joined #nim
05:27:25*luis quit (Quit: luis)
05:27:26*vicfred quit (Quit: Leaving)
05:27:40*luis joined #nim
05:30:20*bung joined #nim
05:35:28*bung quit (Ping timeout: 272 seconds)
05:36:54ZevvI hate how "from" is a keyword :(
05:37:15*luis quit (Ping timeout: 272 seconds)
06:04:26*luis joined #nim
06:06:15*MyMind joined #nim
06:07:47*Sembei quit (Ping timeout: 240 seconds)
06:12:50*bung joined #nim
06:28:06*PMunch joined #nim
06:28:24*qwertfisch quit (Quit: ZNC - http://znc.in)
06:28:37*qwertfisch joined #nim
06:55:10*Vladar joined #nim
06:58:53*luis quit (Quit: luis)
07:04:47*D_ quit (Remote host closed the connection)
07:05:43*D_ joined #nim
07:17:50AraqZevv, write an RFC, we can make 'from' a context specific keyword. Ah no, we cannot
07:17:58Araqnot easily at least
07:18:00*waleee-cl quit (Quit: Connection closed for inactivity)
07:20:00*kinkinkijkin quit (Read error: Connection reset by peer)
07:20:05*kinkinkijkin_ joined #nim
07:20:15*kinkinkijkin_ is now known as kinkinkijkin
07:26:11PMunchHmm, given a generic procedure I want to check the generic parameter in a `when` and output an error in certain scenarios
07:26:38PMunchIs it possible to get the value of the generic T so I can output it in the {.error.} statement I produce?
07:40:42*Elegant joined #nim
07:41:16ElegantDamn discord bridge died, so anyway pmunch what are you looking for exactly?
07:42:14ElegantSecondly as i said in discord that you didnt see "I was following your embedding nimscript writeup and i for the life of me cannot figure how the implementRoutine proc works"
07:42:21PMunchNever mind, I figured it out
07:42:52*lum joined #nim
07:43:26PMunchWhat part of implementRoutine are you struggling with?
07:44:27ElegantI dont exactly understand what it does, i though it implemented the logic inside but the code below doesnt work https://play.nim-lang.org/#ix=2AET
07:44:47*kinkinkijkin_ joined #nim
07:44:52ElegantIt complains that there is no body for compiler proc, but then if i give it a body it returns 0
07:45:59*kinkinkijkin quit (Read error: Connection reset by peer)
07:45:59*kinkinkijkin_ is now known as kinkinkijkin
07:46:08PMunchHave you tried the runnable version of the example found here? https://github.com/PMunch/nimscriptexamples/tree/master/ex7
07:47:02PMunchAnd yeah, it needs a body, as you can see I gave mine the body "discard"
07:47:50ElegantAh yea that works, in your writeup you didnt mention call inside the `scriptProc` proc
07:49:05PMunchAh, I guess that could've been a bit clearer
07:50:22ZevvI have a stupid question
07:50:31ZevvI make a nim.cfg and put --blahblah in it
07:50:41ZevvI compile my program, and the compiler barfs because --blahblah is wrong
07:50:45Zevvthen I put -d:danger in
07:50:46Zevvit compiles fine
07:50:49Zevvbut I don't get a -d:danger build
07:52:11ElegantAlso pmunch what's the bestway to invoke nim procs from nimscript
07:52:58PMunchElegant, there I updated the article and added a small comment in the code snippet in the article about what scriptProc does
07:53:08PMunchWhat do you mean+
07:53:33PMunchZevv, yeah -d:danger and -d:release doesn't work in nim.cfg files for some reason
07:53:54Zevvah ok
07:54:43ElegantSay your nim invokes a nimscript function and that function wants to draw something using the actual nim code. Would the best thing be a sort of RPC system?
07:55:25PMunchWell, you can just do it like the "compilerProc" in that example?
07:55:27ElegantActually now i see that implementroutine enables that
07:55:31PMunchOr am I misunderstanding?
07:55:39ElegantI'm a little tired so didnt notice the echo call :P
07:56:01PMunchAh :P
07:56:13PMunchYeah the compilerProc runs as regular Nim code
07:56:19PMunchSo it can do whatever it likes
07:56:57*kinkinkijkin quit (Ping timeout: 260 seconds)
07:57:04*Tlangir joined #nim
07:58:28PMunchHmm, I have declared a generic like: proc to[T: SomeInteger or bool or string or seq](v: Value): T. And I have a macro that calls `to[:<somekind>](value)` to convert a value. I want to have the user be able to create their own `to` procedure to allow the use of their own types
07:59:16PMunchBut I just get the error `Error: cannot instantiate: 'to[Test]'` when I try to do `proc to*[T: Test](v: Value): Test` in my code
07:59:25*Tanger quit (Ping timeout: 258 seconds)
08:01:33ElegantGod damn i'm dumb i wrote a response in discord not remembering the irc bridge is dead
08:01:46Elegant"Cool, got some ideas to implement to reduce boilerplatey nature of this code" said dumb me
08:02:30ElegantAfaik generics dont like overloading
08:02:32Eleganthttps://play.nim-lang.org/#ix=2AEX
08:02:44PMunchOh please do, a NimScript interface library would be amazing
08:03:46*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:03:50bunganyone familar with mysql protocol? am implementing mysql compression part, when I send a init db command I expect compressed sequence id to be 1 , I got 2
08:04:16PMunchElegant, curiously I don't get any errors about that in my code..
08:07:41ElegantNervously looks around
08:07:45*Elegant left #nim ("Leave.")
08:08:54*ElegantBeef joined #nim
08:09:00ElegantBeefAh a proper name
08:10:21PMunchYou know you can do `/nick ElegantBeef` to change your nick right?
08:10:27*PMunch is now known as likeThis
08:10:31ElegantBeefYou think i know how IRC works?
08:10:31*likeThis is now known as PMunch
08:10:35ElegantBeefIt's magic
08:10:51PMunchHaha, it's actually pretty simple :P
08:10:52ElegantBeefYea tuatarian the bridge is down and no one can see discord
08:11:02*Tuatarian joined #nim
08:11:04ElegantBeefSo sadly i had to go over to IRC
08:11:11TuatarianOh I see
08:11:20TuatarianYeah I'm over here for now as well
08:11:25TuatarianOne time thing though
08:11:31PMunchHas anyone pinged Yardanico to have him look at the bridge?
08:11:36ElegantBeefAlthough this gtk based irc client is nice as it uses my system theme
08:11:38ElegantBeefYea i did
08:11:45ElegantBeefI might be a fool but i'm not an idiot
08:11:47PMunchElegantBeef, which one?
08:11:53ElegantBeefsrain
08:12:06TuatarianI remember last time this happened yardanico sent a bunch of pics of russia
08:12:09TuatarianWas pretty interesting
08:12:32TuatarianCan irc handle images?
08:12:39PMunchOh cool, srain looks like every reason I don't like modern chat clients :P
08:12:44FromGitter<timotheecour> can anyone greenlight https://github.com/nim-lang/fusion/pull/26 ?
08:12:44disbotβž₯ CI: run docs, publish docs
08:13:04PMunchTuatarian, not really
08:13:15TuatarianThat's unfortunate
08:13:27TuatarianIrc feels dated to me, but to each their own I guess
08:13:33PMunchYou can send files, but it basically just sends a hexdump of the image with some special annotation that is read by most clients as a file transfer
08:13:43TuatarianI see
08:13:46PMunchAFAIK
08:13:55TuatarianSo not anything with irc but rather just it being decentralized
08:13:56PMunchWell it is pretty old, so that's not too surprising
08:14:06TuatarianYeah
08:14:18ElegantBeefWhat's your issue with srain?
08:14:31TuatarianI'm using revolution irc on my phone
08:14:42ElegantBeefI know it's attempting to emulate modern chat clients, but i guess you dont like multimedia support? :P
08:15:00TuatarianPretty bad experience overall, but it works and I'm not about to make a better one so whatever
08:15:20PMunchElegantBeef, for one messages take up way too much space. I can still see messages back to when I joined this morning without scrolling
08:15:53PMunchI don't mind multimedia support, but I think I'd like a hover over a link to preview feature or something feature instead
08:16:07TuatarianLooks like WhatsApp
08:16:12PMunchHmm, well then I'd need to move my mouse..
08:16:17TuatarianNot a bad thing, just a thing
08:16:36TuatarianQ: can I just contribute things to fusion?
08:16:47ElegantBeefA: It's open source ;)
08:16:50PMunchTuatarian, of course
08:16:52TuatarianLike random algs I implement for whatever reason, search sort etc
08:17:04ElegantBeefWell make a PR and see if it's accepted
08:17:07TuatarianHow do I know which module to contribute to & how do I test before contribution?
08:17:14TuatarianOh ok trial and error process lmao
08:17:18PMunchI mean if they aren't generally useful or belong in a different module it'll probably get rejected
08:17:27TuatarianCan I contribute to the actual stdlib the same way?
08:17:33FromGitter<timotheecour> if unsure, make an RFC
08:17:35PMunchOf course
08:17:39TuatarianRfc?
08:17:40ElegantBeefYou can contribute to the entire language the same way
08:17:47PMunchRequest For Comment
08:17:52TuatarianAre there tests I need to run before?
08:17:55TuatarianNever heard of that
08:17:58ElegantBeef"Request fucking change"
08:18:01FromGitter<timotheecour> and read https://nim-lang.github.io/Nim/contributing.html first
08:18:11ElegantBeefhttps://github.com/nim-lang/rfcs
08:18:14PMunchYeah, you should run the test suite first
08:18:23TuatarianElegant beef: I prefer your version lmao
08:18:53TuatarianIs koch installed with Nim?
08:19:18PMunchYou can build it from the cloned repo
08:19:28PMunchnim c -d:release koch from the root folder IIRC
08:20:00TuatarianThat sounds complicated
08:20:03TuatarianOh wait nevermind
08:20:07TuatarianJust that command?
08:20:21TuatarianHuh
08:20:28TuatarianBut that wouldn't be in path right?
08:20:43PMunchWhat wouldn't be?
08:20:43TuatarianSo just run the built binary then?
08:20:47TuatarianKoch
08:21:26PMunchOh yeah, if you look in the contributing document timothee linked you have a section called Testing or something like that
08:21:37PMunchIt explains how to use koch to test your changes
08:21:47narimiran koch should come with your nim installation, IIRC
08:22:21narimiranfrom what i can tell, it is in root directory of nim tarball (not in `bin` folder) :/
08:22:56*kinkinkijkin joined #nim
08:25:35ElegantBeefIs there any way to hold every possible proc type inside of a container?
08:28:10*kinkinkijkin quit (Read error: Connection reset by peer)
08:31:00*kinkinkijkin joined #nim
08:32:33*luis joined #nim
08:33:41PMunchhttps://github.com/docopt/docopt.nim/pull/51/#issuecomment-705045570
08:33:42disbotβž₯ Add procedure dispatch module
08:33:50PMunch^ Anyone up for a little code-review?
08:37:18*landerlo joined #nim
08:42:06*lritter joined #nim
08:43:24*Vindaar joined #nim
08:44:00VindaarAgreed, would be really great if people could review or even just thumbs up that PR!
08:44:26VindaarI'll review in detail later, as I mentioned on that comment PMunch.
08:47:59PMunchSweet!
09:08:47*luis quit (Ping timeout: 272 seconds)
09:09:27*luis joined #nim
09:11:16*tribly quit (Quit: WeeChat 2.9)
09:12:10*tribly joined #nim
09:32:32*luis quit (Read error: Connection reset by peer)
09:32:44*luis joined #nim
09:35:38*letto quit (Read error: Connection reset by peer)
09:36:10*letto joined #nim
09:36:43*ElegantBeef quit (Remote host closed the connection)
10:01:43*Tuatarian quit (Ping timeout: 246 seconds)
10:05:47*luis quit (Ping timeout: 272 seconds)
10:06:25*luis joined #nim
10:12:07*luis quit (Quit: luis)
10:12:20*luis joined #nim
10:17:51*Tlangir quit (Quit: Leaving)
10:28:26*noonien quit (Quit: Connection closed for inactivity)
10:43:00PMunchIt's so quiet here without Discord
10:43:17VindaarIt's just as quiet on the Discord side, haha
10:43:42PMunchHuh, peculiar
10:44:47*aeverr joined #nim
10:44:59aeverrprolly a slow day
10:45:12PMunchEvidently
10:45:31PMunchI mean the fact that we can't talk to each other probably means that fewer people overall are talking
10:46:11Vindaarwell, Discord people can at least read these messages here. Even if we can't see their answers
10:46:28PMunchOh? It's only broken one way?
10:46:30aeverryes
10:46:35Vindaaryeah, it's really weird
10:47:19aeverrthe irc->discord system is simpler than the discord->irc system
10:48:32VindaarPMunch, I'm gonna add a few review comments saying that here or there a comment on the macro code might be useful. Because the library doesn't use macros so far and isn't maintained by a heavy macro user
10:52:26PMunchMight be a good idea
10:53:18VindaarHmm, and I'm confused about the `runUserImplemented` macro. The if check on the `typ` should always be true (for valid types anyways), no?
10:53:50VindaarSo, if there is no `to<CustomType>` proc, won't it just end up creating a call to a non existing proc?
10:54:21Vindaar(damn, just reading macros without playing around with them is tricky, haha)
10:55:29VindaarI'm thinking this should somehow also create something like a `when definedInScope(<toProcName>)`
10:56:19Vindaarof course one might argue that a user shouldn't use the `to` proc without a custom conversion proc for custom types
11:00:45*NimBot joined #nim
11:01:23PMunchAh right, that is indeed the case
11:01:52PMunchI meant to output when declared(<generated proc name>): <generatedProcName>(value) else: {.error.}
11:02:06Vindaarok, yes. That makes sense then
11:02:12*landerlo quit (Remote host closed the connection)
11:05:32PMunchFixed
11:05:41Vindaarnice
11:06:10VindaarAnd btw, I'm being extra picky here mainly to show the maintainer that someone actually took a close look at this code, haha
11:07:15PMunchHaha, that is probably a good idea :)
11:08:02Vindaarwow, inline usage of `quote do` in a `newTree` call. Never though about that
11:09:38PMunchHehe, not sure if that is recommended, but I use it quite a bit
11:09:48PMunchI don't like naming things :P
11:10:04PMunchSo I inline a lot of stuff
11:10:06Vindaarfor that alone it is really neat. And one saves a line, hehe
11:15:36PMunchHmm, I've written a small program that listens to Freedesktop notifications and writes them formatted to a file or stdout. Anyone got a good name for the program?
11:16:30*liblq-dev joined #nim
11:16:36liblq-devPMunch: notificatcher?
11:16:48PMunchOoh, that's actually not a bad name
11:17:17liblq-devthis might look weird on logs because i just joined the irc channel lol
11:19:23*lum quit (Ping timeout: 260 seconds)
11:19:36supakeenPMunch: notifyle
11:20:18PMunchBecause it writes to a file?
11:20:31supakeenyes
11:20:34PMunchliblq-dev, haha, that could indeed look a bit weird :P
11:21:56*lum joined #nim
11:23:14*bouzu_ joined #nim
11:27:09Vindaarok, done PMunch
11:31:41PMunchOh wow, that is thorough @Vindaar
11:31:41*FromDiscord quit (Remote host closed the connection)
11:31:55*FromDiscord joined #nim
11:32:22FromDiscord<Vindaar> we back?
11:32:32Vindaarindeed
11:34:37VindaarWell, I said said I'd look at it in detail, haha
11:54:20*luis quit (Quit: luis)
11:54:37*luis joined #nim
11:57:36*luis quit (Client Quit)
11:57:47*luis joined #nim
12:02:55PMunchhttps://uploads.peterme.net/notificatcher.png
12:03:07PMunchliblq-dev ^
12:05:09supakeen:D
12:05:11supakeeni like
12:05:15liblq-devcool
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:09:06PMunchFirst thing that popped into my head when you gave me that name :P
12:09:07FromDiscord<lqdev> test
12:09:15FromDiscord<lqdev> okay discord's back
12:09:16*liblq-dev quit (Quit: WeeChat 2.9)
12:09:28FromDiscord<lqdev> PMunch: *i don't get it*
12:10:11PMunchIt's a dreamcatcher with an envelope in it (the envelope signifying a notification)
12:10:54FromDiscord<lqdev> what's a dreamcatcher?
12:11:49*Vladar quit (Remote host closed the connection)
12:12:25idfits some kind of star thingie that catches bad dreams
12:13:30*Vladar joined #nim
12:14:28PMunchYeah it's native american (I think) folklore that it catches bad dreams that fly around in the night before they can get into your head
12:14:32PMunchOr something like that :P
12:14:36*TomDotTom joined #nim
12:28:04*lum quit (Quit: WeeChat 2.8)
12:28:21*lum joined #nim
12:31:57*lum quit (Client Quit)
12:32:15*dimimir joined #nim
12:33:43*dimimir quit (Client Quit)
12:33:57*lum joined #nim
12:35:38PMunch@Vindaar, pushed some fixes based on your review
12:39:29VindaarReally nice, thanks a bunch. Just found two typos
12:43:24*rockcavera joined #nim
12:49:15PMunchFixed
12:49:58*lum quit (Quit: WeeChat 2.8)
12:56:37FromDiscord<lqdev> http://ix.io/2AGs/nim
12:56:57FromDiscord<lqdev> i want to prevent any assignments of `NoCopy`, the above doesn't work.
12:57:05FromDiscord<lqdev> :s/assignments/copies
12:57:11FromDiscord<lqdev> how would i achieve that?
12:57:29*luis quit (Quit: luis)
12:57:33leorize[m]well you moved it
12:57:47*luis joined #nim
12:58:02leorize[m]that was the last time `a` is used, so the compiler optimized it into a move
12:58:10FromDiscord<lqdev> oh that's why
12:58:25FromDiscord<lqdev> well i have a C type which cannot be copied out of a callback
12:58:51FromDiscord<lqdev> how would i achieve this?
12:59:06leorize[m]view types but those are experimental
12:59:15leorize[m]discipline works best atm :p
12:59:18FromDiscord<lqdev> i'm not on devel
12:59:48FromDiscord<lqdev> i guess i could implement an {.error.} `=` hook for the C type?
12:59:59VindaarPMunch, nice work. Let's hope it's enough for a merge now :)
13:00:05leorize[m]you can still move it out
13:00:35FromDiscord<lqdev> well shit.
13:00:47FromDiscord<lqdev> i guess i'll just have to mention it explicitly in the documentation
13:00:50FromDiscord<lqdev> which is less than ideal
13:01:06leorize[m]@lqdev hmm actually implementing the error `=` hook should work if you shadow the variable itself
13:01:10FromDiscord<lqdev> but wait, couldn't i also implement `=sink`?
13:01:57leorize[m]is this variable passed as parameter?
13:02:21leorize[m]then error `=` hook should work
13:02:52FromDiscord<lqdev> oh ok
13:03:45*luis quit (Quit: luis)
13:03:59*luis joined #nim
13:06:42PMunchHmm, how can I add a requirement to a specific branch of a specific repo to nimble?
13:07:40leorize[m]`#branch`
13:08:06leorize[m]this is as bad as `#head` though, I'd recommend pinning the commit
13:08:15PMunchAh, nice
13:08:33PMunchEh, it's only while docopt hasn't merged my changes
13:10:00*FromDiscord quit (Remote host closed the connection)
13:10:13*FromDiscord joined #nim
13:10:20*abm joined #nim
13:12:21PrestigeHey PMunch
13:13:01PMunchHi, what's up?
13:13:07leorize[m]PMunch: the branch would likely be considered by nimble as the latest version all the time
13:13:15PrestigeI fixed window centering and published a new release, you should be good to go if you make that change to xlunch
13:13:31PMunchHmm
13:13:52PMunchIt would be nice though to be able to specify this for other programs that I don't have control over..
13:14:14PMunchGalculator for example is one I've set to auto-float in i3
13:14:25PrestigeYeah, would be good to add and not too hard
13:17:49FromDiscord<lqdev> `/home/daknus/Coding/Nim/rapid/src/rapid/wrappers/chipmunk/arbiter.nim(29, 3) Error: redefinition of 'CP_MAX_CONTACTS_PER_ARBITER'; previous declaration here: /home/daknus/Coding/Nim/rapid/src/rapid/wrappers/chipmunk/arbiter.nim(29, 3)`
13:17:50FromDiscord<lqdev> wut
13:17:57PMunchhttps://github.com/PMunch/notificatcher
13:18:19*a_b_m joined #nim
13:18:27PMunchlqdev, haha that sucks :P
13:18:40FromDiscord<Recruit_main707> Relatable
13:18:47PMunchPrestige, my notification to a file program is ready: https://github.com/PMunch/notificatcher
13:19:09FromDiscord<Recruit_main707> Maybe he is including and importing the file at the same time?
13:19:12PrestigeI like the icon
13:19:37FromDiscord<Clyybber> @lqdev you included it twice probably
13:20:10PMunchPrestige, thanks :)
13:21:05*abm quit (Ping timeout: 240 seconds)
13:21:31FromDiscord<lqdev> @Clyybber except not
13:21:39FromDiscord<lqdev> oh wait
13:21:42FromDiscord<lqdev> i'm blind -_-
13:22:00FromDiscord<Recruit_main707> Happens to the best of us
13:22:46PrestigeHmm I wonder if there are any good db gui applications in Nim
13:27:10*landerlo joined #nim
13:33:29PMunchFleshed out the README a bit:
13:33:33PMunchhttps://github.com/PMunch/notificatcher
13:37:45*PMunch quit (Remote host closed the connection)
13:37:49ehmryhow does one get more information on where side effects come from?
13:39:31*PMunch joined #nim
13:40:14PMunchUgh Prestige, can you please implement a check for the TOML parsing for config refreshes?
13:41:02PMunchI keep crashing nimdow when I make ill advised changes (this time it was escape characters in my format for notificatcher)
13:41:14PrestigeYeah, I'll try to add that soon
13:41:24Prestigewhat did you put in?
13:41:51leorize[m]ehmry: IIRC devel features side effect tracing
13:41:59PMunchI put this in my autostart section: "notificatcher -f /tmp/notifications \"\\e[38;2;81;159;80m{appName}:\\e[0m {hints:urgency:::\\e[38;2;231;76;60m}{summary}\\e[0m\\n\\t{body}\""
13:42:02*user0 joined #nim
13:42:10PMunchBut I hadn't properly escaped the \e
13:42:25PMunchSo it crashed with an error saying \e wasn't a recognised escape sequence..
13:43:27*a_b_m quit (Read error: Connection reset by peer)
13:43:33PrestigeCool, I'll make that a prio
13:43:48*a_b_m joined #nim
13:46:26PrestigeWhich will be in ~8 hours, work just started for me
13:50:23PMunchAh no worries, I'm off work in ten minutes, and I probably won't have time to be on the computer until tomorrow :P
13:51:05*krux02 joined #nim
13:57:48*luis_ joined #nim
13:57:48*eburk quit (Quit: WeeChat 2.9)
13:58:17*luis quit (Remote host closed the connection)
13:58:17*luis_ is now known as luis
14:00:28AraqYardanico, please reduce the thavlak orc test case, it's a showstopper
14:01:31PrestigePMunch: I'll try to have it ready by tomorrow, see you around πŸ‘‹
14:01:42PMunchSweet!
14:01:59PMunchMan, having you make a WM for me is much easier than doing it myself :P
14:02:16Prestigehaha, glad it's working out
14:02:28PMunchI really like it so far
14:02:35PMunchBut I have some gripes with it still
14:02:47PMunchAnd I'm still not used to having to switch to a monitor before I can change the tag
14:03:12PrestigeI want to solve that with a cli client actually, like sxhkd
14:03:21PMunchOoh, that would be nice
14:03:56Prestigeonly prob is you'd have to use an external program
14:03:57PMunchIt would be nice to be able to e.g. get where a window is, and then move to that tag
14:04:04*luis_ joined #nim
14:04:08PMunchSo I could have a shortcut to jump to my browser for example
14:04:16Prestigeoh neat idea
14:04:45PrestigeCan always open issues with small ideas like this, I think that will also require the cli client first
14:04:51PMunchI also thought about getting all the open windows, then displaying them with xlunch, allow you to select one, and then go to it
14:05:13PMunchThat would be similar to the window switcher you find in many DEs
14:05:27PrestigeYeah, that would be good, too
14:08:01*luis quit (Ping timeout: 264 seconds)
14:08:01*luis_ is now known as luis
14:09:31PMunchOh well, I'm off
14:09:33*PMunch quit (Quit: Leaving)
14:11:25YardanicoAraq: yeah I'll try today
14:11:56Yardanicosadly it's not really deterministic since if you change iteration count from 15000 to like 5000 it doesn't crash
14:12:10Yardanicoand it doesn't crash at all if you do GC_fullCollect() in every iteration
14:12:25Araqit's very deterministic
14:12:39Araqset 'defaultThreshold' to 1 in orc.nim
14:12:56Araqand ensure that we don't set it to anything higher
14:13:28Araqor make 'rootsThreshold' a 'const' and equal to 1
14:13:34Yardanicook, I'll reduce it when I get home (need to go to the store)
14:13:41Araqsure, thanks
14:14:11*a_chou joined #nim
14:16:26*luis quit (Quit: luis)
14:16:34*luis joined #nim
14:16:43*aeverr quit (Quit: Konversation terminated!)
14:19:19*xace quit (Ping timeout: 246 seconds)
14:20:30*xace joined #nim
14:22:29*disruptek is now known as asd
14:22:34*asd is now known as disruptek
14:23:26landerloIn my generic intset PR I've taken the feecback to introduce ordset and make intset delegate to it. But I couldn't make the export ordset from intset work. It says it cannot export with no other errors. At the moment intset delegate the calls to ordset.
14:24:14FromDiscord<Clyybber> are you sure you imported it, not included?
14:25:16*xace quit (Ping timeout: 246 seconds)
14:27:54*kinkinkijkin quit (Read error: Connection reset by peer)
14:28:10*kinkinkijkin joined #nim
14:33:20*xace joined #nim
14:34:54*a_b_m quit (Quit: Leaving)
14:38:45landerloOhhh. the export was before the import and that's why I though that woudln't work, silly me! It works no reordering. thank you, I removed the delegation and pushed now
14:39:17FromDiscord<Clyybber> \o/
14:44:43*xace quit (Ping timeout: 260 seconds)
14:46:18*xace joined #nim
14:49:28*nyd joined #nim
14:50:07*kinkinkijkin quit (Ping timeout: 246 seconds)
14:51:26*kinkinkijkin joined #nim
14:57:06*kinkinkijkin quit (Read error: Connection reset by peer)
14:57:31*kinkinkijkin joined #nim
14:59:45*a_chou quit (Ping timeout: 240 seconds)
15:08:57*a_chou joined #nim
15:16:46*luis_ joined #nim
15:17:45*luis_ quit (Client Quit)
15:20:13*luis quit (Ping timeout: 246 seconds)
15:25:00AraqYardanico, never mind, I can reproduce it now
15:25:32YardanicoAraq: I was able to reproduce it with two iterations with defaultThreshold = 1 and commenting lines 333-334, but nice :)
15:25:36*fredrikhr quit (Read error: Connection reset by peer)
15:25:44*Tuatarian joined #nim
15:25:47Yardanicoit's havlak from kostya/benchmarks, not thavlak from the test suite
15:27:24Araqyeah. lesson learned, we need more 'valgrind: true' in our ORC test suite
15:27:27Araqbbl
15:29:10*a_chou quit (Ping timeout: 256 seconds)
15:38:48*Kiloneie joined #nim
15:40:57*hnOsmium0001 joined #nim
15:52:02*a_chou joined #nim
15:53:52*bouzu_ quit (Quit: Leaving)
16:01:02*rockcavera quit (Remote host closed the connection)
16:10:05*a_chou quit (Ping timeout: 240 seconds)
16:16:58*a_chou joined #nim
16:19:05*TomDotTom quit (Ping timeout: 240 seconds)
16:34:16*lum joined #nim
16:36:17*noonien joined #nim
16:36:32*a_chou quit (Ping timeout: 258 seconds)
16:53:09*nyd quit (Quit: nyd)
16:57:57*TomDotTom joined #nim
16:59:13FromDiscord<Shucks> Tried to compile a library which I could use in cpp. Compiled with `nim c --app:lib --noMain --header -d:release --noLinking mylib.nim`. Shouldn't the header file define a `NimMain` and my exported functions?
16:59:26FromDiscord<Shucks> (edit) 'c' => 'cpp'
17:02:57*xioren joined #nim
17:03:23*rockcavera joined #nim
17:04:47FromDiscord<William_CTO> Just came across Nim, and it looks WONDERFUL!
17:04:53disruptekOH SHIT
17:05:20YardanicoAMAZING
17:06:08FromDiscord<William_CTO> I love Python, enjoy Swift and like? C++, so I think I'll feel right at home with nim
17:07:37disruptekit's pretty great.
17:08:29disruptekit's probably better than you already think, too. and that's kinda nice.
17:08:32xiorencan you instruct the compiler to include a binary file when compiling?
17:08:47FromDiscord<William_CTO> Any good IDEs for nim?
17:08:51disruptekxioren: genotrance (shashlick) has an asset bundler.
17:08:59federico3neovim
17:09:01disruptekthere is new jetbrains support.
17:09:03xiorenthanks will check it out
17:09:05*TomDotTom quit (Ping timeout: 240 seconds)
17:09:15disruptek!repo assets
17:09:16disbothttps://github.com/SSPkrolik/nimasset -- 9nimasset: 11Pure Nim 3D Assets loading library 15 6⭐ 5🍴 7& 4 more...
17:09:25disruptekwell, not that one.
17:09:30disruptek!repo assets owner:genotrance
17:09:31disbotno results 😒
17:09:35*disruptek thobs.
17:09:39*disruptek throbs, too.
17:09:40xiorenill search it on github
17:09:40Yardanicodisruptek: jetbrains one is promising, but it doesn't use nimsuggest yet
17:10:03FromDiscord<Shucks> official one? or a plugin?
17:10:12disruptekit's a plugin.
17:10:18FromDiscord<William_CTO> for CLion?
17:10:21disrupteki personally use and recommend neovim.
17:10:34Yardanico@Shucks semi-official plugin
17:10:46Yardanicoit's made by a JetBrains employee but they didn't announce it
17:10:52Yardanicomaybe he just does it for experience ;)
17:10:56FromDiscord<William_CTO> ah
17:10:58FromDiscord<William_CTO> link?
17:11:13Yardanicohttps://plugins.jetbrains.com/plugin/15128-nim
17:11:23Yardanicobut right now it's far from the best available experience for nim
17:11:32Yardanicofor the best experience you'll probably want to run vscode with the nim extension
17:11:39disruptekneovim is where the best support lands first.
17:11:39Yardanicoand maybe a few more like indent rainbow and guides
17:12:08FromDiscord<William_CTO> how is neovim the best? What does it offer over vscode/jetbrains?
17:12:18FromDiscord<Shucks> its vim ;p
17:12:19FromDiscord<lqdev> - semantic highlighting
17:12:23disruptekgotodef
17:12:23FromDiscord<lqdev> - it actually works
17:12:28FromDiscord<lqdev> - the author knows how to use nimsuggest
17:12:33xiorenlies...all lies
17:12:39FromDiscord<lqdev> truth*
17:12:46Yardanico@lqdev is there autocompletion?
17:12:51disruptekyes.
17:12:54FromDiscord<lqdev> of course.
17:13:09FromDiscord<William_CTO> how does that work in vim?
17:13:19FromDiscord<Shucks> To bad i never got it running. Still stuck on https://github.com/alaviss/nim.nvim/issues/32
17:13:20disbotβž₯ Highlighting disappears Β²
17:13:24disruptekhit tab while typing an identifier.
17:13:37FromDiscord<William_CTO> hmm
17:13:38FromDiscord<William_CTO> cool
17:13:51disruptek!repo nim.nvim
17:13:52disbothttps://github.com/baabelfish/nvim-nim -- 9nvim-nim: 11Vim support for nim. 15 53⭐ 15🍴 7& 3 more...
17:13:55disruptekthere are videos iirc.
17:14:20disruptekhere's a package manager that understands the difference between version "10" and version 10:
17:14:23disruptek!repo nimph
17:14:23disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 84⭐ 5🍴 7& 1 more...
17:14:44disruptekhere's a dog that pees like a bitch:
17:14:45disruptek~bentley
17:14:46disbotbentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek
17:14:46disbotbentley: 11a good boy
17:15:41FromDiscord<William_CTO> thought there was a bult in pkmgr nimble
17:16:20disrupteki thought so too, at first.
17:16:32Yardanico@William it is a part of a standard nim distribution, yes
17:16:35Yardanicoand it's called nimble
17:16:41Yardanicobut there are altnernatives like disruptek's nimph
17:16:43FromDiscord<Vindaar> disruptek, should have named your dog TVR instead of Bentley if you ask me
17:16:50disrupteklike the car?
17:16:58FromDiscord<Vindaar> of course πŸ˜›
17:17:02disruptekmy next bitch will be named `chassis`.
17:17:11FromDiscord<William_CTO> ok well I'm going to be learning several new things already
17:17:13disrupteki think it's a great name for a dog.
17:17:19*TomDotTom joined #nim
17:17:22FromDiscord<William_CTO> I think I'll stick with the standard package manager
17:17:30disruptekyou're going to love it.
17:17:38disruptekas long as you don't count higher than 10, i mean.
17:17:55FromDiscord<William_CTO> Also, https://github.com/baabelfish/nvim-nim last commit was 2017. Should I be concerned?
17:18:04disruptekyes; you're looking at the wrong repo.
17:18:08disruptek!repo nim.nvim
17:18:09disbothttps://github.com/baabelfish/nvim-nim -- 9nvim-nim: 11Vim support for nim. 15 53⭐ 15🍴 7& 3 more...
17:18:15disruptekoh. so am i.
17:18:19disruptek!repo nvim.nim
17:18:20disbothttps://github.com/baabelfish/nvim-nim -- 9nvim-nim: 11Vim support for nim. 15 53⭐ 15🍴 7& 3 more...
17:18:29Yardanicohah
17:18:32disruptek!repo author:alaviss nim.nvim
17:18:32disbotno results 😒
17:18:37FromDiscord<William_CTO> https://github.com/alaviss/nim.nvim
17:18:38landerlonvim-lsp is great, very easy to add async very fast tooling around it. Lua integrated support is very nice
17:18:39Yardanicoyes
17:18:48YardanicoI meant to the repo link
17:19:04disruptekwtf is going on with github.
17:19:31*Tuatarian quit (Quit: Quit)
17:19:53disruptek!repo alaviss/nim.nvim
17:19:54disbothttps://github.com/alaviss/nim.nvim -- 9nim.nvim: 11Nim plugin for NeoVim 15 101⭐ 12🍴
17:21:13narimiranYardanico: there you go, half way there with hacktoberfest :)
17:21:21Yardaniconarimiran: it's actually full already :D
17:21:25Yardanicoi did two PRs to my own nimpylib
17:21:30Yardanico(yes that's still allowed)
17:21:32narimiranYardanico: i thought it might be :)
17:22:56*lolXDshadhhj joined #nim
17:23:14lolXDshadhhjhello
17:23:19Yardanicohallo
17:23:45lolXDshadhhjhallol
17:23:46*natrys joined #nim
17:24:17lumhi
17:24:50lolXDshadhhjlum: WOW! you are here too
17:25:18lumlolXDshadhhj: ?
17:26:03lolXDshadhhjOK, bye
17:26:33lolXDshadhhju are cool
17:26:36lolXDshadhhjlum
17:26:52lolXDshadhhjbut byee
17:27:00*lolXDshadhhj left #nim (#nim)
17:27:21Vindaarlum ([email protected]) [18:34], lolXDshadhhj ([email protected]), ehm yeah... not really unexpected given that "conversation"
17:27:56lumhehehehehe
17:29:01FromDiscord<lqdev> is there any way i can dump what argument nim passes to `gcc`?
17:29:09FromDiscord<lqdev> :s/argument/arguments
17:34:36*nimProgrammer joined #nim
17:34:57FromDiscord<nikki> @lqdev i think you can see it at the top of the file in the generated C file in nim cache
17:35:13FromDiscord<nikki> but maybe there's a way to also log it at the command line when building
17:35:16FromDiscord<lqdev> already found ~/.cache/nim/project_d/project.json
17:37:58nimProgrammerhello, i have a question: why when i write var a = 10, and then a = "str" the error appears?
17:38:12nimProgrammeris it a bug?
17:38:21Yardanicono :)
17:38:28Yardaniconim is a statically typed language, so a variable can only have one type
17:38:29FromDiscord<Vindaar> it's a feature πŸ™‚
17:39:17nimProgrammerlol
17:39:19nimProgrammerok
17:39:44FromDiscord<lqdev> hm, then is there a way of listing all the linked files?
17:39:46FromDiscord<lqdev> no wait
17:39:49FromDiscord<lqdev> the linker command
17:40:29FromDiscord<lqdev> i guess --passL:oijfsi0gsediotgrw9iurw9u8w4et9u4rt works
17:41:37Yardanico--passL:give_me_all_linked_files_you_stupid_computer
17:42:22nimProgrammeri was trolling
17:42:26Yardanicohah
17:42:50FromDiscord<lqdev> i'm trying to figure out why my binary is linked with pthread enabled
17:42:57FromDiscord<lqdev> even though --threads:off
17:43:09FromDiscord<lqdev> and none of my wrappers passes -pthread to the compiler
17:43:41FromDiscord<Vindaar> can't you `objdump` or similar and check if it contains the corresponding symbol?
17:43:59FromDiscord<lqdev> what would that help me with?
17:44:06FromDiscord<lqdev> the binary is a windows binary btw
17:44:11FromDiscord<Vindaar> oh
17:44:19FromDiscord<lqdev> dependency walker doesn't reveal much
17:44:22FromDiscord<Vindaar> No I meant to see whether it tries to load some lib at runtime
17:44:44FromDiscord<lqdev> it tries to load libwinpthread-1.dll
17:44:48FromDiscord<lqdev> for no apparent reason
17:45:33FromDiscord<Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=2AI6
17:47:33FromDiscord<Vindaar> ohh, sorry now I get your confusion
17:47:49FromDiscord<Vindaar> I misread your earlier message as "if" it's linked, instead of "why"
17:48:05FromDiscord<lqdev> ok wtf, i did --passL:-no-pthread and now it complains about pthread usages in libgcc?
17:48:10FromDiscord<lqdev> what is libgcc doing in my executable?
17:54:51FromDiscord<lqdev> ok so doing `--passL:"-Wl,-static -lpthread"` seemed to work
17:55:10FromDiscord<lqdev> but _why_ does mingw-gcc link to winpthread by default?
17:56:58*Kiloneie quit (Quit: Leaving)
17:57:15*Kiloneie joined #nim
18:00:15*nimProgrammer quit (Remote host closed the connection)
18:02:43jken_lmariscal, noticed you have a docking branch in nimgl/imgui. Have you had sucess with that?
18:08:57*lum quit (Quit: WeeChat 2.8)
18:17:47*landerlo quit (Remote host closed the connection)
18:18:53*lum joined #nim
18:19:36*waleee-cl joined #nim
18:21:09FromDiscord<Kiloneie> Why are there 2 Araqs ? Anyways @Araq i PMed you on irc a message a few hours back, i don't think you saw it.
18:26:25FromDiscord<William_CTO> https://github.com/nim-lang/Aporia is this editor any good?
18:26:40disrupteknope.
18:27:11Yardanico@William it's been abandoned for quite a long time and needs changes to be compiled on latest Nim :)
18:27:22YardanicoI have some of them in my fork but even with them aporia crashes quite often
18:27:29FromDiscord<William_CTO> hm
18:27:42FromDiscord<William_CTO> So the editors in https://nim-lang.org/faq.html aren't updated?
18:27:58YardanicoI PRed a change to FAQ just yesterday which removed Aporia from the list :)
18:27:59Yardanicoit was merged today
18:29:11*madpata joined #nim
18:30:32FromDiscord<Recruit_main707> is the new intellij plugin there?
18:30:45FromDiscord<Shucks> https://plugins.jetbrains.com/plugin/15128-nim/versions
18:31:37FromDiscord<Shucks> Just tried to install it into pycharm
18:31:51*rockcavera quit (Remote host closed the connection)
18:34:13Yardanicomade an introductory arc/orc post (posted english versions on dev.to and habr already) https://forum.nim-lang.org/t/6925
18:34:29madpata@Shucks how well did it work?
18:34:39*Vladar quit (Quit: Leaving)
18:35:29FromDiscord<Shucks> Still trying to figure out how to activate the plugin for my project lol
18:35:37FromDiscord<Shucks> Still thinks its python
18:38:56*Kiloneie quit (Quit: Leaving)
18:39:14*Kiloneie joined #nim
18:40:09*gmaggior joined #nim
18:40:29*lritter quit (Quit: Leaving)
18:42:04*TomDotTom quit (Ping timeout: 272 seconds)
18:43:22*rockcavera joined #nim
18:43:30*vil0x_ joined #nim
18:44:55*rockcavera quit (Read error: Connection reset by peer)
18:45:25*rockcavera joined #nim
18:45:48disruptekthat's about where i am with nim.
18:46:14*vil0x_ quit (Client Quit)
18:49:32FromDiscord<patasuss> Would it be possible to change the repository url of an existing nimble package?
18:49:33FromDiscord<patasuss> The owner of the ncurses wrapper package isn't active anymore and the package .nimble file throws errors because of the 'name' attribute.
18:49:48disruptekyep.
18:50:35FromDiscord<patasuss> Just a pull request changing the URL or is there some more ceremony?
18:50:44disrupteknah.
18:50:53disrupteka PR is sufficient.
18:51:13FromDiscord<patasuss> thanks for the info, gonna create a fork then.
18:51:33disrupteki would recommend not forking.
18:51:56FromDiscord<patasuss> why?
18:52:12FromDiscord<patasuss> btw, i meant forking the nim-ncurses repo
18:52:28Yardanicononono, you fork the nim-lang/packages repo and do the changes there
18:52:29disrupteki started maintaining criterion in a fork but it meant that the bot ignored it. i could have fixed the bot, but not having a fork actually makes it clearly that yours is the "upstream".
18:52:33Yardanico!repo nim-lang/packages
18:52:33disbothttps://github.com/nim-lang/packages -- 9packages: 11List of packages for Nimble 15 247⭐ 433🍴 7& 4 more...
18:52:42Yardanicoif the author is inactive for a long time you can take over packages
18:52:46disruptekyeah, we're talking about git right now.
18:52:50Yardanicofork the package itself, and then make a PR to packages repo
18:53:20disruptekwhen you merely take the git repo and push it to github, you still preserve the history and the original creator is represented correctly, etc.
18:53:33disruptekso, that's what i'd recommend. i ended up doing this with criterion and cps.
18:58:10*lum quit (Quit: WeeChat 2.8)
18:58:30Yardanicowell that's what forking does, yeah
18:58:40disrupteknah.
18:58:44Yardanicowdym?
18:58:48Yardanicoforking on github saves all of the history
18:58:55disruptekwell, i tried to explain it above. scroll back.
18:58:57Yardanicoalso you can then remove the fork status by contacting github support
18:59:10Yardanicoso your point about fork doesn't stand
18:59:26YardanicoTo detach the fork and turn it into a standalone repository on GitHub, contact GitHub Support or GitHub Premium Support. If the fork has forks of its own, let GitHub Support know if the forks should move with your repository into a new network or remain in the current network. For more information, see "About forks."
18:59:30Yardanicohttps://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-github-profile/why-are-my-contributions-not-showing-up-on-my-profile#commit-was-made-in-a-fork
18:59:42YardanicoI've did this once
18:59:46Yardanicodone*
18:59:53disruptekthere's no point. you can just git push in this case.
19:00:01disruptekdo what you want.
19:00:10disruptekit's just my recommendation, having done this a couple times.
19:00:24Yardanicoyeah, I agree that there would be not much difference between forking + contacting github support vs creating a new repo and copying all git history
19:00:36Yardanicoit's good that there are multiple ways to choose from :)
19:00:44disruptekyeah, great.
19:12:31FromDiscord<Avatarfighter> would anyone know if there is an RSA library that allows me to supply my own public exponent and modulus?
19:14:12leorize[m]nimcrypto can do rsa, right?
19:14:30FromDiscord<lqdev> is it possible to turn a callback-style iterator to a nim-style iterator?
19:14:33leorize[m]also you can't just use a random number, use one of the audited ones :p
19:14:36FromDiscord<lqdev> the problem is that i cannot yield in the callback
19:14:48FromDiscord<lqdev> because the callback's not an iterator
19:15:28leorize[m]you're wrapping some wicked C lib?
19:15:49FromDiscord<lqdev> yup.
19:15:50FromDiscord<Avatarfighter> leorize: I'm not using my numbers πŸ˜› I'm "porting" java code to nim atm lol
19:16:00leorize[m]@lqdev maybe just write a macro that transform an iterator into a callback function
19:16:17FromDiscord<lqdev> hey yea for loop macros could work technically
19:16:24FromDiscord<lqdev> but they're a bit overkill aren't they
19:16:40leorize[m]well either that or it won't work
19:16:58leorize[m]iterators only work if you have control over the iteration
19:19:26FromDiscord<lqdev> i'll just stick with my callback-style iterators.
19:19:40leorizeit's not too hard tbh
19:20:02FromDiscord<lqdev> ik
19:20:14FromDiscord<lqdev> but honestly i think it's more trouble than it's worth
19:20:15leorizewhat's this api you're wrapping?
19:20:20FromDiscord<lqdev> chipmunk
19:20:32FromDiscord<lqdev> https://chipmunk-physics.net/release/ChipmunkLatest-API-Reference/group__cp_space.html#ga62eea2b00f5503976ef250a33d4c474a
19:21:44FromDiscord<lqdev> i feel like introducing for loop macros is going to bring some leaky abstractions and ugly error messages that i'd rather avoid
19:23:20leorizesure
19:23:43leorizeas long as the loop body can be a closure I don't think anyone will complain
19:24:51FromDiscord<lqdev> yea i specifically abstracted the closure pain away
19:25:10FromDiscord<lqdev> so you just do `space.eachBody do (body: Body): ...` and it works fine
19:25:58leorizeyou literally just solved the biggest problem with auto conversions from for loop macros :P
19:26:04leorizevia*
19:26:33FromDiscord<lqdev> wdym auto conversions?
19:26:45leorizefor-loop to callback
19:26:52leorizebut `return` is a problem so maybe not
19:27:09leorizeI think your way work fine
19:27:45FromDiscord<lqdev> yea i don't think it's gonna cause too many problems in practice
19:28:00FromDiscord<lqdev> maybe it's not as readable as a for loop but you don't use it very often either
19:30:39leorizetrue
19:35:51*landerlo joined #nim
19:36:24*narimiran quit (Quit: leaving)
19:39:32FromDiscord<tinygiant> Is this the appropriate forum/channel to ask questions about nim coding issues? If not, where to? The nim forums aren't allowing me to post (need to verify email and it won't send the email). Thanks!
19:39:53FromDiscord<lqdev> yeah feel free to ask questions here
19:40:12*TomDotTom joined #nim
19:40:24Yardanico@tinygiant what is your forum nickname?
19:40:27YardanicoI can manually approve it
19:40:50Yardaniconim forum uses it's own mail server so some email providers might block it or send to the "spam" folder
19:43:17Yardanicoah, nvm, you seem to have the same nickname as here, @tinygiant I approved your forum profile :)
19:46:10FromDiscord<j$> do the seq and string types have implicit gc? if I wanted to completely avoid garbage collection would I have to not use these?
19:46:34FromDiscord<lqdev> yes.
19:46:43FromDiscord<lqdev> but you do *not* want to avoid garbage collection in nim
19:46:45YardanicoWell yes, they are managed by the runtime, but really you shouldn't worry about "GC "too much
19:46:57*lum joined #nim
19:47:07Yardanicowith new ARC you can have all advantages of automatic memory management without the bad sides :)
19:47:30*lum quit (Client Quit)
19:47:44*lum joined #nim
19:47:47FromDiscord<j$> it's not for practical application dev, I'm just trying to test my understanding of memory so not using gc would be helpful, I don't really want to go the c to do that
19:47:51*lum quit (Client Quit)
19:48:03Yardanicowell, you can always go full-on manual memory management in nim if you want
19:48:05FromDiscord<j$> (edit) 'the' => 'to'
19:48:11*lum joined #nim
19:48:13Yardanicobut then you won't be able to use a lot of the standard types
19:48:17Yardanicolike string/seq/most of the stdlib
19:48:19*lum quit (Client Quit)
19:48:23Yardanicowell you will be able to, but they'll leak
19:48:23FromDiscord<tinygiant> Thanks!
19:48:36*lum joined #nim
19:48:38Yardanicoyou can still use --gc:arc and do your own manual memory management while the compiler will take care of standard types
19:48:44*lum quit (Client Quit)
19:48:59*lum joined #nim
19:49:06*lum quit (Client Quit)
19:49:31FromDiscord<j$> what is the state of arc, I haven't check on it in a while
19:49:35FromDiscord<j$> done?
19:49:42leorizepretty much
19:49:49leorizeit's shipping with the upcoming 1.4
19:50:28leorize~memory
19:50:28disbotmemory: 11The Nim memory model: https://zevv.nl/nim-memory/ -- leorize
19:50:43Yardanicozevv also started http://zevv.nl/nim-memory/nim-arc.html
19:50:44FromDiscord<j$> yeah i've read this a few times
19:50:55Yardanicoyou can also read https://dev.to/yardanico/what-are-arc-and-orc-in-nim-3191 :P
19:52:42FromDiscord<j$> yeah I just remember reading it and sink, constructors and deconstructors went right over my head
19:52:50FromDiscord<j$> maybe it's time for round two later
19:53:29Zevvi never finished https://zevv.nl/nim-memory/nim-arc.html :(
19:53:48leorizedo some manual memory management and you will get the gist of sink/destructors soon enough :p
19:54:15FromDiscord<j$> that's what im thinking
19:54:29*xioren quit (Quit: leaving)
19:54:39*landerlo quit (Ping timeout: 245 seconds)
19:54:44leorizewrite your experiments with `--gc:arc -d:useMalloc` so that the parts of Nim that needs GC would still be working, and you have `valgrind` to help catch leaks
19:55:18FromDiscord<j$> alloc and dealloc use gc?
19:55:32leorizenope
19:55:46leorize`create` also don't use gc
19:56:00leorizein Nim if something outputs `ptr T`, it's not using GC
19:56:09leorizeif it outputs `ref T`, that's GC-ed
19:56:20FromDiscord<j$> yeah, I already avoid ref
19:56:42TomDotTomIs there any in nim to control the gc, maybe like pythons `gc.diable()` / `gc.enable()` ?
19:56:56FromDiscord<mratsim> don't use a GC-ed type
19:57:05FromDiscord<mratsim> i.e. don't use ref types
19:57:09leorizethere's a proc for that, but it's kinda pointless
19:57:13FromDiscord<mratsim> or compile with gc:none
19:57:19FromDiscord<mratsim> well gc:destructors
19:57:27leorizewith the new runtime coming with `--gc:arc` seq and strings will no longer use the GC
19:57:56leorize(not that Nim's seq and string semantic ever needed the gc)
19:58:21FromDiscord<j$> what is gc destructors
19:58:25FromDiscord<lqdev> TomDotTom: https://nim-lang.org/docs/system.html#GC_disable
19:58:34FromDiscord<lqdev> @j$ backend for ARC and ORC
19:58:40TomDotTomThx lqdev
19:58:55*superbia joined #nim
19:59:06FromDiscord<mratsim> gc destructors is scoped memory management, i.e. like C++
19:59:26leorizegc destructors hooks are never finalized and stablized iirc
19:59:45FromDiscord<mratsim> =destroy and =sink and even = assignment works for me
19:59:56leorizeI mean the hooks for memory management
20:00:21leorizearaqsgc is one of the only module to hook into gc:destructors
20:00:25FromDiscord<mratsim> ah right
20:00:30leorizebut he never developed it further
20:00:50Yardanicoyeah, he updated the readme 25 days ago :) now it's officially abandoned :P
20:01:04leorizeit's now --gc:arc :P
20:01:08leorizeexcept that he ditched mimalloc
20:01:14FromDiscord<mratsim> well you can use the =destroy and =sink to build your own memory management scheme, for example I use those to build atomic refcounting for threadsafe memory management: https://github.com/mratsim/weave/blob/master/weave/cross_thread_com/flow_events.nim#L176-L201
20:01:42FromDiscord<mratsim> Mimalloc is still interesting for its fragmentation property on long running apps
20:01:58leorizehow is it compared to nim's tslf?
20:02:40leorizeiirc the only problem with our tslf implementation is that it rarely release the memory back to the os
20:03:05leorizea property that was done to reduce the performance hit by the gc
20:03:18*nature joined #nim
20:03:44leorizebut since we're getting to arc now 4raq already said we can try making the allocator release memory more often
20:06:23FromDiscord<nikki> are closures implicitly ref types?
20:06:33leorizeyes
20:07:27FromDiscord<mratsim> I create my own closures in Weave on top of a threadsafe mempool
20:07:38FromDiscord<Avatarfighter> i hate rsa
20:07:44FromDiscord<Avatarfighter> well more java but rsa too
20:08:02FromDiscord<Avatarfighter> `Cipher instance = Cipher.getInstance("RSA/ECB/PKCS1PADDING");` this makes me cry
20:08:09FromDiscord<mratsim> what happened? Not that I like it too, I prefer elliptic curves
20:08:21Yardanicoiirc java has "var" since like 2016 @Avatarfighter
20:08:23FromDiscord<mratsim> oh, that's because Java doesn't have enums
20:08:35leorize@mratsim do you have an automated environment lifting macro?
20:08:51FromDiscord<Avatarfighter> @mratsim some stupid sdk is using rsa to encrypt their secret key + IV for AES and I want to port it to nim but I am bad at cryptography lmao
20:08:52FromDiscord<mratsim> do you want a simple or complex version?
20:09:39leorizejust asking :P something that lets you plug your own container type (ie. ptr[T], ref[T], seq[T]) I guess?
20:09:48FromDiscord<mratsim> RSA-OAEP is still quite wiely used
20:10:19leorizeI may try to make something like `SecureRef[T]` based on libsodium secure memory thingy
20:11:06FromDiscord<mratsim> 6-lines env packer for cross thread calls: https://github.com/mratsim/blocksmith/blob/master/cross_service_calls.nim#L164-L169
20:12:15FromDiscord<Avatarfighter> I need to parse ASN.1 structures so i can extract the modulus and pub exponent from public keys and then I need to find an rsa lib that will let me plug in my own numbers which is none existent in nim from what I see or i need to find a lib that lets me feed a X509 Encoded public key to then use for rsa lol
20:12:18FromDiscord<mratsim> Weave is a bit more complex but same principle, a buffer with sufficient size for all intent and purpose and you =sink into it
20:12:23*luis joined #nim
20:12:29FromDiscord<lqdev> @mratsim java *does* have enums tho
20:12:39FromDiscord<Avatarfighter> leorize: have you seen memguard for golang?
20:12:45FromDiscord<mratsim> Use nim-bearssl, look into nim-libp2p for how to parse ASN.1 and use RSA
20:12:50FromDiscord<Avatarfighter> https://github.com/awnumar/memguard
20:12:54FromDiscord<Avatarfighter> @mratsim ily
20:13:08FromDiscord<Avatarfighter> i didn't realize libp2p was using rsa
20:13:10FromDiscord<mratsim> https://github.com/status-im/nim-libp2p/tree/master/libp2p/crypto
20:13:15FromDiscord<mratsim> also security audited πŸ˜‰
20:13:27leorize@Avatarfighter it's a bit overkill
20:14:05FromDiscord<Avatarfighter> psh who needs security audited code anyways
20:14:26FromDiscord<mratsim> @Avatarfighter you might be interested in: https://github.com/status-im/nimbus-eth2/issues/545#issue-522203281 and https://github.com/status-im/nimbus-eth2/issues/563
20:14:27disbotβž₯ Hardened memory allocator
20:14:48FromDiscord<mratsim> hopefully people will use Nimbus to secure a couple hundreds of thousands of funds
20:15:01FromDiscord<Avatarfighter> Nimbus is a really cool project
20:15:21FromDiscord<Avatarfighter> Knowing that a whole ethereum node will one day run on Nim makes me excited for the future of the language as a whole lol
20:15:58FromDiscord<mratsim> It also means that Nim will have state of the art cryptography and networking which is super important for cloud services for example.
20:16:05FromDiscord<Avatarfighter> yeah exactly
20:16:11FromDiscord<Avatarfighter> and I will be happy the whole time because it means that
20:16:22FromDiscord<Avatarfighter> whoops
20:16:33FromDiscord<Avatarfighter> it means that I will be able to use audited code not written by myself lmao
20:17:23FromDiscord<dom96> I'm more pessimistic here
20:17:52Yardanicobtw, need to fix this styling issue
20:18:05Yardanicoblob:https://imgur.com/187767c5-4c52-43ad-ac21-9ca32914b892
20:18:06FromDiscord<dom96> State of the art networking won't save me if every other code depends on stdlib's networking
20:18:08Yardanicohttps://i.imgur.com/Q5FJqm9.png
20:18:16Yardanicohttps://i.imgur.com/x5RyDYu.png
20:18:24FromDiscord<Avatarfighter> just gotta make the stdlib state of the art πŸ€” \
20:18:27YardanicoI'm not sure why no one noticed it :)
20:18:42*xioren joined #nim
20:19:04leorize@mratsim what's status opinion on #8363? I believe there would be some incentive to work on this as you're interested in embedded stuff?
20:19:05disbothttps://github.com/nim-lang/Nim/issues/8363 -- 3Rework Nim's exception handling ; snippet at 12https://play.nim-lang.org/#ix=27OQ
20:19:24leorizeor are you just gonna use Result[T] :P
20:19:34FromDiscord<Avatarfighter> disbot is officially the coolest bot i've ever seen
20:20:03FromDiscord<Avatarfighter> Random question but does anyone here have experience with PCI Compliant systems and/or is a PCI Compliance Officer πŸ˜›
20:20:08leorize@dom96 we can port stuff over to the stdlib, it's not like stdlib networking is that bad
20:21:38FromDiscord<dom96> indeed, the stdlib networking is already state of the art πŸ˜›
20:21:45FromDiscord<Avatarfighter> πŸ˜›
20:21:58leorizeI wish I could say the same for stdlib async :P
20:22:09FromDiscord<Avatarfighter> stdlib async is nice imo
20:22:21FromDiscord<mratsim> We use Result. Had a call with auditors as well today, they really want to ensure that all exceptions are handled and so "raises: []" or Result everywhere
20:22:23FromDiscord<Avatarfighter> i haven't had any breaking issues with it yet lol
20:23:01FromDiscord<dom96> leorize: that is literally what networking means πŸ˜‰
20:23:46FromDiscord<dom96> @mratsim let's hope Nim's `raises` implementation has no security holes πŸ˜„
20:23:54xiorenis there a way to get the directory the binary resides in at runtime? as apposed to the dir the binary is _ran from_ (cwd).
20:24:05leorizeNim's `raises` does not filter Defect fwiw
20:24:13*TomDotTom quit (Ping timeout: 264 seconds)
20:24:16leorizexioren: os.getCurrentDir() iirc
20:25:11leorize@mratsim: so why are they against exceptions?
20:25:17xiorenthat give the dir the binary is ran from.
20:25:21xiorengives*
20:25:31leorizexioren: that should get you the cwd
20:25:53FromDiscord<Avatarfighter> isn't there getAppDir()?
20:25:57xiorenright, for me the cwd =/= the dir the binary is in
20:26:09FromDiscord<Avatarfighter> https://nim-lang.org/docs/os.html#getAppDir
20:26:12FromDiscord<Avatarfighter> xioren ^
20:26:29xiorenah that look promising thanks
20:26:32xiorenlooks*
20:26:56FromDiscord<Avatarfighter> finally I'm more knowledgeable than leorize πŸ˜›
20:27:27FromDiscord<Avatarfighter> new nimion coming through 😎
20:27:55Yardanicowow
20:28:01Yardanicomuch skill
20:28:04Yardanicovery nimion
20:28:05FromDiscord<Avatarfighter> ahaha
20:28:15FromDiscord<Avatarfighter> Watch out yard I'm coming for your spot πŸ˜›
20:28:35FromDiscord<patasuss> Never heard of nimion, gotta remember that
20:29:17FromDiscord<lqdev> i think disruptek came up with the name and some people are just using it because it sounds fun :)
20:29:43Yardanicoyeah
20:29:48bungwhen socket recv data contains 0 is there a problem?
20:30:04FromDiscord<Avatarfighter> what protocol ?
20:30:29bungmysql
20:30:38FromDiscord<nikki> how does choosenim interact with installed packages? if i choosenim a different nim, should i uninstall and reinstall everything? currently my only globally installed package is 'nimlsp' (and its dependencies)
20:30:40FromDiscord<Avatarfighter> is the socket tcp ?
20:30:52FromDiscord<nikki> (just switched from stable to devel so that i can see the new stuff in arc)
20:31:07FromDiscord<Avatarfighter> From my experience tcp sockets yield zero data when the connection on one end was closed bung
20:31:19disrupteknikki: i don't think choosenim changes your installation of nimble packages.
20:31:21Yardanico@nikki well, nim packages are source-only, so you don't need to change them
20:31:29Yardanicobut you might want to recompile nimlsp
20:31:33Yardanicoso it uses your new compiler's installation
20:31:39FromDiscord<dom96> @nikki nimlsp compiles statically against some compiler version AFAIK
20:31:50FromDiscord<nikki> yeah; i figured for nimlsp since it's for analyzing nim code, maybe it matters? idk
20:31:51Yardanicoyeah, it uses nimsuggest as a library which uses compiler as a library :)
20:31:55FromDiscord<dom96> (It would be nice if it called nimsuggest as a process instead... but alas)
20:32:34FromDiscord<dom96> yeah, in fact I would report this as a bug. Maybe PMunch can comment now if he's here, but otherwise we should discuss this in an issue tracker for nimlsp
20:33:00bung@Avatarfighter I intent to get data contains 0
20:34:17FromDiscord<Avatarfighter> Are you able to see if MySQL killed the socket connection ? Maybe the data you sent was incorrectly packed ?
20:35:25bungdata sent is correct, and I use withTimeout 30s , it alwasy timeout
20:35:36bungthe data like [5, 0, 0, 0, 0, 0, 0, 2, 116, 101, 115, 116]
20:36:20FromDiscord<Avatarfighter> I wont lie, this is tricky for me to think of what could be the issue because I don't have experience with MySQL 😐
20:36:35bungI need read first 7 bytes
20:38:29disrupteklqdev: you should really look at cps.
20:39:12FromDiscord<Avatarfighter> bung: Sorry I have no clue why your issue is happening, maybe someone else knows :L
20:42:34bungthat's ok, I just need write some code debuging it I think
20:45:06*TomDotTom joined #nim
20:55:24*luis quit (Quit: luis)
20:55:43*solitudesf quit (Ping timeout: 260 seconds)
20:55:45*luis joined #nim
20:58:54*luis quit (Client Quit)
20:59:11*luis joined #nim
21:08:29disruptekbung: sockets should recv 0 just fine.
21:09:21disruptekit's probably their favorite value, honestly.
21:09:35*TomDotTom quit (Ping timeout: 265 seconds)
21:10:12FromDiscord<nikki> does nimsuggest / nimlsp not complete local definitions for anyone else? eg: https://media.discordapp.net/attachments/371759389889003532/766045213151461407/unknown.png
21:10:25FromDiscord<nikki> (if i do this at the top-level, not in a `block:`, it completes `fooDef` fine)
21:11:27disruptekgood point. that seems like it should work, leorize.
21:12:50*FromDiscord quit (Remote host closed the connection)
21:13:05*FromDiscord joined #nim
21:13:49bungdisruptek ok, let me try just increment the timeout seconds
21:14:45disrupteksomewhere in the world there's a socket just aching for my scissors.
21:15:08disruptekprobably more than one.
21:18:17bungis that a joke? I dont understand
21:20:33*FromDiscord quit (Remote host closed the connection)
21:20:47*FromDiscord joined #nim
21:21:06bungam I doing right ? https://play.nim-lang.org/#ix=2AJx alwasy time out
21:21:14FromDiscord<Yardanico> for discord people: don't be confused, there's a temporary discord API issue right now, so webhooks can "lose" the nickname from irc like disruptek became "Captain Hook"
21:21:30disruptekhow'd you know about that, anyway?
21:21:35Yardanicoabout the issue?
21:21:43disruptekabout my curvey penis.
21:21:55FromDiscord<Yardanico> https://i.imgur.com/paAoeZp.png
21:22:08FromDiscord<Yardanico> https://i.imgur.com/kg5V2JO.png
21:22:22Yardanicowe are all captain hook now
21:23:01FromDiscord<patasuss> Really?
21:23:08Yardanicoyes, discord webhook api issue
21:23:13YardanicoI'm yardanico btw :)
21:23:24disruptekwe know and we don't care.
21:23:37Yardanicoi'm a bit uncomfortable sharing the same identity as you :P
21:23:40Yardanicofeels like schizophrenia
21:23:45Yardanicobut it can be good too
21:26:51*TomDotTom joined #nim
21:27:11FromDiscord<dom96> lol wtf is going on with Discord bridge
21:27:21PrestigeIt's burning
21:28:13FromDiscord<Yardanico> @dom96 it's actually not caused by the bridge :) check out <#456504845642235914>
21:28:25FromDiscord<Yardanico> it's an discord-side issue with webhooks
21:29:14FromDiscord<dom96> ahh, sorry, didn't mean to blame your software πŸ™‚
21:29:36FromDiscord<Yardanico> it's fine, I know ircord itself is very far from perfect :D i thought it was an issue in ircord at first too
21:29:56*noonien quit ()
21:30:07FromDiscord<dom96> pretty funny outage heh
21:35:04*natrys quit (Ping timeout: 246 seconds)
21:35:30*natrys joined #nim
21:35:39*natrys quit (Client Quit)
21:38:13*madpata quit (Ping timeout: 246 seconds)
21:48:20*Kiloneie quit (Quit: Leaving)
21:57:10FromDiscord<Avatarfighter> I hate java
21:57:31FromDiscord<Avatarfighter> Does anyone know what mode `KeyGenerator.getInstance("AES")` could be
21:58:21FromDiscord<Avatarfighter> nvm
21:58:34FromDiscord<Avatarfighter> thank goodness search engines are a thing
21:58:57*luis quit (Quit: luis)
21:59:13*luis joined #nim
22:02:46*luis quit (Client Quit)
22:10:57*ormiret quit (Ping timeout: 272 seconds)
22:12:09*ormiret joined #nim
22:13:03disruptekhow come you can only make omelettes with eggs? this is bullshit.
22:15:23FromDiscord<Avatarfighter> wym
22:15:51TomDotTomWhat were you hoping to make an omlette from if not eggs?
22:17:04FromDiscord<Avatarfighter> You dont use eggplants for your omelettes?
22:17:17FromDiscord<Avatarfighter> where else do your eggs grow?
22:17:54TomDotTomEtymology seems to indicate that it used to mean "flat like a plate", so you might be within your rights to start calling your pancakes omlettes
22:18:33*euantorano quit (Ping timeout: 272 seconds)
22:18:49FromDiscord<Avatarfighter> thank god
22:19:29FromDiscord<Avatarfighter> i've been wondering if my plate could be an omelette and you've convinced me
22:20:00TomDotTomGlad to help, let us know how it tastes, and it you have any teeth left after your meal.
22:20:12*euantorano joined #nim
22:20:40FromDiscord<Avatarfighter> I will after I fit my dentures
22:35:25FromDiscord<aooo> Does anyone here have any experience with using colors in the terminal for nim? I'm trying to use proc ansiBackgroundColorCode with a hex code, but it keeps giving me an error.
22:35:43*TomDotTom quit (Ping timeout: 258 seconds)
22:37:29Yardanicowell, it's easier to use styledEcho
22:37:46Yardanicosorry, styledWrite *
22:37:59Yardanicobut ansiBackgroundColorCode expects a "Color" type from "colors" module in stdlib
22:38:31*gmaggior quit (Quit: Leaving)
22:38:42FromDiscord<aooo> I just want to use a hex color code to set the background color. Is that possible?
22:39:13FromDiscord<Yardanico> yes
22:40:12FromDiscord<aooo> Could you please give me an example how I would do that?
22:40:42FromDiscord<Yardanico> yeah, wait a bit
22:41:06FromDiscord<aooo> sure
22:41:26FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2AJV
22:42:11FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2AJW
22:42:47FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2AJX
22:45:44FromDiscord<aooo> Awesome. Your first example worked. You were a huge help man. Why are the other two easier than the first?
22:46:03FromDiscord<Yardanico> because they're shorter to write :)
22:46:12FromDiscord<aooo> cool
22:46:21FromDiscord<aooo> Well thanks again man
22:48:34*NimBot joined #nim
22:49:24*luis joined #nim
22:51:43FromDiscord<aooo> What's weird is how your first example worked as intended, but the other two just gave me a regular echo back without any color to it.
22:51:59FromDiscord<aooo> wait. nevermind
22:52:28FromDiscord<aooo> nevermind on that nevermind. It didn't do anything other than echo back.
22:53:38*madpata joined #nim
22:58:21disruptekyer blowin' my mind right now.
22:59:30disruptekhow can it be that vanilla oreos are a thing? this seems like double-sided duct tape or something similarly blasphemous.
23:00:05Yardanicoyou reminded me of
23:00:05Yardanicohttps://www.youtube.com/watch?v=XD7QgZX6jcI
23:04:29FromDiscord<aooo> @Yardanico Why does your first example change the prompt color and why does it give a blank space for the first line?
23:07:09FromDiscord<Yardanico> because you also need to disable the ANSI code :)
23:07:23FromDiscord<Yardanico> change that line to
23:07:26FromDiscord<Yardanico> echo ansiBackgroundColorCode(Color(0x00FF00)) & "hello!" & ansiResetCode
23:07:43FromDiscord<Yardanico> https://nim-lang.org/docs/terminal.html#ansiResetCode
23:09:03FromDiscord<aooo> Also, why is echo necessary? Is that why it gives an extra carriage return?
23:09:24FromDiscord<Yardanico> it only gives one \n
23:09:32FromDiscord<Yardanico> if you don't want \n at all, you can use stdout.write instead
23:09:40FromDiscord<aooo> Thank you.
23:11:06FromDiscord<aooo> Is it possible to change the background color without echo or stdout.write? Rosettacode didn't use that. https://rosettacode.org/wiki/Terminal_control/Coloured_text#Nim
23:12:26FromDiscord<Yardanico> that code example uses stdout.write internally
23:12:39FromDiscord<Yardanico> setForegroundColor and similar procs on linux just output ANSI colour codes
23:13:02FromDiscord<Yardanico> see at the bottom "f.write" https://media.discordapp.net/attachments/371759389889003532/766076120725717032/unknown.png
23:13:18FromDiscord<Yardanico> so each of these setForegroundColor/setBackground colour calls stdout.write anyway
23:13:44FromDiscord<nikki> kind of wondering if i should just never do `type T = ref object ...` in code and just always write `ref T` everywhere (including like `(ref T)(...)` for construction) so that it's clear where refs are in the code
23:14:00FromDiscord<Yardanico> @nikki it's cleaner to use "ref object" IMO
23:14:17FromDiscord<Yardanico> but if you use "ref"s only a few times and in all other places don't need it, then specifying ref explicitly might be better I guess
23:14:22FromDiscord<Yardanico> but these use cases would probably be very rare
23:14:32FromDiscord<Yardanico> since you can just use "var" if you want to pass a mutable object for example
23:15:02FromDiscord<nikki> yeah hmm. i've been working on a game engine in C++, and entities are mostly in object pools, but i do have something like ref objects with shared_ptr for 'resources' so that eg. images are kept alive in memory till the last reference to them dies (and they're looked up in a cache by path)
23:15:11FromDiscord<Clyybber> if you use type T = ref object you can also get the non-ref object by doing T[]
23:15:45*vicfred joined #nim
23:16:09FromDiscord<nikki> i'm thinking that ref stuff should mostly happen for resources or for i/o rate callbacks (eg. buttons / ui) and not for actual game data processing which should be value type temporaries kinda stuff but all ultimately held in components in pools
23:19:43*nature quit (Ping timeout: 246 seconds)
23:22:12FromDiscord<nikki> the flow analysis stuff for checking moves etc. is really cool, vs. how you don't get help with that in C++ (and you get ... maybe too much help .. in rust)
23:22:23FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/766078480550068274/unknown.png
23:22:25FromDiscord<nikki> thanks, nim!
23:23:06*a_chou joined #nim
23:23:07FromDiscord<Yardanico> 😍
23:24:25FromDiscord<nikki> wonder what the rationale was for the postfix `*` for declaring something as public / exported -- vs. a keyword prefix like `pub` or something -- given that everywhere else nim seems to lean towards keywords vs. punctuation πŸ€”
23:26:28FromDiscord<Yardanico> oberon
23:26:30FromDiscord<Yardanico> (edit)
23:27:03FromDiscord<Yardanico> https://en.wikipedia.org/wiki/Oberon_(programming_language)#Object_orientation see oberon code
23:27:04*xace quit (Ping timeout: 246 seconds)
23:27:15FromDiscord<Yardanico> and see how * is used there :)
23:28:59*xace joined #nim
23:29:22*a_chou quit (Remote host closed the connection)
23:29:46FromDiscord<Yardanico> and I think that having a keyword would've been too verbose
23:33:22*bung quit (Ping timeout: 246 seconds)
23:41:00FromDiscord<nikki> haha nice. yeah i've used oberon (the OS) in a VM before to explore around
23:41:21FromDiscord<nikki> yeah maybe it'd be too verbose indeed, esp. since a lot of stuff tends to be exported πŸ€”
23:41:21disrupteki've used it to frighten children.
23:41:48Yardanicoare they tasty?
23:41:56FromDiscord<nikki> it's p nice tbh. also fun to play around with lisp machines and plan9
23:41:58disruptekdepends upon how they are prepared.
23:43:02Yardanicodo you have any favourite recipes?
23:43:09Yardanicoasking for a friend
23:55:21disrupteki make these black and white sandwiches i call "oreos."
23:56:03disruptekin the eternal words of huey lewis, they are rich as cream,
23:56:11disruptekstronger and harder than a bad girl's dream.
23:56:17disruptekyou feel me, bruh?
23:56:26*luis_ joined #nim
23:56:37Yardanicodisruptek: πŸ‘πŸ‘πŸ‘
23:56:44*luis quit (Ping timeout: 246 seconds)
23:56:45*luis_ is now known as luis