<< 26-08-2020 >>

00:25:53*vicfred_ quit (Quit: Leaving)
00:26:12*vicfred joined #nim
00:40:07*Trustable quit (Remote host closed the connection)
01:01:24*Zevv quit (Ping timeout: 256 seconds)
01:08:11*Zevv joined #nim
01:11:55*theelous3 quit (Ping timeout: 240 seconds)
01:12:39*kenran joined #nim
01:17:23*kenran quit (Ping timeout: 240 seconds)
01:40:26disruptekto quote durian dan, "i smell like i code."
01:41:25*apahl quit (Ping timeout: 240 seconds)
01:43:46*apahl joined #nim
02:15:37*waleee-cl quit (Quit: Connection closed for inactivity)
02:24:27*muffindrake quit (Ping timeout: 260 seconds)
02:26:40*muffindrake joined #nim
03:06:34*arecacea1 quit (Remote host closed the connection)
03:06:57*arecacea1 joined #nim
03:13:54*kenran joined #nim
03:14:45*thomasross quit (Ping timeout: 265 seconds)
03:18:11*kenran quit (Ping timeout: 240 seconds)
03:25:27FromDiscord<iWonderAboutTuatara> Hey, is there a relatively easy way to use py libraries in Nim?
03:25:36FromDiscord<iWonderAboutTuatara> If I have to rewrite it's probably not worth it
03:25:40FromDiscord<Kaynato> I've had good experience with nimpy
03:25:53FromDiscord<iWonderAboutTuatara> I've heard it works well
03:26:02FromDiscord<iWonderAboutTuatara> I'm trying to get moviepy though
03:26:24FromDiscord<iWonderAboutTuatara> Or anything else in Nim that can cut videos with ffmpeg
03:29:03*rockcavera quit (Remote host closed the connection)
03:33:13*arecacea1 quit (Remote host closed the connection)
03:33:38*arecacea1 joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:33:54*krux02_ quit (Remote host closed the connection)
04:35:42*narimiran joined #nim
04:42:24*krux02 joined #nim
05:00:34*krux02 quit (Remote host closed the connection)
05:14:28*kenran joined #nim
05:19:56*kenran quit (Ping timeout: 265 seconds)
05:21:40kinkinkijkiniWonderAboutTuatara is there a set of libav[codec] bindings for nim that you can find?
05:23:03kinkinkijkinhmm i found some though they're from 2017 and auto-generated
05:24:44*kenran joined #nim
05:40:35voltistHere's a super weird problem: Starting any network manager (NetworkManager, wpa_supplicant, etc.) when I have a USB wifi dongle plugged in stalls all gui applications and sudo without using any RAM
05:40:42voltistI think my computer is haunted
05:41:08FromDiscord<Elegant Beef> Just a tad bit
05:43:22*apahl quit (Ping timeout: 260 seconds)
05:43:50FromDiscord<Rika> its reinstall time
05:44:02*apahl joined #nim
05:44:23voltistNoooooo!
05:44:52FromDiscord<Elegant Beef> Time to install X distro
05:45:06FromDiscord<Elegant Beef> X being the distro that the reader prefers
05:45:58voltistOf course
05:48:42FromDiscord<Rika> `echo &"{134.693:>3.0f}"` how can i get this number with no trailing decimal point?
05:48:50FromDiscord<Rika> without stripping it out manually, of course
05:52:32FromDiscord<Elegant Beef> I dont see a way to output the integer part of the float
05:52:59FromDiscord<Elegant Beef> Oh guess it also rounds
05:53:21FromDiscord<Rika> rounding is fine
05:53:31FromDiscord<Rika> i just dont want the damn trailing decimal point
05:54:19narimiran`echo (&"{134.693:>3.0f}").strip(chars = {'.'})` :D
05:54:40FromDiscord<Elegant Beef> Simpler to just `echo &"{134.693.round.int}"`
05:54:42FromDiscord<Rika> > without stripping it out manually, of course
05:55:15FromDiscord<Rika> this is probably one reason why we cant just remove round i guess
05:55:34FromDiscord<Elegant Beef> There are only two references to decimal points both just talk about characters.
05:55:38FromDiscord<Elegant Beef> Why would you remove round?
05:55:53FromDiscord<Rika> theres a lot of discussion to remove round
05:56:02narimiranbeCaUsE it Is nOt eXaCT
05:56:17FromDiscord<Rika> kru_ told me it wasnt that
05:56:29FromDiscord<Rika> or idk who told me exactly actually
05:59:03*Zevv quit (Quit: leaving)
05:59:12FromDiscord<Elegant Beef> both round procs are from C Libs
05:59:16*Zevv joined #nim
05:59:51narimiranif you want only `134` (without rounding), i think the simplest thing to do is just `int 134.693`
06:01:18FromDiscord<Rika> what would i do if i do? the strip part?
06:02:33narimirani don't understand the question
06:07:30*endragor quit (Remote host closed the connection)
06:07:57*endragor joined #nim
06:10:11FromDiscord<Rika> what would i do if i wanted rounding
06:14:07FromDiscord<Elegant Beef> I'd assume use the round to int method or striip
06:14:37*endragor quit (Ping timeout: 264 seconds)
06:18:32narimiran@Rika `round.int` solution mentioned before
06:21:03FromDiscord<Rika> okay
06:21:27*solitudesf joined #nim
06:21:30*endragor joined #nim
06:32:31FromDiscord<Rika> wish i could do optional dependencies in nimble
06:36:06FromDiscord<Elegant Beef> couldnt you use `when compiles( import module)`
06:36:37FromDiscord<Rika> i mean when someone installs the library they'd see that there are optional dependencies available
06:36:47FromDiscord<Rika> that would be nice kinda
06:37:11FromDiscord<Rika> dont want to require installing `stint` for a fuckin progress bar
06:37:29FromDiscord<Rika> actually wait just realized i dont need that
06:37:37FromDiscord<Rika> i need another package, something for float128
06:37:37FromDiscord<Elegant Beef> Cant you use the when compiles for where you'd use the module
06:37:50FromDiscord<Rika> i can but they would never realize that there are optional deps
06:37:53FromDiscord<Rika> until they read the code
06:38:10FromDiscord<Elegant Beef> Well put it on your readme no?
06:38:28FromDiscord<Elegant Beef> *if you require X module in your nimble you can use Y*
06:38:31FromDiscord<Rika> i guess
06:39:14FromDiscord<Rika> huh nim has no "pure" big float libraries
06:39:24FromDiscord<Rika> or maybe im not searching hard enough
06:40:00FromDiscord<Rika> guess its time to implement it myself or something
06:40:57FromDiscord<Elegant Beef> this exists https://github.com/JohnAD/decimal128
06:41:11FromDiscord<Rika> okay thats good enough, should have float tag imo
06:42:08FromDiscord<Elegant Beef> When pmunch looked at it for smalltalk it lacked anything but addition/subtraction so no clue if it's changed
06:42:36FromDiscord<Elegant Beef> lol smalltalk, my brain is dumb, stacklang
06:42:46FromDiscord<Rika> last commit 2 months ago so
06:43:01FromDiscord<Rika> ah its not a float
06:43:15FromDiscord<Rika> its literally a decimal type; i dont know if i need decimal accuracy
06:43:20FromDiscord<Rika> i only need bigger floats ๐Ÿ˜›
06:43:41FromDiscord<Rika> wonder if using float128 is faster than a dec128
06:45:28FromDiscord<Elegant Beef> Is speed really an issue when it comes to a TUI progress bar?
06:46:26FromDiscord<Rika> no its not, hence my "wondering"
06:46:40FromDiscord<Rika> it would be nice to learn how to make this though
06:46:54FromDiscord<Elegant Beef> float 128?
06:47:06*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:47:32FromDiscord<Rika> yeah
06:55:52FromDiscord<Rika> perhaps ill focus on making this threaded instead of contemplating
07:18:19FromDiscord<Admin> How would i change the available elliptic curves for a http client ?
07:20:42*Senketsu joined #nim
07:25:11*Senketsu quit (Ping timeout: 256 seconds)
07:28:30FromDiscord<Elegant Beef> Eliptical curves for http?
07:31:06*krux02 joined #nim
07:34:38FromDiscord<Admin> yes
07:34:55FromDiscord<Admin> the ssl context
07:39:26FromDiscord<mratsim> same question as yesterday, same answer, you need to tinker with the OpenSSL wrapper low-level internals
07:39:41FromDiscord<mratsim> https://nim-lang.org/docs/openssl.html
07:42:05FromDiscord<Admin> sorry feel asleep yday
07:42:13FromDiscord<Admin> yea i looked at that but i dont see the settin
07:42:14FromDiscord<Admin> (edit) 'settin' => 'setting'
07:46:40*andinus joined #nim
07:47:01Zevvalehander92: what about targetting webassmbly
07:47:55*apahl quit (Ping timeout: 240 seconds)
07:49:12*apahl joined #nim
07:51:44*PMunch joined #nim
07:53:37PMunch@Elegant, it was mostly trig functions and such I was missing
07:53:51PMunchBasically I wanted a drop in replacement for the math module
07:54:02FromDiscord<Elegant Beef> I did say anything but add/subtract
07:54:14PMunchBecause everything in the math module is available in stacklang :)
07:54:23PMunchAh, just skimmed the log :P
07:54:31PMunchI think it has multiplication and division as well
07:54:51FromDiscord<Elegant Beef> When you going to accept my optionutils PR, or are you?
07:55:52PMunchHmm, lets see
07:55:52FromDiscord<Elegant Beef> *The code quality is subpar and looks like a monkey wrote it* That's what i expect to see in response
07:56:33PMunchWhy do you do this instead of body[6]: body.findChild(it.kind == nnkStmtList)
07:57:20FromDiscord<Elegant Beef> Was uncertain if it'd move position
07:57:43PMunchNah, they're stable
07:57:55PMunchYou can also use the macroutils module I wrote and just do body.body
07:58:06FromDiscord<Elegant Beef> ah
07:58:12PMunch(But `body` is a but poorly named :P)
07:58:49FromDiscord<Elegant Beef> it's the body of the proc def ๐Ÿ˜„
07:59:24PMunchNo I meant the argument to withSome, that should just be called `procDef` or something
07:59:37FromDiscord<Elegant Beef> probably
07:59:38PMunchThen it would be `procDef.body` if you were using macroutils
07:59:49PMunchWhich is quite readable :)
08:00:58FromDiscord<Elegant Beef> But that adds a dependancy to the repo which you previously didnt have ๐Ÿ˜›
08:05:29PMunchThat's true
08:05:41PMunchBut libraries are written to be used :)
08:12:37FromDiscord<Elegant Beef> So those are you only complaints?
08:12:54FromDiscord<Rika> people hate large dependencies, not dependencies in general, right?
08:12:58PMunchHold on, I'm leaving my feedback as a review on GitHub :)
08:13:56FromDiscord<Elegant Beef> I think they hate the spiderweb of dependancies
08:14:56FromDiscord<Elegant Beef> Also no clue if you noticed pmunch but i didnt `if(a)`
08:15:16FromDiscord<Elegant Beef> I wrote mostly nimidiotic code
08:16:13*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:18:56PMunch`if(a)`?
08:19:22stisa[m]is there somewhere I can read about how sets are implemented in nim? `echo sizeof({1})` gives me 8192 and i'd like to understand why
08:19:32FromDiscord<Elegant Beef> i typically use C like if statements
08:19:42*awe00 joined #nim
08:19:47FromDiscord<Elegant Beef> Where they're wrapped in `()`
08:19:58PMunchAaah, right
08:20:31FromDiscord<mratsim> @stisa, sets can hold up to int16 (enum are at most 2 bytes)
08:21:19FromDiscord<Varriount> @stisa They are implemented as bit sets
08:22:07FromDiscord<mratsim> i.e. I think if you use a set for an integer it assumes you may have up to int16 value inside, though it doesn't seem to fit with 8192 in size since 2 bytes can hold 65536 values
08:22:43FromDiscord<mratsim> anyway it's all there: https://github.com/nim-lang/Nim/blob/devel/compiler/bitsets.nim
08:23:08FromDiscord<Varriount> I really do like Nim's built-in sets they are quite useful
08:23:22stisa[m]thanks, I'll have a look
08:23:34stisa[m]I was searching for nkCurly in the compiler and got a little lost
08:23:36FromDiscord<mratsim> ah sorry this seems a fallback
08:23:50FromDiscord<mratsim> for bootstrapping maybe
08:24:00ForumUpdaterBotNew thread by Halloleo: How to know where a proc is defined - or: Newbie tries to get used to unqualified imports, see https://forum.nim-lang.org/t/6728
08:24:20FromDiscord<Varriount> https://en.m.wikipedia.org/wiki/Bit_array
08:24:35FromDiscord<Varriount> @stisa ^
08:25:23FromDiscord<mratsim> I'm pretty sure Nim bitsets are stack allocated: https://github.com/nim-lang/Nim/blob/v1.2.6/compiler/bitsets.nim#L15
08:25:30FromDiscord<mratsim> Was i wrong?
08:25:54PMunchThey are implemented as bitsets as you say so if the value 0 is in the set then the first bit is set. If the value uint16.high is in the set then the topmost bit is set. So it requires one bit per value, uint16 can store 65536 different values, and at 8 bits per byte that is 65536/8 = 8192 bytes
08:25:59PMunchIt all makes sense
08:26:33FromDiscord<mratsim> ah right
08:27:27stisa[m]ok, thanks! I was just a little surprised, but it makes sense yeah
08:28:04FromDiscord<Varriount> @stisa It might seem limiting, but you'd be surprised at how many things can be represented using enums
08:31:51stisa[m]I know I know, I was just trying to understand them better to implement them in my toy webassembly backend
08:33:15*fowl_ quit (Read error: Connection reset by peer)
08:33:26*sirn quit (Read error: Connection reset by peer)
08:33:54*kwilczynski quit (Ping timeout: 260 seconds)
08:35:04*sirn joined #nim
08:36:31*sirn quit (Max SendQ exceeded)
08:36:47FromDiscord<mratsim> I should probably write a bitarray or packed array library
08:38:31FromDiscord<mratsim> It's actually super simple once you figure out the math: https://github.com/mratsim/constantine/blob/master/constantine/elliptic/ec_endomorphism_accel.nim#L70-L102
08:38:38*sirn joined #nim
08:39:17*fowl_ joined #nim
08:40:21*kwilczynski joined #nim
08:40:44FromDiscord<Rika> how do i check if threads is off again
08:42:31FromDiscord<Elegant Beef> Also pmunch turnsout base `macros` has a body accessor
08:48:52FromDiscord<Clyybber> @Rika compileOption("threads")
08:49:20FromDiscord<Rika> okay thanks
08:51:07*quetzalb quit (Remote host closed the connection)
08:52:07FromGitter<alehander92> zevv well
08:52:12FromGitter<alehander92> maybe ? i am not sure
08:52:12FromDiscord<Elegant Beef> But anywho pmunch should fit your entire review
09:01:22*rakgew[m] joined #nim
09:03:25PMunchOh yes, that was added at some point
09:03:49PMunchmacroutils is a lot more comprehensive though, it has all the accessors you would ever need
09:13:18*rakgew[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/sDFAQqACVSNeMBBjhMTdhkts/message.txt >
09:21:47FromDiscord<Rika> @rakgew https://nim-lang.org/docs/nimc.html#cross-compilation you need to further move the c sources and compile on the machine itself or use a c cross compiler
09:23:55FromDiscord<Rika> also i think its `aarch64` and not arm64, but i dont know
09:25:47*pangey quit (Ping timeout: 240 seconds)
09:26:04*lritter joined #nim
09:27:56rakgew[m]thank you Rika. is it not possible to use build it on the amd64 machine via cross compiler tool chain as mentioned in the docs?
09:28:34*pangey joined #nim
09:29:36*rakgew[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/PBHmtbrFnbtEULuMzNjzKIqe/message.txt >
09:30:54rakgew[m]I tried aarch64 earlier, but the the compiler told me aarch64 would not be available but arm64 was listed.
09:36:01FromDiscord<lqdev> what happens if nim fails to load some dynlib? does it kill the program?
09:38:49FromDiscord<dom96> yes
09:38:56FromDiscord<lqdev> damn
09:39:52FromDiscord<lqdev> i'm trying to load Xlib but make it _optional_
09:39:58FromDiscord<mratsim> @rakgew, you need to use arm64 not aarch64, and there is a recent post detailing cross compilation via Github Actions in the forum
09:40:01PMunch@Elegant, added another comment
09:40:08FromDiscord<lqdev> guess i'll have to load it myself using the dynlib module
09:46:33Araqlqdev: doesn't sound like a good idea
09:47:17Araqmake up your mind if you need Xlib or not
09:47:31Araqand in the worst case, provide two separate binaries
09:47:44Araqso that your users can understand the consequences
09:48:21Araq"huh, my experience with the software just got so much shitter, why is that?" is not good design
09:49:26FromDiscord<lqdev> i need xlib in case it's installed on the user's PC
09:49:28FromDiscord<lqdev> otherwise wayland
09:51:36FromDiscord<lqdev> and also, i don't want to force X11 users to install wayland
09:53:23AraqI'd build two binaries and maybe a startup dispatch script
09:54:23Araqthe script can then fail in all sort of mysterious ways and the resulting Unix experience will make people happy
09:54:49FromDiscord<lqdev> but i'm not building an app, i'm building a library
09:55:02FromDiscord<lqdev> i don't want my users to have to do some weird business with scripts and whatnot.
09:57:07AraqI don't want my libraries to do runtime dependency detection
09:57:17Araqcan't QA that
09:57:34Araqbetter offer a --define switch
09:58:30rakgew[m]mratsim thank you for the pointer! I will search for that forum post.
10:04:21*theelous3 joined #nim
10:04:46*eery quit (Ping timeout: 256 seconds)
10:09:53*eery joined #nim
10:11:44*tane joined #nim
10:18:29ZevvPMunch: repo changed to https://github.com/zevv/fixedpoint. I made a stupid hacky solution for the generic converter problem: a template is used to both define the type, and to create a toType() proc for converting static[float] to that specific type
10:19:59Zevvit's pretty tedious to create all the operators for mixed fp sizes tho :)
10:24:06PMunch"Mixing different fixed point types in operations is someimes supported." haha :P
10:38:28planetis[m]why did you switch to object from distinct?
10:40:41*FromDiscord quit (Remote host closed the connection)
10:40:56*FromDiscord joined #nim
10:42:55Zevvto avoid confusion if people try to convert
10:43:03Zevvthat just shouldnt work
10:43:40FromGitter<alehander92> guys
10:43:48FromGitter<alehander92> do you want to solve the collatz conjecture
10:47:09*awe00 quit (Ping timeout: 258 seconds)
10:48:46PMunchWell, yes
10:49:03Zevvoh i did some time ago, but i guess i forgot how
10:49:04PMunchZevv, is your package in nimble?
10:49:34Zevvnope. just nimble git it for now. im not even sure its fit for consumption
10:49:48Zevvits more like an experiment to see how far typing can take this
10:50:59Zevvi think the mechanics work, but the implementation is tricky and testing is a pita
10:51:45*awe00 joined #nim
10:52:05Araqhttps://github.com/nim-lang/RFCs/issues/247 arrived
10:52:08disbotโžฅ Flexible serialization with a mild focus on JSON ; snippet at 12https://play.nim-lang.org/#ix=2vhM
10:52:18PMunchI guess I'll test it in production and see :)
10:54:29FromGitter<alehander92> finally
10:55:42FromDiscord<Rika> thats a nice rfc
10:55:52FromGitter<alehander92> btw the json issue is more subtle for enums
10:56:03FromGitter<alehander92> in the javascript backend it's so much easier to just map them to integers
10:56:19FromGitter<alehander92> because then the direct javascript parse generates a value
10:56:27FromGitter<alehander92> that can be usually cast-ed to the nim type
10:56:39FromGitter<alehander92> but i guess this isn't so important indeed
10:57:14FromGitter<alehander92> but why not `to(Type, ..)` similarly to the status serialization
10:57:57FromDiscord<Rika> json is meant to be human readable right? so that means enums should map to strings no?
10:58:30FromDiscord<Rika> imagine having an object that has fields that are of different enums
10:58:49FromDiscord<Rika> the integer mess you'd have after converting to json...
10:59:37FromGitter<alehander92> yeah i agree, it's just a note
11:00:29Zevvoh look PMunch, I accidentally gave you full access to the repo
11:00:32Zevvhow convenient
11:00:41PMunchHaha :P
11:00:50PMunchNot wanting to deal with PRs?
11:01:34Zevvim on holidays remember
11:01:54PMunchOooh right
11:15:36planetis[m]now i wonder if unsigned ints should be used for fixed point
11:15:54planetis[m]i think all the libraries i saw used signed ints
11:17:51planetis[m]you need to take care of the sign bit manually when using uints
11:23:48planetis[m]do you specifically need to be able to do ops between different number formats?
11:30:28planetis[m]i should benchmark the distinct version versus the object, i suspect distinct might be faster
11:41:25Zevvwell, just use signed for signed and unsigned for unsigned, right
11:41:41Zevvand ops between formats is power
11:42:01Zevvlike for pmunchs game. speed is s8.2, position is u16.4
11:44:38FromDiscord<19> is it normal to take 5.193 sec to compile `echo "hello world"`?
11:44:57FromDiscord<lqdev> not really
11:45:08FromDiscord<Recruit_main707> the first time maybe
11:45:21FromDiscord<Recruit_main707> if your pc is not very fast
11:45:42FromDiscord<19> i have a fast machine
11:46:30FromDiscord<Rika> it should be sub-second afaik
11:47:35FromDiscord<19> weird
11:47:57FromDiscord<19> in vcc it takes 5.193, in gcc it takes 3.284
11:49:13FromDiscord<Rika> thats oddly high
11:49:30FromDiscord<Rika> what machine are you using
11:49:43FromDiscord<19> win 10, threadripper 2990wx
11:50:24FromDiscord<Rika> god damn okay
11:50:28FromDiscord<Rika> that is weird
11:54:03Zevvhow did you install nim?\
11:55:06FromDiscord<19> downloaded the zip and extracted them
11:55:17FromDiscord<19> then ran the finish.exe
11:55:25Araqwith unsigned you'll never find all the overflow bugs, sounds dangerous
11:55:53Zevvtrue, but didn't inent to :)
11:59:44narimiran@19 do you have antivirus?
12:00:17FromDiscord<19> no
12:00:58FromDiscord<19> it compiles an sdl app faster than a hello world app
12:01:19FromDiscord<Recruit_main707> how can i define a radian type, so that it will go down to cero if it reaches 2*pi? maybe with a concept?
12:02:10*NimBot joined #nim
12:05:52FromDiscord<19> sdl app: 32005 LOC; 2.797 sec; 24.684MiB peakmem;โ†ตhello world app: 14209 LOC; 2.636 sec; 16.078MiB peakmem; โ†ตok its back to 2.6 secโ†ตtbh i dont really care xD
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:46*supakeen joined #nim
12:09:18*theelous3_ joined #nim
12:23:40PMunch@19, that still sounds high
12:24:07PMunchOn my machine (i7 4770K) it takes 0.47s to compile `echo "hello world"`
12:24:34PMunchTo compile a release build it takes 1.3s
12:24:47PMunchDo you have a nim.cfg with some weird parameters in it?
12:25:40PMunchHmm, I think it's time to refactor this project now..
12:26:15PMunchPart of the GameJam challenge was to have pretty code, but since it's a microcontroller that sometimes have to yield to efficiency
12:26:48PMunchNow I just need to find the perfect set of templates to hide all the optimisations and make the code super clean and readable
12:26:57FromDiscord<19> i only change the nimcfg cc parameter to either vcc or gcc
12:27:11PMunchHmm
12:27:16PMunchMy tests where done with GCC
12:27:28PMunchBut I'm on Linux, so that might change something
12:39:32*rockcavera joined #nim
12:39:53PMunchCan you do a `case` on a static enum and have it work as a series of when statements?
12:40:26Araqnah
12:40:32Araqunfortunately not
12:40:37ForumUpdaterBotNew thread by Krisppurg: Dimscord: Library for interacting with the Discord API., see https://forum.nim-lang.org/t/6729
12:41:24PMunchHmm, bummer
12:41:47PMunchGuess I could make some kind of macro for it...
12:42:04PMunchToo bad `of` isn't parseable unless it's in a case statement..
12:44:09*lritter quit (Quit: Leaving)
12:45:13Araqit is parsable
12:45:19Araqfoobar:
12:45:22Araq action
12:45:27Araqof x:
12:45:29Araq ...
12:47:33*FromDiscord quit (Remote host closed the connection)
12:47:47*FromDiscord joined #nim
12:52:12*theelous3__ joined #nim
12:52:37PMunchReally?
12:52:42PMunchI seem to remember it wasn't
12:55:14*theelous3 quit (Ping timeout: 260 seconds)
12:57:23PMunchOg nice, this is perfect!
13:04:29FromDiscord<dom96> Araq: huh, I see in your RFC that the concept syntax isn't the currently implemented one
13:04:36FromDiscord<dom96> are you planning to finally change the syntax?
13:20:20FromDiscord<lqdev> PMunch: yeah `of` is just a regular operator that you can use both in prefix and infix form
13:21:51*krux02 quit (Remote host closed the connection)
13:30:56Araqdom96: couldn't be bothered to write it in today's concept syntax
13:31:26FromDiscord<dom96> can we prioritise fixing concepts? ๐Ÿ™‚
13:31:50AraqI'm considering it now that I wrote this RFC
13:31:54FromDiscord<dom96> yay
13:32:10Araqit's telling I couldn't even remember the current syntax enough to write my RFC
13:33:17FromDiscord<dom96> I tried to use concepts for my thrift lib and gave up: https://media.discordapp.net/attachments/371759389889003532/748173222255656981/Screen_Shot_2020-08-26_at_14.32.09.png
13:38:07FromDiscord<Kiloneie> Is there document describing the use cases/pros/cons of each memory management system available in Nim ?
13:41:42*waleee-cl joined #nim
13:42:28FromDiscord<Kiloneie> Also is Orc meant to be Nim's default GC in the future ?
13:42:46FromDiscord<Recruit_main707> i think so
13:42:57*arecacea1 quit (Remote host closed the connection)
13:43:26*arecacea1 joined #nim
13:43:42FromDiscord<Recruit_main707> https://forum.nim-lang.org/t/5232
13:43:56FromDiscord<Recruit_main707> this talks about the gcs available.
13:44:44bunghttps://nim-lang.org/docs/gc.html
13:45:02FromDiscord<Kiloneie> Okay i will read about it
13:46:34FromDiscord<Kiloneie> https://nim-lang.org/docs/gc.html This does not give much information. Like with boehm GC, first off it says it's based on it, meaning it's probably not exactly 100% boehm, and secondly you gotta go somewhere else to read more about it... No quick comparison there.
13:46:48Zevv*very* preliminary, but i hope to address more of this in here: http://zevv.nl/nim-memory/nim-arc.html
13:47:00Zevvprobably not of much use for you now yet :/
13:47:44FromDiscord<Kiloneie> Nice, this work in progress is what i want to see, and would help others to decide on the memory management solution to use
13:47:51FromDiscord<Clyybber> The current concept syntax is fine, its not arbitrary or complex
13:48:16FromDiscord<Clyybber> The syntax you want should be enabled via a macro
13:51:35FromDiscord<Kiloneie> I should probably do a video on this in the future(making videos is my way of gathering data with explanations for myself)
14:02:42FromDiscord<Kiloneie> Why is Orc going to replace the current Deffered reference counting GC ? (I read some on ARC, but i don't really understand it just yet)
14:04:05FromDiscord<Clyybber> because its simpler and sometimes faster
14:05:01FromGitter<alehander92> dom96 sorry about that: i also think the concept syntax is ok though
14:05:20FromGitter<alehander92> maybe with a bit better error messages
14:05:53FromDiscord<Kiloneie> That's odd since the current GC solution is already simple and fast, what do i know D:
14:06:41FromDiscord<dom96> Kiloneie: it's definitely fast enough, I can sympathise with it being complex though
14:08:06FromDiscord<mratsim> The current GC is not thread friendly
14:08:15FromDiscord<mratsim> nor is it embedded friendly
14:08:35FromDiscord<mratsim> i.e. when you work with low-level, you need to reimplement everything, including strings
14:09:41FromDiscord<dom96> I would challenge that. The amount of times Araq has told me that the GC can be even embedded in an OS
14:09:51FromDiscord<dom96> You can hook the alloc/dealloc calls and it should work just fine
14:10:42FromDiscord<mratsim> the GC uses thread local heaps, so it's problematic when threading.
14:12:01FromDiscord<mratsim> that said arc/orc doesn't allow shared objects either, you still need to impelment atomic refcounting, but it makes it easier to share by transfering ownership
14:12:48FromDiscord<dom96> it's problematic when threading for _some_ usecases.
14:12:48ForumUpdaterBotNew thread by Arnetheduck: Io2 module in stew, see https://forum.nim-lang.org/t/6730
14:13:56FromDiscord<dom96> > New thread by Arnetheduck: Io2 module in stew, see https://forum.nim-lang.org/t/6730โ†ตnice, another stdlib module reimplemented
14:14:26FromDiscord<mratsim> we already said that the stdlib is limited and we were told that due to backward compat we can't change it
14:15:15FromDiscord<Kiloneie> so a breaking change version incoming at some point in the future ?
14:16:37FromDiscord<Kiloneie> Is Arc/Orc an original GC by Araq or based on something ?
14:17:25FromDiscord<mratsim> Original GC based on papers from IBM, Bacon & Dingle to be precise
14:18:04FromDiscord<Kiloneie> Interesting. Nice to have something truly unique.
14:18:14FromDiscord<mratsim> The orc part (dealing with cyclic ref in a refcounting scheme) has no implementation besides Nim in particular
14:18:37FromDiscord<mratsim> Swift which also has ARC, does not have cycle detection, and dev are asked to "deal with it"
14:21:04FromDiscord<Kiloneie> Hmm. "Deal with it" xD...
14:22:58bungI got `Malformed communication packet` when I insert float value to mysql 8 on osx, other 3 ci instance works fine, any ideas?
14:23:07FromDiscord<mratsim> Look for "memory leak Swift" or "weak reference Swift"
14:24:02FromDiscord<Kiloneie> infamous you say ?
14:27:47leorize[m]I don't mind someone redoing io.nim
14:27:58leorize[m]that module desperately need a rework anyway
14:29:08Araqmratsim: a quite similar cycle collector is actually used in PHP
14:31:48leorize[m]I'm not a big fan of this shift to Result[T], but then this is status stuff so they're free to use that
14:34:25FromDiscord<dom96> > we already said that the stdlib is limited and we were told that due to backward compat we can't change itโ†ต@mratsim change what? Not using exceptions for error handling? Is that really so critical for your use cases?
14:42:51FromDiscord<Varriount> Especially now with the goto exception implementation
14:45:44leorize[m]arnetheduck is well known for his preference for result types
14:49:14leorize[m]I would prefer it if status coordinate with upstream more, esp regarding these kinds of big changes like this
14:50:28leorize[m]stdlib can't change suddenly due to backward compat, that's true, but I'm sure that we would welcome revamp to aged modules like io
14:50:48FromDiscord<dom96> indeed
14:51:03leorize[m]an rfc would have helped coordinating efforts
15:01:43FromDiscord<Clyybber> shashlick: Are you sure you didn't compile one binary with -d:useMalloc and the other one without?
15:02:50*cjjuice joined #nim
15:02:59*cjjuice left #nim (#nim)
15:05:35shashlick@Clyybber just retried the tests and was careful about that
15:05:46FromDiscord<Clyybber> ok nice
15:06:19shashlickAll this but my plugins package still fails tests with useMalloc so there's yet more issues
15:13:53ZevvPMunch: I still need to play with this stuff of course. Do you see any benefit of having unsigned types, or is only signed ok as well? It would reduce some of the complexity
15:16:21*natrys joined #nim
15:17:51*hnOsmium0001 joined #nim
15:18:50*theelous3__ quit (Quit: is outty)
15:18:54*theelous3_ quit (Quit: is outty)
15:19:12*theelous3 joined #nim
15:22:02*nikita` is now known as ronja`
15:22:09*ronja` is now known as nikita`
15:22:21*rockcavera quit (Remote host closed the connection)
15:24:23*nuxdie joined #nim
15:25:07FromDiscord<mratsim> @dom96 not using exceptions is critical yes
15:25:30FromDiscord<mratsim> They are problematic for both async and later threading
15:25:58FromDiscord<mratsim> and we need to ensure that all exceptions paths are handled which is better with Result
15:27:20FromDiscord<mratsim> Also for low-level modules, we really need to only use features that do not allocate
15:28:16FromDiscord<mratsim> @leorize, we have our deadlines, we are not proposing to replace stdlib io, we are offering an alternative
15:29:16FromDiscord<dom96> in that case maybe it would make sense for you to put all of these little modules under a "nim-lite" or "nim-low-level" or whatever you want to call it package, and create a distribution ala TinyGo?
15:29:34FromDiscord<dom96> that way its purpose would be clear
15:30:28leorize[m]naming a module `<stdlib name>2` doesn't ring "alternative" to me tbh
15:30:35*kenran quit (Ping timeout: 240 seconds)
15:32:51leorize[m]I can see that Status found limitations within stdlib io from your security audit, but as far as I can tell these limitations are not reported upstream at all. I'm not saying that you must, but for the sake of open source collaboration some communication should be done.
15:36:38FromDiscord<mratsim> @dom96 It's called nim-stew, @leorize we opened io2 for discussion while it's still in PR, and just 8 days after it was initially opened. I don't see what more we can do.
15:37:18FromDiscord<mratsim> we have endians2 and bitops2, that's make it clear for us what to use.
15:39:19FromDiscord<mratsim> i.e. it's in the description: https://github.com/status-im/nim-stew
15:39:24FromGitter<bung87> create organization named as "nim-community" or something like for it
15:41:01FromDiscord<mratsim> For agility, the repo should stay in our organization as it serves as our staging area
15:41:39FromDiscord<mratsim> some modules have matured, and stable enough and can (and have been proposed) to be merged into nim-fusion
15:42:23*Vladar joined #nim
15:44:28leorize[m]given your fast moving pace I guess you're right
15:44:36leorize[m]I'll see what I can backport over to the stdlib
15:46:36leorize[m]I don't see any PRs :P
15:46:52FromGitter<bung87> nim-fusion also a good place to go
15:47:38leorize[m]endians2 is an excellent replacement for what we have in the stdlib currently
15:47:43FromDiscord<Lod> Can someone help me?
15:47:55leorize[m]IMO that one can just go straight as endians replacement if anyone wanted to try
15:48:22FromDiscord<Lod> Iยดm getting this error on Windows: `.nimble\pkgs\httpbeast-0.2.2\httpbeast.nim(183, 36) Error: undeclared identifier: 'EWOULDBLOCK'`
15:48:22leorize[m]@Lod sure, what's your question?
15:48:45FromDiscord<Lod> Tried searching for it, but there's not much information
15:48:52leorize[m]httpbeast doesn't work on windows
15:49:12leorize[m]are you using anything that needs it?
15:50:09FromDiscord<Lod> Yes, I was curious and decided to learn nim, and was checking if rest api's were possible to do
15:50:55leorize[m]on windows there's asynchttpserver in the stdlib
15:50:56FromDiscord<Lod> is there any alternative?
15:51:06FromDiscord<Lod> I will try that ๐Ÿ™‚
15:51:09FromDiscord<Lod> Thanks
15:51:33leorize[m]you might want to try jester too
15:51:36leorize[m]!repo jester
15:51:38disbothttps://github.com/dom96/jester -- 9jester: 11A sinatra-like web framework for Nim. 15 1029โญ 101๐Ÿด 7& 29 more...
15:52:22FromDiscord<Lod> But doesn't jester require httpbeast?
15:53:04FromDiscord<mratsim> AFAIK we do fixes in PR but for replacement/alternative you can cherry pick in stew. The main issue is figuring out the deprecation/replacement path of Nim modules if there is breaking changes
15:53:05FromDiscord<dom96> No, jester uses asynchttpserver on Windows
15:53:21FromDiscord<Lod> Thanks, thats great
15:53:26FromDiscord<Lod> ๐Ÿ™‚
15:54:13*quetzalb joined #nim
16:08:25*narimiran quit (Ping timeout: 240 seconds)
16:16:52bungit's weird I implemented `<` `==` that also need implements `<=`
16:19:01bungwithout it wrongly give me result when I compare as `>=`, no any hint or error
16:20:28Zevvwell, put some debug prints in your < and =, see what it gets as input and what you return
16:20:54FromDiscord<mratsim> I didn't understand your sentence
16:21:13Zevvwhose?
16:24:31bungmine I guess :)
16:27:03bungI tried on play it gives compile time error
16:30:07FromDiscord<mratsim> link
16:30:50bunghttps://play.nim-lang.org/#ix=2vjy
16:31:58bunghttps://travis-ci.org/github/bung87/amysql/jobs/721394923 see line 456 I got 5.7.30 > 8.0
16:33:51bungthen I add `<=` proc in https://github.com/bung87/amysql/commit/93a97263d0563e47bb7d7378020cb2337e53c1e3
16:34:02bungproblem solved
16:38:35*krux02 joined #nim
16:43:13FromDiscord<dk> What's the point of `setLen` truncating the seq?
16:43:37FromDiscord<dk> instead of just changing the `length` field or whatever
16:48:27leorize[m]it doesn't :)
16:48:50leorize[m]it's when the seq grows that the new memory got zero-ed out
16:48:56leorize[m]if you shorten the seq it just reduce the length
16:53:13FromDiscord<dk> Oh
16:53:33FromDiscord<dk> Makes sense
16:53:43FromDiscord<Kiloneie> GC_getStatistics() proc, man it that string hard to read, memory is in bytes D:...
16:54:22FromDiscord<Kiloneie> What does total and occupied memory mean ?
16:55:39FromDiscord<mratsim> Total is all the memory managed by Nim, occupied is the memory for user data, and the difference is due to memory allocated, but no data uses it and it has not been returned to the OS
16:55:50FromDiscord<mratsim> (the last part is an educated guess)
16:56:09FromDiscord<Kiloneie> like how OS steals an insane amount of RAM xD
16:56:16FromDiscord<Kiloneie> windows -.-
16:56:57FromDiscord<Kiloneie> first time reading the source of procs to find more documentation... Someone needs to document a bit more <.<
16:57:35disruptekwhere do i read about whatever the current concept discussion is?
16:57:35*superbia quit (Read error: Connection reset by peer)
16:57:48disruptekit doesn't work and it's blocking.
16:58:32*superbia joined #nim
17:03:53FromDiscord<mratsim> what doesn't work?
17:04:06Zevvme
17:04:10FromDiscord<mratsim> https://github.com/nim-lang/RFCs/issues/168
17:04:11disbotโžฅ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
17:04:13Zevvbecause im on holidays
17:04:14Zevvha ha ha ha
17:04:56disruptekyeah, well, i commented on that one.
17:05:00disruptekno response.
17:06:04FromDiscord<mratsim> Concepts are talked about in hush hush tones on IRC
17:06:28disruptekhere's an example of what i'm frustrated with:
17:06:31disruptekhttps://github.com/disruptek/nimph/blob/denimble/nimph/groups.nim
17:07:44disruptekthe "order matters" sucks the big donkey dick as well.
17:08:48FromDiscord<mratsim> I've created complex recursive concepts but seems like you also should wear a crown
17:08:58FromDiscord<mratsim> sorry co-recursive*
17:09:13disrupteknonsense, this is actually the simiplification that i made to try to understand the problem.
17:10:37disrupteklike, you cannot say "T is Suitable" in Collectable. no. but you can iterate and /then/ check if it matches.
17:11:02disruptekand then /T is Suitable/ at the bottom.
17:11:23FromDiscord<dom96> My god, stop using single letter identifiers!
17:11:56FromDiscord<dk> is there a technical reason there's no `mitems` for `NimNode`?
17:11:58disrupteki don't have a problem with it in a concept definition.
17:12:10disruptekyou would have a hard time finding me using a single letter identifier elsewhere.
17:12:38disruptekhash() is the only exception i can think of.
17:12:49disruptekthere, it is idiomatic.
17:14:01disruptekdk: the technical reason is that it's not needed.
17:14:26disrupteknimnodes are refs.
17:18:13*awe00_ joined #nim
17:19:33bungplease close this https://github.com/nim-lang/Nim/issues/8231
17:19:35disbotโžฅ strutils:formatSize() is broken in JS mode ; snippet at 12https://play.nim-lang.org/#ix=2vjM
17:20:04*awe00 quit (Ping timeout: 258 seconds)
17:27:19FromDiscord<mratsim> done
17:27:49*kenran joined #nim
17:32:15kinkinkijkinquick c to nim question
17:32:55*kenran quit (Ping timeout: 240 seconds)
17:33:49kinkinkijkin"m[12] = m[13] = m[14] = 0;", is that "m[12] = m[13] /n m[13] = m[14] /n m[14] = 0", or "m[12..14] = 0"
17:34:00kinkinkijkini dont know enough c lol
17:34:19disruptekyes, it's all 0.
17:34:22disruptek0 0 0
17:34:26kinkinkijkinalright, thanks
17:35:25FromDiscord<Kiloneie> Is this all good/valid ? https://media.discordapp.net/attachments/371759389889003532/748234157007568966/unknown.png
17:36:06disruptekyou're either saying too much or too little.
17:36:17disrupteki don't know what the 2nd bullet point means.
17:36:29disruptekreferences have myriad use.
17:36:34leorize[m]sans the last one
17:37:03leorize[m]nim automatically optimize parameter passing to pass by reference if the object is big enough (3x float)
17:37:06FromDiscord<Kiloneie> Second bullet point... say you have 4 objects use the same sprite ?
17:37:31disruptekyou need to understand the material before you attempt to teach it.
17:37:37disruptektry writing some code and using references.
17:37:51disruptekteaching it will /refine/ your understanding.
17:37:59disruptekfirst, you must start with that understanding.
17:38:03FromDiscord<Kiloneie> Been on this for a week... not motivated xD...
17:38:11disruptekwell, then.
17:39:08disruptekdo what i do: start yet another lame project.
17:39:15FromDiscord<Kiloneie> i mean i want to understand it, it's just that it took a lot of time already, i honestly should of done other videos since i got a bit of stuck on this one
17:39:37FromDiscord<Kiloneie> for some reason i hit this video's wall and stuck behind it xD...
17:40:02disrupteki don't think you should use this as an excuse to produce poor material that you will want to remake later.
17:40:15disruptekit's hard enough creating content once.
17:40:52disruptekjust my opinion.
17:40:54FromDiscord<Kiloneie> well i am mostly happy with most of my videos so far(besides the audio quality which i think i got covered now)
17:41:10FromDiscord<Kiloneie> this topic is just bit of a stretch
17:41:48FromGitter<iffy> I'm guessing from testing that asyncfile doesn't work for general-purpose file handles. Is that expected? Here's a demo program: https://play.nim-lang.org/#ix=2vjQ
17:42:29FromDiscord<mratsim> @kinkinkijkin weren't you writing a partition system in Nim a couple of months ago?
17:42:42*natrys quit (Ping timeout: 260 seconds)
17:42:48kinkinkijkindepends what you mean by partition
17:43:05FromDiscord<mratsim> for music
17:43:08leorize[m]@iffy you have to setNonBlocking() the fd first
17:43:10FromDiscord<mratsim> not for filesystem
17:43:19leorize[m]I don't think that proc is exported so you might have to copy it
17:43:21kinkinkijkinah, the renderer
17:43:25kinkinkijkinkpmmlnim
17:43:41*nuxdie quit (Quit: Connection closed for inactivity)
17:43:46disruptekneeds more `i`s.
17:43:55FromDiscord<mratsim> or vowels ๐Ÿ˜‰
17:44:23kinkinkijkin(the "nim" at the end denotes it's in nim you see, as opposed to c# like the original version, which sucked and didn't meet the specification it was made for)
17:44:43FromDiscord<mratsim> ah so it's opensource?
17:44:44disruptekdon't be rude; lots of people are perfectly satisfied with c#.
17:44:58kinkinkijkinnono, the original kpmml was suck
17:45:07kinkinkijkinand yes, kpmml is foss
17:45:18disruptek!repo kpmml
17:45:19disbothttps://github.com/kinkinkijkin/kpmmlnim -- 9kpmmlnim: 11nim version of the discontinued kpmml C# 15 0โญ 0๐Ÿด
17:45:21kinkinkijkinbut it's such a torrid pile of spaghetti i dont recommend looking at it
17:45:22FromDiscord<mratsim> disruptek is teasing you
17:45:35FromGitter<iffy> @leorize this one? https://github.com/nim-lang/Nim/blob/ae358a0c7a5f7b14e5dde259cd6ce02b235985a3/lib/pure/nativesockets.nim#L612
17:45:46kinkinkijkinoh dear i put up an early version of kpmmlnim didn't i
17:45:50disruptekthis repo tells me absolutely nothing.
17:46:00leorize[m]@iffy yea
17:46:06kinkinkijkini suck at documentation
17:46:13disruptek echo "You need to specify a file, titscheese."
17:46:24FromDiscord<mratsim> you might be interested in the Omni talk at the NimConf 2020 https://www.youtube.com/watch?v=ruT7sbs5O-Q
17:46:25kinkinkijkinthe most documentation you'll find on kpmml is the botb thread page
17:46:27disrupteki see your potential, however.
17:46:37disruptekahh, thanks for the link.
17:46:41disruptekthat really helps a lot.
17:46:44kinkinkijkinill get the link
17:46:49kinkinkijkinin a sec
17:46:58kinkinkijkinim currently finishing off some math helpers for something else
17:47:08disruptektake your time. i'm already thinking about masturbation.
17:47:10FromDiscord<mratsim> (it's a DSL for low-level audio programming)
17:47:16FromDiscord<mratsim> disruptek :/
17:47:26disruptekway to ruin the mood.
17:47:38FromDiscord<mratsim> it's completely inappropriate
17:47:48disrupteki know, i really had something going there.
17:48:18kinkinkijkinhttp://battleofthebits.org/academy/GroupThread/17789/kPMML+-+PseudoMML+Synthesizer+%28WIP%29/
17:48:38kinkinkijkinthe original kpmml in c# does a lot of things in very, very tacked-on ways
17:48:42FromGitter<iffy> @leorize It works! Thank you!
17:48:55kinkinkijkini recommend not looking at the source for long because it did in 3000 lines what the nim version did in 200
17:50:06kinkinkijkin"you can now add blank lines without crashing the compiler!" is my favourite example of how poorly the original version was written
17:50:44kinkinkijkinit was the first project i programmed since high school and was largely implemented while half-awake
17:51:14FromDiscord<mratsim> I can give you lots of way to crash Nim compiler ๐Ÿ˜‰
17:51:32Yardanicoshhhhhhhh
17:52:06leorize[m]we have an entire section in the issue tracker dedicated to crashing the compiler :P
17:52:23Yardanicowho doesn't :)
17:52:37Yardanicoit's not like you can't get an ICE with gcc or clang
17:52:49disruptekhard to do with only six characters, though.
17:52:58Yardanicohttps://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-ICE
17:53:02Yardanicojust for comparison :P
17:53:45kinkinkijkinmy favourite part of writing kpmml's code spec though was that it was the first music programming language with music macros (not like programming macros, more like functions, mml people have different names for things), for loops, and infinite loop nesting
17:53:51leorize[m]we probably have more but release builds are compiled with -d:danger
17:53:58Yardanicohehe
17:54:02Yardanicothey're not though
17:54:03Yardanicoare they?
17:54:05YardanicoI think they're -d:release
17:54:43kinkinkijkinbut i never properly implemented the infinite loop nesting well in the c# version and while i did get it working in the nim version i never got the nim version far enough to compile the demo files
17:55:07disruptekthere's still time.
17:55:46kinkinkijkinthere is, but now i'm working on a renderer and brushing up on graphics testing to help test panfrost
17:55:54Yardanicopanfrost - nice
17:55:58leorize[m]Yardanico: looks like only nimsuggest remains as -d:danger
17:56:02Yardanicoleorize[m]: yeah
17:56:09YardanicoI tested panfrost a few months ago on my android tv box (running ALARM)
17:56:16Yardanicoand sway and some other gles2 test apps worked
17:56:21kinkinkijkinive done some rudimentary testing (what do i have to do to make this not crash? type testing)
17:56:38*myphs joined #nim
17:56:44kinkinkijkinmm, on my board gles2 does not work, only desktop gl
17:57:08kinkinkijkingles2 loading hangs the system, and im trying to figure out why
17:57:17kinkinkijkinno output to dmesg on why
17:57:20FromDiscord<Kiloneie> Wau i see what i did really retardedly for this Reference objects video... i actually didn't test some of the things i wrote down xD... (i did that for every other video -.-...) Brain dead.โ†ตโ†ตThanks for pointing that out @disruptek
17:57:57disruptekjust trying to motivate you. ๐Ÿ˜‰
17:58:08FromDiscord<mratsim> Well @kinkinkijkin, now you're not alone with music macros in Nim with Omni
17:58:31kinkinkijkinsomeone's working on a music language in nim?
17:58:36kinkinkijkindo they use battleofthebits as well?
17:58:50kinkinkijkincause i shill nim hard there and a bunch of people were excited for kpmml there
17:58:59Yardaniconot sure, check https://github.com/vitreo12/omni
17:59:07Yardanicohttps://vitreo12.github.io/omni/
17:59:32*Jesin quit (Quit: Leaving)
17:59:41FromDiscord<mratsim> I said it a bit before, watch the NimCOnf talk: https://www.youtube.com/watch?v=ruT7sbs5O-Q
18:00:21FromDiscord<dom96> Here is a wild idea, let's prioritise tooling so that identifying which module each identifier comes from works 99.9% reliably https://forum.nim-lang.org/t/6728
18:00:38Yardanicoit works reliably for me :)
18:00:45kinkinkijkin@mratsim looks like it's not someone i know
18:00:46kinkinkijkindarn
18:00:51kinkinkijkinwhat a wacky coincidence
18:01:17kinkinkijkinthough omni seems to be a language-on-language approach, while kpmml is a single-language approach
18:01:45leorize[m]@dom96 I'm still waiting for a review on #14556 :P
18:01:46disbothttps://github.com/nim-lang/Nim/pull/14556 -- 3net, openssl: support setting the minimum supported SSL/TLS version
18:02:02FromDiscord<mratsim> @dom96 Weave can deadlock nimsuggest 99.9% of the time to 100% CPU within seconds :/
18:02:13kinkinkijkinthat is, omni you write omni within your nim code, and kpmml you write kpmml in its own file that you compile on its own
18:02:24Yardanicoem
18:02:24FromDiscord<mratsim> ah right, yes
18:02:29Yardanicoyou write omni in omni though, no?
18:02:37Yardanicoit's technically a nim dsl, yes, but it's separate
18:02:41leorize[m]nimsuggest breaks when you stare at it angrily
18:02:51kinkinkijkinyes, but it sits within nim code
18:03:05kinkinkijkinit's like the original mml before the MCK series of mml compilers jumped up
18:03:26leorize[m]h\
18:03:37leorize[m]oops wrong window
18:03:46Yardanico42=HPQ'
18:06:51leorize[m]I just saw this pop up in my feed: https://github.com/ziglang/gotta-go-fast
18:06:58leorize[m]do we have something similar? (iirc timothee wrote one)
18:07:28disruptekonly golden. i need to get back to it.
18:07:42*enthus1ast quit (Ping timeout: 260 seconds)
18:07:57disrupteklook at lolbench for inspiration.
18:08:37leorize[m]if you got a bench working well I can write some ci scripts to integrate it with the compiler ci
18:09:41FromDiscord<mratsim> put json in there :p
18:10:01Yardanicowell you can take kostya benchmarks, and some benchmarks from the test suite
18:10:10Yardanicolike we have an altneriatve version of the havlak benchmark
18:10:13disruptek!repo nimbench
18:10:14disbothttps://github.com/ivankoster/nimbench -- 9nimbench: 11A micro benchmark module for Nim 15 16โญ 3๐Ÿด 7& 1 more...
18:10:48disrupteki have a few benchmarks include json and base64 that tend to produce cold showers.
18:11:16disrupteknimbench isn't the one i was thinking of.
18:13:39*natrys joined #nim
18:13:58*Jesin joined #nim
18:14:16disruptekarc is finally the fastest for the json bench.
18:14:57*bwsq joined #nim
18:14:58disruptek1.85s versus 1.35s m&s on the base64.
18:15:15disruptekthat's a big improvement, btw.
18:18:24*bwsq quit (Client Quit)
18:18:50disrupteki think araq's work on seqs has made them faster in many cases.
18:21:15*enthus1ast joined #nim
18:24:07FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=2vk7 Ehm, how to get child's type ?
18:24:41*Jesin quit (Quit: Leaving)
18:24:47leorize[m]convert it
18:25:06leorize[m]https://play.nim-lang.org/#ix=2vk8
18:30:27*Jesin joined #nim
18:30:42FromDiscord<Kiloneie> How is that useful ... ? Say i had a ton of inheritance and i wanted to only use a specific one, type, typeof doesn't seem to work.โ†ตProbably didn't explain myself right. type, and typeof shows both elements of "people" sequence as Person...
18:40:05FromDiscord<Rosen> At the risk of sounding stupid, why bother using `.type` when you can just use that `of T` check instead if you only want to use one child type of the parent?
18:42:46Araqyou can use macro voodoo to do more type inspections
18:42:53*quetzalb quit (Remote host closed the connection)
18:44:28leorize[m]@Kiloneie well yea, that's how you're supposed to do it
18:46:56*bwsq joined #nim
18:47:39FromDiscord<Rosen> @Kiloneie maybe explain a situation where the tools we have wouldn't work?
19:00:24*Vladar quit (Quit: Leaving)
19:16:59FromDiscord<Kiloneie> Oh, it flew over my head. if object of myObject: convert and check type if all good if necessary blah blah.
19:28:40*kenran joined #nim
19:33:51*kenran quit (Ping timeout: 258 seconds)
19:38:27*myphs quit (Ping timeout: 256 seconds)
19:39:02FromGitter<Knaque> Could someone please tell me why `(1..100).toSeq().filterIt(it mod 2 == 0)` isn't valid?
19:39:33Yardanicobecause of (1..100)
19:39:54Yardanicoah wait actually
19:39:55Yardanicoit's valid
19:39:58Yardanicowdym?
19:40:04Yardanicoit works just fine on 1.2.6
19:40:17Yardanicodid you perhaps forget to import sequtils?
19:41:08FromGitter<Knaque> I did, but maybe it's just a `nim secret` thing. I'll try the playground.
19:41:26Yardanicowell, "nim secret" is the VM
19:41:32Yardanicosometimes it has strange issues :P
19:42:06FromGitter<Knaque> Yep, its a nim secret thing. Good to know, then.
19:45:42*natrys quit (Quit: natrys)
19:46:17FromDiscord<ache of head> eh? it worked on nim secret for me ๐Ÿ˜†
19:46:43PMunchZevv, sorry I fell asleep. Only signed is fine for now :)
19:47:30FromDiscord<Elegant Beef> Also pmunch very unclear what your issue with my code is ๐Ÿ˜„
19:51:29PMunchJust a sec
19:51:31*narimiran joined #nim
19:54:31FromDiscord<Elegant Beef> Ah forgot to push the named const
19:54:56FromDiscord<Elegant Beef> But it does work with `proc a(a:Option[int] = namedConst)`
19:56:03PMunchAh, it does indeed
19:56:13PMunchBut it does create the code to check it twice
19:57:33PMunchhttp://ix.io/2vkG
19:58:18FromDiscord<Elegant Beef> how do you dump the actual code again?
19:59:25PMunchI just added a "echo procDef.repr" right before the return
19:59:56FromDiscord<Elegant Beef> yea i knew it was possible to dump the actual code, but never seen how
20:00:04FromDiscord<Elegant Beef> always used tree repr ๐Ÿ˜„
20:00:05PMunchBut you can also do: --expandMacro:withSome
20:06:54FromDiscord<Elegant Beef> There beautiful ๐Ÿ˜› https://hatebin.com/byoqoqmzzn
20:10:10*narimiran quit (Remote host closed the connection)
20:11:15PMunchPerfect! Now just remove the extra space after your `let` keyword and we're golden :)
20:19:44*awe00 joined #nim
20:21:56*awe00_ quit (Ping timeout: 256 seconds)
20:22:53FromDiscord<Elegant Beef> There we're golden
20:23:01FromDiscord<Elegant Beef> With the most passive agressive comment possible
20:26:20PMunchHaha :P
20:26:34PMunchMy editor highlights them as red boxes, so they really stick out :P
20:28:40*bwsq quit (Ping timeout: 256 seconds)
20:30:02FromDiscord<Elegant Beef> Yea mine just renders them as a dot, so they blend into the background
20:34:41FromDiscord<Avatarfighter> wait Option[type] is a thing
20:34:42FromDiscord<Avatarfighter> ๐Ÿ˜ฎ
20:34:55FromDiscord<Elegant Beef> Yes in the options module
20:34:59FromDiscord<Avatarfighter> thats neat
20:35:18FromDiscord<Elegant Beef> I do wonder does nimble have a way to auto resolve dependancies and add them to the nimble file?
20:35:56disruptekno, but generating the .nimble is one of the goals of nimph-2.0.
20:36:00FromDiscord<Elegant Beef> Say you use X module and it's in your local packages it could add said package to the file instead with `nimble findDeps` ๐Ÿ˜„
20:36:05FromDiscord<Elegant Beef> Ah
20:39:06*Trustable joined #nim
20:39:45FromDiscord<dom96> That would be a cool feature, and might actually be doable quite easily
20:40:02FromDiscord<dom96> AFAIK Nim exposes info about the modules that were imported after compilation
20:40:27PMunchYup, I used something similar for my NimScript minimised stdlib thing
20:44:50disruptekit's not hard to make it work, it's hard to make it work with clashes from a zero-knowledge starting point.
20:57:04kinkinkijkinhmm, how exactly do i do explicit copy-on-write in nim? ive forgotten, been a while since i needed it
20:57:36kinkinkijkiner
20:57:42kinkinkijkinwait i mightve gotten a term backwards
20:57:44kinkinkijkinjust a sec
20:58:17kinkinkijkinnono, i meant the opposite of copy-on-write lol
20:59:29kinkinkijkinim using variables to construct items for a seq, and want to be 100% sure the item is written into the seq instead of referenced
20:59:42kinkinkijkinbecause i reuse the variables
21:00:29FromDiscord<martinium> on an http request one of the json keys from the response returns an array of strings. How do I assign that array to a variable?
21:04:30kinkinkijkini dont know whether you're actually asking that question and feel like you're answering my question with another question
21:06:02kinkinkijkinthough my question is one i ask because ive had problems with it in the past and the solution i was given was rather dirty; just explicitly converting the variable to the same type on addition to the seq
21:06:36kinkinkijkinid like to avoid doing that and want to know if there's been a feature added since to make this not necessary
21:08:42FromDiscord<Elegant Beef> They deleted their message so you looked crazy on discord, had to check the IRC logs to see who/what was the context
21:09:46kinkinkijkin[17:00:15] <FromDiscord> <martinium> on an http request one of the json keys from the response returns an array of strings. How do I assign that array to a variable?
21:12:23*thomasross joined #nim
21:18:29FromDiscord<Elegant Beef> Yea as i said i checked the IRC logs
21:18:39kinkinkijkinwas for others who couldn't
21:21:58*synshroud joined #nim
21:25:23*tane quit (Quit: Leaving)
21:29:32*kenran joined #nim
21:34:25*kenran quit (Ping timeout: 240 seconds)
21:48:06FromDiscord<dk> Is `asyncnet.recvLineInto` any faster than `asyncnet.recvLine`?
22:00:37FromDiscord<lqdev> it doesn't allocate temporaries
22:01:14FromDiscord<lqdev> so if you're eg. reading commands over and over again, it's faster to use a single buffer
22:01:17*endragor_ joined #nim
22:02:20*synshroud_ joined #nim
22:03:55*solitudesf quit (Ping timeout: 240 seconds)
22:04:23*synshroud quit (Ping timeout: 258 seconds)
22:04:23*ForumUpdaterBot quit (Read error: Connection reset by peer)
22:04:23*def- quit (Quit: -)
22:04:23*def- joined #nim
22:04:23*endragor quit (Read error: Connection reset by peer)
22:05:23*ForumUpdaterBot joined #nim
22:16:56*kitech1- joined #nim
22:17:14*PMunch quit (Quit: leaving)
22:17:56*def- quit (Quit: -)
22:17:56*def- joined #nim
22:17:56*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
22:20:07*krux02 quit (Remote host closed the connection)
22:29:40FromDiscord<acek7> when installing nim and running finish nim asked me to place mingw into the dist folder after it downloaded and i did that. around the end of the extraction the archive extracter gives a bunch of errors
22:31:31FromDiscord<Kiloneie> On windows?
22:31:39FromDiscord<acek7> yes
22:31:46FromDiscord<acek7> windows 10, 64 bit etc
22:31:58FromDiscord<Kiloneie> Everytine i did that all of that was automatic...
22:32:50FromDiscord<Kiloneie> You know what, to be sure, re extract nim, and run finish as admin and y everything
22:33:20FromDiscord<Kiloneie> It should work, i think it didnt have priviligies
22:33:48FromDiscord<Kiloneie> Re extract as in clean copy
22:34:05FromDiscord<Kiloneie> Doesnt work with the path otherwise
22:34:57FromDiscord<acek7> sounds good i will give it a shot
22:39:46*bung quit (Ping timeout: 258 seconds)
22:40:31FromDiscord<dom96> you may also wish to give choosenim a try
22:41:39FromDiscord<Hearthstone> I wish choosenim worked on Arm ;-;
22:43:01*NimBot joined #nim
22:43:16FromDiscord<dom96> Maybe soon if this gets pushed forward https://github.com/dom96/choosenim/pull/213
22:43:17disbotโžฅ Support linux_arm64 and linux_powerpc64
22:43:30FromDiscord<Hearthstone> Oo
22:43:45*synshroud joined #nim
22:50:43*vicfred quit (Quit: Leaving)
22:53:07*vicfred joined #nim
22:54:14*vicfred quit (Max SendQ exceeded)
22:54:43*vicfred joined #nim
22:58:46*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
23:00:04*synshroud joined #nim
23:09:10FromDiscord<martinium> the following jsonnode key is an array of strings: let recipients = data["recipients"] How do I extract the array of strings from the node? For example, getStr() works for string values, what do we use for a jsonarray?
23:09:38FromDiscord<Rosen> getElems no?
23:09:47FromDiscord<martinium> let me try that
23:10:12FromDiscord<martinium> that was it
23:10:17FromDiscord<Rosen> perfect
23:10:20FromDiscord<martinium> wonder why they didn't call it getArray
23:10:27FromDiscord<martinium> ๐Ÿ˜„
23:13:55FromDiscord<Hearthstone> Or `getSeq`
23:28:27FromDiscord<martinium> there is no getSeq when I had checked
23:28:35FromDiscord<kodkuce> lol i acindecly stambles on this https://gist.github.com/jzakiya/6aeebd22b18c01aab56a61b55ef2a649 , araq killing people xD
23:29:46FromDiscord<kodkuce> i personaly find nim community nice, i feal i can say any *poop* i want and have no consequences, only stuff i dont like is i feel too much a newb :)
23:29:50FromDiscord<martinium> that guy is def a snowflake
23:29:59FromDiscord<martinium> he wrote micro aggression
23:30:03FromDiscord<martinium> ...
23:30:05FromDiscord<kodkuce> (edit) '*poop*' => '\*poop\*'
23:30:11FromDiscord<Rosen> I wonder what he got yelled at for
23:30:19FromDiscord<Rosen> oh wait is it in this second part
23:30:23*kenran joined #nim
23:30:44FromDiscord<martinium> Araq was probably trying to code something in the compiler building the language but was getting pestered by that dude for Documentation
23:30:45FromDiscord<martinium> lol
23:30:51FromDiscord<martinium> people can be something else
23:30:56FromDiscord<martinium> anyways
23:31:09FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2vlS
23:31:16FromDiscord<martinium> what line does my error start?
23:31:19FromDiscord<martinium> is it 54
23:31:20FromDiscord<martinium> ?
23:31:46FromDiscord<kodkuce> or 59
23:32:10FromDiscord<kodkuce> but i think your error is you wrong node type
23:32:26FromDiscord<Rosen> yea, post the code segment you're working on
23:32:44FromDiscord<Rosen> I'm trying to remember what I was doing just today where I got that error
23:32:51FromDiscord<Rosen> it was something about accessing keys on a jsonnode
23:33:16FromDiscord<kodkuce> you got an JObject but you tryeing to use it as JArray or soemthing like taht
23:33:27FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2vlU
23:33:38FromDiscord<martinium> let recipients is line 54
23:34:47FromDiscord<Rosen> is resources and recipients guaranteed to be there?
23:34:58FromDiscord<martinium> yup
23:35:29*kenran quit (Ping timeout: 246 seconds)
23:35:44FromDiscord<Rosen> and recipients *is* an array for sure?
23:35:52FromDiscord<martinium> I got the error with and without getElems()
23:36:39FromDiscord<martinium> yeah from API Spec:
23:36:46FromDiscord<martinium> sent a code paste, see https://play.nim-lang.org/#ix=2vlW
23:37:03FromDiscord<martinium> thats under the resources array
23:37:15FromDiscord<martinium> (edit) 'thats' => 'that's'
23:37:46FromDiscord<Rosen> I'm not certain, but I think you may have to getElems on the resources too
23:38:05FromDiscord<Rosen> since [] works on JObject but I think you might have JArray
23:38:57FromDiscord<martinium> let me try that
23:39:18FromDiscord<martinium> I've accessed before without having to do that in other functions
23:39:35FromDiscord<martinium> just using the correct .get for whatever type its supposed to be
23:42:12FromDiscord<martinium> changed it to use curlies instead
23:42:17FromDiscord<martinium> now I get 400 bad request
23:42:25FromDiscord<martinium> so seems it may be the body I am trying to send
23:42:51FromDiscord<martinium> I have this
23:42:56FromDiscord<kodkuce> just do if node.kind == JObject :โ†ต echo whatyou go
23:42:59FromDiscord<kodkuce> (edit) 'go' => 'got'
23:43:23FromDiscord<kodkuce> else: echo what you got
23:43:36FromDiscord<kodkuce> so you will see where it goes bonkers
23:44:44FromDiscord<martinium> I may be trying to send json data incorrectly
23:44:59FromDiscord<martinium> I am trying to make a putContent request
23:45:38FromDiscord<martinium> json I am trying to send I am doing as client.putContent(url, body=body)
23:48:50*def-- joined #nim
23:50:10*Jesin quit (Quit: Leaving)
23:50:10*def- quit (Quit: -)
23:50:10*def-- is now known as def-