<< 27-08-2020 >>

00:00:06*Trustable quit (Remote host closed the connection)
00:02:43*awe00 quit (Ping timeout: 265 seconds)
00:04:54FromDiscord<martinium> is this incorrect syntax to send a json body on a put request?↵```↵let resp = await client.putContent(url, body=params)↵```
00:05:27FromDiscord<kodkuce> hmm just do echo req
00:05:54FromDiscord<kodkuce> you can read whole request and see if json is broken, but dont think it is
00:05:57FromDiscord<martinium> params = let body = %*{"enabled": true, "name": sitesMap.getOrDefault(ids) & " - Weekly", "notification": "SMTP", "recipients": recipients["recipients"].getElems(), "relayServer": "yadda", "senderEmailAddress": "yadda"}
00:06:44FromDiscord<martinium> i tried breaking down the array elem but thats not the case
00:06:58*Jesin joined #nim
00:07:44FromDiscord<kodkuce> this jester or asynchttp?
00:07:55*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
00:09:11*synshroud joined #nim
00:09:58FromDiscord<martinium> asynchttpclient
00:10:03FromDiscord<kodkuce> @martinium you need to pass stirng not json i think
00:10:13FromDiscord<martinium> yeah it says to pass as string
00:10:14FromDiscord<kodkuce> body = $params
00:10:27FromDiscord<martinium> when I pass it to function I pass as $params
00:10:35FromDiscord<martinium> still get the assertion error of doom
00:10:49FromDiscord<martinium> let me post full code on a gist
00:12:17FromDiscord<kodkuce> so it dose not crash when you create body, ↵```let body = %*{"enabled": true, "name": sitesMap.getOrDefault(ids) & " - Weekly", "notification": "SMTP", "recipients": recipients["recipients"].getElems(), "relayServer": "yadda", "senderEmailAddress": "yadda"}``` ?
00:12:31FromDiscord<kodkuce> (edit) 'body, ↵```let' => 'body ?↵```let' | removed '?'
00:12:47FromDiscord<martinium> it only crashs on assert error
00:12:50FromDiscord<martinium> https://gist.github.com/martinium/6ce1feccb73bdd2e998e434372bc909f
00:14:22FromDiscord<martinium> (edit) 'crashs' => 'crashes'
00:14:45FromDiscord<martinium> definitely have it narrowed down to a malformed request though
00:16:00disruptekyou can't pass a jsonnode to the client; just give it a string.
00:16:15FromDiscord<kodkuce> hmm i would put echo 54, echo 55, echo 56, echo 57, just to be sure
00:16:22FromDiscord<kodkuce> he is $ fing it
00:17:38FromDiscord<martinium> I am passing it as a string on line 56
00:18:02FromDiscord<martinium> line 54 with {} instead of [] gives 400 bad request
00:18:22FromDiscord<martinium> so has to be that I am either forming request wrong
00:18:31FromDiscord<martinium> should this be multipart data vs body
00:18:43FromDiscord<martinium> (edit) 'multipart data' => 'multipartdata' | 'body' => 'body?'
00:19:15FromDiscord<kodkuce> (%* {"t": "r", "i":r, "p": game.rockets[r].pos}) this is my json but ye i think its good
00:19:42FromDiscord<kodkuce> i asked to write echo 1,2,3,4,5 bewine each line just to be sure where it exploeds
00:19:52FromDiscord<kodkuce> tough i am no pro :)
00:21:21*theelous3 quit (Ping timeout: 258 seconds)
00:22:01FromDiscord<kodkuce> https://media.discordapp.net/attachments/371759389889003532/748336481755463771/2020-08-27_022004.png
00:22:21FromDiscord<kodkuce> better sure then sorry :)
00:23:11FromDiscord<martinium> so I did it and the eror happens here let data2 = await putReq(fmt"sites/{ids}/alerts/smtp", $body)
00:23:12FromDiscord<kodkuce> i think error heppends on body
00:23:20FromDiscord<martinium> yeah it does
00:23:22FromDiscord<kodkuce> (edit) 'i think error heppends on body' => 'hmm'
00:23:34FromDiscord<martinium> I did echo 1 right before it and the 1 printed before error
00:23:40FromDiscord<martinium> so def a malformed request
00:23:46FromDiscord<kodkuce> w8 it heppens on let body or on let data2
00:24:03FromDiscord<martinium> switching to curlies gives this Exception message: 400 Bad Request↵Exception type: [HttpRequestError]
00:24:14FromDiscord<martinium> for line 56
00:24:22FromDiscord<martinium> it happens on let data2
00:25:53FromDiscord<kodkuce> and putReq is a proc you wrote
00:27:20FromDiscord<kodkuce> https://media.discordapp.net/attachments/371759389889003532/748337821386932304/2020-08-27_022530.png
00:27:38FromDiscord<kodkuce> or i wronk
00:28:10FromDiscord<kodkuce> are you sending request to your api?
00:28:25FromDiscord<kodkuce> and werent an error json one not http one
00:29:13FromDiscord<martinium> putReq is my function that inside has client.putContent(url, body=params)
00:29:15FromDiscord<kodkuce> 400 can mean maybe wrong url too, echo url and try in browser
00:29:23FromDiscord<martinium> I pass the params as a string
00:30:10FromDiscord<martinium> url is confirmed to be correct
00:30:48FromDiscord<martinium> I am trying to do same thing as python's request libraries json={"key": value}
00:30:58FromDiscord<martinium> as part of the put request
00:31:11FromDiscord<martinium> (edit) 'libraries' => 'library's'
00:31:23FromDiscord<kodkuce> did you write thise echos
00:31:24FromDiscord<kodkuce> :)
00:31:42FromDiscord<martinium> eror happens at let data2
00:31:57FromDiscord<kodkuce> but let data calls putReq function
00:31:59FromDiscord<kodkuce> you wrote
00:32:08FromDiscord<kodkuce> so error probbaly heppend in it
00:32:39FromDiscord<kodkuce> thats why i say echo like img up
00:32:59FromDiscord<martinium> python would be requests.put(url, json=body)
00:33:45FromDiscord<kodkuce> echo echo echo, its like 4 lines of code you can tell me that i am stupid leater if want
00:35:00FromDiscord<martinium> think I figured it out
00:35:12disrupteki don't believe it.
00:35:31FromDiscord<martinium> api docs say body needs to be sent as an array of json
00:35:41FromDiscord<martinium> [{yadda:yadda}]
00:36:09FromDiscord<kodkuce> thats probbaly reason why you get 400 bad req
00:36:13FromDiscord<martinium> yup
00:37:25FromDiscord<martinium> bahaha now I get 500 error
00:37:35FromDiscord<martinium> going to have to use a post request vs a put
00:38:42FromDiscord<martinium> post gets 400 error
00:38:55FromDiscord<kodkuce> duno if not your api maybe use postman/curl or whatwer to figure out exact data format
00:39:01FromDiscord<martinium> can I turn the json node in body into an array by just wrapping it in []?
00:39:23FromDiscord<martinium> (edit) removed 'json node in'
00:39:30*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
00:39:35FromDiscord<martinium> or do I need to do seq[]
00:39:48*synshroud joined #nim
00:41:12FromDiscord<kodkuce> hmm duno xD
00:41:37FromDiscord<kodkuce> https://play.nim-lang.org/
00:41:39FromDiscord<kodkuce> try here
00:42:34FromDiscord<kodkuce> i think you can wrap with [ ]
00:43:03FromDiscord<kodkuce> https://play.nim-lang.org/#ix=2vm7
00:43:58FromDiscord<kodkuce> anyway i need to go sleep its 02:42 at me
00:44:16FromDiscord<martinium> thanks for your help
00:44:19FromDiscord<martinium> have a good night
00:45:18FromDiscord<kodkuce> and also care duno what api you sening request, but some have limit on requests per some time and simliar
00:45:20FromDiscord<kodkuce> good night
00:45:32FromDiscord<kodkuce> np hope i helpd you at least some :)
00:55:05*Tanger quit (Ping timeout: 258 seconds)
00:57:47*kinkinkijkin quit (Ping timeout: 260 seconds)
00:59:55*vicfred quit (Ping timeout: 240 seconds)
01:03:02*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
01:03:19*synshroud joined #nim
01:05:54*kinkinkijkin joined #nim
01:07:55*bra-ket quit (Ping timeout: 240 seconds)
01:13:30*zyklon joined #nim
01:15:56kinkinkijkini need to figure out why this object loader is a data bomb
01:16:07kinkinkijkinfills my 16gb of ram in 20 seconds
01:16:12kinkinkijkinfor a 13mb file
01:16:31disruptekso, less than a gig a second? doesn't sound like nim.
01:17:05kinkinkijkinit's a databomb but it tries to do more calculations than stores :p
01:20:21*bunbunbunbunny joined #nim
01:21:33kinkinkijkinoh i know what im doing wrong
01:21:51kinkinkijkinim not clearing temp single-item variables
01:22:51kinkinkijkinthat's... oh god
01:22:58kinkinkijkinthat would've taken a very long time to stop
01:31:20*kenran joined #nim
01:36:13*kenran quit (Ping timeout: 246 seconds)
01:41:10*apahl quit (Ping timeout: 244 seconds)
01:42:20*apahl joined #nim
01:45:18*bunbunbunbunny quit (Quit: leaving)
02:08:24kinkinkijkinaaaaand im having the issue i went about before
02:08:42kinkinkijkinhow do i make sure a variable is rewritten for a seq?
02:08:49kinkinkijkinin this case, a tuple
02:09:32Prestigekinkinkijkin: what do you mean by rewritten?
02:09:34kinkinkijkinim looking for a blanket solution that doesn't require messy tricks like adding .toSeq
02:10:10kinkinkijkinprestige, normally a seq will reference any memory put into it, which is fine if you're putting literals or file items into it
02:10:25kinkinkijkinbut when you're putting live variables into it, often they'll disappear
02:11:19kinkinkijkinthe only solution ive been given for this so far was years ago, and that was to explicitly re-type the variable to the type that it already is on the .add
02:11:42kinkinkijkini was expecting that there would be a better solution by now
02:11:48PrestigeCan you give an example? I'm curious
02:12:19kinkinkijkinyeah, do you want pseudocode, working nim, or a description?
02:12:27Prestigeworking nim
02:12:31kinkinkijkinwelp~
02:12:35kinkinkijkinwelp*
02:12:46Prestigewell, the recreated problem
02:12:59kinkinkijkinokay
02:13:01kinkinkijkinjust a sec
02:17:03kinkinkijkinhttps://dpaste.org/KW9b this is just an example
02:17:45kinkinkijkingiven a file that has multiple lines, that will return only the values from one line
02:17:46kinkinkijkinsometimes two
02:19:20Prestigehmm interesting
02:20:12kinkinkijkinin that case chaning tmptmpvarvar.add(tmpvar) to tmptmpvarvar.add(tmpvar.toSeq) fixes that
02:20:43kinkinkijkinbut that's... messy, unclear
02:21:13PrestigeCould make a template or just comment for clarity ig
02:21:30kinkinkijkinim just looking for a real solution
02:21:39*Tanger joined #nim
02:22:12kinkinkijkinwhether it's using different types for this, or using gc magic, or both
02:23:32*muffindrake quit (Ping timeout: 244 seconds)
02:23:48Prestigemaybe doesn't suit your actual problem, but what about initializing a new variable there?
02:23:52leorize[m]what are you trying to do?
02:24:37*konkrrrrrr joined #nim
02:24:48*kinkinkijkin quit (Disconnected by services)
02:24:52*konkrrrrrr is now known as kinkinkijkin
02:25:26*Jesin quit (Ping timeout: 240 seconds)
02:25:58*muffindrake joined #nim
02:35:59*bung joined #nim
02:43:02*thomasross_ joined #nim
02:43:02*thomasross quit (Killed (card.freenode.net (Nickname regained by services)))
02:43:02*thomasross_ is now known as thomasross
02:51:03*waleee-cl quit (Quit: Connection closed for inactivity)
02:57:46*bung quit (Ping timeout: 246 seconds)
03:07:22disrupteka real solution is never a good idea.
03:07:32*letto quit (Quit: Konversation terminated!)
03:08:15*letto joined #nim
03:32:12*kenran joined #nim
03:35:26*bung joined #nim
03:37:14*kenran quit (Ping timeout: 260 seconds)
03:42:25*apahl quit (Ping timeout: 240 seconds)
03:43:32*apahl joined #nim
03:50:06*bra-ket joined #nim
03:50:35*zyklon quit (Read error: Connection reset by peer)
03:52:03*vicfred joined #nim
03:55:06*arecacea1 quit (Remote host closed the connection)
03:55:30*arecacea1 joined #nim
04:04:35*pbb quit (Remote host closed the connection)
04:05:47*pbb joined #nim
04:05:52FromDiscord<martinium> question how are you supposed to send json data in an http request in Nim? Are you supposed to use ```body = data``` or ```multipart = data```?
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:34*supakeen joined #nim
04:06:45*thomasross quit (Ping timeout: 240 seconds)
04:15:42*ptdel joined #nim
04:18:54disrupteksurprise me.
04:20:31FromDiscord<martinium> body = data
04:20:53FromDiscord<martinium> (edit) 'data' => '$data'
04:22:03disrupteksounds good.
04:24:26FromDiscord<martinium> sigh
04:24:34FromDiscord<martinium> I need to get a handle on this language does it
04:24:45*Jesin joined #nim
04:25:00FromDiscord<martinium> did what I needed to in Python but def want to know how to get it done with Nim so I can use this always vs Python
04:32:19*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:32:27*njoseph joined #nim
04:32:29*njoseph quit (Client Quit)
04:32:35*njoseph joined #nim
04:33:30*njoseph quit (Client Quit)
04:33:38*njoseph joined #nim
04:33:43*njoseph quit (Client Quit)
04:33:50*njoseph joined #nim
04:37:55*narimiran joined #nim
04:43:47*synshroud_ joined #nim
04:44:25*synshroud quit (Ping timeout: 240 seconds)
04:48:40FromDiscord<Elegant Beef> @martinium reimplement it in nim, best way to learn it! 😄
05:10:40*arecacea1 quit (Remote host closed the connection)
05:11:08*arecacea1 joined #nim
05:14:26FromDiscord<dk> Is it """normal""" for OS to totally hang up on infinite template call recursion?
05:15:47bungis https://github.com/JohnAD/decimal128 suit of encoding for mysql float ?
05:20:27*synshroud_ quit (Quit: ZNC 1.7.5 - https://znc.in)
05:20:42*synshroud joined #nim
05:21:03FromGitter<halloleo> Hi! Does anybody have experience with using D3 (https://d3js.org/) from Nim with the JS backend?
05:25:45*kenran joined #nim
05:36:32FromDiscord<martinium> how can I check the type of an object?
05:36:36FromDiscord<martinium> is there a proc for that?
05:37:06FromDiscord<martinium> it's weird but a value for a jsonnode key happens to be an array
05:37:19FromDiscord<martinium> but it's saying its an openArray vs a JArray
05:43:34bung`aVal is AType`
05:44:20FromDiscord<Rika> `aVal.kind == JArray`?
05:48:56FromDiscord<Elegant Beef> `object of T`
05:49:15FromDiscord<martinium> when I echo a parent json array with a bunch of keys the key I want to access prints its values
05:49:32FromDiscord<martinium> the key I want to access has an array of strings as its values
05:49:38FromDiscord<Elegant Beef> shit is it of... cant recall
05:49:43FromDiscord<martinium> when I try to access this key directly it prints out empty keys
05:49:53FromDiscord<Elegant Beef> ah it is of
05:58:52FromDiscord<Rika> so root is obj, next is arr, next is string, right?↵so something like ["key"][index].getStr() right?
05:59:59FromDiscord<martinium> wow I finally got it
06:00:22FromDiscord<martinium> I had to specify a damn index after main json array
06:00:39FromDiscord<martinium> main array I want to access is called resources
06:01:21FromDiscord<martinium> so data{"resources"}{0}{"recipents"}.getElems()
06:01:24FromDiscord<martinium> that finally worked
06:01:34FromDiscord<martinium> why did it need an index........
06:02:09FromDiscord<martinium> it's always going to be 0 since it is iterating through each object....
06:02:29*Zectbumo joined #nim
06:02:34FromDiscord<martinium> (edit) 'data{"resources"}{0}{"recipents"}.getElems()' => '```data{"resources"}{0}{"recipents"}.getElems()```'
06:02:45FromDiscord<martinium> omg
06:03:00FromDiscord<martinium> because resources is an array containing a bunch of objects
06:03:20FromDiscord<martinium> so each object has an index value
06:03:23FromDiscord<martinium> ughhhhhhhhhhh
06:03:42FromDiscord<martinium> glad I finally figured it out
06:03:48FromDiscord<martinium> time for bed now
06:03:49FromDiscord<martinium> later
06:03:52FromDiscord<Rika> bruh
06:04:00FromDiscord<Rika> gn to you
06:04:13FromDiscord<martinium> thanks man same to you
06:04:23FromDiscord<martinium> 2AM here and I work in the morning
06:04:24FromDiscord<martinium> lol
06:04:28FromDiscord<martinium> later
06:06:03FromDiscord<Rika> "same to me" but its not night for me xd
06:06:52*solitudesf joined #nim
06:15:02*letto quit (Quit: Konversation terminated!)
06:15:48*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:19:55*elijahr joined #nim
06:20:56*letto joined #nim
06:28:47*Vladar joined #nim
06:31:01ForumUpdaterBotNew thread by Halloleo: List with the modules of the Standard library which do not work with the JS backend, see https://forum.nim-lang.org/t/6731
06:33:14*mal`` quit (Quit: Leaving)
06:33:30*mal`` joined #nim
06:41:21*PMunch joined #nim
06:43:56*kinkinkijkin quit (Read error: Connection reset by peer)
06:44:40*kinkinkijkin joined #nim
07:09:16*elijahr quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:10:15*elijahr joined #nim
07:21:39PMunchHmm, is there a way to undeclare a variable?
07:22:04FromDiscord<mratsim> put it's use in a "block:"
07:22:11FromDiscord<mratsim> scope its*
07:22:18PMunchAh, it's an argument to a function
07:22:35PMunchAnd I have a pragma that I want to hide it
07:22:53FromDiscord<mratsim> shadow it with `let a = "THOU SHALL NOT REUSED US"`
07:22:58FromDiscord<Rika> was gonna say
07:23:05PMunchWell that's just ugly
07:23:13PMunchWhat if `a` was a string to begin with
07:23:16FromDiscord<mratsim> ugly is in the eye of the beholder
07:23:35FromDiscord<Rika> make a new type
07:23:38FromDiscord<mratsim> type ShadowVariable = enum
07:23:43FromDiscord<Rika> type DoNotUse = object
07:23:45FromDiscord<Rika> or something
07:24:13PMunchThat's just a different form of ugly, but still ugly :P
07:24:57PMunchWhat I could do is create two procedures, one with all the arguments and one without one of them
07:25:08PMunchAnd then call the one without the argument from the one with
07:25:30PMunchBut that adds a procedure call.. And a template won't work..
07:25:34FromDiscord<mratsim> or use a default parameter?
07:25:38PMunchI guess I could add {.inline.}
07:25:49FromDiscord<mratsim> inline would apply to any caller
07:25:57PMunchWell, that won't work for this usecase
07:26:17FromDiscord<mratsim> but you can do fooImpl, and have a foo1 and foo2 with different number of args
07:26:22PMunchI'm looking at the `withNone` pragma @Elegant wrote
07:26:46PMunchBasically it checks if all Option[T] arguments given to a procedure are `none`
07:27:05FromDiscord<mratsim> if procs are declared in the same module and the inner one is private, the compiler will auto-inline it if necessary so don't worry too much
07:29:12PMunchThe `withSome` he wrote unpacks `a: Option[T]` to `a: T` in the procedure, so I was wondering if it would make sense to hide `a` when using the `withSome` pragma
07:29:28PMunchwhen using the `withNone` proagma*
07:30:43*elijahr quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:31:12PMunchIf we just had something like `undef a` or `without(a):` then I could just use that
07:41:18FromDiscord<mratsim> template a: {.error: "Don't use".}
07:41:48FromDiscord<mratsim> so without should use identifier construction
07:42:59*krux02 joined #nim
07:44:04FromDiscord<mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2vne
07:44:20FromDiscord<mratsim> change nkSym to nkIdent actually*
07:44:48FromDiscord<mratsim> oh and put those in a "block: "
07:45:20FromDiscord<mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2vnf
07:45:38FromDiscord<mratsim> (edit) 'https://play.nim-lang.org/#ix=2vnf' => 'https://play.nim-lang.org/#ix=2vng'
07:46:03FromDiscord<mratsim> @PMunch ^
07:46:31FromDiscord<Elegant Beef> does that `untyped{kind}` work for user defined types aswell?
07:47:00FromDiscord<mratsim> afaik only nimnode
07:47:04FromDiscord<Elegant Beef> Ah
07:47:12FromDiscord<Elegant Beef> Damn that's cool syntax for procs for specific variants 😄
07:47:14FromDiscord<mratsim> but there is a RFC for better verification of variant types
07:47:32FromDiscord<mratsim> it's not an overload, it throws a "runtime" (VM runtime) error
07:47:41FromGitter<alehander92> there is a plan for that
07:47:41FromDiscord<Elegant Beef> Ah
07:47:47FromGitter<alehander92> but is there a rfc?
07:47:57PMunchHad to change nkStmt to nkStmtList, but seems to work well :)
07:48:02FromDiscord<mratsim> it's the same as "assert symbol.kind in {nkIdent}" at the beginning of the proc
07:48:26FromDiscord<Elegant Beef> Yea i suppose a macro that does that is rather simple
07:48:38PMunchhttps://play.nim-lang.org/#ix=2vni
07:50:04PMunchHmm, that `untyped{}` syntax would be useful for pragmas that has to be attached to procedures as well
07:50:18FromDiscord<mratsim> maybe there isn't a RFC @alehander42 and I saw that mentioned somewhere else
07:50:20PMunch`func` is still a nnkProcDef right?
07:50:28FromDiscord<mratsim> no it's nnkFuncDef
07:50:45PMunchAh..
07:51:02FromDiscord<alehander42> yeah i mentioned
07:51:08FromDiscord<alehander42> i wanted to write one 😦 😄
07:51:13FromDiscord<alehander42> sorry for being late
07:51:41FromDiscord<mratsim> xD
07:53:59FromDiscord<mratsim> Added to my budding cookbook - https://github.com/status-im/nim-cookbook
07:58:26Araqhttps://nim-lang.org/araq/writetracking_2.html feedback appreciated but do not share the link yet
07:58:57*bunbunbunbunny joined #nim
07:59:02PMunchHmm @Elegant, withSome/withNone doesn't work with `var` arguments..
08:00:03FromDiscord<Elegant Beef> I dont like the `..` it makes me think you are upset with me 😛
08:02:00PMunchHaha, not at all :P
08:04:26FromDiscord<mratsim> @Araq, sounds good, ypu might want to add `The reason is that while n itself is a parameter and immutable, n.data remains mutable due to the pointer indirection!` (This was called "shallow immutability" in the past)
08:11:06*myphs joined #nim
08:18:37*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:23:17FromDiscord<Elegant Beef> pmunch seems sorta weird to use the macro with var options, any good reason to support this?
08:23:19PMunchHmm, should "nimble test" also generate the documentation in order to test "runnableExample"s?
08:23:36PMunch@Elegant, why would that be weird?
08:23:43PMunchI've already implemented a fix for it :)
08:23:59FromDiscord<Elegant Beef> Cause if you're passing a var option you'd expect to set it if it's none
08:24:20FromDiscord<Elegant Beef> So i guess it has point with `withNone`
08:24:22PMunchOr set it to none after the execution
08:26:00FromDiscord<Elegant Beef> So were you using my macros and ran into that?
08:30:49PMunchI was just cutting a new release, and when writing some more documentation I noticed a couple small things I wanted to change
08:33:36PMunch@Elegant: https://github.com/PMunch/nim-optionsutils/commit/3810fdad719abcb3994bafee91a0fed350c0a7fc
08:34:02PMunchHmm, does `:` in a highlight work?
08:34:10PMunch@Elegant ^
08:34:23FromDiscord<Elegant Beef> It pinged me yes
08:34:48PMunchAh okay, cool
08:36:23PMunchHmm, I guess I could've implemented a similar thing for `ptr` and `ref` options as well
08:37:26FromDiscord<Elegant Beef> ref/ptr options, sounds weird
08:37:58PMunchDefinitely, not used very often
08:38:22FromDiscord<Elegant Beef> I mean it's sorta against the idea of options, so yea 😛
08:40:28*myphs quit (Ping timeout: 256 seconds)
08:40:31FromDiscord<Elegant Beef> Do really like the added undefining
08:40:58PMunchYeah it's nice :) Thanks @mratsim
08:41:28PMunchPlays well into the whole "safe options" thing that it has going
08:42:13Araqmratsim: ok, thanks
08:44:13FromDiscord<Elegant Beef> Im just happy my macro wasnt abhorrent 😄
08:44:31FromDiscord<Elegant Beef> Which reminds me, i probably should redo my constructors macro
08:45:31PMunchI like it :) Can certainly see how it could be useful
08:46:02FromDiscord<Elegant Beef> I more mean that it was cleaner than this implementation↵https://github.com/beef331/constructor
08:49:34PMunchHmm, that's a pretty cool package TBH
08:49:48PMunch(Didn't look at the implementation)
08:50:36FromDiscord<Elegant Beef> I realized i do need to have a body to call after
08:50:54FromDiscord<Elegant Beef> So you can do subscription and the like after it's created
08:53:19FromDiscord<Elegant Beef> I know someone from a gamedev discord that uses Swift and named parameters as much as possible that was peturbed by that
08:53:42FromDiscord<Elegant Beef> "Why would you not want named parameters?!"
08:54:16PMunchI try to use them when it's not clear what the arguments are
08:54:55FromDiscord<alehander42> hmm
08:55:00PMunchExample: "createNew(SuperHero, height = 210)"
08:55:07FromDiscord<Elegant Beef> I only use them when specifying values of optional parameters
08:55:10FromDiscord<Elegant Beef> Since they're basically forced
08:55:31PMunchI don't use `kind = SuperHero` because it's kinda obvious, but `height` can't really be guessed just from `210`, so I name it
08:55:32FromDiscord<Elegant Beef> Cause fuck populating the entire proc signature for the 13th entry
08:55:45*Zectbumo quit (Quit: 64bits!)
08:55:54PMunchHeh, yeah it really also depends on how often I use something :P
08:56:28Araqanybody else?
08:56:32FromDiscord<Elegant Beef> I see how they can be nice, but it just adds a lot of text and they also do the whole block declaration
08:56:38FromDiscord<Elegant Beef> Other than good job, nope 😄
08:56:44PMunchIf you use a proc 13 times you kinda expect the user to know what the arguments are. But if you use it once then it might be nice to specify.
08:56:57FromDiscord<Elegant Beef> i didint say 13 times
08:57:03FromDiscord<Elegant Beef> I said 13 variable entry
08:57:12PMunchAraq, anybody else what?
08:57:16FromDiscord<Elegant Beef> (edit) '13' => '13th'
08:57:19FromDiscord<Elegant Beef> On his musings
08:57:27AraqPMunch, please read my linked article
08:57:28PMunchOh, missed that link
08:58:32PMunchMaybe link "Clyybber" to their GitHub?
08:59:02FromDiscord<Elegant Beef> I do have to ask does this immutabillity only apply to `noSideEffects` or does it also apply to `procedures` non `var` arguments?
09:00:16FromDiscord<Elegant Beef> I know it'd break a ton of code, but having true immutabillity on non variable arguements would be interesting 😄
09:01:25PMunchAlso the "7 years ago I wrote how Nim would get "write tracking"" part should include a link
09:02:02Araqhmm ok
09:02:31Araq<Elegant Beef> it applies to .noSideEffect procs
09:02:49Araq('func' remains syntactic sugar)
09:02:58Araqand it's inferred
09:03:08Araqjust like it used to be
09:05:04FromDiscord<alehander42> 🙂
09:06:27FromDiscord<alehander42> yeah this is what side effect
09:06:29FromDiscord<alehander42> sounds like
09:06:45FromDiscord<alehander42> but isn't this a big breaking change
09:07:03FromDiscord<Elegant Beef> Only for people that were using impure funcs
09:07:15FromDiscord<alehander42> well .. sorry but this is how they were defined
09:07:38FromDiscord<Elegant Beef> It is also expiremental atm, so no it doesnt 😄
09:07:56AraqI ported some code over, mostly it just works
09:08:19FromDiscord<alehander42> but all code that mutates refs should break no?
09:08:24Araqin rare cases you need a {.noSideEffect.}: block to override the compiler's thinking
09:09:46FromDiscord<Elegant Beef> Anything that modifies a non `var` argument will break
09:10:20Araq<alehander42>: well there is considerable overlap between using funcs and not using much of true mutation
09:10:23FromDiscord<Elegant Beef> Which is kinda fine since the entire point of a `func` is to have no state changes
09:11:03FromDiscord<Elegant Beef> I feel like anyone that'd contemplate using a func would realize they're mutating objects and go "Well this isnt the job for a func"
09:11:53FromDiscord<Elegant Beef> But i've literally never used a `func` so what do i know
09:12:09Araqyou don't have to use 'func', it's inferred :P
09:12:19FromDiscord<Elegant Beef> oh
09:13:00PMunchThis is a great feature!
09:13:15PMunchAnd the article describes it well
09:13:19FromDiscord<Elegant Beef> So what your're saying is that Nim has been making me write functional programming without me knowning, this is absurd!
09:13:34FromDiscord<Elegant Beef> (edit) 'knowning,' => 'knowing,'
09:13:50PMunchHaha, well you can call something declared as a `proc` from a `func` as long as the `proc` isn't mutating anything
09:14:06PMunchIn that case the `proc` could've been a `func`
09:14:19FromDiscord<Elegant Beef> Well yea
09:14:35Araqif you phrase it this way and it might be "absurd" then. but in reality we infer a subset of what people mean when they say FP
09:15:08Araqand with the --experimental switch we infer it differently
09:15:22FromDiscord<Elegant Beef> Yea i was mostly just joking. Think it's cool.
09:16:03FromDiscord<Elegant Beef> If im not asking for help, or helping someone there is an extremely high chance my sincereity is less than 0
09:16:14Araqin reality I don't care about you mutating your stuff, I care about my optimizer to perform well ;-)
09:16:49FromDiscord<Elegant Beef> See Pmunch i told you Araq doesnt care about you
09:20:49*beatmox- quit (Ping timeout: 244 seconds)
09:22:09FromDiscord<Varriount> Oh look, an RFC
09:22:32FromDiscord<Varriount> I shall pounce on it like a cat with a ball of yarn
09:23:34*Tanger quit (Quit: Leaving)
09:23:58*awe00 joined #nim
09:24:05FromDiscord<Rika> cute
09:24:06*beatmox joined #nim
09:24:43FromDiscord<Elegant Beef> All i learned is that varriount jumps on cats whilst he holds a ball of yarn
09:24:47FromDiscord<Elegant Beef> Pretty metal if you ask me
09:25:17FromDiscord<Varriount> I like cats. I intend to adopt one at some point
09:25:39FromDiscord<Varriount> Mainly when I feel like I'm responsible enough
09:25:50FromDiscord<Elegant Beef> I mean that's cruel adopt a cat just to jump on it
09:31:36FromDiscord<Elegant Beef> Reading RFC#247, couldnt the ref objects be solved by storing all the objects in the graph, then instead of storing a reference just storing the index inside the json, so then you can reconstruct on deserialization?
09:31:52FromDiscord<Elegant Beef> But it's too late for me
09:32:00FromDiscord<Elegant Beef> So i go now, my shitty jokes leave with me
09:33:32Araqthat's what marshal.nim does
09:34:02Araqit translates refs into integer IDs.
09:34:23Araqbut when I use a web API that sends me some JSON it doesn't do that
09:34:51Araqit's about interop with foreign systems, you don't get to define the rules of play
09:35:31Araqand so we shouldn't "guess", in the end the programmer needs to say what he needs, we can only automate part of the problem domain
09:40:34*Vladar quit (Quit: Leaving)
09:42:08FromDiscord<mratsim> FP aren't the only users of func
09:42:25FromDiscord<mratsim> I'm more interested in writing bug-free / surprise-free code
09:43:54*kinkinkijkin quit (Read error: Connection reset by peer)
09:44:13FromDiscord<mratsim> on that band-wagon, I would love if large objects that are passed by pointers in the backend also get tagged with __restrict. I have some poor extra "mov" generated by the compiler.
09:44:35*kinkinkijkin joined #nim
09:45:40Araqwill give you a .restrict pragma but f(x, x) implies it cannot always be restrict
09:47:42FromDiscord<mratsim> restrict at the function parameter level?
09:48:21FromDiscord<mratsim> Because restrict for variable is already possible with: https://github.com/numforge/laser/blob/master/laser/compiler_optim_hints.nim#L23-L26
09:53:01AraqI know it's possible but that's hacky
09:56:15FromDiscord<mratsim> My code is a collection of hacks 😉
09:56:57*FromGitter quit (Remote host closed the connection)
09:56:57*oprypin quit (Quit: Bye)
09:57:15*oprypin joined #nim
09:57:28*FromGitter joined #nim
09:58:06FromDiscord<mratsim> anyway restrict on param would help avoiding very large function prologue/epilogue when passing big object like arrays of bytes from hashes with arrays of bytes from bigint for example.
10:00:06FromDiscord<mratsim> in this function, I have unexplained 50 cycles cost even if it's completely empty ... https://github.com/mratsim/constantine/blob/master/constantine/tower_field_extensions/quadratic_extensions.nim#L55-L139
10:00:53FromDiscord<mratsim> sorry 23 cycles*
10:01:05FromDiscord<mratsim> but still almost 10% of the function time
10:01:59*theelous3 joined #nim
10:03:49*Trustable joined #nim
10:04:11FromGitter<alehander92> mratsim FP is about bug-free code usually
10:08:26FromDiscord<mratsim> but it's also slow
10:09:29FromGitter<alehander92> mratsim eh ..
10:09:36FromGitter<alehander92> it depends on too many factors
10:09:53FromDiscord<mratsim> There are plenty of domains where you want the compiler to help you track bugs as much as possible, but FP isn't suitable because it assumes a GC or allocates lot of intermediate compute
10:10:02FromGitter<alehander92> but harder to optimize/low level is true
10:10:23FromGitter<alehander92> fp doesn't have to assume a GC
10:10:25FromGitter<alehander92> imho
10:11:11FromGitter<alehander92> allocations can be controlled, but I agree that it's a harder model for this kind
10:11:28FromGitter<alehander92> but imperative shell, functional core still sounds reasonable for some projects
10:12:17FromDiscord<mratsim> FP does assume a GC, there are no FP language out there that doesn't use one.
10:12:49FromDiscord<mratsim> The basic Fp data structure, the singly linked list requires some form of memory management.
10:13:25FromGitter<alehander92> you're right in practice
10:13:34FromGitter<alehander92> but on theory i don't think it's impossible
10:13:38FromDiscord<mratsim> All the closures for Higher Order functions also requires a GC
10:14:19FromGitter<alehander92> hm, it's a good question
10:14:43FromGitter<alehander92> still, i'd say some form of deterministic GC + strict typing might
10:14:49FromGitter<alehander92> get you an almost fp-language
10:14:52Araqwell you can emulate a GC to some extend with "memory regions" but then the memory region becomes mutable and against the FP mantra
10:14:55FromGitter<alehander92> something like rust lite
10:15:37FromGitter<alehander92> another option is effect systems for memory
10:16:16FromGitter<alehander92> which somehow encode the used regions in a way that is checkable
10:16:35Araqregion inference was done for ML
10:16:43FromDiscord<mratsim> Yes, some kind of borrow checker + a proof system 😉
10:16:44FromGitter<alehander92> similarly to the way IO usage is encoded but haskell still does it in "pure"
10:17:06Araqone problem was that a valid outcome is always "just use a single region for the entire program"
10:17:07FromGitter<alehander92> yeah: probably not a great fit
10:17:45FromGitter<alehander92> so immutability is what makes it hard
10:18:27FromGitter<alehander92> i'll ask the proglangdesign channel for other examples
10:18:53Araqplease spare me :P
10:19:07AraqI've been there...
10:19:33FromGitter<alehander92> hahahaha
10:20:05FromGitter<alehander92> they know some obscure stuff: i like those folks
10:20:10FromGitter<alehander92> but think about it
10:20:29FromGitter<alehander92> we can have a more generalized immutability to mutable equivalent tool
10:20:51FromGitter<alehander92> after all, once we've proved some code doesn't mutate stuff
10:20:59FromGitter<alehander92> all kinds of optimizations including totally rewriting it
10:21:02FromGitter<alehander92> should be possible
10:21:15FromGitter<alehander92> and this might be easier than encoding manually regions and
10:21:31FromGitter<alehander92> combining it with hard type stuff
10:21:45*bunbunbunbunny quit (Ping timeout: 240 seconds)
10:21:58Araqyou don't have a cost model about memory consumption.
10:22:15Araqyou can optimize the program to a bump pointer allocator
10:22:28Araqand it works just fine for small input and dies with OOM on bigger inputs
10:22:46FromGitter<alehander92> yeah cost model is hard
10:22:49Araqthat's how to think about it.
10:22:57*bunbunbunbunny joined #nim
10:23:12FromGitter<alehander92> but the compiler can generate that for you
10:23:27FromGitter<alehander92> it can say "ok this code would use ~X relatively"
10:23:33FromGitter<alehander92> before/after optimization
10:23:51FromGitter<alehander92> again, not great for writing a kernel probably
10:24:52Araqthe problem is not about writing a kernel. the problem is that you enjoy thinking and then stop at the 60-80% solution and way before you wrote a single line of code.
10:24:54*bunbunbunbunny quit (Client Quit)
10:25:01FromDiscord<mratsim> For low-level code, I want tools to help me verify soundness/ensure safety. I can handle the perf.
10:25:27FromGitter<alehander92> mratsim same
10:25:32FromDiscord<mratsim> Ah yes, reading papers without code is like that ...
10:25:36FromGitter<alehander92> i don't want immutability at all costs
10:25:41Araqso everything always remains "theoretically" possible
10:25:52FromDiscord<mratsim> The so called "implementation details"
10:25:54FromGitter<alehander92> Araq you mean people or me
10:26:16Araqyou, personally.
10:26:20FromGitter<alehander92> yeah well i should get to the 90% solution
10:26:21FromGitter<alehander92> right
10:27:07Araqand I'm not trying to be offensive here, it's fine to enjoy musing about things
10:27:16FromGitter<alehander92> "Araq's musings"
10:27:35FromDiscord<mratsim> It's like people recommending O(n^2.7) algorithms for matrix multiplication, while the problem is not the number of low-level operation but the cache hierarchy of your actual CPU. You spend time on theoretical speed improvement that don't materialize in reality.
10:27:42Araqbut it does get tiresome to have you explain to me thing that I mused over myself for 7 years
10:27:49FromGitter<alehander92> sorry
10:27:56FromGitter<alehander92> i just try to see if it makes sens
10:28:10FromGitter<alehander92> so it's very helpful to talk with experienced people :D
10:28:17FromGitter<alehander92> to not try it again
10:28:33FromGitter<alehander92> i have many ideas, but that's it : they are weak
10:28:35FromGitter<alehander92> at some point
10:28:51FromGitter<alehander92> so if one waits for the perfect concepts/plans, probably one would never write down anything
10:29:39FromGitter<alehander92> maybe small prototypes should be a better talking point
10:30:27FromDiscord<mratsim> That's how I started Weave, but it's costly in time. I created a prototype in July a year ago, wrote the RFC, then rewrote it completely from scratch in November.
10:30:38FromGitter<alehander92> yeah it takes time
10:31:25FromDiscord<mratsim> This is also why having a way to evolve/deprecate/replace the standard library is so important.
10:31:34FromGitter<alehander92> and i want something useful for job search right now (that's why i am trying to write c -> asm compiler in haskell ..
10:31:41FromDiscord<mratsim> i.e. the protocol discussion mentioned
10:32:14FromDiscord<mratsim> OCaml seems to be the defacto standard for compilers Proof of concepts
10:32:28FromGitter<alehander92> eh they're both pretty standard
10:32:58FromDiscord<Clyybber> alehander92: Try to mold your ideas into algorithms
10:33:24FromGitter<alehander92> good advice!
10:33:31FromGitter<alehander92> ah another idea i wondered about was
10:34:05FromGitter<alehander92> fusing passes : the problem with many optimization/other passes is that they still slow down a compiler ⏎ but what if one could describe them in more rewriting way
10:34:16FromGitter<alehander92> as rewrite rules, e.g. optimizations
10:34:21FromGitter<alehander92> and fuse some of them automatically
10:34:35FromDiscord<Clyybber> The issue is that many passes aren't that local
10:34:36FromGitter<alehander92> this way you get both cleaner arch and faster runtime
10:34:49FromGitter<alehander92> we're talking about local
10:34:58FromDiscord<Clyybber> And it doesn't jump out to me what could be fused
10:35:03FromGitter<alehander92> imagine a backend which has 20 possible local optimizations
10:35:09FromDiscord<Clyybber> Because many passes strictly depend on the previous pass
10:35:27FromDiscord<mratsim> I've seen some talks that walk through graph rewrite with an AST in python that were easy to follow
10:35:31FromGitter<alehander92> that's also true: but that's the rewrite rule point
10:35:58FromGitter<alehander92> you detect which can be combined and an optimal way to order them
10:36:10FromGitter<alehander92> i guess there is some theory on that
10:36:18FromDiscord<Clyybber> probably
10:36:27FromDiscord<Clyybber> but I don't think it will help the nim compiler that much
10:36:34FromGitter<alehander92> oh no it's very theoretical
10:36:35FromDiscord<Clyybber> but the only way to know is to try :)
10:37:30FromDiscord<Clyybber> What orders of performance increase are you thinking about?
10:37:37FromGitter<alehander92> about nim my biggest guess is still the approach with parallel/IC submodules
10:37:43Araqsee the "Burg" code generator for the lcc C compiler, written in 1995
10:37:48FromGitter<alehander92> but i need to write that prototype as well
10:37:51FromGitter<alehander92> finish
10:39:35Araq(did I read the book? yes, I did. maybe you should too.)
10:39:36*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
10:40:08FromGitter<alehander92> yeah i tried to find
10:40:10FromGitter<alehander92> the paper
10:40:13FromGitter<alehander92> https://c9x.me/compile/bib/iburg.pdf ?
10:40:20FromGitter<alehander92> sorry https://dl.acm.org/doi/abs/10.1145/131080.131089?download=true
10:40:22*synshroud joined #nim
10:41:46FromGitter<alehander92> clyybber no idea, mostly wondering if it's viabl
10:41:53FromGitter<alehander92> mratsim yeah maybe similar
10:43:52FromDiscord<Clyybber> alehander92: Assuming a 10 to 20 percent performance increase I don't think it is
10:44:09FromDiscord<Clyybber> it will make the code harder to write since we have to restrict ourselves more
10:44:20FromDiscord<Clyybber> and harder to debug since it will be mixed together
10:46:36FromGitter<alehander92> about fusing/rewrite ? this is just a toy idea, i dont think it even matters to nim
10:46:47FromGitter<alehander92> as it would apply to e.g. a backend
10:47:23FromGitter<alehander92> IC is where it is for nim
10:51:12Araqyeah that paper.
10:51:27Araqas an exercise, rewrite the algorithms it uses to be purely functional
10:52:17FromGitter<alehander92> can't buy it man
10:52:45FromGitter<alehander92> but i'll keep it in mind (i have to read much more before it anyway :D)
10:53:06FromDiscord<Clyybber> psst scihub
11:05:43FromGitter<alehander92> hm, but which one is the "book"
11:06:03FromDiscord<dom96> Araq: ready to release that article yet?
11:07:16*myphs joined #nim
11:08:57*qwertfisch quit (Quit: ZNC - http://znc.in)
11:15:46Araqbook is here, https://www.amazon.de/Retargetable-Compiler-Design-Implementation/dp/0805316701
11:17:12FromDiscord<mratsim> You can get the paper here: file:///home/beta/Research/Compiler/Burg%20fast%20optimal%20instruction%20selection.pdf
11:17:22FromDiscord<Clyybber> lol?
11:17:41federico3well, technically it' not wrong
11:17:50FromDiscord<dom96> hah
11:17:58FromDiscord<Clyybber> @mratsim press the (+) to the left of the message box to upload stuff
11:18:17FromDiscord<mratsim> https://www.researchgate.net/profile/Christopher_Fraser/publication/2856341_Burg_---_Fast_Optimal_Instruction_Selection_and_Tree_Parsing/links/09e4150c61da64007b000000/Burg---Fast-Optimal-Instruction-Selection-and-Tree-Parsing.pdf?origin=publication_detail
11:20:04federico3[I just joined acm.org - because of Nim]
11:21:53FromGitter<alehander92> mratsim haha
11:22:12FromGitter<alehander92> huh how did you find it
11:23:31FromGitter<alehander92> hm 40$ an year is not so much
11:27:18FromGitter<alehander92> thanks Araq for the book link
11:27:40FromGitter<alehander92> seems cool, but for now I'll try using online resources
11:28:09federico3hm, Vala is getting quite some traction https://en.wikipedia.org/wiki/Elementary_OS - I really feel the need for stable gtk3+libhandy wrappers for Nim
11:28:41FromGitter<alehander92> one friend gave me https://www.amazon.de/Engineering-Compiler-Keith-Cooper/dp/012088478X/ref=pd_sbs_14_1/261-4787818-2240533?_encoding=UTF8&pd_rd_i=012088478X&pd_rd_r=5c7135aa-b3aa-4fcd-8556-c202ba35da60&pd_rd_w=h9T1L&pd_rd_wg=HTWDg&pf_rd_p=d5022659-416a-420a-bccc-de3cf1d7297a&pf_rd_r=N1QJSNYFWZPTVKATKQKY&psc=1&refRID=N1QJSNYFWZPTVKATKQKY as a present : I might take a look at it as well again
11:30:35FromDiscord<dom96> federico3: Elementary OS has been around for years, did something change recently that gave it more traction and as a result given Vala more traction too?
11:32:01federico3dom96: libhandy came out recently and the new gtk-based smartphones gathered a developer community very quickly
11:33:34FromDiscord<dom96> Interesting. But I've personally lost my faith in GTK.
11:37:05FromDiscord<dom96> I would much rather put work in to make Karax work natively on mobile ala React Native (or just React Native itself)
11:37:12FromDiscord<dom96> (edit) 'I would much rather put work in to make Karax work natively on mobile ala React Native (or just ... React' => 'I would much rather put work in to make Karax work natively on mobile ala React Native (or justuse'
11:37:37FromDiscord<Clyybber> GTK disabling disabling CSD really sucks
11:38:12federico3I've yet to see a UI library that I like, but gtk is what is being adopted
11:38:40FromDiscord<Clyybber> Qt is perfect from a user perspective
11:38:49FromDiscord<Clyybber> and seems fine from a devs perspective too
11:38:58federico3qt is a nightmare
11:39:03FromDiscord<Clyybber> is it?
11:39:16FromDiscord<dom96> QML seems like a nice light alternative
11:43:37Araqalehander42: I cannot comment on "Engineering a Compiler", didn't read it
11:43:37*kinkinkijkin quit (Read error: Connection reset by peer)
11:44:10*kinkinkijkin joined #nim
11:47:46FromDiscord<mratsim> @alehander42 I just googled it
11:49:10FromDiscord<mratsim> Plus I have over 8GB of papers on my machine so I learned how to avoid paywalls
11:49:49FromDiscord<Clyybber> Araq: I have to change the spec with my PR the typed example here https://nim-lang.github.io/Nim/manual#templates-passing-a-code-block-to-a-template works now
11:50:02Araqsure, go for it
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:33*supakeen joined #nim
12:09:49ForumUpdaterBotNew thread by ElAfalw: Handling in-place functions efficiently, see https://forum.nim-lang.org/t/6732
12:14:54PMunchHmm, what does this error mean? Error: system module needs: appendString
12:15:39*Senketsu joined #nim
12:28:38FromDiscord<Clyybber> PMunch: Somehow appendString is not available
12:29:23FromDiscord<Clyybber> do you use os:standalone or some other funky stuff that might cause appendString to not be defined?
12:30:04PMunchYup, I'm compiling for an Arduino
12:30:11PMunchIt works in -d:danger mode
12:30:31PMunchBut I had some weird behaviour so I tried to go back to a regular release in order to see if I was missing some obvious error
12:32:01FromDiscord<Clyybber> any reason you are not using os:ansic?
12:32:33FromDiscord<Clyybber> if it works in danger but not in release its the error messages, they probably use `&` to concatenate the strings
12:32:48FromDiscord<Clyybber> and that calls appendString, which is not available on os:standalone
12:32:58*Senketsu quit (Ping timeout: 260 seconds)
12:33:57FromDiscord<Yardanico> You mean --os:any :)
12:35:03FromDiscord<Clyybber> right
12:35:29FromDiscord<Clyybber> probably remembered the PR name or somethign :D
12:35:51PMunchWith --os:any: /home/peter/.choosenim/toolchains/nim-#devel/lib/system/osalloc.nim(306, 10) Error: Port memory manager to your platform
12:37:33FromDiscord<Clyybber> yeah, you need to provide malloc
12:38:34FromDiscord<Clyybber> or maybe just -d:useMalloc to use malloc itself
12:48:06*arecacea1 quit (Remote host closed the connection)
12:48:34*arecacea1 joined #nim
12:52:00*NimBot joined #nim
12:57:23FromDiscord<Clyybber> Araq: https://github.com/nim-lang/Nim/pull/15158 is ready, I had to go with the shadow scope approach in the end to avoid resemming the argument
12:57:24disbotFix #5691
12:57:43FromDiscord<Clyybber> But it turned out to relatively simple actually
13:01:38Araqif I write 'noMatch(); return' everywhere do you think I don't know I could make it part of the template instead?
13:02:01AraqI choose not to hide the control flow
13:02:05Araq*chose
13:03:11FromDiscord<Clyybber> ok, thought it was just an oversight
13:05:13FromDiscord<Clyybber> Araq: Are you ok with renaming it to noMatchReturn then ?
13:05:29FromDiscord<Clyybber> It prevents one from calling noMatch and forgetting the return
13:07:51Araqyour way is fine
13:07:53*waleee-cl joined #nim
13:08:00Araqdon't need the 'return' in the name
13:09:04FromDiscord<Clyybber> oh, okay :)
13:14:49Araqdom96: ok, ready to relase my article
13:24:49AraqClyybber: what about generated generics?
13:24:56Araqdo we have to undo them on block exit?
13:26:29FromDiscord<Ricky Spanish> is it possible in nim to link a dll like this```const LibName = "mydll/mydll.dll"↵{.push callconv:cdecl, dynlib: LibName.}↵{.push importc.}↵``` and then include the header file with ```{.emit: """#include "../some_header.h"""".}``` and then call the functions from that header in nim procedures?
13:26:38*Vladar joined #nim
13:28:15Araqyou need to decide whether you interface to a DLL or to a C header file
13:31:03FromDiscord<Ricky Spanish> the C header has the definitions of the types i can use from nim in the dynlib so dont i need to link like above and includes the header as usual or is there something im missing
13:32:46FromDiscord<Ricky Spanish> or against the lib rather
13:33:14leorize[m]you can't just "include" a header then call it from Nim. You will still need to translate the procs in the header to Nim
13:33:24leorize[m]nimterop is a seamless way to do this
13:36:18bunganyone know how to pack json param in mysql binary protocol ? I packed it as 1 byte(filed type,) a byte(0),variable-length(json string without quote) it has no problem with 5.7, with 8 it throw `Incorrect arguments to mysqld_stmt_execute`
13:36:57bungI searched hours no luck.
13:37:48leorize[m]are you trying to interface with mysql through the wire without using the library or smt?
13:38:32bungyeah, I write a lib amysql in pure nim
13:39:02bungso it need implement mysql protocol its self.
13:40:57*hackePelle joined #nim
13:42:51*hackePelle quit (Quit: Connection closed)
13:44:55*myphs quit (Ping timeout: 240 seconds)
13:45:19FromDiscord<dom96> Well, I submitted Araq's article to HN in case anyone wants to give it a little upvote
13:45:58FromDiscord<Clyybber> Araq: IMO no, its only about scoping
13:50:26*Kaivo quit (Ping timeout: 260 seconds)
13:51:10FromDiscord<dom96> Araq: Your blog needs opengraph tags
13:52:45*Kaivo joined #nim
13:53:45FromDiscord<Clyybber> Zevv: ready to work on cps again?
13:54:38Zevvslowly, slowly
13:54:45Zevvhaving my last beers
13:54:55Zevvtomorrow morning taking the ferry back home
13:55:05Zevvyou did notice I did not do any of the work, right?
13:55:12ZevvI just nag disruptek
13:55:41ZevvI decided after years of refusing manager or teamlead roles to give it a try for once
13:55:57FromDiscord<haxscramper> On wrapping C++ again - I made libclang wrapper https://github.com/haxscramper/hcparse - right now this is just some convenience sugar on top of things like getting kind/type of the node etc. There are of course some rough edges (because well, *c++*), but it looks manageable.
13:56:44FromDiscord<haxscramper> For /wrapping/ things. libclang also has access to documentation, types and other similar things.
13:58:16FromDiscord<haxscramper> And I also made macro for creating visitor callbacks to traverse AST - it was a bit of a paint to use, mainly due to `{.cdecl.}` calling convention on visitors.
13:59:24Araqdom96: what are "opengraph" tags?
13:59:50Araq<haxscramper>: yay, now please take over c2nim and make it use clang's parser
14:00:26FromDiscord<haxscramper> Not right now but maybe in future :)
14:01:32FromDiscord<Recruit_main707> that would be nuts
14:01:33FromGitter<alehander92> hmm nice
14:01:44FromDiscord<haxscramper> Now I just want to make sure it is not as painful to use as raw c bindings - e.g. porting enum and function names to use nim naming conventions (remove `clang_` prefix from everyhing, drop `CXX` etc)
14:02:16bungI found that's mysql unimplemented feature.
14:02:50FromDiscord<haxscramper> I've already done it /partially/ - documentation for cleaned version: https://haxscramper.github.io/hcparse-doc/src/hcparse/libclang.html , but it just needs more work
14:08:03*myphs joined #nim
14:08:10*myphs quit (Remote host closed the connection)
14:08:15FromDiscord<haxscramper> How can I get 'preprocessed' (expand all macros and templates) nim AST from source file
14:08:19PMunchCrap, just found a weakness in my superQuote macro..
14:08:30PMunchIt can't do string lookup in tables..
14:08:39FromDiscord<Rika> not so super anymore aint it
14:08:43PMunchAnd there doesn't seem to be any way of fixing it with how Nim handles ``..
14:08:55FromDiscord<haxscramper> There is a `compiler/parser` for parsing string to `PNode` - I want to have something similar
14:09:21FromDiscord<haxscramper> Some other part in compiler that I missed
14:10:20PMunchOh well, I'm off
14:10:21*PMunch quit (Quit: Leaving)
14:17:06FromDiscord<haxscramper> Sometimes I wonder what world would we live in if creators of C & C++ didn't try to be too smart with syntax. Things like `<<<template>>>`, ambiguous syntax for `if {} else {}` (probably created just to have something to write chapter in the textbooks on parsing), no keywords for function declarations etc.
14:28:56disruptekhow is this better than treesitter?
14:29:40Yardanicodisruptek: clang is a C/C++ *compiler*
14:29:48Yardanicoit surely knows C/C++ better than treesitter
14:29:51disruptekgtfo since when?
14:30:08Yardanico?
14:31:06FromDiscord<haxscramper> It has fully type-resolved (AFAIK) ast, can deal with includes, *any* standard-conforming C++ syntax, documentation etc.
14:32:02Araq<haxscramper> you cannot get a preprocessed Nim file as Nim has no preprocessor
14:32:15Araqclosest would be the "after sem" AST
14:32:23Araqbut it's not exposed
14:33:40FromDiscord<haxscramper> That's sad. I wanted to make wrapper for sourcetral DB writer and make nim source code explorer. I can just make it on top of parser alone though
14:36:48disruptekthose are features that treesitter cannot handle?
14:37:10Yardanicodisruptek: of course, it's not a C/C++ compiler
14:37:17Yardanicoit's just a parser
14:37:28Yardanicofor different languages
14:37:38shashlickI've not faced any limitations with tree sitter but I've only worked on c so far
14:37:40Yardanico"Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited."
14:37:42disruptekdocumentation doesn't strike me as exclusive to compilation.
14:38:12shashlickOf course clang will be better but don't envy haxscramper at all
14:38:13FromGitter<alehander92> i think it is optimized for incremental usage as editors etc
14:38:22disruptekso we're really talking about /typed/ ast.
14:38:48*endragor_ quit (Remote host closed the connection)
14:39:15*endragor joined #nim
14:40:04shashlickits light weight and provides enough information for wrapping
14:40:16disruptekhaxscramper: it's easy enough to insert yourself into nim's compilation process, it just might not be what you expect.
14:40:17FromDiscord<haxscramper> Clang is much better because it is specifically targeted for C++, has several pages worth of documentation already, multiple talks and dozen articles on how to use it to parse c++. It is easier to get started with, better suited for this particular task and provides richer interface. From what I saw treesitter is just generic parse-everything
14:40:31shashlicki did look at libclang when i started but for my approach, it is not viable
14:40:55FromDiscord<haxscramper> Why?
14:41:09shashlickbest to read the nimterop readme
14:43:50*endragor quit (Ping timeout: 265 seconds)
14:44:07FromDiscord<haxscramper> I'm sorry but there is no mention of clang/libclang on the readme. It talks about advantages of treesitter. Maybe I missed something? I looked in 'why-nimterop' section.
14:44:49FromDiscord<haxscramper> And I'm actually not really concerned with things like preprocessor, porting macros etc. At least not right now.
14:45:47FromDiscord<haxscramper> My current objective is to create toolking to writing *fully automatic* wrapped generators for some libraries. Things like qt, cgal etc. that are big enough to have dedicated tool for them.
14:47:00FromDiscord<haxscramper> And I also want to be able to throw in as many heuristics and logic during translation as I want in order to provide more idiomatic nim API.
14:47:48*hnOsmium0001 joined #nim
14:49:18FromDiscord<haxscramper> And I also hope to use libclang to wrap libtooling and *this* use it too. Right now this is in "todo thing that I want to do"
14:50:49Araqexcellent
14:51:09Araq> My current objective is to create toolking to writing *fully automatic* wrapped generators for some libraries. Things like qt, cgal etc. that are big enough to have dedicated tool for them.
14:51:12Araq^ this.
14:51:57AraqI completely agree with this approach
14:53:37shashlick> I'm actually not really concerned with things like preprocessor <= that's a big deal in my mind
14:54:20shashlickhope you read the preprocessing section
15:00:05FromDiscord<haxscramper> Maybe it is possible to integrate two approaches somehow? Since preprocessor is basically a separate language on top of C++ code it is better to talk about wrapping **preprocessor code** and wrapping **C++ code** as two separate targets.
15:00:30FromDiscord<Clyybber> what c2nim does is try to translate preprocessor macros into templates
15:00:38FromDiscord<Clyybber> and preprocessor constants into const
15:01:00FromDiscord<haxscramper> Valid preprocessor is not valid C++ and vice-versa
15:01:08shashlickeven if u ignore templates, there's still #ifdef blocks which should either be translated into when statements or the resolved output used
15:01:10disruptekwell, if we have typed ast, it becomes a "simple" question of transforms.
15:01:33disruptekhaxscramper: what remains to be implemented?
15:01:35FromDiscord<Clyybber> disruptek: The issue is that the preprocessor isn't typed at all
15:01:49*Kaivo quit (Ping timeout: 256 seconds)
15:01:54FromDiscord<Clyybber> not even untyped
15:01:56disrupteki know, but i don't write C macros in nim.
15:02:30FromDiscord<Clyybber> shashlick: They should be translated into when of course
15:02:49FromDiscord<Clyybber> if hax wants to go the c2nim way
15:02:49disruptekthat's a whooooole 'nother ball of wax.
15:02:59FromDiscord<haxscramper> If you want to put up with raw c wrappers + some convinience sugar on top everything is already done: https://haxscramper.github.io/hcparse-doc/src/hcparse/libclang_raw/raw_user.html (sugar) and https://haxscramper.github.io/hcparse-doc/src/hcparse/libclang_raw/index.html (raw bindings)
15:03:21disruptekhow do you handle preprocessing now?
15:03:49FromDiscord<haxscramper> As regular C++ compilation. It is handled internally by libclang
15:04:12*Kaivo joined #nim
15:04:21FromDiscord<haxscramper> I put in C++ file + all compilation flags (if any) and get translation unit ast with everything expanded/type resolved whenewher possible
15:04:25FromDiscord<Pixeye> guys how you manage info visibility in Nim? It's pretty easy with C# with protected/internal stuff to hide guts of library from end user. But what are the options in nim ?
15:04:36Yardanicoyou can have private/public fields
15:04:40disruptekokay, so you currently use the same approach as nimterop.
15:04:55Yardanicoyou can have internal and "external" modules and only export the "external" ones
15:04:58Yardanicofrom your main module file
15:04:58*bung quit (Read error: Connection reset by peer)
15:05:17leorize[m]@Pixeye things in Nim are hidden unless you export them
15:05:20FromDiscord<haxscramper> The main issue with C++ preprocessor that I see is actually porting libraries that have different API based on defines.
15:05:44*bung joined #nim
15:05:54disruptekpreprocessor is known to be a huge pita, of course.
15:05:56FromDiscord<haxscramper> But I think I need to cross this bridge when I come to it instead of trying to do everything at once.
15:06:21disruptekthe nimterop approach is not popular with araq but it does work.
15:07:01FromDiscord<Pixeye> leorize[Matrix] , I understand this. I've already wrote pretty stuff in nim. I ask about how people handle large scoped projects in nim where there a lot of stuff in one module that is mixed of public/private stuff
15:07:14FromDiscord<Clyybber> the nimterop approach is guaranteed to work, so thats a plus
15:07:19FromDiscord<haxscramper> Working with C++ is like eating cardboard anyway - with or without preprocessor.
15:07:28FromDiscord<Clyybber> the c2nim approach will produce nicer wrappers, but might not work for everything
15:08:16FromDiscord<haxscramper> But when I started wrapping libclang I used `c2nim` - after tenth 'expected ) but found )' I decided it is easier to write C++ to wrap libclang in nim.
15:09:04FromDiscord<haxscramper> Right now this package actually looks like matryoshka doll - I used C++ to generate raw bindings, then I use them to generate usable bindings for nim.
15:09:17leorize[m]I take it that you didn't use c2nim `#def` and `#pp` to selectively expand macros?
15:09:19disruptekhey, it works.
15:09:21FromDiscord<dom96> I love shashlick so it pains me to say this, but I strongly oppose nimterop
15:09:30*endragor joined #nim
15:09:36FromDiscord<haxscramper> When you use `c2nim` you are expected to manually tweak things.
15:10:10disruptekwhat you guys overlook about nimterop is that you expect to be able to cross-compile and your wrappers won't work in that scenario.
15:11:00disrupteki've had plenty of grief from nimterop, but it /works/ and it frees me from having to think about wrapping.
15:11:41FromDiscord<haxscramper> Yes, but that's not actually C++ as I already said. In order for this to work you actually need to port *preprocessor*, not C++
15:12:00disruptekwe agree.
15:12:10disruptekbut it's not done yet.
15:12:11ForumUpdaterBotNew thread by Araq: Blog post about strict funcs, see https://forum.nim-lang.org/t/6733
15:12:31disruptekthis sounds like a really good step forward, though.
15:12:38Yardanicobtw, seems like after the forum update my forum update bot has been working without issues
15:12:43Yardanicobefore it stopped updating after ~2 days
15:13:28FromDiscord<haxscramper> When I do manageable libclang I will look into merging it with nimterop somehow.
15:14:54*endragor quit (Ping timeout: 260 seconds)
15:16:45FromDiscord<haxscramper> Libtooling partially exposes information about macro expansions - https://clang.llvm.org/doxygen/group__CINDEX__LOCATIONS.html which might be used too.
15:17:57FromDiscord<Clyybber> Yardanico: Huh, I wonder what caused it
15:18:09Yardanicowell if it stops again, then it's a failure in my bot :)
15:18:14FromDiscord<dom96> I would say that you can get a 90% accurate without caring about macro expansions
15:18:22FromDiscord<dom96> and for 99.9% of use cases 90% is good enough
15:18:50disruptekhaxscramper: maybe the best solution is to come up with a directory structure for generated wrappers and plan for a platform-agnostic subdirectory that you can check for. this would let you add x-platform support later.
15:19:41FromDiscord<dom96> as for libclang, before you get an AST out of it, the C/C++ code passes through the preprocessor, so retrieving the preprocessor data is not trivial
15:20:13disruptekit is known.
15:20:19FromDiscord<haxscramper> I'm actually more interested in wrapping template C++ code into nim
15:20:49leorize[m]libclang can keep preprocessor macros in the ast
15:21:15disruptekholy shit, really?
15:21:19FromDiscord<dom96> How?
15:21:20FromDiscord<haxscramper> It can?
15:21:38FromDiscord<haxscramper> It has expansion extents, yes
15:22:03FromDiscord<haxscramper> Ah, no, not this one
15:22:08FromDiscord<Clyybber> wonder how that looks for duffs device
15:22:50FromDiscord<Clyybber> macros
15:23:06FromDiscord<Clyybber> or similar macros that rely on the textual representation
15:23:11disruptekshow us show us show us
15:23:13disruptekleorize
15:23:40FromDiscord<haxscramper> I don't think keeping macros as part of ast is even possible in theory. You can get some kind of mirrored ast where c++ corresponds to macros.
15:23:59disruptekthat's okay; the syntax isn't the important part.
15:25:35FromGitter<alehander92> well why not
15:25:40FromGitter<alehander92> overally keeping expanded forms
15:25:48FromGitter<alehander92> seem useful for debugging as well
15:26:13FromGitter<alehander92> we had a thing which mapped nim expansions to lines of code etc for that
15:27:21FromDiscord<haxscramper> Found this one: http://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html - it is in libtooling, so no available now
15:27:45disruptekthat would work, definitely.
15:28:43FromDiscord<dom96> nice, that could work
15:30:59*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
15:31:18*synshroud joined #nim
15:32:03disrupteksomeone else had a problem where they had to define `<=`() and i'd like to hear about it. i had the same problem.
15:32:19disruptekit's exactly as insane as it sounds.
15:37:15FromDiscord<Clyybber> what do you mean?
15:37:33FromDiscord<Clyybber> also staticboundsChecks or staticBoundsChecks?
15:37:45disruptekno.
15:37:47FromDiscord<Clyybber> (edit) 'staticboundsChecks' => 'staticboundChecks'
15:37:52*narimiran quit (Ping timeout: 256 seconds)
15:37:53FromDiscord<Clyybber> (edit) 'staticBoundsChecks?' => 'staticBoundChecks?'
15:38:07disruptek<= was false when < or == was true. or vice-versa.
15:38:19FromDiscord<Clyybber> in Nim?
15:38:22disruptekyeah.
15:38:27FromDiscord<Clyybber> for ints?
15:38:42disruptekwell, skiplists. i have a custom comparator.
15:38:48disruptekbut, yes, ints.
15:38:53FromDiscord<Clyybber> well, then you implemented it wrong
15:39:05disrupteki didn't implement it at all.
15:39:07disruptekthat's the point.
15:39:18FromDiscord<Clyybber> do you have something to reproduce?
15:39:31disruptekof course.
15:40:45FromDiscord<Clyybber> (tell me staticboundChecks or staticBoundChecks?)
15:40:57disruptekstill no.
15:41:13FromDiscord<Clyybber> I can't win with you
15:41:22disruptekwhat?
15:41:38disruptekyou want me to try enabling that?
15:41:52FromDiscord<Clyybber> no, tell me which capitalization is better
15:42:00disruptekstaticBound
15:42:02disruptekobvs
15:42:16*kinkinkijkin quit (Quit: Leaving)
15:42:43disruptekit should actually be staticBoundsChecks because bounds are plural.
15:43:40FromDiscord<Clyybber> yeah but thats a breakign change :)
15:43:48disrupteknot my problem.
15:44:17FromDiscord<Clyybber> but mine
15:44:23disruptekindeed.
15:44:46disruptekdude, it's embarassing how much time i spent on this <= thing.
15:45:02bunghttps://github.com/bung87/amysql finally I make all CI passed
15:45:16disrupteki mean, yesterday was a complete loss because i didn't have any coffee. but, even so, i was losing my fucking mind here.
15:45:24FromDiscord<Clyybber> disruptek: show me le repro
15:45:48disrupteki will; it's not in a good state atm.
15:46:34shashlickdisruptek: not sure I got your feedback on nimterop - what's to oppose
15:46:45FromDiscord<Clyybber> weird, my commit is not appearing on github
15:46:48disrupteki don't oppose nimterop.
15:47:08Yardanicoshashlick: you probably wanted to ping @dom96 instead?
15:47:20shashlickThe reason I didn't use clang is because it's too fat to get into every user's machine
15:47:31shashlickAnd they already have another compiler they want to use
15:47:39disruptekdamn users.
15:47:45shashlickWhose define values will not be the same
15:47:54*elijahr joined #nim
15:48:22shashlickBut that's because wrapping preprocessed headers makes the wrapper config specific
15:49:19*clyybber joined #nim
15:49:36clyybberhmm, apparently correcting your clock by 4 hours while firefox is running really throws it off
15:50:28shashlickSo if you want to sign onto converting ifdefs to when's and somehow handle all config specific defines typically discovered by cmake and the like, it will produce a better wrapper for sure
15:50:50shashlickAh it is dom96 okay, np
15:51:14disruptekshashlick: 😘
15:51:21*endragor joined #nim
15:51:32*clyybber quit (Client Quit)
15:51:58disrupteki like being a user of nimterop. it's a little too ambitious a project for my little brain.
15:52:07FromDiscord<Clyybber> great, looks like I triggered a github bug
15:52:34FromDiscord<Clyybber> commit appears here: https://github.com/Clyybber/Nim/tree/palexontology, but not here: https://github.com/nim-lang/Nim/pull/14777
15:52:35disbotCleanup
15:53:56shashlickI appreciate the pushback on nimterop but the alternative is manual and doesn't scale
15:53:59Yardanicohttps://github.com/nim-lang/Nim/pull/14777/commits/0b941d3afcc1ff48486813221753fa1d95b7b920
15:54:00disbotCleanup
15:54:03Yardanicohm
15:54:09Araqdon't wrap "preprocessed" headers
15:54:10Yardanico" This commit does not belong to any branch on this repository."
15:54:45Araqshashlick: I appreciate all the hard work you're doing but that's your mistake in 2 words, "doesn't scale"
15:55:02*bung quit (Ping timeout: 260 seconds)
15:56:38shashlickanyway, the goal is to just share my opinion and i've written it in the readme, if there's a better way to solve this, i'm happy to archive toast
15:56:39Araqit does scale well enough for Python, Ruby, PHP, Lua, C#, ...
15:57:34disruptekhooray for bikeshedding software that doesn't exist!
15:57:34Araqand if we want to be better than the competition I would focus on C++ interop, think of TensorFlow, Qt and Godot
15:57:42leorize[m]nimterop framework for building library inline with the nim source is pretty useful on its own
15:58:00FromDiscord<Clyybber> Yardanico: Huh, it appears in front of all the other commits
15:58:05Yardanicolol
15:58:06FromDiscord<Clyybber> even though its the last one
15:58:10disruptekit doesn't matter how flawed the approach is; the output is superior to any currently available alternative.
15:58:26FromDiscord<Recruit_main707> what araq says makes sense, but i still think we would need the ability to override c++ methods
15:58:27disruptekAraq: talk is cheap. fix c2nim if it's so superior.
15:58:43FromDiscord<haxscramper> By the way - I'm right now I'm nostly focues on writing **library**, not a tool for wrapping.
15:58:51AraqI don't have to. already c2nim supports C++ and nimterop doesn't.
15:59:05FromDiscord<haxscramper> Of course it can be used like this, but it is possible to make nimterop use it
15:59:07FromDiscord<mratsim> Someone help me automate that: https://github.com/SciNim/minitorch/issues/1
15:59:08disruptekah, so qt and godot and tensorflow are already wrappable.
15:59:08disbotWrapping
15:59:09disrupteki forgot.
15:59:24FromDiscord<mratsim> I can do that manually but upstream merges dozens of commits per day
15:59:27disruptek!repo nim-qt
15:59:27disbothttps://github.com/filcuc/nimqml -- 9nimqml: 11Qt Qml bindings for the Nim programming language 15 71⭐ 9🍴 7& 1 more...
15:59:37disruptekwhere's the rest?
15:59:42disruptek!repo tensorflow
15:59:43disbothttps://github.com/tensorflow/tensorflow -- 9tensorflow: 11An Open Source Machine Learning Framework for Everyone 15 147854⭐ 82529🍴 7& 29 more...
15:59:51disruptekhmm.
15:59:52FromDiscord<haxscramper> I would prefer to avoid makeing yet another 'nice tool' for wrapping C++.
15:59:59leorize[m]qt is wrappable, you just need to write a `moc` compiler for Nim :P
16:00:12disruptekso basically, it doesn't exist.
16:00:19disruptekhooray for bikeshedding software that doesn't exist!
16:00:25FromDiscord<haxscramper> Or generate C++ code to compile qt
16:00:30*disruptek 🎉
16:00:48leorize[m]you still need to run moc on the generated C++
16:00:52leorize[m]it's better to just do it using macros in Nim
16:00:59FromDiscord<haxscramper> Because qt is just preprocessor-troubles--x2-back-and-forth
16:01:01Araqdisruptek: I can wrap it with c2nim, it's much work. I cannot wrap it at all with nimterop.
16:01:03leorize[m]crystal cracked the formula
16:01:23Araqbut ok, enough of this
16:01:27FromDiscord<haxscramper> There is also https://woboq.com/blog/verdigris-qt-without-moc.html
16:01:32disruptekif the work doesn't get done then it really doesn't matter how hard it is; the result is the same.
16:01:47disrupteki cannot be bothered to use c2nim to wrap libgit2, but luckily, i don't have to: i have nimterop.
16:02:24FromDiscord<haxscramper> It requires better handing of macros as opposed to wrapping qt directly (which requires implementing qt moc)
16:02:49*kenran quit (Ping timeout: 258 seconds)
16:03:15leorize[m]https://github.com/Papierkorb/bindgen <- this is crystal solution built on libclang, which you might find interesting haxscramper
16:03:48FromDiscord<mratsim> Btw, Nim is copying exported const arrays in all C files?
16:04:16leorize[m]no, it generates external symbols that's referenced
16:04:23FromDiscord<mratsim> if I have const foo = [1, 2, 3, ..., 48]
16:04:36shashlickthere's already a tensorflow c api that's wrapped - https://gist.github.com/genotrance/9214b1c1762c1fc85e62bac1de67725f
16:06:37shashlickAraq - it's either nimterop or nimble, i only have one brain
16:07:08FromDiscord<mratsim> @leorize: https://media.discordapp.net/attachments/371759389889003532/748574325942255667/unknown.png
16:07:22Araqshashlick: well then "nimterop" doesn't scale.
16:07:42shashlickindeed
16:08:23FromDiscord<Clyybber> shashlick: How do I handle an error with the download thing?
16:08:34shashlickwhich download?
16:08:41leorize[m]@mratsim: that's weird then, the last time I tried to make those arrays `static` in the compiler I got all sorts of "symbol not found" error :P
16:08:43FromDiscord<Clyybber> your download header stuff
16:08:47leorize[m]I guess the compiler changed in the mean time
16:09:02shashlickwhat error are you seeing
16:09:29FromDiscord<Clyybber> shashlick: I'm not seeing any error, I mean what happens if a download ails
16:09:38FromDiscord<Clyybber> or if the download suceeds but the wrapping fails
16:10:18FromDiscord<Clyybber> Can I manually download that stuff too and put it in a dir?
16:10:38shashlickyes, nothing is required - you can call any of the implementation if you prefer
16:10:48shashlickyou can download yourself, you can call c2nim also if preferred
16:11:09leorize[m]can I have some more opinions on #15212?
16:11:10disbothttps://github.com/nim-lang/Nim/pull/15212 -- 3typetraits: implements `value in type`
16:11:10FromDiscord<Clyybber> why did you include that download thing into nimterop though?
16:11:19leorize[m]#15212
16:11:19disbothttps://github.com/nim-lang/Nim/pull/15212 -- 3typetraits: implements `value in type`
16:11:33shashlickcause the goal was to make interop easy which also includes obtaining the source/binaries
16:11:37*endragor quit (Ping timeout: 264 seconds)
16:11:37leorize[m]ah, it's matrix being laggy again...
16:11:43shashlickat least i included it in my charter
16:11:55FromDiscord<Clyybber> isn't it better handled in config.nims ?
16:11:58shashlickyou could just as well use apt or any other way
16:11:58FromDiscord<Clyybber> or the .nimble ?
16:12:20FromDiscord<Clyybber> Yeah but the issue is, somebody uses that, I use their library. Now I have to have internet when I'm building
16:12:39shashlickgetheader offers many options that are controlled by the end user
16:13:00shashlickthe library author can offer multiple ways, including letting the user download themselves
16:13:32FromDiscord<Clyybber> hmm, ok
16:14:03shashlicklike nimgit2, you can set -d:git2Std and just use the locally available libgit2 headers and binaries
16:14:25shashlicki've been lazy with nimarchive though - it only offers static linking - so depends on the library author
16:17:55disruptekleorize[m]: i don't get it.
16:18:16disruptekleorize[m]: `if m notin Month` ... how is this not solved with a slice?
16:18:19FromDiscord<Clyybber> leorize: Any reason why you are doing <= and >= instead of in A..B
16:18:35FromDiscord<Clyybber> disruptek: Think about enums with holes
16:18:48disruptekthat's the only one i can come up with.
16:19:03disruptekwhy not create a better slice type that works with holy enums.
16:19:20FromDiscord<Clyybber> Thats not how holes work
16:19:31FromDiscord<Clyybber> Thats not how slices work
16:19:33Araq if m notin low(Month)..high(Month)
16:19:47Araqwe need a shortcut for low(T)..high(T) IMHO
16:19:48leorize[m]@Clyybber: avoids an HSlice creation
16:19:56Araqbut please not more conflations of types with values
16:20:06disruptekclyybber: that's my point.
16:20:16disruptekwhen i do this today, i have to literally iterate.
16:20:20disruptekcannot use succ, etc.
16:20:21Araqleorize[m]: the HSlice creation is free when you have a good optimizer
16:20:23FromDiscord<Clyybber> leorize: I see, super nitpicky, but can you do low <= v and v <= high instead of v => low and v <= high?
16:20:33Araqand if we haven't, we can special case it in the backend
16:20:56disruptekand seriously, why can't succ work?
16:21:07FromDiscord<Clyybber> Araq: We can already do array[SomeEnum, T], so thats a moot point
16:21:28Araqin fact, pushing the complexity to the backend side is almost always the best design
16:21:31FromDiscord<Clyybber> disruptek: I don't understand what this has to do with succ
16:22:25disruptekwell, araq's solution doesn't work for holy enums.
16:23:02FromDiscord<Clyybber> thats what leorize's PR is about
16:23:20disrupteki know. my point is that holy enums are the only use-case i can think of.
16:23:43disruptekand i'd like succ to work as a side-effect of this effort.
16:24:10FromDiscord<haxscramper> In nim enum value can be anything of `string | <ordinal type> | tuple of (<ordinal type>, string) | nothing`, correct?
16:24:18FromDiscord<mratsim> holy enums? lol
16:24:33disruptekthey are always ordinals.
16:24:39disruptekyou can merely override the str repr.
16:24:57leorize[m]I do use it for range types too, although I don't mind changing that with a shortcut for `T.low..T.high`
16:24:58FromDiscord<mratsim> holy enums are not Ordinal
16:25:04disruptekwhen you do this while overriding the ordinal, the syntax is tuple-like.
16:25:16AraqI don't understand what array[SomeEnum, T] has to do with anything I said
16:25:21FromDiscord<haxscramper> Yes, I mean what can you put on the right side of `enum =`
16:25:24leorize[m]so `range(T)` that creates a slice of `T.low..T.high`?
16:25:43Araqyes. better name it fullRange(T)
16:25:53disruptekhaxscramper: yes, your grammar is right.
16:27:13leorize[m]Araq: there's still the problem that you can only do `T in fullRange(T)`
16:27:24Araqhuh?
16:27:38Araqmy 'in' operator works with values
16:27:46leorize[m]or should that spit out `Slice[int|float]`?
16:28:05*bung joined #nim
16:28:28leorize[m]I mean the value for the `in` check must be already of type `T`
16:28:47leorize[m]by then you don't need to do the check anymore
16:28:52Araqproc fullRange(T: typedesc): Slice[T] = low(T)..high(T)
16:29:04Araqwe have an overload for 'in' and Slice
16:30:07FromDiscord<Clyybber> Araq: My point is that an enum at its core is nothing more than the set of its valid entries (and maybe a relation).
16:30:19FromDiscord<Clyybber> But arguably then we can ask for 'a in uint8' too
16:30:23leorize[m]ah okay, what about enums with holes?
16:30:32disruptekthis is my point.
16:31:10*casaca quit (Ping timeout: 246 seconds)
16:32:37*bung quit (Ping timeout: 264 seconds)
16:32:58*kinkinkijkin joined #nim
16:34:04leorize[m]should the macro for matching enum with holes be spun off into a different proc (`inEnum(T, value)`?) or be dropped?
16:34:06FromDiscord<Clyybber> small question: why do we have < <= and so on defined on booleans?
16:34:45Araqwhat about "enum with holes"? the PR adds an 'in' for typedesc. I want the typedesc->range conversion spelt out in an explicit operation like fullRange
16:35:07disruptekah, good.
16:35:27disruptekso `in` is limited to valid values for the type, yes?
16:35:40Araq"enum with holes" are like "string", not an ordinal type, cannot construct a range of them because the range might have holes
16:36:05Araqnow if you want to improve holy enums, we can talk about that but I think there is a connection
16:36:16Araq*I think there is no connection
16:36:45*kinkinkijkin quit (Remote host closed the connection)
16:36:56disrupteki think they should be better supported or unsupported.
16:37:10*kinkinkijkin joined #nim
16:37:17AraqI fixed the known bugs with them
16:37:18disruptekthey compose so nicely that i would prefer they were supported.
16:37:24FromDiscord<Clyybber> How about a macro which you give a enum
16:37:26disrupteksucc() doesn't work afaik.
16:37:35FromDiscord<Clyybber> and they give you back a set with all the values of the enum
16:37:52disruptekthat's what i use these days.
16:37:57Araqdisruptek: yes indeed. I don't mind that
16:38:07disruptekyou don't?
16:38:09FromDiscord<Clyybber> although it wont work for enums too big for a set
16:38:37FromDiscord<Clyybber> Should we remove the `<` `<=` overloads for bool?
16:38:58disruptekseems useful for sorting.
16:39:07Araqmeh, false < true
16:39:31FromDiscord<--HA--> sent a code paste, see https://play.nim-lang.org/#ix=2vpu
16:39:56AraqI took it from Delphi and had code like for a in false..true: for b in false..true: ... for doing naive satisfiability checks
16:40:29disruptekthat's kinda cute.
16:40:56disruptekwhat's the rational for succ not working, though?
16:40:59disrupteki don't see it.
16:41:18Araqdisruptek: its implementation is more complex than 'x + 1'
16:41:31Araqand so far nobody could be bothered to support it
16:41:35disruptekmaybe, but that doesn't strike me as a good excuse.
16:41:41disrupteki would rather error.
16:41:45*kinkinkijkin quit (Remote host closed the connection)
16:41:47Araqit does error
16:42:00Araq(I hope! tried to fix all these bugs...)
16:42:21*kinkinkijkin joined #nim
16:42:21disrupteki doubt it, but someone with fast fingers will let us know.
16:42:50Araqit used to compile
16:43:08FromDiscord<Clyybber> IMO it still makes sense to remove holy enums
16:43:23FromDiscord<Clyybber> and replace them with a distinct ints
16:44:01FromDiscord<Clyybber> Since those are more flexible anyways
16:44:12FromDiscord<Clyybber> and enums with holes most often come up in wrappers
16:44:32FromDiscord<Clyybber> and then we still have to retain the order when declaring, and can't have duplicates
16:44:34leorize[m]@--HA-- use `macros.getImpl` to get the symbol definition
16:45:01AraqClyybber: too late, would break too much infrastructure code
16:45:01disrupteki don't see how a distinct int achieves the goal.
16:45:26leorize[m]there's no way to guarantee that the values will be available at compile time, so you're on your own on that
16:46:58AraqI agree that 'distinct int' is better but that ship is sailed and I'd rather spend the effort on unifying iterator+proc scopes, for example
16:47:25disruptekokay, succ does fail. it's sad but it's correct.
16:47:53FromDiscord<Clyybber> Araq: Fair
16:48:03FromDiscord<Clyybber> disruptek: Oh btw, the typed fix is merged
16:48:09leorize[m]Araq: what do you think about having `rangeof(T)` over `fullRange(T)`?
16:48:26disrupteki like that.
16:48:33disruptekclyybber: today or yesterday?
16:49:03FromDiscord<Clyybber> today
16:49:10disrupteknice, thank you dude.
16:49:27disruptekwhat did you end up doing with the shadow scopes?
16:49:41*tane joined #nim
16:49:54disruptekread: are you in favor of nkScope?
16:50:05FromDiscord<Clyybber> Not really
16:50:08FromDiscord<Clyybber> since it can't work here
16:50:25disruptekmaybe not here, no.
16:50:28FromDiscord<Clyybber> You can't know in advance if you need or don't need a scope there
16:50:37FromDiscord<Clyybber> so you have to put in this shadowscope
16:51:30FromDiscord<Clyybber> nkScope seems like unneccessary nesting to me
16:52:01FromDiscord<Clyybber> but maybe the actual idea is not what I'm thinking of rn
16:52:05FromDiscord<--HA--> Thanks leorize!
16:52:23disruptekthe only way it's unnecessary is if there is provably no other scenario where you want a new scope.
16:52:26*jacereda joined #nim
16:52:35disruptekto me that just sounds like gratuitous limitation.
16:53:06disrupteki would rather query scope than have to know the language semantics for wherever i am...
16:53:46jaceredahi... how can I see the commands invoked by `nimble build`? both nim and compiler/linker invocations...
16:54:34Zevvoy clyybber, you got it merged, sweet stuff
16:54:49Zevvthanks for all the effort you put in there dude
16:55:25FromDiscord<Clyybber> np :)
16:55:28Zevvi was thinking, if we can get our hands on a starwars transporter and slightly modify it so it does not kill the original
16:55:58Zevv /startrek/
16:56:12Zevvooh that's one *serious* mistake i made there
16:56:55leorize[m]@jacereda I think --verbose and/or --debug should work
16:57:37FromDiscord<dom96> Zevv: get out
16:57:42*Zevv quit (Quit: leaving)
16:57:46jaceredaleorize[m]: it just says something like `CC: parser_cpp`, I'd like to get the full compiler invocation
16:57:47jacereda
16:58:08Araqjacereda: --listcmd
16:58:15jaceredaAraq: great, thanks!
16:58:47Araqdom96: er... what did happen here?
16:59:07*superbia1 joined #nim
16:59:15leorize[m]dom96 lol he quit for real
16:59:43FromDiscord<dom96> lol he'll be back
17:00:22*a_chou joined #nim
17:00:42*a_chou quit (Client Quit)
17:01:11*a_chou joined #nim
17:01:23*superbia quit (Ping timeout: 256 seconds)
17:01:48*endragor joined #nim
17:02:38*shabby joined #nim
17:03:16*shabby is now known as shaggy
17:05:56leorize[m]can we have a `Documentation` category in the forum please :) I would like to start some discussions relating to the front page and such, and a category would be useful to keep the topic floating around.
17:06:03*shaggy quit (Client Quit)
17:06:14*Zevv joined #nim
17:06:52*a_chou quit (Quit: a_chou)
17:07:52*endragor quit (Ping timeout: 265 seconds)
17:12:54FromGitter<jorjun_twitter> do I need a make file for a nim project with several dependent sources?
17:13:09FromDiscord<dom96> leorize: suggest a description and a colour and I may add it 🙂
17:13:34FromDiscord<dom96> perhaps it shouldn't be `Documentation` but maybe we can make it even more generic: `meta`
17:13:49FromDiscord<dom96> for all discussions about the nim website, the nim forum, docs, etc.
17:14:25disruptekjorjun_twitter: no.
17:17:45leorize[m]Araq: opened #15232
17:17:46disbothttps://github.com/nim-lang/Nim/pull/15232 -- 3typetraits: add rangeof(T), a shortcut for low(T)..high(T)
17:18:00FromGitter<jorjun_twitter> @disruptek If I compile A which imports B . Change B, but re-compile A. Nim compiler will re-compile B automagically?
17:18:13Yardanicoof course
17:18:25Yardaniconim compiles all nim libraries into a single binary
17:18:51disruptekwhat yardanico is trying to say is, yes.
17:18:58Yardanicoif you use nimble packages, you would want to use "nimble develop" though
17:19:17leorize[m]@dom96 I think documentation is important enough that it warrants its own category
17:20:20leorize[m]"Meta" can be the category to talk about the Nim website and the forum
17:21:08jaceredaif I import a module that has a .passC pragma it seems to be propagated to my module... is that the expected behaviour?
17:21:31leorize[m]too bad we don't have support for stickies :P
17:21:40leorize[m]can be useful to pin something to tell people to go to github if they want to report bugs
17:21:59FromDiscord<dom96> What do others think?
17:22:08FromGitter<jorjun_twitter> Alright.. my next problem .. so far learning nim has been a descent deeper and darker into the machine… how could it be that libpng.dylib loads ok with "nim c" but not "nim c —r" and also not under a debugger? Starting to think, that like Python dev, you can’t get far without being very adept with debugger… can’t wait to step thru code
17:22:14FromDiscord<dom96> Implement stickies then 😉
17:22:41disrupteki think docs needs its own category.
17:22:54disruptekit will help people take ownership.
17:22:55FromDiscord<dom96> The compiler doesn't load libpng.dylib, so unless you run the binary with `-r` it won't actually try to load it
17:24:38FromGitter<jorjun_twitter> aaha. Thanks @dom96 . Is there something else I need to do after "brew install libpng" for it to be dynamically loaded reliably?
17:25:55FromGitter<jorjun_twitter> thinking if this works: "pkg-config --libs libpng” , should be OK ..
17:26:02FromDiscord<dom96> good question, dynamic loading of libraries is a pain in the ass on every OS
17:26:16FromDiscord<dom96> you need to make sure that brew installed it somewhere that macOS will look for it
17:26:52FromDiscord<dom96> The way to force macOS is to use `DYLD_LIBRARY_PATH`
17:27:07FromDiscord<dom96> DYLD_LIBRARY_PATH=/path/where/dylib/is ./yourExecutable
17:27:25FromDiscord<dom96> Run the executable directly as Nim might not pass the env var correctly
17:27:41leorize[m]I'd say dynamic loading of libraries is really simple in C land
17:28:25leorize[m]you just add a requires to your builder (`cmake`, `autohell`, `meson`) and bam it just works
17:28:54leorize[m]if the library is missing it will even print friendly messages on what you don't have and how to install it
17:29:08leorize[m]at least on *nix
17:30:23ForumUpdaterBotNew thread by Gabbhack: Problem with template and async, see https://forum.nim-lang.org/t/6734
17:32:05FromDiscord<--HA--> leorize, with your advice I got the first version working but when the macro is called from a proc it is always `NilLit`. Do you have an idea? The commented code is the one I'm trying to get to work.↵https://play.nim-lang.org/#ix=2vpM
17:32:53Yardanicowait, why are you using a macro here
17:34:38FromDiscord<--HA--> I wan't to be able to define a tuple with the field names coming from an array of strings
17:37:19leorize[m]it won't work with a proc because `proc` is a runtime thing
17:38:39leorize[m]use `template` instead if you want compile-time reflection
17:40:25*ofelas quit (Ping timeout: 240 seconds)
17:42:12FromDiscord<--HA--> Nice! Thanks again leorize.
17:44:30leorize[m]@dom96 "Documentations: Discussions relating to [Nim's documentation](https://nim-lang.org/documentation.html): API docs, the Manual, code examples, etc."
17:44:44leorize[m]as for colors: use light blue/green
17:46:34leorize[m]"Meta: For everything related to the Nim website, the forum, the playground and the various chatrooms"
17:47:12leorize[m]use brown or gray for that category
17:47:40leorize[m]oh, maybe add some bits about learning materials to "Documentations" description
17:58:23jaceredaShouldn't {.localPassc ...} affect all the {.compile ...} modules? It seems it only affects the module generated by the .nim file
17:58:26ForumUpdaterBotNew thread by Kiakra: How to import a struct (constant)field from C, see https://forum.nim-lang.org/t/6735
17:59:20*kenran joined #nim
18:00:26jaceredaI must be missing something, .passC is propagated to other modules, .localPassc doesn't affect the .cpp/.c modules included in this nim... either .localPassc should be modified or there should be a .foreignPassc to set options for .compile modules
18:04:20*kenran quit (Ping timeout: 258 seconds)
18:05:04FromDiscord<Clyybber> I think its intended to be this way
18:05:16FromDiscord<Clyybber> maybe .compile should get extra args
18:06:06*bung joined #nim
18:06:56jaceredaso, you can't .compile a .c with, say, '-std=c11' and a .cpp without that flag right now?
18:09:24jaceredaand isn't .passC very dangerous? if I import an external module using .passC will it mess my flags? or is it affecting only at project boundaries?
18:10:18FromDiscord<Clyybber> AFAIK it affects everything
18:10:51*bung quit (Ping timeout: 258 seconds)
18:13:00jaceredahmmm... that wouldn't be coherent, since a project built using -passC wouldn't propagate flags but a project using .passC would
18:13:29*bung joined #nim
18:13:38*synshroud_ joined #nim
18:14:26FromDiscord<Clyybber> I think a project build using -passC would too
18:14:26*kungtotte quit (Read error: Connection reset by peer)
18:14:34*synshroud quit (Ping timeout: 265 seconds)
18:17:20jaceredaAraq: could you shed some light? I'm willing to work on this issue if needed, do you want me to open a ticket?
18:18:14*bung quit (Ping timeout: 256 seconds)
18:18:16*kungtotte joined #nim
18:19:52FromDiscord<mratsim> use localPassC if you want flags that apply to single files
18:20:45jaceredamratsim: but I want flags that affect {.compile .} files, not the module generated by the current .nim file
18:21:40FromDiscord<mratsim> you might be able to hack something with nim.cfg
18:22:38shashlickrequest folks interested in nimble to read https://github.com/c-blake/hldiff/issues/1
18:22:39disbotAdd `installExt` to `hldiff.nimble`
18:23:38FromDiscord<mratsim> If you create a nim.cfg and put the name of your C files in there with custom flags it might work, like here: https://github.com/numforge/laser/commit/7b9fd9b32283fa13680ac5f7223fa31283c0d3a4#diff-8294857335429e5df0d207389e22a1d8
18:24:28FromDiscord<Clyybber> shashlick: WDYT about removing that structure requirement?
18:24:37*bung joined #nim
18:25:56jaceredamratsim: that could work for my current use case, thanks
18:26:28*superbia1 is now known as superbia
18:27:17*casaca joined #nim
18:28:55*bung quit (Ping timeout: 240 seconds)
18:35:31*bung joined #nim
18:39:59*bung quit (Ping timeout: 258 seconds)
18:41:57*arecacea1 quit (Remote host closed the connection)
18:42:16*bung joined #nim
18:42:16*arecacea1 joined #nim
18:45:20FromDiscord<Clyybber> Araq: I've reverted the enum changes in #14777
18:45:21disbothttps://github.com/nim-lang/Nim/pull/14777 -- 3Cleanup
18:45:49FromDiscord<Clyybber> I think we need definite assignment analysis only for returning lent/var
18:48:11kinkinkijkini found out why my obj loader wasn't working
18:48:43kinkinkijkinturns out the bug i was talking about was fixed with non-explicit memory management, i just accidentally used readLines instead of lines in one spot
18:50:43*bung quit (Ping timeout: 258 seconds)
18:52:03*arecacea1 quit (Remote host closed the connection)
18:52:35*arecacea1 joined #nim
18:54:56*bung joined #nim
18:56:51FromDiscord<Kaynato> Does there exist a neat method of getting the bound type of a generic type without touching macros?
18:57:05leorize[m]@Clyybber I think currently it already does and will yield a warning
18:57:41leorize[m]@Kaynato typetraits.genericParams
18:57:49FromDiscord<Kaynato> Thanks!
18:59:04leorize[m]@Clyybber if not then probably we just need to enable it? ProveInit analysis has been improved a lot thanks to zah efforts iirc
18:59:44leorize[m](ps. please let me have `{.requiresInit.}` attachable to a proc while you're at it)
19:01:27*bung quit (Ping timeout: 265 seconds)
19:07:08*bung joined #nim
19:09:42*qwertfisch joined #nim
19:13:38shashlick@Clyybber which specific one
19:14:01FromDiscord<Clyybber> the package structure restriction
19:15:28*bung quit (Ping timeout: 265 seconds)
19:18:16*bung joined #nim
19:26:45*bung quit (Ping timeout: 258 seconds)
19:31:50*bung joined #nim
19:36:59bungwhat's the recommanded struct when implement custom type's `$`
19:37:16shashlickthat's what we are discussing to improve - goal is to just git clone and leave it that way
19:37:35FromDiscord<Kaynato> wrt. macros, is there a prohibition between mixing undeclared symbols (e.g. for injecting) and declared ones? I'm getting a strange situation where it's ok to have something like `myMacro(unknown1, [known1, known2])` or `myMacro(unknown1, known1)`, but `myMacro(unknown1, known1, known2...)` is prohibited
19:37:53shashlickthere's still a warning if package exports a module that don't match the package name
19:38:26shashlick• `pname-0.1.0/pname.nim` = OK, `pname-0.1.0/mname.nim` != OKAY
19:38:38shashlickbut that's about it
19:39:09Zevvkaynato: please be more specific about your error messages
19:39:30*Vladar quit (Quit: Leaving)
19:39:41FromDiscord<Kaynato> Just "undeclared identifier: 'unknown1'" and such.
19:39:52Zevvare your macros typed or untyped?
19:40:04Zevvyou probably want untyped in this case for your argument
19:40:04Zevvs
19:40:26FromDiscord<Kaynato> All args are untyped. Would it be that introducing more than one naked typed argument into the untyped macro still makes it treated as typed...?
19:40:43FromDiscord<Kaynato> The macro itself is `macro withGenericParams*(genericType, unloadAs, body: untyped): untyped`
19:41:41Zevvtry to minimize to a small snippet that shows the behaviour, if you share that here its pretty likely that people will take a look for you
19:41:55FromDiscord<mratsim> "undeclared identifier: foo" is unfortunately a catchall error message with macros
19:42:04Zevvexactly
19:42:07Zevvits a pita
19:42:15Zevvcan't we just deprecate macros
19:42:46*narimiran joined #nim
19:42:59FromDiscord<mratsim> when something is wrong and the generated code does not resolve, it just tells you that the identifier doesn't exist (because it was not transformed or created correctly by the macro)
19:43:14FromDiscord<mratsim> (and so Nim doesn't know what to do with it I guess)
19:43:55FromDiscord<Kaynato> It... went away and I have no idea what caused it. I lost the undo buffer.
19:45:48FromDiscord<Kaynato> Fortunately the underlying problem (which was held up by that issue) is still unsolved. I'm trying to get the generic params in a macro, and can't figure out a way to get the macro to pass the typedesc into the helper function (even with passing it as `typed` into the macro, it says it's just another NimNode)
19:45:52FromDiscord<Yardanico> Apparently Rust people have their own compile the execution with an interpreter
19:46:06FromDiscord<Yardanico> time*
19:47:22FromDiscord<Yardanico> https://github.com/rust-lang/rust/pull/72437/
19:47:23disbotStabilize `#![feature(const_if_match)]` and `#![feature(const_loop)]`
19:49:29FromDiscord<Yardanico> But it seems to be much more limited than in Nim
19:51:34FromDiscord<Kaynato> https://play.nim-lang.org/#ix=2vqE causes internal error
19:52:32FromDiscord<Kaynato> Oh wait, missing a proc, one second >>;
19:52:50FromDiscord<Kaynato> Ok, here we go: https://play.nim-lang.org/#ix=2vqF
19:54:04*PMunch joined #nim
20:00:13*kenran joined #nim
20:05:05*kenran quit (Ping timeout: 240 seconds)
20:08:03FromDiscord<Kaynato> Does anyone else have memory leak issues with nimsuggest in vscode? https://media.discordapp.net/attachments/371759389889003532/748634953419325450/unknown.png
20:08:22FromDiscord<lqdev> yes.
20:08:33FromDiscord<lqdev> the solution is to use a different extension (which doesn't exist btw)
20:08:43FromDiscord<lqdev> or fix the existing extension
20:09:07FromDiscord<Kaynato> Ahh, did someone already identify where the issue is coming from?
20:09:22FromDiscord<lqdev> wrong usage of nimsuggest
20:09:24FromDiscord<dom96> the solution is to fix nimsuggest
20:10:03FromDiscord<dom96> nimsuggest is one of those things I simply don't use, just like concepts
20:10:09FromDiscord<dom96> and methods
20:10:11FromDiscord<dom96> and the do notation
20:10:23FromDiscord<Elegant Beef> you dont use concepts?
20:10:33FromDiscord<Elegant Beef> Why not?
20:11:02FromDiscord<dom96> indeed, because they're "experimental" and will very likely be redesigned
20:11:45FromDiscord<mratsim> Vtables have been coming soon for 3 years ;). Nim time is competing with Valve Time :p
20:12:09shashlick@dom96 hey was wondering why srcDir exists
20:12:42FromDiscord<dom96> how else would you allow source files to live in a `src` dir?
20:13:28shashlickIt's not required right
20:13:41FromDiscord<dom96> nope
20:14:16shashlickSo it's for diligent devs who organize their package
20:14:26shashlickIt could be inferred right
20:14:30*Kaivo quit (Ping timeout: 260 seconds)
20:14:32FromDiscord<dom96> yes, it's used for nimble init-ted packages too IIRC
20:14:55FromDiscord<dom96> I don't think inferring this sort of thing is a good idea
20:15:40shashlickIt's been around for a long time and isn't mandated so no need to remove it
20:15:47shashlickJust wanted to understand
20:16:05shashlickI've written up the proposal for all that discussion - where should I post it
20:16:31shashlickMake a new issue and link/close the ones it fixes?
20:16:48*Kaivo joined #nim
20:18:08FromDiscord<Kaynato> https://cdn.discordapp.com/attachments/229317733194530817/748636252906979378/unknown.png This isn't normal, is it? Nothing out of the ordinary as far as I could see in general while using the nim vscode extension, and out of nowhere, simply after a file save, the terminal flashed black, and when I deselected and reselected it, this appeared...
20:18:37FromDiscord<Elegant Beef> No it's not
20:18:37FromDiscord<Kaynato> It looks like it might be some sort of dump of something? I hope that it's nothing to do with hardware failing.
20:19:47leorize[m]shashlick: I've commented on my take on why MVS can't be implemented in Nim as it is currently
20:20:10FromDiscord<dom96> shashlick: sure, make a new issue in Nimble's repo. Not sure which ones you want to close
20:20:17leorize[m]and it also details why I think multiple versions of the same thing in a program is a horrible idea
20:20:49FromDiscord<mratsim> MVS?
20:21:03shashlick@leorize cool thanks
20:21:11FromDiscord<dom96> https://research.swtch.com/vgo-mvs
20:22:20FromDiscord<dom96> leorize: while I understand your concern, I think that multiple versions of the same package in a single program is an important feature
20:23:01FromDiscord<dom96> In the event that data structures are shared, you can cross that bridge when you come to it and you should get a nice compile-time error when that happens
20:23:14FromDiscord<dom96> better than getting a package error when that might not even be a problem
20:28:02leorize[m]IMO this is not something that "you can cross the bridge when you come to it", but YMMV. I'm heavily biased from my experience with packaging for distros, where this sort of mixups happens things silently SIGSEGV without you knowing why. In fact symbol versioning in *nix was invented because of this problem.
20:28:51*narimiran quit (Ping timeout: 258 seconds)
20:29:07leorize[m]Go's trick of forcing major version in the name is a pretty clever idea IMO
20:29:14FromDiscord<dom96> Yes, you're fearful that it will cause runtime errors. If it does then it's definitely bad.
20:29:37FromDiscord<dom96> I don't think this is important right now, but we should have a plan for how to make it happen in the future.
20:30:23FromDiscord<dom96> Because once we start running into problems with dependencies wanting two different versions of the same package we will desperately want this feature.
20:30:35Araqmultiple versions of the same package in a single program is horse shit
20:31:09Araqit's Node.js on the next level
20:31:12FromDiscord<Elegant Beef> Is there really a compelling reason for wanting to use a deprecated package and a contemporary package at the same time?
20:31:33leorize[m]perks of having major versions in module name: you know exactly what's compatible and what's not. It will show up in autogenerated docs, in the source code, etc.
20:31:37disruptekit takes three to tango.
20:31:48FromDiscord<dom96> also, apparently disruptek already ran into this
20:32:10disrupteknimph just issues a warning.
20:32:52disruptekwhatever the project is that you're building will trump any clashing requirement.
20:33:56FromDiscord<haxscramper> I almost finished porting libclang into 'clean' state - documentation is almost done - https://haxscramper.github.io/hcparse-doc/src/hcparse/libclang.html . Tomorrow I will port helper wrappers and probably start writing some tests for this thing
20:34:32FromDiscord<haxscramper> By almost I mean it is not as good as I want it to be
20:35:04leorize[m]@haxscramper have you looked at python's clang-index thingy? it abstracts the cursor system using an iterator
20:35:22leorize[m]having never used libclang, I don't know if that's a good or a bad idea :P
20:35:45FromDiscord<haxscramper> No, I haven't. And I actually don't think it is necessary
20:36:08FromDiscord<haxscramper> In this case I'm trying to make interface as similar as possible to `NimNode`
20:36:43FromDiscord<haxscramper> So things like `[]` to get nth child, `case node.cxKind` to switch over possible scenarions, `for subn in node.children` and so on.
20:40:08*Trustable quit (Remote host closed the connection)
20:41:14leorize[m]sounds neat
20:42:38FromDiscord<haxscramper> I just realized I can hook up `nimtrs` to provide pattern-based rewriting rules for function types.
20:42:50FromDiscord<haxscramper> Wrapping C-style functions that accept array + size into ones that accept `seq[T]`
20:43:00*bra-ket quit (Ping timeout: 244 seconds)
20:43:20FromDiscord<haxscramper> Since function signature is just a list of types I can just find and replace them using pattern
20:43:32*zyklon joined #nim
20:45:35FromDiscord<haxscramper> Something like `*(Pointer($a) & %?integer) => seq[$a]`. Although this would require finishing rewriting between different ASTs which means it is a project for some later time.
20:51:50*elijahr quit (Quit: Textual IRC Client: www.textualapp.com)
21:02:30*NimBot joined #nim
21:06:48shashlickdom96 - am going to just use a gist - issues don't have any history for edits to track any changes
21:10:00federico3dom96: I keep seeing tiny libraries being added to nimble. Nim will end up with the npm dependency hell if the trend is not reversed :(
21:10:54FromDiscord<Elegant Beef> I make my small packages nimble usable but dont add to the nimble repository like a good boy 😄
21:11:05Araqfederico3: there is no alternative. either we become successful and a mess or we are irrelevant
21:11:41Araqthe only way to avoid the dependency hell is to be unsuccessful
21:11:53federico3Araq: why not a third option like successful but without tiny libraries?
21:12:05Araqthere is now a generation of programmers who only know JS
21:12:34Araqit'll take 20 years at least to reverse the trend
21:12:55Araqbut hey, I have no fact to back up my claims so I might as well shut up :-)
21:12:59Araq*facts
21:13:36FromDiscord<Elegant Beef> I think the biggest issue with these small libraries is they can just be put into a bigger `topicutils` package
21:13:52FromDiscord<Elegant Beef> consoledate QOL packages together!
21:14:42federico3dumping 20-lines libraries on github (instead of trying to consolidate the code) is a culture thing and culture can be changed
21:15:11disruptekjust abandon the idea of a central list of packages.
21:15:15federico3it's also encouraged by having too low friction on creating projects/packages
21:15:32federico3disruptek: and then in gets even worse, like go
21:15:44disruptekthat's worse?
21:16:36federico3much worse
21:16:41disruptekwhy is that?
21:20:08federico3it made the ecosystem even more volatile. It's well known to be a nightmare for system engineers and for environments that require traceability and ability to maintain medium/large projects for a long time
21:20:32FromDiscord<dom96> disruptek: nimble supports more than one package list
21:20:38FromDiscord<dom96> someone just needs to create an alternative
21:20:42disruptekthis is not a problem that we have, right?
21:20:56disrupteki mean, what is your proposal?
21:21:12disruptekdom96: you're going to laugh, but i don't use nimble. 😁
21:21:33FromDiscord<dom96> disruptek: did I imply that you did?
21:21:37*disruptek found someone to create an alternative.
21:23:03bungnimble lack of grouped deps others parts are good to me
21:23:47*awe00_ joined #nim
21:25:05*awe00 quit (Ping timeout: 240 seconds)
21:25:45*audiofile joined #nim
21:26:18bungany good example of database connections thread pool ?
21:27:31FromDiscord<mratsim> it's like any threadpool, memory pool, object pool no?
21:27:39FromDiscord<dom96> disruptek: wat?
21:30:21FromDiscord<dom96> shashlick: where is this gist?
21:31:34bungdont know , some libs implemented defferiently
21:32:19federico3bung: I was looking for a good threadpool for postgresql but... no
21:33:22bungthey use lock,atomic lock
21:34:11FromDiscord<Clyybber> @Kaynato heh, looks a bit like https://www.youtube.com/watch?v=68NvvJClDKI&
21:34:35bungfederico3 I really need that, and I hav'nt write related code to that myself
21:34:59FromDiscord<Clyybber> Araq: I rebased https://github.com/nim-lang/Nim/pull/14777 and reverted the enum changes
21:34:59disbotCleanup
21:35:16*PMunch quit (Quit: leaving)
21:35:17FromDiscord<Clyybber> Do you want me to revert the result = "" changes too?
21:35:39FromDiscord<Clyybber> I think maybe definite assignment analysis should be restricted to lent/var
21:35:51FromDiscord<Clyybber> at least there its definitiely needed
21:36:06bunghttps://github.com/npgsql/npgsql/blob/dev/src/Npgsql/ConnectorPool.Multiplexing.cs
21:36:31FromDiscord<Clyybber> leorize: It probably should use the dfa I think
21:36:38bunghow about this one ? dont know its quality
21:37:57*jwm224 quit (Ping timeout: 260 seconds)
21:42:58*jwm224 joined #nim
21:43:06Araqyes. revert the 'result = "" ' changes please
21:43:36*dv-^_^ joined #nim
21:44:22*solitudesf quit (Ping timeout: 258 seconds)
21:48:04FromDiscord<martinium> > it'll take 20 years at least to reverse the trend↵@Araq[IRC]#0000 maybe even longer. Maybe some will learn or know enough CS that they can transition back and forth between high-level dynamic languages to static strict systems languages. Only time will tell.
21:48:44federico3bung: set up N connections in a seq, pick an unused one using a lock, run the query, release the lock, handle reconnections? like https://github.com/treeform/pg/blob/master/src/pg.nim but simpler
21:56:57*tane quit (Quit: Leaving)
21:57:55FromGitter<bung87> federico3 it's really like this? all I've seen all larger than that
22:01:03*kenran joined #nim
22:06:06*kenran quit (Ping timeout: 256 seconds)
22:06:33federico3https://www.postgresql.org/docs/11/libpq-threading.html
22:07:42*noonien joined #nim
22:12:54ForumUpdaterBotNew thread by Leorize: We should make it simpler for authors to have their blog featured on the Nim front page., see https://forum.nim-lang.org/t/6736
22:15:11*synshroud_ quit (Quit: ZNC 1.7.5 - https://znc.in)
22:15:26*synshroud joined #nim
22:16:16*dv-^_^ quit (Quit: The Lounge - https://thelounge.chat)
22:18:02FromDiscord<Hearthstone> When Nimph is working and works on Arm, could someone let me know?
22:19:19FromDiscord<martinium> what is Nimph
22:19:25FromDiscord<martinium> didn't find it on Nimble
22:20:02FromDiscord<Elegant Beef> nimph is an alternative package manager
22:20:04FromDiscord<martinium> found it
22:20:06FromDiscord<martinium> https://github.com/disruptek/nimph
22:23:52bungfederico3 thanks, the document is very basic theory
22:31:45federico3bung: https://nim-lang.org/docs/db_postgres.html uses a wrapper for libpq - if it's already thread safe your work is much easier...
22:32:56*endragor joined #nim
22:39:49*endragor quit (Ping timeout: 264 seconds)
22:54:45disruptekyou can't build nimph on arm?
22:55:09shashlick@dom96 - https://github.com/nim-lang/nimble/wiki/Package-structure-and-Interop
22:55:34FromDiscord<Hearthstone> > you can't build nimph on arm?↵No idea
22:55:38FromDiscord<Hearthstone> I'll check though
22:55:50FromDiscord<Hearthstone> Does the current version build successfully normally?
22:56:25disrupteksure.
22:56:33shashlickDoes the github wiki not have comments?
22:56:43FromDiscord<Hearthstone> Okay
23:00:42disruptekshashlick: i don't think so.
23:04:59FromDiscord<Hearthstone> disruptek: Got this issue while trying to install nimterop, so i just responded yes https://media.discordapp.net/attachments/371759389889003532/748679482394673163/Screenshot_20200828_000422_com.termux.jpg
23:05:02shashlickMeh I'll have to use a gist regardless
23:05:34FromDiscord<Hearthstone> Same for nimgit2 https://media.discordapp.net/attachments/371759389889003532/748679627752472686/Screenshot_20200828_000517_com.termux.jpg
23:05:56FromDiscord<Hearthstone> They're both repos from genotrace
23:06:08disruptekthat guy's a punk.
23:06:19FromDiscord<Hearthstone> Oof
23:06:34disruptekdo you know how to get more debugging out of nimble?
23:06:38*disruptek doesn't.
23:06:53FromDiscord<Hearthstone> Build failed for nimterop 0.6.8
23:06:56FromDiscord<Hearthstone> Nope :P
23:06:58shashlickIf I had enough disk space in my Linux box, I could try an arm docker image
23:07:22FromDiscord<Hearthstone> I'm just building it on my aarch64 android using Termux-
23:07:32disruptektry --debug argument to nimble.
23:07:32FromDiscord<Hearthstone> A mobile programmer just became useful-
23:07:52FromDiscord<Hearthstone> I'll try if it doesn't work :P
23:07:58disruptekaight, thanks.
23:08:17FromDiscord<Hearthstone> Error with one of your repos this time https://media.discordapp.net/attachments/371759389889003532/748680314930331778/Screenshot_20200828_000802_com.termux.jpg
23:08:18disrupteki don't know if libgit2 works on arm. it probably will.
23:08:24FromDiscord<Hearthstone> gittyup
23:09:01disrupteki mean, i kinda need to see the debugging output.
23:09:37shashlickit should
23:09:46FromDiscord<Hearthstone> :P
23:10:01disruptekthere's a lot of arm in the cloud now.
23:10:06shashlickcan you just `git clone https://github.com/nimterop/nimterop`
23:10:24shashlickand then `cd nimterop; nim c nimterop/toast`
23:10:29disruptekactually, nimph's bootstrap might work better.
23:10:33disruptekit does all that.
23:10:45shashlicktoast isn't compiling so this isn't nimph
23:10:55disrupteki know, but it'll produce better messages.
23:11:01FromDiscord<Hearthstone> Where do i add this? https://media.discordapp.net/attachments/371759389889003532/748680998383779992/Screenshot_20200828_001048_com.termux.jpg
23:11:10FromDiscord<Hearthstone> I am using bootstrap-
23:11:32FromDiscord<Hearthstone> I'm trying the nonimble version now
23:11:41disruptekyeah, that's the one that should produce better output.
23:12:02disruptekwhat kinda device is this?
23:12:11FromDiscord<Hearthstone> An android-
23:12:16FromDiscord<Hearthstone> Android 10-
23:12:21disruptekbut what's the hardware?
23:12:24disrupteki'm just curious.
23:13:01FromDiscord<Hearthstone> It's a Huawei p30 lite with 4gb ram, 128gb internal and an aarch64/arm64 cpu
23:13:10disruptekwow.
23:13:48*krux02 quit (Remote host closed the connection)
23:14:04FromDiscord<Hearthstone> These are the only errors :P https://media.discordapp.net/attachments/371759389889003532/748681766897975316/Screenshot_20200828_001339_com.termux.jpg
23:15:08FromDiscord<Hearthstone> You can't get gcc on termux
23:15:23FromDiscord<Hearthstone> It comes with clang by default
23:15:29FromDiscord<Hearthstone> And they aliased gcc to clang
23:15:43disruptekugh.
23:15:58FromDiscord<Hearthstone> ¯\\_(ツ)\_/¯
23:15:59disruptekyou have `cc = clang` in your global nim.cfg?
23:16:16*endragor joined #nim
23:16:56FromDiscord<Hearthstone> I think so
23:16:59disruptekhmm, it's running clang. is it not a real clang?
23:18:01disruptekmaybe we're trying to build it with c instead of cpp.
23:18:13FromDiscord<Hearthstone> Nope, it's using gcc
23:18:17FromDiscord<Hearthstone> I'll change that
23:18:37FromDiscord<Hearthstone> Fixed that
23:18:38disruptekthe nonimble calls `c` not `cpp`, right?
23:18:41disruptekthat's what you fixed?
23:18:55FromDiscord<Hearthstone> No idea, I'll checj
23:18:59FromDiscord<Hearthstone> I fixed my nim.cfg
23:19:02disruptekjust for the toast line, 2nd to last.
23:19:07FromDiscord<Hearthstone> It used gcc instead of clang
23:19:08FromDiscord<Hearthstone> Okay
23:19:55disrupteki'm surprised this is a problem but probably we should fix it if toast really requires cpp.
23:20:38FromDiscord<Hearthstone> Trying that now
23:20:45FromDiscord<Hearthstone> Maybe :p
23:21:45shashlicktoast requires cpp
23:21:45disruptekwe can blame clyybber if it doesn't work. \o/
23:21:55disrupteknice, i'll fix that.
23:21:57FromDiscord<Hearthstone> https://media.discordapp.net/attachments/371759389889003532/748683751948681236/Screenshot_20200828_002139_com.termux.jpg
23:22:25FromDiscord<Hearthstone> I'm using the fish shell btw
23:22:32FromDiscord<Hearthstone> Hope that doesn't affect anything
23:22:47disrupteknah, i use fish, too.
23:22:51FromDiscord<Hearthstone> Nice
23:23:49disruptekwell, there a couple solutions to this.
23:24:06FromDiscord<Hearthstone> It says something about not die
23:24:14FromDiscord<Hearthstone> And it not being able to be called
23:24:16FromDiscord<Hearthstone> Oh?
23:24:30shashlickwhy is it looking for git2_jl.jll - it should be libgit2_jl.jll
23:24:35disruptekfor now i would just edit src/nimph.nim.cfg and change the --define:git2JBB to --define:git2Git
23:24:37shashlickand is toast even compiled
23:24:49FromDiscord<Hearthstone> Okay
23:24:56disrupteklooks like toast is compiled.
23:24:59disruptekone other change.
23:25:06FromDiscord<Hearthstone> Yes?
23:25:15disruptek--define:git2SetVer:"1.0.1" use "v1.0.0" -- i think git requires a v.
23:25:46disruptekthat will just build libgit2 from scratch.
23:25:47FromDiscord<Hearthstone> Okay
23:26:10FromDiscord<Hearthstone> Nice
23:26:21shashlicki don't get it d
23:26:37*Tanger joined #nim
23:26:37*endragor quit (Ping timeout: 246 seconds)
23:26:43disrupteki know.
23:27:25shashlickwhere do you specify git2JBB
23:27:36disrupteknimph.nim.cfg under nimph.
23:27:42FromDiscord<Hearthstone> ^^
23:27:44disruptekin master branch, anyway.
23:28:13FromDiscord<Hearthstone> That's what I'm using!
23:28:19FromDiscord<Hearthstone> :3
23:28:21disruptekbut how does that string even get composed without a lib in it?
23:28:27disruptekyeah, the master branch is stable.
23:28:40FromDiscord<Hearthstone> Hmm https://media.discordapp.net/attachments/371759389889003532/748685441498087555/Screenshot_20200828_002828_com.termux.jpg
23:28:57disrupteknice.
23:29:30FromDiscord<Hearthstone> Maybe something isn't in the path that should be?
23:29:40disruptekwell it's building libgit successfully, looks like.
23:29:46shashlickwhat version of nimgit2 are you cloning
23:29:48disruptektoast can't find itself?
23:29:52disruptek1.0.1
23:29:56disruptekoh, nimgit2.
23:30:04shashlickit didn't build it did it
23:30:12disruptekuh, it's probably head because this is the nonimble script.
23:30:29FromDiscord<Hearthstone> Yeah
23:30:29disruptekit did build it, afaict.
23:30:31*hyiltiz quit (Ping timeout: 260 seconds)
23:30:35*hyiltiz_ joined #nim
23:30:56disruptekhave you ever used nimterop for anything else?
23:31:30FromDiscord<Hearthstone> Nope
23:31:38FromDiscord<Hearthstone> But I've installed it before
23:31:51FromDiscord<Hearthstone> And the nimterop commands work
23:32:10FromDiscord<Hearthstone> Also my phone is actually getting affected by compiling in the background-
23:32:14FromDiscord<Hearthstone> Never normally does-
23:32:21disruptekoh, just wait.
23:32:35disrupteknimph in master is like 600k lines of nim.
23:33:26FromDiscord<Hearthstone> I think i might of uninstalled nimterop at one point
23:33:31FromDiscord<Hearthstone> Installing again rn-
23:34:01disruptekshashlick: how is it building libgit without building toast?
23:34:07*jacereda quit (Remote host closed the connection)
23:35:22FromDiscord<Hearthstone> Uhoh
23:35:27FromDiscord<Hearthstone> https://media.discordapp.net/attachments/371759389889003532/748687146420011019/Screenshot_20200828_003518_com.termux.jpg https://media.discordapp.net/attachments/371759389889003532/748687146931716186/Screenshot_20200828_003513_com.termux.jpg
23:37:05disruptekthis nonimble script doesn't work for me.
23:37:18disruptekbut, remember, we had to change it to cpp.
23:37:24FromDiscord<Hearthstone> Yup
23:37:35disrupteklemme try the normal bootstrap.
23:37:42FromDiscord<Hearthstone> Okay
23:37:52shashlickWhat version of nimgit2 is being cloned
23:38:03FromDiscord<Hearthstone> 1.0.1
23:38:09disruptekit's head.
23:38:13FromDiscord<Hearthstone> I think
23:38:15FromDiscord<Hearthstone> O
23:38:30disruptektry the normal bootstrap.sh; that one uses the correct versions of everything.
23:38:50disrupteknimble has its uses. 😉
23:39:18FromDiscord<Hearthstone> Okay
23:39:32FromDiscord<Hearthstone> Oh yeah
23:39:34disruptekit should crash with "Error: Cannot satisfy the dependency on cligen 1.2.0 and cligen 0.9.45" after installing most stuff.
23:39:50FromDiscord<Hearthstone> Nimterop doesn't install for me for some version
23:40:06disruptekoh that's right.
23:40:07FromDiscord<Hearthstone> When i tried nimble install nimterop
23:40:17FromDiscord<Hearthstone> :/
23:41:21disruptekwhat does clang --version say?
23:42:42FromGitter<deech_twitter> If I'm making a compiler PR how backwards compatible does the code need to be? eg. can I use `collect`?
23:43:02disruptekmaybe i should just roll nimterop back until it doesn't conflict with cligen.
23:43:03FromDiscord<Hearthstone> Let's see
23:43:35FromDiscord<Hearthstone> sent a code paste, see https://play.nim-lang.org/#ix=2vrG
23:44:03disrupteklooks pretty legit.
23:44:25FromDiscord<Hearthstone> Mhm
23:46:42disruptekahhh, yeah.
23:46:57disruptekshashlick: nimterop isn't working with clang on linux, either.
23:47:26disruptek0.6.8
23:47:50FromDiscord<Hearthstone> Oof
23:48:53disrupteki should be able to find one that works.
23:50:09disruptekit seems to be a passC added in treesitter/api.nim
23:50:58disruptekhmm, now i get a nim bug.
23:53:08disruptekdoesn't work in 0.4.4 either.
23:53:55disruptekor 0.3.3. i think you're probably screwed, unfortunately.
23:54:12*endragor joined #nim
23:54:24disruptekaraq would say he saw this comin'.