<< 12-10-2020 >>

00:00:03leorize[m]1so the entry point ends up being whatever file you opened with the editor
00:00:05FromDiscord<anto> what do you use for your threads? are you using threadpool?
00:00:26leorize[m]1@anto I use regular threads
00:00:34FromDiscord<anto> ok
00:02:33FromDiscord<Clyybber> leorize: No, it will use the forward decl's sym
00:03:25leorize[m]1@Clyybber it does allocate a new symbol, then it search the symbol table for the forward decl's sym
00:04:01leorize[m]1I have to add an another hook to grab the info after the search, it's a pain :P
00:05:15FromDiscord<Avatarfighter> What would be the best way of verifying the integrity of memory during runtime?
00:05:29FromDiscord<Avatarfighter> ^ assuming that is possible
00:05:41disruptekthe what?
00:05:43leorize[m]1you can use a randomly generated canary
00:06:23FromDiscord<Avatarfighter> wow
00:06:26leorize[m]1if the canary is corrupted then maybe there is a chance of corruption
00:06:30FromDiscord<Avatarfighter> leorize you are a knowledge powerhouse
00:06:32*abm quit (Read error: Connection reset by peer)
00:07:10FromDiscord<Avatarfighter> I was trying to see if I could something similar to ARM PAC but idk
00:07:23disruptekjust keep the memory such that it always hashes to the same value.
00:08:33FromDiscord<Avatarfighter> I'm trying to make my current program difficult for someone to crack it
00:08:36leorize[m]1well you gotta define your security model
00:08:44leorize[m]1it's not feasible to defend against everything
00:08:55FromDiscord<Avatarfighter> i know
00:09:01FromDiscord<Avatarfighter> I'm trying to protect only a single proc
00:09:02disruptekjust threaten them.
00:09:08FromDiscord<Avatarfighter> I deadass will
00:09:21FromDiscord<Avatarfighter> in the console output it'll say "crack if dumb"
00:12:45*noonien quit (Quit: Connection closed for inactivity)
00:13:10leorize[m]1I'd say you don't have to go overkill on security
00:13:31disrupteki'd say you do.
00:13:40disrupteki've killed four times. it's not overkill.
00:13:54disruptekmy software remains secure.
00:13:55leorize[m]1just enough without needing special drivers to protect your software
00:16:21FromDiscord<Avatarfighter> bouta write a ring0 driver to protect my process
00:16:36disruptekringo was the ugly one, right?
00:16:52FromDiscord<Avatarfighter> 😐
00:17:02FromDiscord<Avatarfighter> when are you streaming disruptek smh
00:17:26disruptekask musk, the scumbag.
00:18:04FromDiscord<Avatarfighter> 😐
00:18:42leorize[m]1@Avatarfighter lol what is this proc that you wanna protect?
00:19:42FromDiscord<Avatarfighter> I have a system where the dlls that my program loads verify the authenticity of the main program and vice versa and I'm trying to protect the procs that authenticate
00:20:21disruptekyou're fucked, son; killing in the name of.
00:20:36FromDiscord<Avatarfighter> disruptek I am going to slap you
00:20:53FromDiscord<Avatarfighter> lmao
00:22:41*luis joined #nim
00:25:55leorize[m]1@Avatarfighter you can never win in that fight :p
00:26:32FromDiscord<Avatarfighter> I know but as long as I can stop a 12yr old with a cracked version of IDA Pro I’ll be happy
00:26:46FromDiscord<Avatarfighter> im willing to write a vm that then runs my program 😐
00:27:41leorize[m]1here's the thing, you can never stop a 12yr old with ida pro
00:28:03leorize[m]1a 12yr old has infinitely more time than you do, so you're pretty much bound to fail
00:28:25disruptekit sounds like fighter is only 14.
00:29:47leorize[m]1@Avatarfighter google did exactly that for recaptcha, then some rando on the internet reverse engineered the entire VM as well as the bytecode of it :p
00:30:21disruptekfighter: ask yourself this:
00:30:33disruptekwhat does it mean that i smell like armpit? someone else's armpit.
00:30:50FromDiscord<Avatarfighter> tbh recaptcha was so easy to bypass, the python discord just used google speech to text to solve the recaptcha audio challenges lol
00:31:18disruptekdon't be rude.
00:31:26leorize[m]1that really wasn't the point :p also they patched that up
00:31:27FromDiscord<Avatarfighter> my bad you’re write
00:31:29*luis quit (Read error: Connection reset by peer)
00:31:36FromDiscord<Avatarfighter> Nah that still works 😛
00:31:45*luis joined #nim
00:31:59FromDiscord<Avatarfighter> ok hear me out guys: i have the same amount of time on my hands as a 12 yr old
00:32:13disruptek12 years is a long time. i am looking for 8 year olds now.
00:32:24FromDiscord<Avatarfighter> 😳
00:32:32disruptektastes change, what can i say.
00:32:52FromDiscord<Inam> ...
00:33:57leorize[m]1@Avatarfighter well what's your security model and what are you trying to achieve?
00:34:22leorize[m]1note that local verification can always be bypassed simply by patching out the verification itself
00:34:30FromDiscord<Avatarfighter> yes
00:34:58FromDiscord<Avatarfighter> My ultimate goal is to have my program last more than a day uncracked
00:35:32leorize[m]1just license denuvo and use it
00:35:37leorize[m]1last for 2 days tops
00:35:50FromDiscord<Avatarfighter> lmaooo
00:35:58FromDiscord<Avatarfighter> this is actually so sad
00:36:15disruptekfighter: i'm a sailor but i don't own a boat.
00:36:19FromDiscord<Avatarfighter> i guess its vm time 😔
00:36:24disrupteki'm a pilot but i don't own a plane.
00:36:26FromDiscord<Avatarfighter> wanna help me build the boat disruptek
00:38:37FromDiscord<Avatarfighter> what if i load my dlls from memory that will make it more difficult to crack
00:39:39leorize[m]1nah
00:39:51FromDiscord<Avatarfighter> well just a bit
00:40:22leorize[m]1not at all lol
00:40:30FromDiscord<Avatarfighter> Tiny bit
00:41:03FromDiscord<Avatarfighter> None of this negativity leorize we’re strategizing against 12 yr olds r’
00:41:07FromDiscord<Avatarfighter> (edit) 'r’' => 'rn'
00:42:14FromDiscord<Avatarfighter> Im pretty sure loading a dll from memory will stump at least 2 people who have never heard of that
00:42:25leorize[m]1here's how you prevent your software from being cracked for more than a day: release the no-op version for a day, then update to the working one the day after
00:42:47FromDiscord<Avatarfighter> smart
00:42:59leorize[m]1your software can't be cracked if there's no software :p
00:43:13FromDiscord<Elegant Beef> Or release like stadia, and just stream it to users 😛
00:43:26FromDiscord<Avatarfighter> wait thats huge
00:43:46FromDiscord<Avatarfighter> YOURE SO SMART @Elegant Beef
00:43:49FromDiscord<Elegant Beef> Fuck you
00:43:51disruptekif i had a nickel.
00:43:54FromDiscord<Elegant Beef> No you dont fucking get to do that shit
00:44:01FromDiscord<Avatarfighter> wait thats so good
00:44:02FromDiscord<Inam> monkaS
00:44:06FromDiscord<Elegant Beef> Can we ban avatar for even jokingly suggesting to do that
00:44:13FromDiscord<Avatarfighter> im not even joking
00:44:21FromDiscord<Elegant Beef> I want to ban you from existance
00:44:26FromDiscord<Inam> :p
00:44:32FromDiscord<Elegant Beef> The joke was it's a terrible idea
00:44:37FromDiscord<Elegant Beef> Not something you should follow
00:44:38FromDiscord<Avatarfighter> Im just not going to give users the actual software
00:45:14FromDiscord<Inam> h-how
00:45:16FromDiscord<Avatarfighter> im putting your name in the credits @Elegant Beef
00:45:17FromDiscord<Inam> what is this software
00:45:23FromDiscord<Avatarfighter> its a shoebot
00:45:23FromDiscord<Inam> server costs 🤔
00:45:26FromDiscord<Elegant Beef> I hate you avatar
00:45:50FromDiscord<Inam> like...to purchase shoes?
00:45:54FromDiscord<Avatarfighter> yes lmao
00:46:16FromDiscord<Avatarfighter> some of the more popular bot software sell for just a bit over 3k$
00:46:28disruptekshoeboot, you mean.
00:46:30FromDiscord<Inam> ok but
00:46:32FromDiscord<Avatarfighter> others follow a cheaper subscription model of 500$/month
00:46:32FromDiscord<Inam> stream it?
00:46:39FromDiscord<Avatarfighter> not stream it per sau
00:46:42FromDiscord<Avatarfighter> (edit) 'sau' => 'say'
00:46:56disruptekthe term is `per se`
00:47:07FromDiscord<Avatarfighter> Pur sae
00:47:12FromDiscord<Inam> frickin latin.
00:47:27FromDiscord<Avatarfighter> je déteste l’anglais :/
00:47:30disruptekit's easy to remember because it sounds like, "cocksucker."
00:48:02FromDiscord<Avatarfighter> Thanks to elegant beef and leorize i wont be giving users the software just a portal to access it lol
00:48:25FromDiscord<Avatarfighter> doesnt matter if you crack the portal if it doesn’t authenticate 😎
00:48:32FromDiscord<Inam> > it's easy to remember because it sounds like, "cocksucker."↵how.
00:48:57FromDiscord<Avatarfighter> wym how
00:49:03FromDiscord<Avatarfighter> how are you pronouncing it
00:49:10FromDiscord<Inam> like...percy
00:49:25FromDiscord<Avatarfighter> hm
00:49:27disrupteksee? i just heard "cocksucker."
00:49:30FromDiscord<Inam> or like you wrote it
00:49:31FromDiscord<Inam> per say
00:49:32FromDiscord<Avatarfighter> yeah
00:49:33disruptekwhat did you hear?
00:49:42FromDiscord<Avatarfighter> But when you pronounce it out loud
00:49:55FromDiscord<Avatarfighter> It somewhat sounds like "cocksucker"
00:50:13FromDiscord<Inam> ...sure
00:50:36FromDiscord<Avatarfighter> leorize how do you pronounce it ?
00:55:58*luis quit (Read error: Connection reset by peer)
00:56:33disrupteklee-ore-eyes
00:57:08FromDiscord<Avatarfighter> le or is
00:57:16FromDiscord<Avatarfighter> wow thanks @Elegant Beef
00:57:33FromDiscord<Elegant Beef> No!
00:57:38FromDiscord<Avatarfighter> nono
00:57:51FromDiscord<Avatarfighter> your funny idea was a good base for what I thought of
00:57:59FromDiscord<Elegant Beef> I do not like this form of DRM
00:58:06FromDiscord<Elegant Beef> It's an affront to freedom, i will find you and ban you!
00:59:23FromDiscord<Avatarfighter> ill just make my thing a lifetime subscription then you don't technically own what you paid for
01:00:00disruptekthat's what they say about love on the hoof.
01:00:44FromDiscord<Avatarfighter> disruptek have you ever played space station 13?
01:00:57disrupteklet's just say that campbell's makes more than soup.
01:01:24TomDotTomAvatar: "Lifetime subscription" makes as much sense as "Mandatory donation"
01:01:41FromDiscord<Avatarfighter> yes i am aware
01:01:59FromDiscord<Elegant Beef> Hey elementary OS' "pay what you want" most likely has never cause anyone to think it's non-free 😄
01:05:32*luis joined #nim
01:13:21*a_chou joined #nim
01:28:13*Tanger joined #nim
01:29:00FromDiscord<Clyybber> @Avatarfighter honk
01:29:18FromDiscord<Avatarfighter> @Clyybber honk
01:29:27FromDiscord<Clyybber> Honkmother
01:29:51*luis quit (Ping timeout: 272 seconds)
01:29:59*luis joined #nim
01:30:06FromDiscord<anto> leorize: no idea if you're still here, but i figured out my thread problem. turns out i forgot about the for loop i had in my infinite loop, so it took however long the seq was before it realized that the thread was supposed to have stopped.
01:30:52FromDiscord<Clyybber> @Avatarfighter did u play ss13?
01:31:07FromDiscord<Avatarfighter> Yessir proud goon 🙂
01:31:34FromDiscord<Clyybber> nice, eris here
01:35:02*a_chou quit (Ping timeout: 260 seconds)
01:36:27*apahl quit (Ping timeout: 240 seconds)
01:38:30*apahl joined #nim
01:42:09*TomDotTom quit (Ping timeout: 265 seconds)
02:00:42FromDiscord<Avatarfighter> Ever played on goon @Clyybber ?
02:08:09*a_chou joined #nim
02:09:20*a_chou quit (Remote host closed the connection)
02:31:12leorize[m]1disruptek: feel free to pull this and give it a try: https://github.com/nim-lang/Nim/pull/15555
02:31:13disbotsuggest: try to find the implementation of a symbol when def is used
02:32:47PrestigeI'd love that to be fixed
02:40:10*unihernandez22 joined #nim
02:40:22unihernandez22Hi
02:41:36Prestigesup unihernandez22
02:42:20unihernandez22https://pastebin.com/gfx5cy57
02:42:30unihernandez22Anyone knows why I get that error?
02:42:50unihernandez22does anyone know*
02:43:14leorize[m]1I'm very impressed with pastebin's highlighter :P
02:43:32unihernandez22Yeah hahaha
02:44:05leorize[m]1the issue is simple, `first` is not exported
02:44:27*muffindrake quit (Ping timeout: 240 seconds)
02:44:32leorize[m]1(we may want to hide unexported identifiers from docs in the future...)
02:45:23leorize[m]1the only way to go through an ordered set is via an iterator, unfortunately
02:46:11unihernandez22Oh, it should be exported
02:46:18unihernandez22Thx
02:46:23FromDiscord<Avatarfighter> I opened the pastebin expecting perfect highlighting
02:46:44FromDiscord<Avatarfighter> that was wayyy too funny
02:46:58Prestige^ same lol
02:47:03*muffindrake joined #nim
02:47:09PrestigeWhy not use play.nim-lang.org?
02:52:09vicfredis there any balanced tree implemented in the standard library?
02:52:28vicfredI thought orderedset would implement one but it doesnt seem like it does
02:52:37leorize[m]1we have a btree implementation in fusion
02:57:16*luis quit (Read error: Connection reset by peer)
02:58:00FromDiscord<Avatarfighter> https://github.com/nim-lang/fusion
02:58:07FromDiscord<Avatarfighter> just in case you don't know what fusion is
03:04:39*luis joined #nim
03:07:14vicfredty
03:19:32*luis quit (Quit: luis)
03:19:42*luis joined #nim
03:39:24*krux02 quit (Remote host closed the connection)
03:58:33*luis quit (Quit: luis)
03:58:41*luis joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:22:53FromDiscord<PizzaFox> does gitignore have a way to do any kind of logic so i can ignore compiled nim files↵ex. block `./tests/a` if `./tests/a.nim` present
04:23:33FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2As6
04:25:56*luis quit (Quit: luis)
04:26:07*luis joined #nim
04:26:55*unihernandez22 quit (Quit: Leaving)
04:29:24FromDiscord<PizzaFox> also does nim have a pragma or nimdoc standard for marking a proc as private (ex. javadocs `@private`)
04:32:49*muffindrake quit (Quit: muffindrake)
04:44:18TangerPizzaFox: I don't believe so, but procs have to be explicitely exported with `export X` or the asterisk (ie proc MyFun*())
04:44:53FromDiscord<PizzaFox> yeah but i need to export my proc
04:45:07FromDiscord<PizzaFox> it formats hex values for testament result comparisons
04:45:12FromDiscord<Rika> I don't understand, how can a proc be private yet exported
04:45:23FromDiscord<PizzaFox> private as in only my module should use it
04:45:31FromDiscord<Rika> So protected
04:45:34FromDiscord<PizzaFox> yes
04:45:53FromDiscord<Rika> No such construct in nim AFAIK
04:46:00FromDiscord<PizzaFox> this is so sad
04:46:16*bung joined #nim
04:47:01FromDiscord<Rika> I also wish it had such construct but if you think a bit more about it there is no such thing as a package to nim
04:47:04FromDiscord<impbox> hmm protected means something very different which doesn't make much sense in nim, private is the default in nim
04:47:06FromDiscord<Rika> Only to nim+nimble
04:47:25FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Asc
04:47:29FromDiscord<impbox> @PizzaFox what problem are you trying to solve?
04:47:45FromDiscord<PizzaFox> i have a proc that my tests use for formatting output
04:47:54FromDiscord<PizzaFox> my tests should be the only files that can use it
04:48:00FromDiscord<impbox> put that proc in the tests?
04:48:13FromDiscord<PizzaFox> like in the tests dir
04:48:31FromDiscord<PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2Asc' => 'https://play.nim-lang.org/#ix=2Asd'
04:48:31*luis quit (Quit: luis)
04:48:42FromDiscord<Rika> Well your tests dir doesn't have to be purely tests
04:48:42*luis joined #nim
04:48:53FromDiscord<PizzaFox> didnt want to deal with testament running a util file as a test
04:49:19bungdoes nimble support optional dependency declaration?
04:49:33FromDiscord<Rika> Yes using a when statement
04:49:37FromDiscord<Rika> Oh
04:49:38FromDiscord<Rika> Nimble
04:49:39FromDiscord<Rika> No
04:51:41bungah, then I can only check compile flags and declared()
04:53:33bungwish it could supported like ruby,py has group of dependencies
04:59:48*luis quit (Quit: luis)
04:59:53*solitudesf joined #nim
05:00:05*luis joined #nim
05:04:55FromDiscord<PizzaFox> how can i do math notation in nim documentation comments
05:06:56FromDiscord<Rika> what do you mean
05:08:44*waleee-cl quit (Quit: Connection closed for inactivity)
05:14:25*luis quit (Read error: Connection reset by peer)
05:15:13FromDiscord<PizzaFox> > Any comments which are preceded by a double-hash (##), are interpreted as documentation. Comments are parsed as RST
05:16:13FromDiscord<PizzaFox> https://docutils.sourceforge.io/docs/ref/rst/directives.html#math
05:16:25FromDiscord<PizzaFox> > Error: invalid directive: 'math'
05:17:17FromDiscord<PizzaFox> what gives
05:19:12FromDiscord<Rika> dont think its supported then
05:19:31FromDiscord<PizzaFox> L
05:22:02leorize[m]1@PizzaFox so here's a quick hack if you wanna access private functions: `include salsa20`
05:22:23FromDiscord<PizzaFox> >:(
05:22:30FromDiscord<PizzaFox> i am content with my current solution
05:35:42*luis joined #nim
05:44:46*luis quit (Quit: luis)
05:47:23*Vladar joined #nim
05:51:58*narimiran joined #nim
05:56:04*Cthalupa quit (Ping timeout: 256 seconds)
05:58:57*Cthalupa joined #nim
06:21:49FromDiscord<PizzaFox> these values can all be expressed as uint32s, but compiler is mad and says they are int64s. can i avoid manually doing `num.uint32` on each one
06:21:57FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Ast
06:22:18FromDiscord<PizzaFox> https://zws.im/‍‍‍‍‍‌‌‌‌‍‍‍‍‍‌‍
06:22:27FromDiscord<Elegant Beef> just do 'u32 on the first
06:22:51FromDiscord<PizzaFox> doesnt work
06:23:01FromDiscord<PizzaFox> not for all of them at least
06:23:25FromDiscord<PizzaFox> https://zws.im/‍‍‍‍‍‌‌‌‌‍‍‍‍‍‍‌
06:23:50*narimiran quit (Ping timeout: 272 seconds)
06:24:37*narimiran joined #nim
06:25:58FromDiscord<Rika> Does it run
06:26:23FromDiscord<PizzaFox> no
06:26:30FromDiscord<PizzaFox> > ```↵> Error: type mismatch: got <int64> but expected 'uint32'↵> ```
06:26:54FromDiscord<PizzaFox> in here we love typesafety https://zws.im/‍‍‍‍‍‌‌‌‍‌‌‌‌‌‌‌
06:27:11FromDiscord<Rika> I assume it's because of the highest bit being set
06:27:17FromDiscord<Rika> Which is weird
06:27:42*arecacea1 quit (Remote host closed the connection)
06:27:52FromDiscord<PizzaFox> is it one of those things where you can have a giant number (bigger than `2^32 - 1`, `uint32` max) represented as like `2^99`
06:28:05FromDiscord<PizzaFox> and nim is being stupid and just checking if num > max
06:28:06FromDiscord<PizzaFox> (edit) 'max' => 'max`'
06:28:08FromDiscord<PizzaFox> (edit) 'num' => '`num'
06:28:10*arecacea1 joined #nim
06:28:19FromDiscord<Elegant Beef> Yea nim's int lits are issue causing
06:28:57*luis joined #nim
06:29:17FromDiscord<PizzaFox> figured as much
06:30:13*tsujp quit (Ping timeout: 265 seconds)
06:30:42FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Asu
06:31:38FromDiscord<Rika> well they dont use integers
06:31:39FromDiscord<PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2Asu' => 'https://play.nim-lang.org/#ix=2Asv'
06:31:46FromDiscord<PizzaFox> its the same kind of issue
06:31:52FromDiscord<Rika> not exactly
06:31:55FromDiscord<PizzaFox> naively checking if something is larger than a value
06:32:05FromDiscord<PizzaFox> and not considering the underlying system used to represent the value
06:32:20FromDiscord<Rika> i dont think so
06:32:23FromDiscord<PizzaFox> how
06:32:31FromDiscord<Elegant Beef> !eval var y: uint32 = 0xffffffff
06:32:33NimBotCompile failed: /usercode/in.nim(1, 17) Error: type mismatch: got <int64> but expected 'uint32'
06:32:46FromDiscord<Rika> because that fails not-silently
06:32:51*tsujp joined #nim
06:33:18FromDiscord<Elegant Beef> Iirc the issue is that it defaults to the signed int for checking, but dont recall
06:33:23FromDiscord<Elegant Beef> (edit) 'Iirc the issue is that it defaults to the signed int for checking, but dont recall ... ' => 'Iirc the issue is that it defaults to the signed int for checking, but dont recall100% 😄'
06:33:55supakeen2^32 - 1 is a positive number that doesn't fit in an int32.
06:34:06FromDiscord<Rika> but it fits in a uint32
06:34:21supakeenBut the literal doesn't know that it's supposed to be unsigned :)
06:34:56FromDiscord<Rika> isnt that the type checker's job?
06:35:03FromDiscord<Rika> or w/e its called
06:35:53supakeenI'm just guessing here but unsigned ints behave differently in overflow as well.
06:37:48FromDiscord<Rika> wdym?
06:37:58FromDiscord<Rika> whys that relevant if it doesnt overflow
06:38:14supakeenIt might not be able to tell before hand if it does.
06:38:27supakeenBut I should shut up and not assume / speculate :)
06:38:59narimiran!eval var y = 0xffffffff'u32
06:39:02NimBot<no output>
06:39:24narimiran@Elegant Beef ^
06:39:37FromDiscord<Elegant Beef> Yea narimiran i realize that, but it didnt work the the entire array that pizza posted
06:40:12narimiranwhich array?
06:40:41narimiranaha, now i see
06:40:56FromDiscord<Rika> !eval var y: uint32 = 0x7fffffff
06:40:58FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2AsC
06:40:58NimBot<no output>
06:41:21FromDiscord<Rika> !eval var y: uint32 = 0x80000000
06:41:23NimBotCompile failed: /usercode/in.nim(1, 17) Error: type mismatch: got <int64> but expected 'uint32'
06:41:29FromDiscord<Elegant Beef> !eval let a = 0xafffffff
06:41:31NimBot<no output>
06:42:07FromDiscord<Elegant Beef> Aw shit i'm dumb 😄
06:42:43*luis quit (Ping timeout: 272 seconds)
06:43:23FromDiscord<Elegant Beef> Yea rika after you got above the `int32.high` the literal fails without forcing it to be taken as a u32
06:45:59*luis joined #nim
06:47:27*PMunch joined #nim
06:49:39FromDiscord<Theodore> h- h- hhhelp
06:50:06FromDiscord<Theodore> does nim have any Neural net stuffios
06:52:19FromDiscord<Elegant Beef> Got this https://github.com/sinkingsugar/nimtorch, but i dont do anything like that so not a clue what is really required 😄
06:52:29FromDiscord<Elegant Beef> I just went to the nimble directory and searched "neural"
06:52:42FromDiscord<Rika> maybe check in <#755344160592101389> if they have some sort of list or smth
06:52:53FromDiscord<Rika> https://github.com/nim-lang/needed-libraries/issues/77
06:52:54disbot[Meta] Are we scientists yet?
06:54:59FromDiscord<Elegant Beef> Nah, i'm barely a programmer
06:55:44FromDiscord<Elegant Beef> But hey, atleast i've published constructor to nimble 😄
06:56:07FromDiscord<Rika> ivent published anything to nimble, mainly because i kinda cant be assed to
06:56:21FromDiscord<Elegant Beef> I mean it's super easy
06:56:41FromDiscord<Rika> super easy != effortless
06:57:42FromDiscord<Elegant Beef> The best part was forgetting that json doesnt allow trailing commas https://media.discordapp.net/attachments/371759389889003532/765105896799338496/unknown.png
06:58:53*astronavt quit (Read error: Connection reset by peer)
06:59:08FromDiscord<Elegant Beef> My latest version even has default values, it's like actually useful
07:09:18FromDiscord<Theodore> my brain fries itself before i can get a reasonable amount of neural network code done in rust
07:11:29FromDiscord<Theodore> Numpy equiv in Nim?
07:11:40FromDiscord<Theodore> if there is ima convert to Nim ngl.
07:12:36bungwhy I can't raise AssertionDefect ?
07:12:49bung@Theodore check arraymancer
07:12:52FromDiscord<Elegant Beef> Arraymancer would probably be in your want
07:12:52FromDiscord<Recruit_main707> There are ways to use numpy from python, but no 1:1 equivalent afaik
07:15:15bung@Theodore also check https://github.com/SciNim
07:16:35FromDiscord<Theodore> hahaha
07:16:38FromDiscord<Theodore> Nim gang
07:17:00FromDiscord<Theodore> `Nim's memory management is deterministic and customizable with destructors and move semantics, inspired by C++ and Rust. It is well-suited for embedded, hard-realtime systems.` how exactly is it inspired by rust
07:19:06FromDiscord<Theodore> im going to see if Nim solves my problems with Rust + NN
07:29:27*luis quit (Quit: luis)
07:31:23*opal quit (Ping timeout: 240 seconds)
07:34:22*opal joined #nim
07:39:43*luis joined #nim
07:40:12leorize[m]1checkout the #science channel, that's where most of the sciency people are :)
07:42:06FromDiscord<Elegant Beef> Leroize it's ok you can call them nerds
07:42:38FromDiscord<Rika> LOL
08:02:36PMunchPrestige, you around
08:09:53FromDiscord<Elegant Beef> I can pretend to be him if you need
08:10:32PMunchHaha, thanks :P But I had some questions about nimdow
08:10:33FromDiscord<Elegant Beef> "I've spent all this time working on my WM then learned that there are already premade WMs like i3wm, awesome, bspwm, the list goes on"
08:10:52PMunchHaha :P
08:11:26PMunchPretty sure he knew about other WMs before he made nimdow
08:13:14FromDiscord<Rika> he said he can try
08:13:22FromDiscord<Rika> he didnt say it would be convincing
08:14:17PMunchConvincing?
08:14:33FromDiscord<Elegant Beef> Pmunch you're a slueth and a half, it wasnt really prestige
08:14:59FromDiscord<Rika> sleuth its sleuth
08:15:30FromDiscord<Elegant Beef> Dont make me spell properly, it's the only word i can spell properly
08:17:21FromDiscord<Rika> at least you can spell
08:17:26FromDiscord<Rika> sometimes
08:19:47FromDiscord<Elegant Beef> Sometimes is easy to spell
08:20:23PMunchs-o-m-e-t-i-m-e-s
08:20:46FromDiscord<Rika> can you pronounce it tho
08:21:31PMunch\/ˈsʌmtaɪmz/
08:21:47PMunchˈsʌmtaɪmz
08:35:06*luis quit (Quit: luis)
08:35:20*luis joined #nim
08:36:12FromDiscord<lqdev> somm thymes
08:43:28FromDiscord<Elegant Beef> sum time s
08:48:50*NimBot joined #nim
08:54:29*lritter joined #nim
09:08:19*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:16:41FromDiscord<ache of head> can you pronounce "somm" and "thymes" though? 🤔
09:16:48FromDiscord<ache of head> or "sum" or "time"?
09:16:57FromDiscord<ache of head> (edit) '"time"?' => '"time?"'
09:27:00*Tanger quit (Quit: Leaving)
09:29:05*luis quit (Quit: luis)
09:36:31*luis joined #nim
09:43:18*lum quit ()
09:51:43*lum joined #nim
10:08:27*natrys joined #nim
10:15:55*luis quit (Ping timeout: 240 seconds)
10:16:41*luis joined #nim
10:24:25*luis quit (Read error: Connection reset by peer)
10:24:37*luis joined #nim
10:31:32FromDiscord<PizzaFox> is there a way to define a type for a number `num` where↵```nim↵assert num mod 4 == 0↵```
10:31:43FromDiscord<PizzaFox> (edit) 'a number' => 'an integer '
10:34:01*luis quit (Read error: Connection reset by peer)
10:39:17FromDiscord<haxscramper> You mean that only valid values are `0, 4, 8 ...` and so on? No, I don't think this is possible without just writing custom object and providing operator overloads. There is a `range[high, low]` but it only ensures that value is within certain bound
10:46:42*agent0x00 quit (Quit: WeeChat 1.9.1)
10:47:46FromDiscord<PizzaFox> ok new question
10:47:58FromDiscord<PizzaFox> how do i convert a little endian u32 to 4 u8s
10:48:16Yardanicowith bit shifts? :P
10:48:21FromDiscord<PizzaFox> gib code
10:48:35FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Atm
10:48:41FromDiscord<PizzaFox> my brain is soup and i cant think straight though
10:48:52FromDiscord<PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2Atm' => 'https://play.nim-lang.org/#ix=2Atn'
10:49:22FromDiscord<himu> I have been writing Nim without manually implementing memory allocation and de-allocation. I heard that Nim also allows doing down to the pointers. Best place to get started with pointers and memory in Nim?
10:49:31*lum quit (Quit: WeeChat 2.8)
10:49:47*lum joined #nim
10:50:00Yardanicohttp://zevv.nl/nim-memory/ might help somewhat
11:00:34*lum quit (Quit: WeeChat 2.8)
11:26:27*krux02 joined #nim
11:27:07*luis joined #nim
11:37:11*abm joined #nim
11:41:00*Cthalupa quit (Ping timeout: 256 seconds)
11:41:28FromDiscord<mratsim> @PizzaFox https://github.com/status-im/nim-stew/blob/master/stew/endians2.nim#L172-L177
11:41:38*luis quit (Read error: Connection reset by peer)
11:41:56FromDiscord<PizzaFox> cool
11:42:50*dawsoncreek joined #nim
11:42:57FromDiscord<mratsim> @Theodore I wrote Arraymancer in Nim because when I tried to do science stuff in Rust it was super painful.
11:43:00*Cthalupa joined #nim
11:43:34dawsoncreekHello, new to Nim, caught my eye lately
11:45:38Yardanicohi
11:48:03*dawsoncreek quit (Remote host closed the connection)
11:48:49*dawsoncreek joined #nim
11:49:04*dawsoncreek quit (Remote host closed the connection)
11:56:15FromDiscord<Clyybber> @Avatarfighter yeah, though only once
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:08:24*dv-^_^619392328 joined #nim
12:10:13*dv-^_^61939232 quit (Ping timeout: 260 seconds)
12:12:57FromDiscord<Clyybber> leorize: ping
12:16:51FromDiscord<Clyybber> @leorize not sure how to ping matrix correctly
12:19:22*luis joined #nim
12:19:34Yardanicofunnily enough https://www.youtube.com/watch?v=rUJ7Bzgv3n0 is still getting viewed
12:19:56Yardanico160 views in last 3 months
12:22:16PMunchHuh, that lead me down a rabbit hole of checking views on talks
12:22:26PMunchApparently someone has uploaded my Nim talk to YouTube :P
12:22:29PMunchhttps://www.youtube.com/watch?v=0-t9j_ZxCAc
12:22:32Yardanicoyeah, I know who :)
12:22:45PMunchDo I know who it is?
12:22:54Yardanicoyes
12:23:27YardanicoI don't think he's active in this chat, but I've seen him in english and russian nim tg chats
12:23:29Yardanicoalso on the forum
12:23:49Yardanicohttps://forum.nim-lang.org/profile/dponyatov
12:24:23PMunchAh, the name is familiar
12:26:59*manjaroi3_ joined #nim
12:27:49*TomDotTom joined #nim
12:31:48*manjaroi3_ quit (Ping timeout: 260 seconds)
12:56:13*natrys quit (Ping timeout: 246 seconds)
12:56:45*lum joined #nim
12:56:54*luis quit (Read error: Connection reset by peer)
13:06:20*luis joined #nim
13:08:54*a_b_m joined #nim
13:11:31*natrys joined #nim
13:11:52*abm quit (Ping timeout: 265 seconds)
13:18:17*luis quit (Quit: luis)
13:43:05FromDiscord<Jew> Hello everyone! Is anybody here using Nim for frontend development?
13:43:13*luis joined #nim
13:45:18*xet7 quit (Quit: Leaving)
13:47:31FromDiscord<Inam> As in, on the web?
13:48:25*luis quit (Quit: luis)
13:48:41*luis joined #nim
13:50:57*waleee-cl joined #nim
13:53:27*luis quit (Client Quit)
13:53:42*luis joined #nim
13:54:34*lum quit (Quit: WeeChat 2.8)
13:54:49*lum joined #nim
13:58:34*nixfreak quit (Ping timeout: 272 seconds)
14:00:36*xet7 joined #nim
14:01:24*a_b_m quit (Quit: Leaving)
14:06:29bungwhen I cast[string]() it can't accept seq[byte], is there differience between seq[char] and seq[byte]
14:06:35leorize[m]1@Clyybber o/
14:07:25*lum quit (Quit: WeeChat 2.8)
14:09:56leorize[m]1bung: usually not
14:10:02leorize[m]1wdym by can't accept?
14:11:40FromDiscord<lqdev> byte and char are different types representing different things
14:11:53*PMunch quit (Ping timeout: 256 seconds)
14:13:25*luis quit (Ping timeout: 240 seconds)
14:14:27bunghttps://play.nim-lang.org/#ix=2Au7
14:14:58*luis joined #nim
14:16:26*abm joined #nim
14:16:46FromDiscord<lqdev> nim is not C
14:16:51FromDiscord<lqdev> a byte is a byte
14:16:59FromDiscord<lqdev> a char is a character
14:17:19FromDiscord<lqdev> bytes are numbers
14:17:43FromDiscord<lqdev> while chars are extended ASCII characters
14:18:20*PMunch joined #nim
14:18:58bunghmm , am doing compress uncompress things, the api returns seq[byte]
14:19:15bunghow do pass it as string
14:19:38PMunchcast[string]
14:19:57PMunchstring is a seq[char] under the hood, so casting between them is "safe"
14:22:30*luis quit (Read error: Connection reset by peer)
14:23:47bungok thanks, maybe it's another problem.
14:24:56FromDiscord<Jew> @Inam Yes
14:26:23FromDiscord<Clyybber> leorize: Maybe we should simply not call suggestQuit if the sym is sfForward
14:26:34FromDiscord<Clyybber> that way we should get both definitions
14:27:37FromDiscord<Clyybber> @leorize
14:27:43leorize[m]1@Clyybber well that works too, but might be a breaking change for current users of nimsuggest
14:28:02FromDiscord<Clyybber> Both is a breaking change technically
14:28:16leorize[m]1I know for nim.nvim I just consume the first response, but I don't know how others do it
14:28:19FromDiscord<Clyybber> But this will give us both defs which is what we want
14:29:03FromDiscord<Clyybber> For clients that just consume the first def my change probably isn't even a breaking one
14:29:15FromDiscord<Clyybber> since they get the same sym as before
14:29:42leorize[m]1yea but as I said, I don't know how other plugins, like vscode would react
14:31:37FromDiscord<Clyybber> yeah, but its preferable to just ignoring the forward decl
14:35:25FromDiscord<mratsim> @PMunch @Bung don't cast seq[byte] to string
14:35:40PMunchWhy not? If you know it contains string data?
14:35:46*luis joined #nim
14:35:49FromDiscord<mratsim> https://github.com/status-im/nim-http-utils/pull/9
14:35:50disbotNull terminate public strings
14:36:09FromDiscord<mratsim> because it won't be nul terminated and you will break C l
14:36:17FromDiscord<mratsim> C library
14:36:56FromDiscord<mratsim> string to seq[byte] won't have issues because the extra byte won't cause problem in copies or deallocation.
14:37:54FromDiscord<mratsim> I think stringToSeqBytes or BytesToString should be in sugar or fusion.
14:38:20PMunchYeah, I've asked about that before..
14:38:43PMunchBut yeah, that was part of what I meant by "if you know it contains string data"
14:40:17*muffindrake joined #nim
14:40:18FromDiscord<mratsim> even if it contains string data, that would mean you first setLength(len-1) to not count \0 in the length before you do the cast
14:40:43FromDiscord<mratsim> but in that case you need to take into account the 0 length seq bytes where you can do -1
14:40:54leorize[m]1@mratsim you can try to PR one to system.nim
14:41:26FromDiscord<mratsim> and even then if you cast, unless you pass directly to the consuming proc, the cast will trigger an intermediate allocation because seq/strings have value semantics
14:42:11FromDiscord<mratsim> so casts gain you nothing but complexity and bug surface compared to just alloc + copyMem.
14:43:19FromDiscord<mratsim> (and if you worried about performance because hot path, you would use pooling and raw ptr UncheckedArray
14:47:01leorize[m]1so anyone up for a `toString(openArray[byte | char])`?
14:48:30bungoh that's actually a problem, it may contains multiple times \0
14:53:49*TomDotTom quit (Ping timeout: 246 seconds)
14:54:13disruptekit's not a problem; i never met a mammal i couldn't milk.
14:56:34*TomDotTom joined #nim
14:59:38Prestigedisruptek: hahaha. thanks
14:59:54supakeenthat's... quite the image
15:00:45bungwell, found I can just use asyncnet send take a pointer , not string
15:03:31*arecacea1 quit (Remote host closed the connection)
15:03:56*arecacea1 joined #nim
15:12:26FromDiscord<mratsim> @leorize I thik it should go in sugar or a dedicated byteutils package
15:14:15*luis quit (Read error: Connection reset by peer)
15:22:45*luis joined #nim
15:32:08*bung quit (Ping timeout: 256 seconds)
15:37:33*bung joined #nim
15:39:25*TomDotTom quit (Ping timeout: 240 seconds)
15:44:06*bung quit (Ping timeout: 256 seconds)
15:44:50*bung joined #nim
15:45:50*TomDotTom joined #nim
15:55:53leorize[m]1disruptek: newest update for go-to-definition https://asciinema.org/a/K9lIPJ30bbv6OPRdUKj1plNyC
15:55:59FromGitter<offbeat-stuff> Hi , I am trying to pass seq[float32] data to proc
15:56:13FromGitter<offbeat-stuff> but when I assign it there it just becomes empty
15:56:26leorize[m]1do you have any examples?
15:56:50FromGitter<offbeat-stuff> That is the main call
15:56:51FromGitter<offbeat-stuff> nModel( @[ ⏎ ⏎ 1) 5'f32, 0.5'f32, 0.0'f32, ⏎ 2) 5'f32, -0.5'f32, 0.0'f32, ⏎ -0.5'f32, -0.5'f32, 0.0'f32, ... [https://gitter.im/nim-lang/Nim?at=5f847cc378d7f20c9fa5bab3]
15:57:10FromGitter<offbeat-stuff> I create a variable in there and assign the seq
15:57:19FromGitter<offbeat-stuff> to the variable
15:57:29FromGitter<offbeat-stuff> but in the end it shows as empty
15:57:38FromDiscord<Vindaar> something else must be going on there. Can you show the full code?
15:57:47leorize[m]1looks correct, but I can't say much without actually seeing the code
15:58:00FromGitter<offbeat-stuff> Here
15:58:01FromGitter<offbeat-stuff> proc nModel* (vertices:seq[float32],indices:seq[uint32]):model= ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f847d09e6840119ec82f962]
15:58:52leorize[m]1the issue is probably in `bufferData`
15:59:15FromGitter<offbeat-stuff> but the variable also shows the seq as empty
15:59:17leorize[m]1have you tried to `echo` right after setting `mOut.vertices/indices`?
15:59:30FromGitter<offbeat-stuff> yes i tried
16:00:11FromGitter<offbeat-stuff> that where it shows empty
16:01:30leorize[m]1https://play.nim-lang.org/#ix=2Av6
16:01:35leorize[m]1seems to work just fine here
16:03:36leorize[m]1unless you can produce a standalone sample it's hard for us to actually debug this issue
16:04:10FromGitter<offbeat-stuff> Any help on maybe the bufferData function messing up
16:04:36*TomDotTom quit (Ping timeout: 272 seconds)
16:05:06leorize[m]1I can't say much without knowing what that function does :P
16:05:16FromGitter<offbeat-stuff> fixed it just needed to return the output
16:05:45leorize[m]1oh lol
16:06:11leorize[m]1you can use the built-in `result` variable, it's faster that way
16:06:16*natrys quit (Ping timeout: 246 seconds)
16:06:24FromGitter<offbeat-stuff> what's that
16:07:26FromGitter<offbeat-stuff> thanks works all out now
16:07:37leorize[m]1https://nim-lang.org/docs/tut1.html#procedures-result-variable
16:08:31leorize[m]1and here's a small trick you can do: https://play.nim-lang.org/#ix=2Av9
16:08:34FromDiscord<Innokentiy Sokolov> this `result` idea is hardly fitted in my head - what is the point for it? For convenience sake?
16:08:37FromGitter<gogolxdong> something causes OOM, is it nimsuggest
16:08:58FromDiscord<Rika> @Innokentiy Sokolov allows for optimization
16:09:08leorize[m]1instead of using `seq[T]` as the parameter, if you use `openArray` it will be much more flexible
16:09:10FromDiscord<Innokentiy Sokolov> @Rika like what?
16:09:24FromDiscord<Rika> do you know how C does multiple return values?
16:09:25leorize[m]1@Innokentiy Sokolov yes and for named return value optimization
16:09:47leorize[m]1basically instead of `return-ing`, it's converted into an output parameter
16:09:55FromDiscord<Innokentiy Sokolov> > do you know how C does multiple return values?↵@Rika sorry but I don't, came from interpreter languages :)
16:10:02disruptekleorize[m]1: is that in master?
16:10:02FromGitter<gogolxdong> What to use for jump to definition then?
16:10:04FromDiscord<Rika> basically, instead of returning many values packed into some struct of some sorts, you put the extra return values in a var argument
16:10:09FromDiscord<Rika> and edit that instead
16:10:19FromDiscord<Innokentiy Sokolov> ooohh
16:10:26leorize[m]1disruptek: soon™, need #15555
16:10:26disbothttps://github.com/nim-lang/Nim/pull/15555 -- 3suggest: try to find the implementation of a symbol when def is used
16:10:46FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2Avb
16:10:49FromDiscord<Rika> i dont remember why this is faster but
16:10:55FromDiscord<Rika> from testing it is
16:11:20FromDiscord<Innokentiy Sokolov> yeah Ok sounds legit , need to process this idea
16:11:30FromDiscord<Rika> if you early-return, this optimization doesnt really work afaik? but i dont remember or know too well
16:11:33disruptekit's fast because you don't alloc the result in the second case.
16:11:42FromDiscord<Rika> i see, thanks
16:11:51disruptekreturn is transformed into `result = ...; return`
16:12:04disruptekso, early return is irrelevant.
16:12:25disruptekthe reason to prefer result over return is that it allows for the growth of more explicit control flow throughout the function.
16:12:41disrupteki almost never use return.
16:13:05*arecacea1 quit (Remote host closed the connection)
16:13:40*arecacea1 joined #nim
16:14:44FromDiscord<Rika> me neither, its a great feature imo
16:15:39*luis quit (Remote host closed the connection)
16:16:02disruptekthe other reason it exists is to absorb the last value of a stmtlist or expr.
16:17:28FromGitter<gogolxdong> why would `rawExec` of db_mysql convert @ and . as `SELECT password,id,cloudfast_group,name,source,email,mobile,telephone,company,address,position,is_open FROM user WHERE email='cloudfastnet\64cncarecc\46com'`
16:18:04*noonien joined #nim
16:18:18disruptekfor the lulz
16:18:48leorize[m]1disruptek: pushed that change to master, you can build a nim with #15555 merged to use with it
16:18:50disbothttps://github.com/nim-lang/Nim/pull/15555 -- 3suggest: try to find the implementation of a symbol when def is used
16:18:59disruptekprobably part of a sql saftener.
16:19:04*natrys joined #nim
16:19:34disruptekleorize[m]1: nice, maybe i will mess with it. 👍
16:19:45FromGitter<gogolxdong> it works before.
16:20:24disruptekleorize[m]1: do you know when we're tagging 1.4? seems like rc is not the last rc.
16:20:48leorize[m]1no idea, ask Araq
16:21:39leorize[m]1also you may like nim-lang/nightlies#40
16:25:54disrupteki saw the changelog ref for that but didn't understand it.
16:26:18disrupteki use your releases for gitnim, see.
16:26:32*nature joined #nim
16:26:43disruptekoh, i see; tags.
16:26:50disruptekthat lets me automate gitnim easily.
16:27:09disruptekshould be able to just make it a github action.
16:28:19FromDiscord<Avatarfighter> Ello ello
16:28:25FromDiscord<Avatarfighter> what is new everyone
16:28:59disruptekyesterday i met a cow with a very pretty mouth.
16:29:48Prestigedisruptek: is this where the milking started?
16:29:59*waleee-cl quit (Quit: Connection closed for inactivity)
16:30:51disruptekcows are where the milking stops.
16:31:08*PMunch quit (Quit: leaving)
16:31:11disrupteklike, fish live under the water. you get it?
16:31:22disruptekARE YOU WITH ME
16:31:37disruptektoday i might have time to actually write some code.
16:31:52disruptekit's IC Tuesday.
16:35:15*luis joined #nim
16:37:47FromDiscord<Rika> interesting cow tuesday
16:39:08*TomDotTom joined #nim
16:39:34*abm quit (Ping timeout: 256 seconds)
16:40:29*luis quit (Quit: luis)
16:46:50FromDiscord<haxscramper> How do I disable warning only for specific block of code? `{.warning[CaseTransition]: off.}` does not work - the error is still generated. Code in question is inside `quote do` so it might potentially be related
16:47:02FromDiscord<haxscramper> (edit) 'error' => 'warning/'
16:47:22FromDiscord<haxscramper> `s/error/warning/g`
16:47:23*luis joined #nim
16:48:05leorize[m]1@haxscramper: generate `{.push warning[CaseTransition]: off.}` and `{.pop.}` inside the quote do itself
16:49:45FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Avn
16:51:09leorize[m]1sounds like a bug
16:59:35FromDiscord<Avatarfighter> Disruptek: IC Tuesday but Twitch?
17:02:28*luis quit (Read error: Connection reset by peer)
17:02:42*luis joined #nim
17:05:28disrupteki could maybe stream a bit.
17:07:56*lum joined #nim
17:08:46FromDiscord<For Your Health> Is there a good way to find the key of a table based on value?
17:09:02disruptekno sub-O(1) way, no.
17:09:11disrupteker, sub-O(n)
17:10:02FromDiscord<For Your Health> Is there a decent way to construct an inverted table at compile time?
17:10:42FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2Avy
17:11:21FromDiscord<For Your Health> But that table is much longer in reality, and I want to create a version where the keys and values are swapped
17:12:15FromDiscord<haxscramper> I would just generate `case` using macro if all values are ordinals
17:12:44FromDiscord<haxscramper> Basically zero overhead, O(1) etc.
17:13:18*abm joined #nim
17:13:21FromDiscord<For Your Health> Can you go into a little more detail? I'm not super experienced with nim so I don't know my way around yet
17:13:51FromDiscord<For Your Health> Ideally I would just have an enum of all of the keycodes so I only have to write it one time
17:13:54leorize[m]1so you want a bi-directional table?
17:14:24FromDiscord<For Your Health> Yeah a bi directional table would work.
17:14:29disruptekthere's a bitable impl, but yeah, i would just use a constant map if they are constants.
17:14:34disrupteki didn't look at the snippet.
17:15:29FromDiscord<For Your Health> Is there a way to document all of my keycodes in such a way that I only write the keynames one time?
17:15:41disruptekwhat's a keycode?
17:16:04leorize[m]1it depends on how you structure your code tbh
17:16:12FromDiscord<haxscramper> @For Your Health Basically you want to do something like this: https://play.nim-lang.org/#ix=2Avz , for more details on case statement construction see https://nim-lang.org/docs/macros.html#statements-case-statement
17:17:22*waleee-cl joined #nim
17:17:45FromDiscord<haxscramper> This is simple example, but should illustrate how you can generate case statement - `newLit` calls is the place where you need to plug in your values, for enum names replace with `ident("fldName")` or `newDotExpr( .. )`
17:17:55*lum quit ()
17:18:19leorize[m]1@For Your Health so why couldn't you use enums?
17:18:25FromDiscord<haxscramper> `newLit(elem), newLit(elem + 2)` is your key-value mapping basically. Example does not compile, but I just forgo to add discard
17:18:27FromDiscord<For Your Health> @haxscramper that's a bit over my head at the moment but I can study it and see if I can understand
17:19:33FromDiscord<For Your Health> I can use an enum, but I also want to store an array of keystates and be able to index into that array
17:19:55FromDiscord<For Your Health> The enum will have holes in it so if I raw index with the enum the array will have unused spaces
17:20:21FromDiscord<haxscramper> Or, I just remembered you can index array using enums - `let val: array[Enum, Val]` or something like that
17:20:36leorize[m]1it will still have unused space
17:20:51FromDiscord<haxscramper> Well, this is probably the easiest solutions if you don't want to write macro
17:20:52leorize[m]1not to mention that enum with holes aren't ordinals in Nim so you can't do that
17:22:06*lum joined #nim
17:22:09FromDiscord<For Your Health> The idea with the tables was to define an enum with no holes for the keys, define a table of mappings between the keys and the keycodes, and somehow make it bidirectional
17:22:35FromDiscord<For Your Health> The downside being I have to write all of the keynames twice
17:22:37FromDiscord<haxscramper> Then only `case` I guess, Table also has non-zero time/space overhead + internally it will use more space anyway than strictly necessary AFAIK
17:23:24leorize[m]1https://github.com/nim-lang/fusion/pull/23
17:23:25disbotAdd `enummaps` module to attach metadata to enums; as a special case, it replaces enum with holes
17:23:29FromDiscord<haxscramper> Macro can accept `static[seq[tuple[key: Enum, value: int (or whatewher you have as valuie)]]]` as a parameter
17:23:31leorize[m]1that could work I suppose
17:23:57leorize[m]1@haxscramper the values are simple enough that you can easily construct them with a for loop at compile time
17:26:33FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2AvD
17:28:55leorize[m]1https://play.nim-lang.org/#ix=2AvF
17:31:09leorize[m]1@For Your Health ^
17:32:35FromDiscord<For Your Health> Sweet, that seems to work, thanks!
17:34:00leorize[m]1Nim's compile time function evaluation is really useful for things like this
17:34:59disruptekaight lemme just rub one out and then i'll stream.
17:35:01disruptek~stream
17:35:02disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
17:36:33*opal quit (Remote host closed the connection)
17:37:47*opal joined #nim
17:37:53FromDiscord<Avatarfighter> I would like to point out that there was a whole minute between what disruptek said and when the stream started
17:41:00FromDiscord<Vindaar> well, no time to waste!
17:41:11FromDiscord<Avatarfighter> you gotta stream IC fast ig
17:41:24*hyiltiz quit (Remote host closed the connection)
17:42:04leorize[m]1disruptek: `touch compiler/nim.nim.cfg` or `touch compiler/nim.nims` to mark `compiler/nim.nim` as the entry file for nim.nvim
17:44:57leorize[m]1`./koch test` for testament
17:46:28FromDiscord<Avatarfighter> disruptek are you in the stream?
17:46:32FromDiscord<Avatarfighter> not disruptek
17:46:33FromDiscord<Avatarfighter> leorize
17:48:16Zevv!last treeform
17:48:17disbottreeform spoke in 12#nim 3 days ago 12https://irclogs.nim-lang.org/09-10-2020.html#16:58:54
17:48:38FromDiscord<Avatarfighter> he is online in discord Zevv, just ping him
17:49:07leorize[m]1disruptek did you break stream chat notification? :P
17:52:20leorize[m]1disruptek: because you didn't install a mergetool :P
17:52:25*luis quit (Read error: Connection reset by peer)
17:52:36*luis joined #nim
17:53:12Zevvping @treeform
17:53:39*astronavt joined #nim
17:53:51leorize[m]1read `git mergetool --help` when you have time. A merge tool visualize a 3-way merge much better than just looking at the annotated lines by yourself
17:54:28FromDiscord<treeform> @Zevv, wut?
17:54:33Zevvoi
17:54:39Zevvyou're the color expert, right
17:54:41Zevv\o/
17:55:20ZevvI'm looking for an algorithmically generated set of N colors of equal lumiocity and with equal "visual distance"
17:55:36ZevvI've tried some of the polars from chroma, but I find that some things are "too close" and some "too far"
17:55:50*lum quit (Quit: ~ Trillian - www.trillian.im ~)
17:55:51Zevvdoes that question even make sense?
17:55:55FromDiscord<treeform> yeah
17:56:23FromDiscord<treeform> I think I wanted that too, but now I have 2 opinions on this
17:56:35Zevvwow I asked the right man, I see
17:56:59FromDiscord<treeform> 1. its really hard to judge colors when they just sit next to each other. Colors that my clash in one context look really good next to each other.
17:57:08FromDiscord<treeform> So how you view them and where matters at ton.
17:57:13Zevvsure
17:57:41FromDiscord<treeform> 2. Its really hard for an algorithm to pick colors, its not mathematical, it makes no sense, brain does not deal with color angles etc...
17:57:52FromDiscord<treeform> I would just pick a pallet made by a professional
17:58:08FromDiscord<Vindaar> @Zevv: an easy way to achieve that with chroma is to use the approach used by ggplot2, see here:↵https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L697-L704
17:58:12Zevvyeah, I was about to go that way indeed...
17:58:22FromDiscord<Vindaar> doesn't mean it's perfect of course, because HCL isn't perfect
17:58:27FromDiscord<treeform> there is a site just for this: https://www.colourlovers.com/
17:58:42FromDiscord<Clyybber> @Avatarfighter cya o/
17:58:50FromDiscord<treeform> and https://color.adobe.com/trends
17:59:11Zevvso, and now I got another one of those obsessions
17:59:14FromDiscord<treeform> and I guess https://dribbble.com/ to some extent
17:59:21ZevvA few years I spent days getting my kernings right
17:59:26Zevvand here I am, chasing colors
17:59:27Zevvthis is sick
17:59:31FromDiscord<treeform> I really like the https://flatuicolors.com/palette/defo and use that as my default
17:59:48FromDiscord<Vindaar> in principle you'd want a more correct color model, similar to CIECAM02 (the one used to derive viridis and family)
17:59:58FromDiscord<Vindaar> (or do what treeform is telling you of course)
18:00:03Zevv:)
18:00:09ZevvI'm trying to see what ggplot2 does
18:00:42Zevvwell, that's just what I do. but it's wrong
18:00:59Zevvit's like, I got a heap of blues, then a sharp transition and a heap of reds and oranages
18:01:00FromDiscord<Vindaar> it's wrong because HCL is wrong
18:01:14FromDiscord<treeform> @Zevv, there is a color space that I want to implement that might help with some of this: https://www.hsluv.org/
18:01:16Zevvright. Thus my question
18:01:19FromDiscord<treeform> I don't have this space yet
18:01:24FromDiscord<treeform> but its based on human vision
18:01:31FromDiscord<treeform> https://www.boronine.com/2012/03/26/Color-Spaces-for-Human-Beings/
18:01:44FromDiscord<treeform> Maybe that would produce better human pleasing colors... but
18:01:50Zevvthat seems about right for what I'm looking for
18:01:53FromDiscord<treeform> I only think it has like 15% of working for my use
18:02:13FromDiscord<treeform> I don't think it can fix the innate problem with colors is that they are so artistic
18:02:20FromDiscord<Clyybber> disruptek: your twitch chat is broken
18:02:22FromDiscord<treeform> and based on persons previous experience
18:02:24leorize[m]1disruptek: you will find this useful if you gotta rebase a lot: http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/
18:02:27FromDiscord<Clyybber> newer messages don't appear for oyu
18:02:30Zevvthat's all very true
18:02:57ZevvI think I'll try HSLuv
18:03:49FromDiscord<Vindaar> no, please go ahead and do a full implementation of https://en.wikipedia.org/wiki/CIECAM02 in Nim. Cause I want that 😛
18:03:54FromDiscord<treeform> I would love a PR for HSLuv
18:04:01FromDiscord<Vindaar> (or the newer even more complex one)
18:04:22Zevvargh that implementation is nauseating
18:05:01FromDiscord<treeform> But even with HSLuv and CIECAM02... I don't think that can fix the issue that colors are very artistic.
18:05:12FromDiscord<Vindaar> no the artistic part of course not!
18:05:30FromDiscord<Vindaar> for a "give me something workable quickly" it's a great thing though
18:05:45FromDiscord<treeform> like if you were going for human toned stuff, computer has no clue what human skin tones are, but humans are very very very good at them: https://color.adobe.com/trends
18:05:52ZevvI hardly have the knowledge or experience, but I think for my purpose (categorization) I really have this requirement of "seperatibility"
18:05:57Zevvso that's 100% about human vision
18:06:16FromDiscord<treeform> or like nature, computers have no clue what trees and grass and sky look like: https://color.adobe.com/trends
18:06:49FromDiscord<Vindaar> then a CAM should do what you want to the best possible way. But take into account that it also really depends on the display being used etc. This is a really messy thing you want
18:07:11FromDiscord<treeform> yeah the displays play a huge part
18:07:19FromDiscord<treeform> good thing that most of the displays are "good enough" now.
18:07:22ZevvI guess
18:07:35FromDiscord<treeform> back couple of years ago colors where very washed out
18:07:58FromDiscord<treeform> so you had issues of people making stuff using good monitors with good contrast for people with bad monitors with bad contrast
18:08:03FromDiscord<treeform> but that problem is way less now
18:08:21FromDiscord<Clyybber> @leorize with the new approach, is usageSym still required?
18:08:27FromDiscord<Clyybber> the param I mean
18:08:30ZevvIt's probably a bit like mastering music. First I do it on my great headphones, then I do it again for crappy speakers
18:08:36*luis quit (Read error: Connection reset by peer)
18:08:41FromDiscord<treeform> If you are making charts I would just pick a palette from some one
18:08:46FromDiscord<treeform> that is what I do
18:08:51leorize[m]1@Clyybber yes, I need to know which sym I'm working with
18:09:07Zevvyeah that's probably way cheaper then implementing the full colors space
18:09:20ZevvI did like the option to allow L/S tweaking in my UI
18:09:52leorize[m]1@Clyybber nimsuggest will only capture the sym at the referenced position, so I need that stored before I can move on
18:10:01FromDiscord<Clyybber> ah
18:10:02FromDiscord<Clyybber> ok
18:10:14FromDiscord<treeform> Zevv, there is an idea that 1970-2000 music was largely influenced by how it sounds over the radio.
18:10:27Zevvvery true
18:10:29FromDiscord<treeform> and how it sounds over car noise and with static ...
18:11:13*kungtotte joined #nim
18:11:33FromDiscord<treeform> Its a bit like early pixel graphics and blurry TVs etc...
18:11:44FromDiscord<Vindaar> so where does really monotonous black metal with bad audio quality fit in there? such that it's just another level of noise in your car? 🧐
18:13:02FromDiscord<treeform> I am not a music expert, but the idea says that most popular 1970-2000 music lacked a high dynamic range it was all very loud to sound good in the car going down the road.
18:13:21FromDiscord<treeform> Classical music sounds really bad in car because you can't hear like half of it.
18:13:29FromDiscord<Vindaar> (I was kidding of course. For popular music it makes a lot of sense even)
18:14:54FromDiscord<treeform> On a side note I just got arc rendering to work, and I am really happy
18:14:56FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/765276333713391626/unknown.png
18:14:59*lritter quit (Remote host closed the connection)
18:15:18FromDiscord<Vindaar> nice!
18:15:25FromDiscord<treeform> svg arcs are really confused: https://codepen.io/lingtalfi/pen/yaLWJG
18:15:29FromDiscord<treeform> just play around with that
18:16:09Zevvyeah, even hsluv does not seem to do well on my case
18:16:14FromDiscord<lqdev> @treeform wow that's looking cool!
18:16:18Zevvthin objects on a dark background
18:16:25FromDiscord<lqdev> what are you going to use it for?
18:16:47FromDiscord<treeform> I am adding HTML cavas style path rendering to flippy
18:16:58FromDiscord<lqdev> ooh nice
18:17:21FromDiscord<lqdev> so i guess eventually it's gonna have a VG renderer like cairo?
18:17:31FromDiscord<treeform> https://play.nim-lang.org/#ix=2AvU
18:17:34FromDiscord<treeform> I guess...
18:18:19Zevvit hurts my head how your arcs double and not shrink, but grow instead of exploding
18:18:31FromDiscord<treeform> it hurts my haed
18:18:36FromDiscord<treeform> too
18:21:22Zevvsticking with PolarLUV, thanks for the explanations treeform
18:21:49FromDiscord<treeform> you welcome
18:22:03FromDiscord<lqdev> @treeform but does your arc renderer appropriately compile on --gc:arc?
18:22:12FromDiscord<lqdev> the single most important thing right now.
18:22:22Zevvyeah, does it!
18:23:06FromDiscord<treeform> yes it does
18:23:36Zevvnow render an orc!
18:23:41FromDiscord<lqdev> that's an arc-ception bois
18:24:00FromDiscord<lqdev> damn this makes me wanna add a pun to my future game
18:24:14FromDiscord<lqdev> a base level ARC Furnace and an upgraded ORC Furnace
18:26:14leorize[m]1@Clyybber you studied CPS, right? how should I convert a recursive function into an iterative one?
18:26:53leorize[m]1ast.copyTree overflows in debug mode and it's making nimsuggest debugging a PITA
18:27:54FromDiscord<mratsim> Trampoline?
18:28:04FromDiscord<Clyybber> yeah trampolines
18:28:15FromDiscord<mratsim> _never studied CS_
18:30:04Zevvyeah it shows from the quality of your code man
18:30:25Yardanicolmao
18:30:29FromDiscord<Clyybber> altho I'm not sure how its related
18:30:47Zevv:)
18:31:01FromDiscord<Clyybber> as in how does the cycle even get there
18:31:12FromDiscord<Clyybber> and why only in nimsuggest
18:31:46FromDiscord<Clyybber> Zevv, heh in that its not shitty
18:32:04FromDiscord<Clyybber> too many CS profs who write awful code
18:32:51FromDiscord<Avatarfighter> lmaooo
18:32:57*hnOsmium0001 joined #nim
18:33:34FromDiscord<Rika> LOL
18:33:40ZevvI am the paria of my team. My code is too terse. These guys all did uni
18:33:47FromDiscord<Rika> aw shit does that mean i have to write shitty code
18:35:26FromDiscord<Avatarfighter> yeah crap i guess i gotta downgrade the quality of my code 🙄
18:36:45YardanicoOnce again so you know nim IRC channels: #nim #nim-embedded #nim-gamedev #nim-langdev #nim-news #nim-offtopic #nim-science #nim-webdev #nimconf
18:36:49FromDiscord<michaelthewolf> > lmao↵@Yardanico[IRC]#0000 lmao
18:36:57idfhi michael
18:37:03FromDiscord<michaelthewolf> hello
18:42:48*bung quit (Quit: Lost terminal)
18:46:10*lum joined #nim
18:48:58*notchris joined #nim
18:49:24notchrishello all, i was wondering how to convert from type `cint` type `ptr cint` in nim
18:50:21FromDiscord<treeform> @notchris, `addr yourintvar`
18:50:53notchrisAh okay let me try that, also, what is the official discord channel?
18:51:16FromDiscord<treeform> https://play.nim-lang.org/#ix=2Aw4
18:51:30FromDiscord<treeform> discord: https://discord.gg/nJX9kn
18:52:27*luis joined #nim
18:52:34FromDiscord<notchris> Thank you @treeform this is wonderful
18:53:12FromDiscord<notchris> Just started using Nim a couple of days ago and im enjoying it!
18:53:24FromDiscord<Avatarfighter> Welcome 🙂
18:53:44FromDiscord<Avatarfighter> hopefully you’ll enjoy the community as much as nim !
18:54:12FromDiscord<notchris> Thank you @Avatarfighter
18:54:24FromDiscord<notchris> This is my first attempt at making a game with nim: https://github.com/notchris/nim-platformer
18:58:52FromDiscord<Yardanico> @treeform or just https:0/discord.gg/nim :)
18:58:59FromDiscord<Yardanico> (edit) 'https:0/discord.gg/nim' => 'https://discord.gg/nim'
18:59:10FromDiscord<Yardanico> Since this server is official
19:00:05FromDiscord<notchris> @treeform so im definitely getting somewhere, im using the sdl2 lib, trying to measure some text, i am now getting a result (of 0) so now i just have to see what i messed up 🙂
19:00:11*luis quit (Read error: Connection reset by peer)
19:00:25FromDiscord<notchris> sent a code paste, see https://play.nim-lang.org/#ix=2Awb
19:00:27*luis joined #nim
19:04:44FromDiscord<treeform> does it work?
19:05:46FromDiscord<treeform> you would probably have to use unsafeAddr:
19:05:47FromDiscord<treeform> https://play.nim-lang.org/#ix=2Awe
19:05:53FromDiscord<treeform> because w and h can go out of scope
19:06:06FromDiscord<treeform> you need to be aware that sizeText will not hold your pointers after functions exists.
19:06:46FromDiscord<notchris> oh wait im silly treeform `Returns: 0 on success with the ints pointed to by w and h set as appropriate`
19:07:01FromDiscord<notchris> i didn't realize i then needed to check the pointers, im coming from js, so its a little new to me
19:07:34FromDiscord<treeform> yeah
19:07:49FromDiscord<treeform> you are using a c library in nim, so its not even nim you are programming 🙂
19:07:59FromDiscord<treeform> In nim you normally don't use pointers either.
19:08:47FromDiscord<notchris> 😮
19:08:50FromDiscord<notchris> TIL
19:09:51*manjaroi3_ joined #nim
19:12:23*lum quit (Quit: WeeChat 2.9)
19:12:34*TomDotTom quit (Ping timeout: 256 seconds)
19:12:51*lum joined #nim
19:13:13FromDiscord<lqdev> technically speaking, you do. but not raw pointer
19:13:14FromDiscord<lqdev> (edit) 'pointer' => 'pointers'
19:13:23FromDiscord<lqdev> (`ptr`)
19:13:35*luis quit (Read error: Connection reset by peer)
19:13:38*sealmove joined #nim
19:13:40FromDiscord<lqdev> remember that `var` is also just a pointer :)
19:13:43FromDiscord<lqdev> same for `ref`
19:13:54FromDiscord<lqdev> but unlike `ptr`, they're are safe
19:15:10sealmoveis it ok to import a module multiple times?
19:15:16*natrys quit (Ping timeout: 246 seconds)
19:15:23disrupteksure.
19:16:11*jaens[m] quit (Quit: killed)
19:16:11*BitPuffin quit (Quit: killed)
19:16:12*leorize[m]1 quit (Quit: killed)
19:16:12*hnOsmium0001[m] quit (Quit: killed)
19:16:13*Helios quit (Quit: killed)
19:16:13*VijayMarupudi[m] quit (Quit: killed)
19:16:16*k0mpjut0r quit (Quit: killed)
19:16:21*silvernode[m] quit (Quit: killed)
19:16:21*stisa[m] quit (Quit: killed)
19:16:21*leorize[m] quit (Quit: killed)
19:16:21*guelosk[m]1 quit (Quit: killed)
19:16:23*brainbomb[m] quit (Quit: killed)
19:16:27*unclechu quit (Quit: killed)
19:16:33*inamiyar[m] quit (Quit: killed)
19:16:33*MTRNord[m] quit (Quit: killed)
19:16:34*reversem3 quit (Quit: killed)
19:16:35FromDiscord<Clyybber> Zevv: You might want to go with CAM16-UCS
19:16:35*planetis[m]1 quit (Quit: killed)
19:16:35*solitudesf1 quit (Quit: killed)
19:16:35*ee7[m] quit (Quit: killed)
19:16:36*lnxw37d4 quit (Quit: killed)
19:16:59FromDiscord<Clyybber> Its simpler and better than CAM02
19:17:39*lum quit (Client Quit)
19:19:33*a_chou joined #nim
19:19:48Zevvit's not in chroma :(
19:19:53ZevvI just got lazy
19:19:56Zevvits past nine
19:20:11FromDiscord<exelotl> > _never studied CS_↵I taught myself, got frustrated with my code being messy, battled with design patterns and "clean code", realised most of it was convoluted garbage, went back to C, and *then* went to uni to study CS
19:20:22*gmaggior joined #nim
19:21:29FromDiscord<exelotl> first year was a joke lol, having to do introductory courses in java and software engineering xD
19:21:45*luis joined #nim
19:21:47ZevvClyybber: any clean implementation somewhere I can easily port to nim?
19:21:53Zevvor C so I can just pull it in?
19:23:39Zevvnaah nevermind
19:23:46ZevvI'm getting a stiff drink now
19:24:28FromDiscord<Vindaar> python, but still worth a look for people interested I suppose: https://colour.readthedocs.io/en/develop/_modules/colour/appearance/cam16.html
19:26:01*inamiyar[m] joined #nim
19:28:36FromDiscord<Clyybber> Zevv: I only found this https://github.com/d3/d3-cam16/ but it doesn't look too complex
19:29:26*a_chou quit (Remote host closed the connection)
19:29:53Zevvtoo late. already started on the threaded parsers first :)
19:30:03Zevv(Add to bookmarks)
19:30:27FromDiscord<Clyybber> npeg?
19:30:47Zevvno, too slow
19:43:40*luis quit (Remote host closed the connection)
19:48:27*lum joined #nim
19:48:29*Helios joined #nim
19:48:29*k0mpjut0r joined #nim
19:48:29*leorize[m] joined #nim
19:48:29*stisa[m] joined #nim
19:48:29*reversem3 joined #nim
19:48:29*MTRNord[m] joined #nim
19:48:29*brainbomb[m] joined #nim
19:48:29*GitterIntegratio joined #nim
19:48:29*hnOsmium0001[m] joined #nim
19:48:29*jaens[m] joined #nim
19:48:29*unclechu joined #nim
19:48:29*planetis[m] joined #nim
19:48:29*leorize[m]1 joined #nim
19:48:29*BitPuffin joined #nim
19:48:29*lnxw37d4 joined #nim
19:48:35*ee7[m] joined #nim
19:48:35*silvernode[m] joined #nim
19:48:35*solitudesf1 joined #nim
19:48:36*VijayMarupudi[m] joined #nim
19:48:36*guelosk[m] joined #nim
19:53:33*manjaroi3_ is now known as TomDotTom
19:53:39*zidsal joined #nim
19:55:58zidsalHi guys if I make a new Table the key type needs to have a hash proc, However when I look at the nim implementation for newTable the typing is just newTable*[A, B] how does the nim compiler know that A needs a hash function?
19:57:49lumnewTable is a generic
19:57:57*luis joined #nim
20:00:10lumso, the compiler can undersa
20:00:47lumunderstand what type you are using*
20:00:52zidsal@lum, I get that, but where does it state in the tables.nim that A must implement a hash, have I missed something as nothing about that function definition defines A as needing a hash
20:02:14zidsalah, I've figured it out, its in the typing for Table it's self thanks for the help @lum
20:02:45disruptekwhy do we do asserts in release?
20:03:54FromDiscord<Clyybber> because its not -d:danger :p
20:07:57FromDiscord<Vindaar> zidsal: it doesn't understand that it needs a hash function first and foremost. It just instantiates a proc of the given type `newTable` for whatever `A` you give it and then when trying to compile that proc for your type it realizes that it uses `hash`. Then it can't find it for your type and throws an error
20:13:10*lum quit (Quit: WeeChat 2.9)
20:13:33*lum joined #nim
20:14:42zidsal@vindaar thanks
20:17:08leorize[m]I still think it's silly to do assert on release
20:18:30FromDiscord<Avatarfighter> assert compiler == compiled
20:18:50FromDiscord<Theodore> > @Theodore I wrote Arraymancer in Nim because when I tried to do science stuff in Rust it was super painful.↵@mratsim for real?
20:18:59*Vladar quit (Quit: Leaving)
20:19:02FromDiscord<Clyybber> heh @treeform I just stumbled on your blog by random
20:19:05FromDiscord<Clyybber> https://blog.istrolid.com/blog/space-station-13-remakes.html
20:19:06FromDiscord<Theodore> cuz yeah its a fucking PAIN
20:19:47FromDiscord<Avatarfighter> god i love ss13
20:20:17FromDiscord<Clyybber> I have a strong urge to remake it in Nim
20:20:42FromDiscord<Avatarfighter> that would be interesting
20:22:43FromDiscord<Avatarfighter> the only thing I can think of that would be interesting would be simulating canister bombs
20:23:06FromDiscord<Avatarfighter> since that usually makes ss13 servers grind to a halt
20:23:29*abm quit (Read error: Connection reset by peer)
20:23:37*a_b_m joined #nim
20:24:25*narimiran quit (Ping timeout: 240 seconds)
20:40:50*luis quit (Quit: luis)
20:46:26*luis joined #nim
20:56:08FromDiscord<treeform> @Clyybber I have did a ss13 protoptye in nim already.
20:56:54FromDiscord<Avatarfighter> @treeform yoooo
20:56:58FromDiscord<Avatarfighter> wait that's so good
20:57:03FromDiscord<Avatarfighter> is it still 2d?
20:57:14FromDiscord<Avatarfighter> Does it also have the server lag that we're all accustomed to?
20:57:18FromDiscord<Avatarfighter> what about the fart emote
20:57:32FromDiscord<treeform> Among Us did it well though.
20:58:08FromDiscord<treeform> I would describe "Among Us" as a ss13 where they removed all the crazy crap and only focused on one thing and done it really well.
20:58:33FromDiscord<Avatarfighter> yeah they took the changeling rounds from ss13 and made them very replay-able
20:59:00FromDiscord<treeform> I bet there are other ss13 game modes you could take and make them better
20:59:32FromDiscord<Avatarfighter> yeah
20:59:44FromDiscord<Avatarfighter> imo revolution would be a fun one to take and make a stand alone game
20:59:55FromDiscord<Avatarfighter> (edit) 'stand alone' => 'standalone'
20:59:56FromDiscord<treeform> yeah
21:00:03FromDiscord<treeform> Needs more people though
21:00:12FromDiscord<Avatarfighter> Yeah it would need a lot of people to work well
21:00:20FromDiscord<treeform> Blob too
21:00:24FromDiscord<Avatarfighter> blob lmao
21:00:26FromDiscord<Avatarfighter> oh god
21:00:38FromDiscord<treeform> AI Malfunction
21:00:39FromDiscord<Avatarfighter> idk if other forks of ss13 have nuke ops but that would be fun
21:00:43FromDiscord<treeform> 1 v crew
21:00:53FromDiscord<treeform> nuke ops is standard
21:00:57FromDiscord<Avatarfighter> ok I wasn't sure
21:01:02FromDiscord<Avatarfighter> I dont think TG station have it
21:01:04FromDiscord<treeform> https://wiki.ss13.co/Game_Modes
21:01:18FromDiscord<Avatarfighter> that's only for goonstation
21:01:29FromDiscord<Avatarfighter> but since goonstation is really the only fork that matters its fine 😛
21:01:36FromDiscord<Avatarfighter> WIZARD WOULD BE SO FUN
21:02:05FromDiscord<Avatarfighter> you've convinced me treeform, I'm about to be camped out in <#706542664643772436> now 😛
21:06:08*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:10:46*luis quit (Quit: luis)
21:10:58*luis joined #nim
21:14:37*solitudesf quit (Ping timeout: 264 seconds)
21:18:35*TomDotTom quit (Ping timeout: 265 seconds)
21:22:44*luis quit (Quit: luis)
21:22:59*luis joined #nim
21:25:21*lum quit (Quit: WeeChat 2.9)
21:25:46*lum joined #nim
21:43:17*noonien quit (Quit: Connection closed for inactivity)
21:49:26*luis quit (Read error: Connection reset by peer)
21:49:42sealmoveDoes Nim type algebra sound interesting enough for having it on a seperate repo?
21:50:16sealmovefor example `proc inferType(node: NimNode): string`
21:50:53*nature quit (Ping timeout: 258 seconds)
21:51:48sealmoveor `proc inferType(node: NimNode): NimNode`
21:51:59FromDiscord<treeform> I don't understand what you mean by Nim type algebra
21:52:55sealmoveIf you have an expression as a NimNode, and you want to get the type that this expression boils down to
21:53:16sealmoveYeah I am only talking about Nim expressions, should have clarified this
21:55:39FromDiscord<haxscramper> I would probably sell my left arm if this could give me types of arbitrarily generated nim nodes, but implementing this is either redoing all work done by compiler, or exposing this interface to end user (maybe I'm wrong though)
21:56:09FromDiscord<haxscramper> To me it sounds /extremely/ interesting
21:56:15sealmoveyeah, I've been needing this for almost a year for my project
21:56:29FromDiscord<Yardanico> @sealmove does it work for arbitrarily complex expressions?
21:56:37FromDiscord<haxscramper> But that's just speculative compilation or something like this, so it would (might) hinder compilation times if used excepssively
21:56:40disruptekyou can just use a macro on a macro.
21:56:46sealmoveYardanico: that's the plan at least
21:56:47FromDiscord<Yardanico> it really feels like duplicating compiler work
21:56:59FromDiscord<Yardanico> @disruptek yeah, that's true
21:57:02FromDiscord<haxscramper> But oh my god, how good of compile errors could i make if I had access to something like that
21:57:22*luis joined #nim
21:57:39FromDiscord<haxscramper> Instead of this BS with 'static assert' and generation of string literals for errors
21:57:40*sealmove quit (Read error: Connection reset by peer)
21:58:40*zidsal_ joined #nim
22:00:00FromGitter<sealmove> People here have suggested a really convoluted hack for this, but it only gets you so far. It didn't allow me yo obtain the type programmatically, but only to echo it.
22:00:19FromDiscord<haxscramper> Or things like two-level macro calls where you have untyped template to generate call to typed macro which in turn can access types
22:00:34FromGitter<sealmove> Yeah that
22:02:01*zidsal quit (Ping timeout: 264 seconds)
22:02:21FromGitter<sealmove> In my case I need to generate type definitions which depend on the type of an expression which is transpiled to Nim
22:03:13FromGitter<sealmove> So it's not evem 2-lvl macro, but the idea is similar
22:03:18FromGitter<sealmove> even*
22:03:20FromDiscord<haxscramper> Well, in general it all probably boils down to `compiler-as-a-collection-of-libraries-with-nimscript-as-binding-glue-at-runtime`
22:03:39FromDiscord<haxscramper> which exposes API for said libraries for manipilation of the AST etc.
22:06:51FromGitter<sealmove> Should be doable
22:07:46FromGitter<sealmove> I'll make a git issue after some investigation
22:07:48FromDiscord<haxscramper> https://github.com/nim-lang/Nim/milestone/5
22:07:58FromDiscord<PizzaFox> could the `endians` library maybe get a little bit of js support that would be good i think
22:08:17FromDiscord<PizzaFox> we have the uint8arrays
22:08:20*Jesin joined #nim
22:08:26FromDiscord<PizzaFox> we have the buffers
22:11:04FromDiscord<klaos> ello
22:11:13FromDiscord<klaos> can i ask for help with requests here?
22:11:24FromDiscord<klaos> (edit) 'requests' => 'httpclient'
22:11:29FromDiscord<klaos> (edit) 'httpclient' => 'httpclient/asyncdispatch'
22:15:41*FromDiscord quit (Remote host closed the connection)
22:15:58*FromDiscord joined #nim
22:16:12*FromDiscord quit (Remote host closed the connection)
22:16:30*FromDiscord joined #nim
22:17:01*FromDiscord quit (Remote host closed the connection)
22:17:14*FromDiscord joined #nim
22:18:26*zidsal_ quit (Read error: Connection reset by peer)
22:18:47*luis quit (Ping timeout: 272 seconds)
22:19:51*FromDiscord quit (Remote host closed the connection)
22:20:04*FromDiscord joined #nim
22:21:27*FromDiscord quit (Remote host closed the connection)
22:21:40*FromDiscord joined #nim
22:22:56*FromDiscord quit (Remote host closed the connection)
22:23:18*FromDiscord joined #nim
22:23:51FromDiscord<Avatarfighter> So `client.getContent` returns to you a string that is the body of your request. When you parseJson you can get a specific node with the `[]` operator like you were doing, but to get the string you need to do `JsonNode.getStr` so with your code it would be like this `proxy = parseJson(content)["proxy"].getStr`
22:24:14FromDiscord<klaos> o lit
22:24:54FromDiscord<Avatarfighter> if you're going to return the value of the proxy variable you can do that right away by instead setting the last line of your proc as `result = parseJson(content)["proxy"].getStr`, result is a magic variable found in all procs
22:25:18FromDiscord<Avatarfighter> it returns whatever its set to unless you implicitly return a value
22:25:21FromDiscord<klaos> (edit) 'lit' => 'lit, ye but still the instantiation of 'async' from here thing'
22:25:31FromDiscord<klaos> (edit) removed 'o lit,' | removed 'but still the instantiation of 'async' from here thing'
22:25:48FromDiscord<klaos> lit lit lit
22:27:21*luis joined #nim
22:47:32FromDiscord<Yardanico> Just did a random YouTube search and found that there seems to be more Nim videos
22:47:37FromDiscord<Yardanico> Like for example this https://youtu.be/XnYDxFtKDJA
22:47:46FromDiscord<Yardanico> Or some much recent tutorial videos
22:47:50FromDiscord<Yardanico> not by kiloneie
22:50:30*sealmove joined #nim
22:50:57FromDiscord<Avatarfighter> the community is growing \o/
22:51:19FromDiscord<Yardanico> https://youtu.be/xu0jWgGoDjc
22:51:47FromDiscord<Yardanico> Nim at 9:25
22:51:59FromDiscord<Yardanico> It's growth vs Crystal
22:52:09FromDiscord<Yardanico> And more
22:52:13FromDiscord<Avatarfighter> oh wow
22:52:21FromDiscord<Avatarfighter> nim and crystal have similar trends
22:52:30FromDiscord<Avatarfighter> imo
22:59:03FromDiscord<Yardanico> https://youtu.be/DWmauiHoB3A
22:59:33FromDiscord<Yardanico> He actually has 61 videos on Nim
22:59:34FromDiscord<Yardanico> https://www.youtube.com/playlist?list=PLSmTe_AayBFPoHvSnvyNwehoLELaZTdaf
22:59:49FromDiscord<Avatarfighter> that's super cool
22:59:57*luis quit (Ping timeout: 272 seconds)
22:59:59FromDiscord<Yardanico> Or rather they*
23:00:02FromDiscord<Yardanico> It's multiple people
23:00:10FromDiscord<Avatarfighter> that's EVEN COOLER!
23:00:25*luis joined #nim
23:00:37FromDiscord<Yardanico> Different videos have different people, maybe they're students learning or something
23:00:46FromDiscord<Avatarfighter> yeah maybe?
23:00:57FromDiscord<Avatarfighter> !repo bigint
23:00:58disbothttps://github.com/def-/nim-bigints -- 9nim-bigints: 11BigInts for Nim 15 48⭐ 15🍴 7& 4 more...
23:01:53FromDiscord<Yardanico> https://youtu.be/DkG8C_AFj4k
23:01:55FromDiscord<dom96> > https://www.youtube.com/playlist?list=PLSmTe_AayBFPoHvSnvyNwehoLELaZTdaf↵amazing
23:02:42FromDiscord<Yardanico> https://youtu.be/5l54EUN3fds
23:02:57FromDiscord<Avatarfighter> wow wtf
23:03:01FromDiscord<Avatarfighter> ive never seen this syntax
23:03:09FromDiscord<Avatarfighter> sent a code paste, see https://play.nim-lang.org/#ix=2Axl
23:04:03FromDiscord<dom96> Regarding lang popularity, my favourite metrics are Wikipedia page view stats: https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2015-07&end=2020-09&pages=Nim_(programming_language)|Crystal_(programming_language)|Rust_(programming_language)|Python_(programming_language)
23:04:05FromDiscord<Yardanico> it's term rewriting macros
23:04:11FromDiscord<dom96> (Be sure to enable logarithmic scale)
23:04:30FromDiscord<Avatarfighter> I've never seen that @Yardanico
23:04:45FromDiscord<Yardanico> @Avatarfighter https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros
23:04:54FromDiscord<Avatarfighter> i've never read the manual apparently
23:05:00FromDiscord<Yardanico> It's an experimental feature and mainly could help with optimization
23:05:05FromDiscord<Yardanico> Or crazy things like
23:05:11FromDiscord<Yardanico> !repo strenc
23:05:12disbothttps://github.com/Yardanico/nim-strenc -- 9nim-strenc: 11A tiny library to automatically encrypt string literals in Nim code 15 12⭐ 1🍴
23:05:20FromDiscord<Avatarfighter> i love this library
23:05:21FromDiscord<dom96> It's not experimental AFAIK
23:05:23FromDiscord<Avatarfighter> i use it all the time
23:05:49FromDiscord<Yardanico> @dom96 well it is experimental really
23:06:03disruptekit's getting reimpl'd.
23:06:10FromDiscord<Yardanico> Is it?
23:06:33FromDiscord<Yardanico> give relevant commits/PRs, I'm curious
23:06:39disruptekwell, it has to get rfc'd first.
23:06:45*dv-^_^6193923289 joined #nim
23:07:17disrupteki mean, i wouldn't exploit it much if you are worried about having to rewrite.
23:07:18FromDiscord<Avatarfighter> gosh i want candy rn
23:07:51FromDiscord<Yardanico> no I'm not
23:08:07FromDiscord<Yardanico> But there's nothing right now, so it's only your thinking :P
23:08:14FromDiscord<Yardanico> i thought there was something already
23:08:24disrupteki just said it's pending an rfc.
23:10:05*dv-^_^619392328 quit (Ping timeout: 240 seconds)
23:10:40FromDiscord<Avatarfighter> why
23:10:55FromDiscord<Avatarfighter> actually i take that back
23:10:59disruptekbecause, like features, rfcs start in the /unwritten/ state.
23:11:24FromDiscord<Avatarfighter> just write it lol /s
23:11:33FromDiscord<Yardanico> @dom96 seems like D popularity is really declining
23:11:34FromDiscord<Yardanico> https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2015-07&end=2020-09&pages=Nim_(programming_language)|Crystal_(programming_language)|D_(programming_language)
23:11:36disrupteki can't. it's not my rfc.
23:11:47disrupteki think term rewriting macros are too powerful.
23:11:48FromDiscord<Yardanico> The graph is very clear on that
23:11:59*luis quit (Ping timeout: 272 seconds)
23:12:09FromDiscord<Yardanico> what about converters
23:12:25disruptekwhat about them?
23:12:59*Senketsu joined #nim
23:14:48FromDiscord<Avatarfighter> what even is a converter
23:15:23disruptekthey are mines laid by evil programmers to fuck up your afternoon.
23:15:37FromDiscord<Yardanico> a routine which will be called for trying to convert one type into another *implicitly*
23:15:38FromDiscord<Avatarfighter> rip why did yardanico make them 😢
23:15:41FromDiscord<Avatarfighter> ok
23:15:43FromDiscord<Yardanico> i didn't
23:15:48FromDiscord<Yardanico> they can be useful
23:15:53FromDiscord<Avatarfighter> I'm just teasing 😛
23:15:55FromDiscord<Yardanico> For example when dealing with FFI
23:16:03FromDiscord<Yardanico> so you write less verbose code
23:16:17disrupteki think their use should be much more limited.
23:16:27disruptekgrandfathering types, mostly.
23:16:44FromDiscord<Yardanico> https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2017-01&end=2020-09&pages=Nim_(programming_language)|Crystal_(programming_language)|D_(programming_language)|Zig_(programming_language)|Vala_(programming_language)|Haxe_(programming_language)|Pascal_(programming_language)
23:17:01FromDiscord<Yardanico> Oh no discord too stupid
23:17:10FromDiscord<Yardanico> Doesn't know that ) is valid in the url
23:17:24FromDiscord<Yardanico> https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2017-01&end=2020-09&pages=Nim_(programming_language)|Crystal_(programming_language)|D_(programming_language)|Zig_(programming_language)|Vala_(programming_language)|Haxe_(programming_language)|Pascal_(programming_language) dummy text
23:18:22FromDiscord<Yardanico> https://pageviews.toolforge.org/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2017-01&end=2020-09&pages=Nim_(programming_language)%7CCrystal_(programming_language)%7CD_(programming_language)%7CZig_(programming_language)%7CVala_(programming_language)%7CHaxe_(programming_language)%7CPascal_(programming_language)
23:23:54*luis joined #nim
23:25:24*gmaggior quit (Quit: Leaving)
23:25:38*sealmove quit (Quit: WeeChat 2.9)
23:25:51*gmaggior joined #nim
23:26:24*gmaggior quit (Remote host closed the connection)
23:30:38*bunbunbunbunny joined #nim
23:34:40*a_b_m quit (Quit: Leaving)
23:39:03*themoon[m] joined #nim