<<19-05-2020>>

00:06:32*Guest59717 quit (Ping timeout: 260 seconds)
00:12:42*dadada__ joined #nim
00:13:57*Ven`` joined #nim
00:16:52*opal quit (Remote host closed the connection)
00:17:05*opal joined #nim
00:17:27FromDiscord<codic> Is there a way to create a variable that can change it's type?
00:18:12FromDiscord<codic> using :untyped doesn't work
00:18:25Yardanicono
00:18:31Yardanicoyou need to use something like object variants for that
00:18:42Yardanicoor JSON module for simple stuff will also work (since it uses an object variant internally)
00:18:51Yardanicoand if you don't convert it to string there won't be any overhead really
00:36:34*dadada__ quit (Ping timeout: 265 seconds)
00:42:41*dadada joined #nim
00:43:06*dadada is now known as Guest26794
00:48:29FromDiscord<codic> see, the problem is, I want to nullify the variable later
00:48:41FromDiscord<Yardanico> Well yes
00:48:49FromDiscord<Yardanico> json module had JNull
00:48:54FromDiscord<Rika> options module
00:49:13FromDiscord<Rika> if you just want a nullable use options module
00:50:51FromDiscord<codic> what is that for?
00:53:47*konvertex quit (Ping timeout: 260 seconds)
01:03:49FromDiscord<Rika> nullable type
01:06:49*Guest26794 quit (Ping timeout: 264 seconds)
01:10:35*lritter quit (Ping timeout: 260 seconds)
01:11:26*lritter joined #nim
01:11:47*zacharycarter joined #nim
01:11:53*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:11:54*CcxWrk quit (Remote host closed the connection)
01:12:10*CcxWrk joined #nim
01:12:43*dadada__ joined #nim
01:27:22FromDiscord<Technisha Circuit> Can i unset a variable in Nim?
01:29:05FromDiscord<Rika> no
01:29:12FromDiscord<Technisha Circuit> Ok
01:29:58*chemist69 quit (Ping timeout: 244 seconds)
01:30:15FromDiscord<Technisha Circuit> Is it faster to define a variable with the type specified?
01:30:34FromDiscord<Rika> faster in what way
01:32:17*chemist69 joined #nim
01:33:09FromDiscord<Yardanico> @Technisha Circuit unset in what way? GC automatically collects unused memory
01:33:40FromDiscord<Yardanico> And no, explicit types won't affect runtime at all
01:34:42FromDiscord<Yardanico> You really have to understand that all stuff like macros, templates, overloading, ufcs doesn't exist in the binary
01:35:02FromDiscord<Yardanico> It's all native machine code in the end, no types at all
01:36:14*dadada__ quit (Ping timeout: 256 seconds)
01:36:28FromDiscord<Yardanico> Types are a compile time (in Nim and backend language if it's not JS) thing
01:37:38FromDiscord<Technisha Circuit> Oh okay
01:37:40FromDiscord<Yardanico> That's why compiled programming languages with type systems are usually faster than duck typed interpreted ones - you don't have to do any type checking at runtime since you already know all possible types for everything at compile time
01:38:23FromDiscord<Yardanico> Well, that's not the only reason, but it still can affect the performance quite a lot
01:38:28FromDiscord<Technisha Circuit> Oh okay
01:38:44FromDiscord<Technisha Circuit> So why do most programming languages that are compiled require typing?
01:39:40FromDiscord<Yardanico> ???
01:39:40FromDiscord<Rika> you can write nim without ever touching a type, given that you dont write any procs w/ non-default args
01:39:57FromDiscord<Yardanico> There's also "auto"
01:39:59FromDiscord<Rika> the important thing is that the type does not change
01:40:12FromDiscord<Rika> @Yardanico cant auto args w/o default value xd
01:40:16FromDiscord<Technisha Circuit> Okay, thanks
01:40:17FromDiscord<Rika> or can you?
01:40:22FromDiscord<Yardanico> You can @Rika
01:40:23FromDiscord<Rika> i dont know actually
01:40:40FromDiscord<Technisha Circuit> Also, can i import a directory that isn't a package?
01:40:45FromDiscord<Yardanico> No
01:40:56FromDiscord<Yardanico> You can import packages from a directory though
01:41:01FromDiscord<Rika> how would that work tho...
01:42:06FromDiscord<Technisha Circuit> Hm
01:42:13FromDiscord<Yardanico> @Rika with auto it just assumes that the first call to the proc is the right one afaik
01:42:26FromDiscord<Rika> i see
01:42:38*dadada joined #nim
01:42:40FromDiscord<Rika> and if its not used it's DCE'd anyway
01:42:41FromDiscord<Rika> yeah i see
01:42:50FromDiscord<Yardanico> Ah no
01:42:52FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#types-auto-type
01:42:55FromDiscord<Rika> hm? really?
01:42:58FromDiscord<Yardanico> It's an implicit generic basically
01:43:01*dadada is now known as Guest85333
01:43:05FromDiscord<Technisha Circuit> How would i import all packages in a directory with that directory's name, so if `te.nim` was a file in `dir`, how would i do `dir.te.myFunction`?
01:43:24FromDiscord<Rika> i see lmao
01:43:51FromDiscord<Rika> you make a nim file with the same name as that directory that exports all files in the dir
01:44:03FromDiscord<Rika> (nim file outside the dir)
01:44:11FromDiscord<Yardanico> Fun fact - you could have implicit auto types in earlier versions
01:44:29FromDiscord<Yardanico> Luke proc test(a, b) = discard
01:44:39FromDiscord<Rika> who's Luke?
01:44:41FromDiscord<Rika> 😛
01:44:47FromDiscord<Yardanico> !eval proc test(a, b) = discard
01:44:49NimBotCompile failed: /usercode/in.nim(1, 11) Error: typeless parameters are obsolete
01:44:49FromDiscord<Yardanico> *like
01:44:54FromDiscord<Yardanico> See
01:45:25FromDiscord<FromIRC> Uptime - 3 days, 9 hours, 7 minutes, 57 seconds, 263 milliseconds, 181 microseconds, and 919 nanoseconds
01:45:26FromDiscord<Yardanico> !status
01:45:29FromDiscord<Yardanico> That's nice
01:49:42*ftsf joined #nim
01:51:42FromDiscord<Yardanico> TIL from the manual:
01:51:59FromDiscord<Yardanico> !eval var a = 5; int(a) = 3; echo(a)
01:52:02NimBot3
01:52:35FromDiscord<Yardanico> " The type conversion T(a) is an L-value if a is an L-value and typeEqualsOrDistinct(T, type(a)) holds."
02:04:04shashlick@leorize
02:06:28*Guest85333 quit (Ping timeout: 265 seconds)
02:08:26FromDiscord<Technisha Circuit> !eval echo "Hi"
02:08:29NimBotHi
02:09:04FromDiscord<Technisha Circuit> Who writes their code like `echo "Hi"` and why? Do you just prefer it? (I do for somethings but for others I don't)
02:09:13FromDiscord<Yardanico> Wdym
02:09:44FromDiscord<Yardanico> For most people it's easier to hit space on a keyboard than to type ( or ). :)
02:10:00FromDiscord<Rika> i prefer it
02:10:34FromDiscord<Rika> echo "" but everything else is either smth.call() or smth.call when "property", then stuff() if functional
02:12:16*zacharycarter quit (Ping timeout: 265 seconds)
02:12:37FromDiscord<Technisha Circuit> Oh okay
02:12:45*dadada__ joined #nim
02:13:14FromDiscord<Technisha Circuit> I think i might ditch Python once I know enough Nim
02:13:18FromDiscord<Technisha Circuit> And i am happy about that
02:13:46FromDiscord<Rika> i already have 😛
02:13:53FromDiscord<Technisha Circuit> Cool
02:14:08FromDiscord<Technisha Circuit> And NimScript is a nice interpreter for Nim too
02:14:08FromDiscord<Technisha Circuit> Well
02:14:12FromDiscord<Rika> only thing that makes me occasionally come back is the package count lol
02:14:16FromDiscord<Technisha Circuit> Kind of like an alternative
02:29:11*fredrikhr quit (Ping timeout: 265 seconds)
02:36:13*dadada__ quit (Ping timeout: 264 seconds)
02:38:18*madpata_ joined #nim
02:39:11FromDiscord<Technisha Circuit> How would i read any file a NimScript file?
02:39:19FromDiscord<Technisha Circuit> For example a `.env` file
02:39:22*muffindrake quit (Ping timeout: 260 seconds)
02:40:20FromDiscord<Rika> ??
02:40:29FromDiscord<Rika> dooooocs
02:41:14*madpata quit (Ping timeout: 240 seconds)
02:41:20*muffindrake joined #nim
02:42:41*dadada joined #nim
02:43:04*dadada is now known as Guest37533
02:43:55FromDiscord<Technisha Circuit> Ok :p
02:44:38FromDiscord<Technisha Circuit> Is it possible for me to make a bot for this server that allows you to search the docs?
02:44:44FromDiscord<Technisha Circuit> Because it'd be nice
02:44:55FromDiscord<Rika> you can do that manually though?
02:44:57FromDiscord<Technisha Circuit> Similar to the python bot
02:45:13FromDiscord<Technisha Circuit> ~~Convinience and laziness~~
02:51:20FromDiscord<Elegant Beef> Just use my rofi thing↵https://streamable.com/mhot0
02:53:08FromDiscord<Technisha Circuit> How has no one boosted the server?
02:53:24FromDiscord<Elegant Beef> All the cool people are on irc
02:53:44FromDiscord<Technisha Circuit> ;-;
02:53:56FromDiscord<Technisha Circuit> I think a Nim chat client would be cool
02:54:37FromDiscord<Technisha Circuit> If it made IRC so much friendlier and nicer I'd use it
02:54:47FromDiscord<Technisha Circuit> Since nick servers are a pain for me
02:55:21FromDiscord<Technisha Circuit> Also, is there a module that allows me to edit json data as if it was a table?
02:55:49FromDiscord<Elegant Beef> Json has overloaded `[]` so you can use strings to navigate the json data
02:56:15FromDiscord<Elegant Beef> overidden*
02:56:16FromDiscord<Technisha Circuit> I want to be able to edit it though, because i can't edit the json data once loaded
02:56:44FromDiscord<Rika> what do you mean
02:56:47FromDiscord<Rika> you deffo can?
02:57:18leorize[m]shashlick: pong
02:57:59FromDiscord<Technisha Circuit> Oh? I want to be able to do `jsonData["new_value"] = "Nice"`
02:58:22leorize[m]use .add?
02:58:23FromDiscord<Rika> jsonData["new_value"] = %"Nice"
02:58:34leorize[m]ah yea you need that
02:58:36FromDiscord<Rika> do you have to use add? i dont remember needing to
02:58:39FromDiscord<Elegant Beef> Nah
02:58:44FromDiscord<Elegant Beef> Just tested↵https://streamable.com/mhot0
02:58:47FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2mFr
02:58:48FromDiscord<Elegant Beef> Shit
02:58:49FromDiscord<Elegant Beef> 😄
02:58:52FromDiscord<Rika> god
02:58:54FromDiscord<Rika> dog*****
02:59:01FromDiscord<Rika> motherfucker im a dumbass
02:59:13FromDiscord<Elegant Beef> Nah dogs are gods
02:59:48FromDiscord<Elegant Beef> If it's not obvious the `%` operator converts to the json node equivelent
03:04:23FromDiscord<Technisha Circuit> Thanks hahaha
03:06:16shashlick@leorize - curious what you think of https://github.com/nimterop/nimterop/issues/217
03:06:49*Guest37533 quit (Ping timeout: 264 seconds)
03:08:28*NimBot joined #nim
03:09:49*Jesin quit (Read error: Connection reset by peer)
03:10:23*Jesin joined #nim
03:10:50*Jesin quit (Client Quit)
03:11:14*Jesin joined #nim
03:11:18leorize[m]there is a legitimate use case for this but this has to be done really carefully
03:12:43*dadada__ joined #nim
03:12:53leorize[m]I'd propose a way to generate typed dynlib objects
03:13:45FromDiscord<InventorMatt> is there a way to do word based operators? like using then as an operator so you could say: a then b
03:14:02leorize[m](ie. a distinct object that allow you to do something like: `let myLib = loadMyLib("path"); myLib.myProc(params)`)
03:14:44*lritter quit (Quit: Leaving)
03:15:10leorize[m]@InventorMatt nope, only a specific set of keywords can be used
03:15:32FromDiscord<InventorMatt> okay, that's what I thought. thank you
03:15:34leorize[m]shashlick: my main concern would be the developer negligence of ABI breakage
03:15:41FromDiscord<Technisha Circuit> You could probably make it a thing with macros apparently
03:15:44FromDiscord<Technisha Circuit> Well
03:15:46FromDiscord<Technisha Circuit> I think
03:17:20leorize[m]shashlick: though I'm not sure if this would be in the scope of nimterop
03:18:05leorize[m]a typed dynlib object generator can be used for many other things (plugin systems?)
03:20:01shashlickokay can you please share your thoughts on that thread?
03:20:43shashlickcause this is related to https://github.com/nimterop/nimterop/issues/154 as well
03:21:27leorize[m]not really, this is much more flexible and target advanced use cases
03:23:02FromDiscord<Rika> leorize: eh? really?
03:23:09FromDiscord<Rika> you cant just backtick any word?
03:23:35leorize[m]you can backtick any word
03:23:42leorize[m]whether they will be treated as an operator is another story
03:24:23FromDiscord<Yardanico> @Rika https://nim-lang.org/docs/manual.html#lexical-analysis-operators
03:25:29FromDiscord<Rika> i c
03:27:27shashlick@leorize: i already do something similar in the plugin system I made
03:28:13leorize[m]I pretty much expected that :P
03:29:41leorize[m]it's really just whether: should this be a nimterop thing, or can we build a general purpose system then hook nimterop into it?
03:30:00FromDiscord<Technisha Circuit> With NimScript could i make a dynamic command loader for Dimscord?
03:30:04FromDiscord<Yardanico> Yes
03:30:22shashlickhttps://genotrance.github.io/plugins/api.html
03:30:38FromDiscord<Technisha Circuit> What's the pros and cons for doing this?
03:30:40FromDiscord<Yardanico> But you'll have to handle all data transfer between host app and VM yourself
03:30:47FromDiscord<Technisha Circuit> Okay
03:30:50PrestigeFinishing up status bar integration: https://0x0.st/i9ch.png
03:30:53shashlicklike @kdheepak prototyped, it is easy to do in nimterop - question is how far to take it
03:30:54FromDiscord<Yardanico> Like you can't really pass complex types easily
03:30:58FromDiscord<Technisha Circuit> Oh
03:31:02PrestigeNeed to do some cose cleanup before I'll merge though, probably tomorrow
03:31:39FromDiscord<Technisha Circuit> I'd only need to be able to pass the `Message` type from dimscord and a sequence
03:32:51leorize[m]shashlick: go barebones, create an object around LibHandle
03:33:07FromDiscord<Technisha Circuit> And the bot instance
03:35:31shashlickleorize - what do you suggest around the lib path - rpath?
03:36:08leorize[m]it's not really our job for this use case
03:36:32*dadada__ quit (Ping timeout: 260 seconds)
03:36:38leorize[m]in this design, the developer is the one that has to manage all the paths, not us
03:40:26FromDiscord<slymilano> stuck with a little simple problem, trying to run removeSuffix on a string, but the error is a bit confusing to me as a new Nim dev: https://play.nim-lang.org/#ix=2mFz
03:41:17FromDiscord<Elegant Beef> remove suffix doesnt return a string it directly modifies it
03:41:31FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2mFA
03:41:38FromDiscord<Elegant Beef> Solved it 😛
03:41:47FromDiscord<slymilano> shiet
03:42:27FromDiscord<slymilano> now teach me to fish here i'd be greatful, the docs say: "proc removeSuffix(s: var string; suffix: string) {...}" by having it say `s: var string` the var tells me it's a direct modify function?
03:42:35FromDiscord<Yardanico> yes
03:42:38FromDiscord<slymilano> noice
03:42:40FromDiscord<slymilano> im learndin
03:42:43FromDiscord<Elegant Beef> also the fact it doesnt have a return type
03:42:44*dadada joined #nim
03:43:06FromDiscord<Elegant Beef> which would be indicated after the proc as such `proc procName(): ReturnType=`
03:43:07*dadada is now known as Guest35686
03:44:16FromDiscord<slymilano> yeah boah we're cooking now, thanks!
03:44:24FromDiscord<Elegant Beef> Np
03:49:25*dddddd quit (Ping timeout: 264 seconds)
03:56:11leorize[m]shashlick: here's a draft of how a typed dynlib can be generated: https://play.nim-lang.org/#ix=2mFD
03:58:33leorize[m]this is much simpler than your plugin system, since we know what can be in the lib already
03:58:39FromDiscord<Technisha Circuit> What does this do?
03:58:50leorize[m]I'd say it's a compelling use case
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:13*Guest35686 quit (Ping timeout: 246 seconds)
04:06:43*supakeen joined #nim
04:08:01*silvernode joined #nim
04:12:50*dadada__ joined #nim
04:14:56shashlick@leorize: can we use a macro to generate this? will simplify how much code nimterop should generate
04:15:14shashlickthat's what i recommended @kdheepak do in https://github.com/nimterop/nimterop/issues/217#issuecomment-629746276
04:15:16disbot➥ 3Allow shared libraries to be loaded at run time instead of at load time
04:15:27leorize[m]sure, you can see that I wrote it in a way that's macro-friendly :P
04:17:29leorize[m]I can write a macro that take a list of procdefs and generate a type like this
04:17:41leorize[m]I'm a bit busy right now though, so that'd have to wait
04:22:27FromDiscord<Technisha Circuit> Would it be possible for me to implement a similar import system from Python using pyImport from Nimpy?
04:22:59FromDiscord<Technisha Circuit> So i could do `from foo.bar import baz`?
04:23:31FromDiscord<Technisha Circuit> And then rename the default nim import syntax to `nimport`?
04:23:43FromDiscord<Technisha Circuit> (edit) 'syntax' => 'system'
04:24:00shashlickokay cool
04:24:10FromDiscord<Technisha Circuit> Because i am trying to run small bits of Python code in Nim now :P
04:29:16FromDiscord<Technisha Circuit> Is there a way to bypass the invalid Token error in Nim? ```python↵/data/data/com.termux/files/home/nim_stuff/pynim/main.nim(3, 8) Error: invalid token: _ (\95)```
04:33:06*silvernode is now known as mollusk
04:33:35*narimiran joined #nim
04:36:05FromDiscord<slymilano> Anyone know how to parse CDATA in xml? my child call is returning xnElement, and it seems innertext doesn't work on that type 😦 https://play.nim-lang.org/#ix=2mFG
04:36:58*dadada__ quit (Ping timeout: 272 seconds)
04:37:04*waleee-cl quit (Quit: Connection closed for inactivity)
04:37:29FromDiscord<slymilano> https://nim-lang.org/docs/xmltree.html#innerText%2CXmlNode - "If n is xnElement, runs recursively on each child node and concatenates the results." but it's returning an empty string for all nodes.
04:40:34*nsf joined #nim
04:42:14FromDiscord<Elegant Beef> @slymilano can i see the xml data in question?
04:42:39*dadada joined #nim
04:43:03*dadada is now known as Guest8643
04:45:54*rockcavera quit (Remote host closed the connection)
04:46:44FromDiscord<slymilano> It's in the link, I don't want to link to "piracy" here lol
04:46:51FromDiscord<slymilano> line 11
04:56:39FromDiscord<Elegant Beef> should be as simple as checking the kind if it's of `xnCData` `node.text`
04:56:53FromDiscord<Elegant Beef> (edit) 'should be as simple as checking the kind if it's of `xnCData` ... `node.text`' => 'should be as simple as checking the kind if it's of `xnCData`use'
04:57:26FromDiscord<Elegant Beef> @slymilano
04:58:19FromDiscord<Elegant Beef> since CData is actually a node
04:59:09FromDiscord<slymilano> Sounds like I need to drill one level deeper, before calling .text, right now: "Error: unhandled exception: /Users/sergiotapia/.choosenim/toolchains/nim-1.2.0/lib/pure/xmltree.nim(178, 10) `n.k in {xnText, xnComment, xnCData, xnEntity}` [AssertionError] - by just calling `item_node.child("title").text()`
04:59:19FromDiscord<Elegant Beef> yea seems so
05:00:00FromDiscord<slymilano> Woah! `echo item_node.child("title").child("CDATA").text()` - SIGSEGV: Illegal storage access. (Attempt to read from nil?)
05:00:23FromDiscord<Elegant Beef> try `.child("title")[0]` instead
05:00:58FromDiscord<slymilano> https://www.youtube.com/watch?v=xR4Ej7bny8k
05:01:14FromDiscord<Elegant Beef> I assume that means it worked?
05:01:14FromDiscord<slymilano> that worked duuuude, you smart
05:01:23FromDiscord<Elegant Beef> Nah i just bodge stuff a lot 😄
05:01:42*mollusk quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
05:06:14*Guest8643 quit (Ping timeout: 240 seconds)
05:12:41*dadada__ joined #nim
05:36:49*dadada__ quit (Ping timeout: 264 seconds)
05:42:43*dadada joined #nim
05:43:06*dadada is now known as Guest26772
05:53:40*Jesin quit (Ping timeout: 246 seconds)
06:06:54*Guest26772 quit (Ping timeout: 272 seconds)
06:09:09skrylar[m]Yardanico: well this works now https://git.sr.ht/~skrylar/skpostbox although figuring out how to thread it is a thing
06:12:40*dadada__ joined #nim
06:16:47*solitudesf- joined #nim
06:31:34FromDiscord<Technisha Circuit> How do i persuade a stubborn Python user to try Nim?
06:32:07*fanta1 joined #nim
06:32:17FromDiscord<Rika> tell them its faster than python by years
06:32:39FromDiscord<Technisha Circuit> They don't care about that point
06:32:51FromDiscord<Rika> then what
06:33:19FromDiscord<Technisha Circuit> No idea
06:33:24FromGitter<bung87> it use indent
06:33:34FromDiscord<Technisha Circuit> Already showed them that
06:34:12FromGitter<bung87> well, most time they dont care much speed
06:34:40FromDiscord<Technisha Circuit> They tried making their Python library faster then most other libraries
06:34:52FromDiscord<Technisha Circuit> And it has the fastest http and async rn
06:35:17FromDiscord<Rika> and you say that they dont care about speed?
06:35:17FromDiscord<Rika> what
06:35:21FromDiscord<InventorMatt> Ability to compile easily is another huge advantage
06:35:40FromDiscord<Technisha Circuit> > and you say that they dont care about speed?↵They do but not from other languages
06:35:43FromDiscord<Technisha Circuit> I want to replace their http using Nim
06:35:49FromGitter<bung87> they can port python code very straightforward
06:35:49FromDiscord<Elegant Beef> It's extreme extensible
06:35:53FromDiscord<Technisha Circuit> And maybe their async implementation
06:35:56FromDiscord<Elegant Beef> (edit) 'extreme' => 'extremely'
06:36:49*dadada__ quit (Ping timeout: 264 seconds)
06:36:55FromDiscord<Technisha Circuit> > they can port python code very straightforward↵Just bringing up that point rn
06:37:01FromDiscord<Technisha Circuit> Just gonna see their reply
06:37:23FromDiscord<Elegant Beef> It's statically typed is a big seller to me
06:37:24FromDiscord<Technisha Circuit> They just said they won't because they don't like nim ;-;
06:37:32FromGitter<bung87> usually x number faster than python
06:38:08FromDiscord<Rika> @Technisha Circuit did they explain why
06:38:12FromDiscord<Technisha Circuit> Nope
06:38:22FromDiscord<Technisha Circuit> Just straight out said they don't like it
06:38:30FromDiscord<Rika> why are you even friends with him
06:38:33FromDiscord<Elegant Beef> ^
06:38:41FromDiscord<Rika> i'd stop taking him seriously
06:39:17FromDiscord<Rika> @Technisha Circuit just stop tryinh
06:39:25FromDiscord<Rika> he isnt someone we'd want here
06:39:27FromDiscord<Elegant Beef> Dont force shit onto people
06:39:35FromDiscord<Rika> that too
06:39:48FromDiscord<Elegant Beef> Although everyone here should use linux or should get banned!
06:39:57FromDiscord<Technisha Circuit> I ain't forcing, just pointing out reasons they might try it
06:40:06FromDiscord<Rika> good think im using linux, albeit manjaro
06:40:14FromDiscord<Technisha Circuit> > Although everyone here should use linux or should get banned!↵I don't want to say anything
06:40:17FromDiscord<Technisha Circuit> Manjaro is nice
06:40:25FromDiscord<Technisha Circuit> But i prefer Solus
06:40:26FromDiscord<Rika> i just want to use a pc man
06:40:30FromDiscord<Rika> ill configure on the way
06:40:40FromDiscord<Technisha Circuit> But my machine is crappy rn ;-;
06:42:41*dadada joined #nim
06:43:05*dadada is now known as Guest67691
06:46:46FromDiscord<Technisha Circuit> How many members are in in the irc, discord, Gitter and matrix it total?
06:47:08FromDiscord<Rika> lol start counting
06:47:19FromDiscord<Technisha Circuit> Oof
06:47:25FromDiscord<Technisha Circuit> (edit) 'it' => 'in'
06:56:47FromGitter<kdheepak> @leorize @shashlick thanks for the discussion! Let me know if there's anything I can do to help.
06:58:12FromGitter<alehander92> disruptek
06:58:24FromGitter<alehander92> what happened with serializing
06:58:29FromGitter<alehander92> the seq
07:00:05*Trustable joined #nim
07:06:30*Guest67691 quit (Ping timeout: 260 seconds)
07:12:43*dadada__ joined #nim
07:15:37PrestigeNothing like debugging a problem for 4 hours just to find out your code was correct
07:19:18*JustASlacker joined #nim
07:26:23*golechwi1 quit (Ping timeout: 252 seconds)
07:28:24*golechwi1 joined #nim
07:28:47*PMunch joined #nim
07:30:03*Vladar joined #nim
07:36:48*dadada__ quit (Ping timeout: 256 seconds)
07:38:27*D_ quit (Ping timeout: 240 seconds)
07:41:58*D_ joined #nim
07:42:39*dadada joined #nim
07:43:02*dadada is now known as Guest19971
07:43:50*JustASlacker quit (Ping timeout: 265 seconds)
07:48:30*liblq-dev joined #nim
07:48:31*pbb quit (Ping timeout: 272 seconds)
07:48:39*pbb joined #nim
07:51:41*JustASlacker joined #nim
07:51:41*JustASlacker quit (Client Quit)
07:51:57*JustASlacker joined #nim
07:52:46*Jesin joined #nim
07:57:51*liblq-dev quit (Ping timeout: 265 seconds)
07:58:33skrylar[m]the code is correct. the test is wrong.
07:59:25*liblq-dev joined #nim
08:01:24FromDiscord<Rika> gotta write tests for your tests
08:03:49skrylar[m]or use yards neat vscode visualizer thingy
08:04:19AraqPrestige, happens to me all the time...
08:04:53Araqwrite some code, debug it, find out there was a problem with the debug echos
08:05:14Araqand that you didn't test what you thought you would
08:06:39*brainbomb joined #nim
08:08:37*moerm joined #nim
08:08:44moermHello everybody
08:09:13PMunchMorning ):
08:09:14PMunch:)*
08:09:47FromDiscord<Elegant Beef> Yellow
08:09:58alehander92GREEN
08:10:22skrylar[m]turqoise?
08:11:22moermturquoise I hereby accepted as the majority choice
08:11:54moermunless, of course, the peoples fron of Judea has justified objections (in which case we'll stone them)
08:17:04PMunchWhat just happened?
08:17:23skrylar[m]a beautiful thing
08:17:37FromDiscord<Clyybber> it is done
08:17:38PMunchAnd as a representative of the Judean peoples front I must object
08:19:59*waleee-cl joined #nim
08:20:19*natrys joined #nim
08:21:38*zedeus quit (Ping timeout: 260 seconds)
08:21:56*brainbomb left #nim (#nim)
08:22:30*brainbomb joined #nim
08:22:40FromDiscord<Elegant Beef> Did i just join a cult?
08:22:47FromDiscord<Elegant Beef> *start*
08:22:56FromDiscord<Rika> yes
08:23:34*zedeus joined #nim
08:24:37*konvertex joined #nim
08:31:54*arecaceae quit (Remote host closed the connection)
08:32:16*arecaceae joined #nim
08:38:54FromDiscord<Elegant Beef> Damn, i've never had this much power before, ok guys we need to go get more users, ensure you talk down on their language so they have to look at nim to see why their language is "better". Dont actually say anything about nim though just ensure they have to look into it
08:39:21FromDiscord<Rika> what do you mean power? 😛
08:39:29FromDiscord<Rika> im interested in what you discovered
08:42:53FromDiscord<Elegant Beef> You said i started a cult
08:43:01FromDiscord<Elegant Beef> Wait doesnt the person that start it have all the power?
08:43:18FromDiscord<Elegant Beef> I've never started a cult before
08:43:42alehander92ugh
08:43:59FromDiscord<Rika> you joined one
08:44:05FromDiscord<Rika> not started
08:52:50*arecaceae quit (Ping timeout: 272 seconds)
08:57:15*Tongir joined #nim
09:00:12*Tlongir quit (Ping timeout: 265 seconds)
09:25:49*natrys quit (Quit: natrys)
09:34:23*marquisdefalbala joined #nim
09:34:42*Ven`` joined #nim
09:39:11FromGitter<bung87> does csources archive has released on nim-lang.org?
09:40:00*opDispatch joined #nim
09:41:55FromGitter<bung87> it's too huge for people blocked by GFW
09:43:51*fredrikhr joined #nim
09:46:34moerm- back - PMunch object? OK, choose your favourite stones ...
09:47:12PMunchHmm, give me two big ones and a couple small ones
09:49:56moermPMunch colour? Any other design wishes? Also: With anaesthesia or without? "We aim to please"
09:51:17moermElegant Beef What for? Nim will rule the world anyway very soon (T)
09:51:27moerm+M
09:52:52FromGitter<sheerluck> Nim will rule the world
09:53:31FromDiscord<kodkuce> 1 day
09:53:40FromDiscord<kodkuce> far far along
09:54:12moermHow could anyone in his right mind doubt that? (disbelievers, please register with our stoning department)
09:54:54moermkodkuce Sorry, our stoning department is currently a bit overloaded...
09:56:42opDispatchI esitate to learn a new PL
09:57:26opDispatchare AST macros that good ? I only used templates so far
09:58:18PMunchThey're great if you need them
09:58:23liblq-devthey are, but Nim's implementation has some pitfalls
09:58:37opDispatchI want to choose a PL with cool stuff you see, I don't care about making software actually, I want to have fun with a PL
09:58:56moermopDispatch Try ATS
09:59:04moermor Seed7
10:02:35opDispatchmmh yes, seed7 homepage makes it tempting
10:05:09moermSee you soon, bye all
10:05:19*moerm quit (Quit: Leaving)
10:06:32opDispatchwell I meant the feature list, not the look.
10:08:09*xet7 quit (Remote host closed the connection)
10:10:43*xet7 joined #nim
10:15:25*Ven`` quit (Read error: Connection reset by peer)
10:15:35*Vladar quit (Quit: Leaving)
10:17:56*abm joined #nim
10:26:30*dddddd joined #nim
10:39:36Guest19971what's the code on nim's manual and doc pages licensed under?
10:39:41Guest19971can it be used in MIT code?
10:39:50Guest19971and how would I know whom to attribute copyright to?
10:39:59Guest19971https://nim-lang.org/docs/parsexml.html
10:40:11Guest19971for example this example code is what I'd like to copy (and change)
10:40:12FromDiscord<Clyybber> its MIT
10:43:07PMunchopDispatch, Nim is one of the most interesting and fun languages I've used at least
10:50:03*monokrom joined #nim
10:53:59FromDiscord<uniminin> sent a code paste, see http://ix.io/2mGO
10:54:05FromDiscord<uniminin> how can i handle if there is no arguments in specific index
10:54:18*marquisdefalbala quit (Quit: Konversation terminated!)
10:59:09FromGitter<bung87> no value then no that index
10:59:30FromGitter<gogolxdong> ipfs get Qmf14tTLCz5bALK4WyoMgAn1wVNYhAWq5ZeKDJmbdU8oMQ
10:59:39FromGitter<gogolxdong> It's Nim
11:00:56alehander92https://github.com/vedantroy/typecheck.macro willyboar PMunch
11:01:14alehander92maybe something like that was what i wondered about validators and web frameworks
11:01:23alehander92but i thought we can just do stuff like types + z3 require
11:01:36alehander92to generally want arguments that went through such validators
11:01:44alehander92(but autogenerating those also seems useful)
11:02:17alehander92still one can check that his arg didnt somehow arrive without the validator
11:02:37alehander92+ bung87 ^
11:02:43FromDiscord<uniminin> > no value then no that index↵@bung87[Gitter]#0000 wdym?
11:04:17PMunchalehander92, I guess that's similar to https://github.com/PMunch/jsonschema
11:05:07PMunchMy idea was to define routes using Nim types, and then register "parsing" middleware that will convert e.g. JSON to that Nim type.
11:05:11alehander92hm, i forgot about it
11:05:23*marquisdefalbala joined #nim
11:05:44PMunchAnd if you define a "view" (e.g. a HTML site) that pulls from multiple routes it won't actually go through creating/parsing JSON, it will just work directly on the Nim types.
11:05:45Guest19971opDispatch: I agree with PMunch .. definitely makes me more productive, the only other language I felt this productive with was python, and I may be even more productive, especially in the long term mainly due to macros and the power of automatizing tedious tasks
11:05:58alehander92yeah, and plugging this validation inside seems possible
11:06:56alehander92seems good, yeah
11:07:24alehander92btw that reminds me
11:07:37alehander92there are rest/graphql specs right?
11:08:49FromGitter<bung87> alehander92 seem can just translate it
11:10:14alehander92a nim web framework
11:10:26FromGitter<bung87> uniminin how you put a empty string to that position?
11:10:32FromGitter<bung87> from command line
11:10:48alehander92can also check automatically that graphql/rest api it supports works according to its spec similarly
11:10:56alehander92or even autogenerate
11:11:20alehander92those base paths+json schema def+controllers
11:11:26PMunchYeah my idea was to automatically generate documentation at least
11:11:30alehander92of them (leaving to the user to fill it)
11:11:37alehander92yeah, docs too
11:11:38PMunchBased on the types and docstrings given to routes
11:11:59alehander92yeah the other option is the opposite
11:12:06alehander92but maybe i am talking about openapi here
11:12:17PMunchGenerating an API based on a spec?
11:12:46alehander92yes
11:13:00alehander92bung87 what can be translate d
11:13:56FromGitter<bung87> hold on I release a new version, check what can I get by translating https://github.com/vedantroy/typecheck.macro
11:14:28alehander92mate
11:14:55alehander92:D
11:15:36alehander92kinda makes sense if you think about it
11:15:50alehander92but it's probably tied to typescript
11:16:05alehander92we should write own libs for metaprogramming
11:16:26alehander92because it's usually not easy to port even manually
11:17:31alehander92but yeah, your tool can do that :P
11:18:04FromGitter<bung87> I know I will fails at first time, I can just try improve my tool.
11:22:19*Jesin quit (Ping timeout: 246 seconds)
11:26:32FromDiscord<Recruit_main707> @uniminin you can do paramCount() iirc to get the number of args
11:26:43Yardanicoyes
11:27:00Yardanicoalso there's https://nim-lang.org/docs/os.html#commandLineParams
11:27:02FromDiscord<uniminin> where is paramCount from?
11:27:06Yardanicoos
11:27:09Yardanicohttps://nim-lang.org/docs/os.html#paramCount
11:27:26FromDiscord<uniminin> thanks
11:27:29Yardanicoto get all params you either use commandLineParams or do
11:28:13Yardanicofor i in 1 .. paramCount(): echo paramStr(i)
11:28:31Yardanicoi because paramStr(0) is like in C - path of the binary
11:33:11alehander92bung87 of course!
11:34:46Araqyay my code works
11:34:48Araqbbl
11:39:43*waleee-cl quit (Quit: Connection closed for inactivity)
11:47:33FromDiscord<Clyybber> which code?
11:47:39Yardanicohttps://github.com/nim-lang/Nim/pull/14398 ?
11:47:41disbot➥ 3specialize genericReset
11:47:49FromDiscord<Clyybber> ah, nice
11:48:30Yardanicobtw, just a question - is it possible to somehow not store any error messages in the binary for smaller size? with os:any
11:48:33Yardanicojust to make the binary smaller :D
11:49:51FromDiscord<Clyybber> hmm, I don't know, maybe Zevv knows
11:50:18YardanicoI might try nimStackTraceOverride I guess
11:50:27Yardanicoand onUnhandledException
11:55:53*abm quit (Quit: Leaving)
11:56:14*abm joined #nim
11:57:08*couven92 joined #nim
11:57:22*fanta1 quit (Quit: fanta1)
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:42*supakeen joined #nim
12:12:23*marquisdefalbala quit (Quit: Konversation terminated!)
12:15:32*abm quit (Quit: Leaving)
12:16:58*rockcavera joined #nim
12:17:17*abm joined #nim
12:17:22*fredrikhr quit (Quit: Client Disconnecting)
12:17:42*fredrikhr joined #nim
12:19:20PMunchHmm, should I report this issue? http://ix.io/2mHr
12:19:56FromDiscord<Clyybber> probably
12:28:06FromDiscord<Yardanico> And yeah, I figured out it were error messages from statically linked musl and not from the Nim program xd
12:28:17PMunchI was more thinking if it was a known issue or not
12:36:34*couven92 quit (Quit: Client disconnecting)
12:36:55FromDiscord<j$> is there an limit/issue with create large arrays
12:37:01FromDiscord<j$> creating*
12:37:35*tane joined #nim
12:38:16*JustASlacker quit (Ping timeout: 246 seconds)
12:43:01PMunchDefine large
12:43:23FromGitter<bung87> @alehander92 https://github.com/bung87/typecheck.macro/tree/master/src seems also lot of work to do....
12:47:35FromDiscord<j$> 500k+ bytes
12:48:51FromDiscord<j$> I'm just curious I was doing opengl stuff and app was crashing on array allocation(or something) I just used seq instead and it worked
12:51:16*JustASlacker joined #nim
12:51:44solitudesf-stack overflow?
12:51:56*solitudesf- is now known as solitudesf
12:52:03PMunchProbably yeah
12:52:15PMunchThat does sound like a stack overflow
12:52:35FromDiscord<j$> that sounds about right
12:52:42PMunchHmm, my program seems stable after I threw in a GC_fullcollect
12:53:10PMunchSo it seems like the GC wasn't able to do its thing. The program accumulated memory for a while and then just crashed
12:53:20*Guest19971 quit (Ping timeout: 256 seconds)
12:54:14FromDiscord<j$> side note if anyone knows opengl well enough and is willing to help me with an issue pm me on discord j$#1043
12:54:16disbot12https://github.com/nim-lang/Nim/issues/1043 -- 5Getting the enum order right
12:54:59*jds_dizzy_ joined #nim
12:55:04*zacharycarter joined #nim
12:55:07*dadada joined #nim
12:55:30*dadada is now known as Guest43940
12:57:03*jds_dizzy_ quit (Remote host closed the connection)
12:57:13*krux02 joined #nim
13:00:45*filcuc joined #nim
13:02:30PMunchHmm, so if I don't want to do a fullcollect every step, I should probably do some stuff with GC_step right..
13:02:41PMunchBut I can't really guess the timing..
13:10:17PMunchHmm, doesn't -d:useRealtimeGC work with --gc:markandsweeP?
13:11:07FromDiscord<Technisha Circuit> If i made an app and i wanted to be able to have support for making plugins, would NimScript be a good choice for the scripting language?
13:11:10*filcuc quit (Ping timeout: 246 seconds)
13:11:29PMunchDepends a bit what you want your plug-ins to do
13:11:40PMunchAnother option would be to use dll/so's
13:12:30FromDiscord<Technisha Circuit> But if i made an android app wouldn't .so files be harder to use?
13:14:03*NimBot joined #nim
13:14:38FromDiscord<Technisha Circuit> I want to make a game, but I don't know if i should split up the features into plugins that the user can modify if they wish to do so
13:15:34PMunchWell it depends
13:15:53PMunchIt's probably going to be harder to do, so the question becomes: "would anyone use this feature?"
13:20:06FromDiscord<Technisha Circuit> Well, even if no one uses that feature, it makes the game more modular so it's easier to test
13:20:25*Jesin joined #nim
13:20:36Yardanicohcr?
13:20:39Yardanico(hot code reloading)
13:20:42FromDiscord<Technisha Circuit> So instead of searching for a million lines I could just go to a file called `blocks.nims` and edit a few
13:20:43*fanta1 joined #nim
13:20:48FromDiscord<Technisha Circuit> Yeah
13:24:00PMunchIs GC_step with int.high pretty much the same as GC_fullcollect?
13:25:41*bebarker joined #nim
13:26:59*JustASlacker quit (Ping timeout: 256 seconds)
13:28:56*bbarker quit (Ping timeout: 265 seconds)
13:31:32alehander92bung87 look it's a fine example, but i really dont think its a good target for your tool currently
13:32:12alehander92i think translating some real world dts files (e.g. for small popular libs)
13:32:22alehander92might be a good goal
13:32:33alehander92or some other small examples/libs code
13:34:38PMunch@Technisha Circuit, two things to keep in mind for using NimScript; 1. It's much slower than Nim, in a completely synthetic fibonacci benchmark I ran it was about 0.5x Python. 2. Getting data to/from the script is a bit painful and might slow it down even further.
13:34:50Guest43940xmltree/xmlparser doesn't work at compile time due to fopen, I think it would be sad if this is really the only reason for it not working
13:35:04Guest43940somebody please make it use staticread :D
13:39:43*JustASlacker joined #nim
13:41:37Guest43940is there something like a stmtList that is more like a seq of nodes, but not an actual stmtList? I need something that I could use in a quote do
13:44:41PMunchYou can use a stmtList in quote do
13:58:16FromDiscord<zetashift> @j$ why not just post your issue on the forums?
14:04:08FromGitter<bung87> @alehander92 got it, I'll try
14:08:17PMunchHmm, it seemed to be working with GC_fullcollect earlier. Now it just instantly segfaults..
14:12:26PMunchThis is why you should always use git kids..
14:22:07*fanta1 quit (Quit: fanta1)
14:23:20supakeen'git kids' sounds like a book title to me.
14:23:46Yardanicogitgud kids
14:25:58disruptekteen pregnancy horror lit.
14:27:25*waleee-cl joined #nim
14:30:59supakeenOr a childrens book about git.
14:31:11supakeenWith a monster that destroys files and git to save them.
14:36:32*Guest43940 quit (Ping timeout: 256 seconds)
14:40:31*ftsf quit (Quit: Leaving)
14:42:39*dadada joined #nim
14:43:03*dadada is now known as Guest24206
14:43:25disruptekDAMNIT
14:43:37disruptekI DIDN'T CHOOSE TO BE THIS AGE.
14:44:03PMunchWhat?
14:44:18disruptekhow old i am.
14:44:21disruptekit wasn't by choice.
14:44:27Yardanicodisruptek: when is your bday
14:44:36disruptekevery year.
14:45:05disruptekevery fucking year.
14:46:59PMunchHaha :P
14:52:34disruptek~stream
14:52:35disbot9stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- 7disruptek
14:52:38disruptekpersistence toys.
14:56:37disruptekhow did we lose lemonboy?
14:57:05disruptekthis guy was smart.
14:57:26PMunchOh yeah, where did he go?
14:57:32disruptekD
14:57:49FromDiscord<Clyybber> hes gone inactive and then reappeared at zig :D
14:57:59disruptekoh, zig.
14:58:12disruptekthat's what i meant. 😁
14:58:28PMunchHmm, well that's a shame
14:59:29PMunchOkay, I've messed this up good somehow..
15:00:51PMunchOh wait, I know what I did in this case
15:01:15PMunchBut I still get crashes in multithreaded mode..
15:01:38PMunchSo annoying that I had something that worked..
15:01:49PMunchAlthough that could've been a super random fluke..
15:07:48*NimBot joined #nim
15:11:28bebarkerSince mutability of arrays in Nim is determined by declaration style (let/const vs var), is there a way to thaw and freeze arrays without copying? (thaw meaning make mutable, freeze to make immutable)?
15:11:36bebarkerjust curious
15:12:38leorize[m]if you access the variables directly, no
15:14:05leorize[m]though with a bit of wrapping magic this is possible, just not pretty
15:14:08FromGitter<brentp> is there a way to allocate a seq that's invisible to the garbage collector? I can `alloc` but then it doesn't know the length or cap.
15:15:07leorize[m]use --gc:arc
15:15:15alehander92PMunch what are you doing
15:15:36leorize[m]why are you trying to avoid the gc though?
15:16:32FromGitter<brentp> hmm. it's a callback from a C-api that's multi-threaded (in C). if I use any GC'ed object in there, it crashes.
15:16:47FromGitter<brentp> though you are right, it works fine to allocate with `--gc:arc`
15:16:54FromGitter<brentp> but not `--gc:refc`
15:17:24bebarkerleorize[m], I was thinking that might be the ticket, though in my current sleep deprived state I've apparently not thought of the exact incantation. I guess it involves working with refs
15:17:49*drewr joined #nim
15:18:05bebarkeralso i've just finished tut1 and probably missing something from tut2
15:20:14leorize[m]@brentp is the seq contained in the callback?
15:20:56FromGitter<brentp> yes. and if I use an array, all is well. as soon as i allocate anything, then it segfaults. i've had this problem before.
15:21:08FromGitter<brentp> ... but it works fine with --gc:arc
15:21:28leorize[m]run `setupForeignThreadGc()`
15:21:51leorize[m]arc won't have this issue, but it's still experimental
15:26:14FromGitter<brentp> @leorize. yes, that works ! thanks. now i have new issue that if I try to use the callback, I get ` Error: illegal capture 'map_fn' because 'process' has the calling convention: <cdecl>`
15:27:20leorize[m]your callback is trying to capture a variable from the outside
15:28:02leorize[m]closures and threads don't mix, so try not to :p
15:28:10shashlick@zacharycarter - nimterop should be faster now, made several perf improvements - please see if it helps
15:38:26*abm quit (Ping timeout: 260 seconds)
15:43:52*Jesin quit (Ping timeout: 272 seconds)
15:53:54*abm joined #nim
15:59:39FromDiscord<Technisha Circuit> Just to clarify, making an android app that uses NimScript as plugins/modules/whatever that get loaded in my code so i can make new items and stuff for example is not a bad idea!
15:59:43FromDiscord<Technisha Circuit> (edit) 'idea!' => 'idea?'
16:00:27disrupteklemonboy has to be the most nature nimmer i've ever seen.
16:01:52leorize[m]too bad he left
16:01:59leorize[m]iirc it was around the time timothee got banned
16:03:39*Guest24206 quit (Ping timeout: 258 seconds)
16:07:08*nekits quit (Ping timeout: 256 seconds)
16:12:44*dadada joined #nim
16:13:08*dadada is now known as Guest75573
16:14:10*nekits joined #nim
16:19:47FromGitter<zetashift> Also think he went to Zig land
16:24:24narimiranleorize[m]: it was before that
16:24:44Araqwe didn't ban him, krux02 annoyed him
16:24:45narimiranhe got tired of some nitpicking, IIRC
16:25:52Zevvdont we all
16:26:55shashlickZevv!
16:27:02shashlickHow do you profile in the vm
16:27:24disrupteklol
16:29:44Zevvshashlick: yeah thats fun.
16:30:04Prestigedisruptek: the guy that wrote lemonbar?
16:30:17Zevvtheres cpuTime() available but it is bogus unless you pass some flag, I was not allowed to put it in by mr A because he thinks people will do stupid stuff with it
16:30:52Zevvwhile he does allow tons of other stuff which can be used for way more stupid things
16:31:10disrupteklike pointers.
16:31:37disruptekBAN THE POINTER
16:31:44shashlickso i need to throw around a bunch of cpuTime() calls where I need to figure stuff out?
16:31:53Zevvright
16:31:54shashlickbut need a secret flag
16:31:58Zevvright
16:32:04Zevvthis is 2020
16:32:11Zevvyou want that kind of stuff, you do it yourself!
16:32:25Zevvcmon, really, no one want to profile the nim vm
16:32:29shashlickam watching Microsoft Build right now, don't ask
16:32:34Zevvwhy would you do such a thing
16:32:50shashlicki want to make sure the nimterop compile time stuff isn't too slow
16:32:52FromGitter<zetashift> nimterop will have dotnet support now
16:33:01shashlickalready threw out regex and sped it up by 20%
16:33:20Zevvwell, nim tells you how long it took to compile, thats one thing
16:33:28Zevvits 1-sample profiling
16:33:53*nekits quit (Quit: Ping timeout (120 seconds))
16:34:02shashlickdoesn't help with there's 2k+ lines of code
16:34:06shashlickwhat's the falg
16:34:18*nekits joined #nim
16:34:42shashlickoptBenchmarkVM?
16:34:42krux02Just to correct it. Timothee was banned for a time.
16:35:06*nekits quit (Read error: Connection reset by peer)
16:35:56krux02I also blocked him personally around the same time.
16:37:25disruptekthis guy is a fucking genius.
16:37:54shashlickprove it
16:38:34alehander92but now we're all happy together
16:39:41narimiran...singing kumbaya
16:40:32alehander92krux02 how are ya
16:40:46alehander92you dont want me singing
16:40:51alehander92narimiran
16:41:18disrupteklooks like twitch just changed their pre-roll ad delay from 30mins to 20mins.
16:41:34disruptekisn't that the same as paying themselves 33% more?
16:42:17*monokrom quit (Remote host closed the connection)
16:43:52*nekits joined #nim
16:45:11shashlickZevv: I just get undeclared identifier 'cpuTime' even with --benchmarkVM
16:45:45Zevvhm lemmesee
16:46:05shashlickokay i had to import times
16:46:27Zevvwell, there it is
16:48:12ZevvI think doing proper profiling in the VM should not be too hard to add. In the end it's just bytecode running in a VM, so it should be possible to get the VM instruction counter periodically and accumulate where time is spent, calculating the VM instructions back to their sources
16:51:07shashlickdo we already have a macro that can be pushed that measures proc execution time?
16:51:14shashlickfor all following procs
16:52:01Zevvnot that I know of
16:52:45Zevvalso, cpuTime is confusing to many people
16:55:08krux02alehander92, hi I am fine, thanks
16:57:18*lritter joined #nim
17:03:43FromGitter<bung87> @alehander92 https://github.com/bung87/typecheck.macro/blob/master/dist/typecheck.macro_d.nim
17:04:15FromGitter<bung87> let's me say ~50% done
17:07:58shashlickmeh - too much work to measure perf of each and every proc and macro one at a time
17:08:50PMunchalehander92, I'm writing a .so that is loaded in another program
17:09:06PMunchThe other program can call the `operate` procedure from any thread
17:13:40Zevvwhy is {.computedGoto.} disabled in the main VM loop?!
17:14:18AraqZevv: never tried to enable it, after I developed the feature I was burned out
17:14:48*brainbomb quit (Quit: Leaving.)
17:15:23Zevvwell, let me see how it blows up
17:21:19alehander92bung87 nice
17:21:27alehander92how would you deal with `_name` names
17:21:47alehander92PMunch yeah the setup foreign gc or something helped me a lot the other day
17:21:52alehander92not sure if applicable
17:22:07PMunchI've had that for ages
17:22:12PMunchSo it's not that
17:22:16PMunchThis is running in production
17:22:24PMunchSo it must've been something I've done in the latest iteration
17:23:41alehander92hm, so the diff doesnt help?
17:24:00PMunchWell, I think I know why..
17:24:07PMunchI have a global cache of things
17:28:00Zevvshashlick: I got a VM profiler running
17:28:06Zevvit's pretty trivial
17:30:29FromGitter<bung87> oh ,I make bug, I remove all `_`
17:31:36*natrys joined #nim
17:31:41alehander92but then
17:31:46alehander92you have to think of `_a` vs `a`
17:31:58alehander92`_a` are usually private fields
17:32:15alehander92you can think of naming convention
17:32:49FromGitter<bung87> a function startwith _ will not export (has`*` mark
17:33:46shashlickZevv: please share
17:34:42FromGitter<bung87> others I haven't take care.
17:35:17Zevvshashlick: it's pretty crude, but it works:
17:35:17Zevvhttps://github.com/zevv/Nim/pull/new/zevv-vm-profiler
17:35:31Zevvit shows you the top 16 CPU eating lines for each VM invocation
17:36:02ZevvTo make this usable I guess it will either need full annotation, or do inclusive accounting of the whole stack frames
17:36:04PrestigeHey PMunch, when using nimlsp if you make a change in one file, does it not register that the change was made in the other?
17:36:11Zevvbut all the info is there where it is needed.
17:36:14PrestigeTrying to figure out if it's a problem with my lsp client or not
17:36:25Zevvoh wait that's a pull request :)
17:36:30PMunchPrestige, what do you mean?
17:36:48Zevvshashlick: this one: https://github.com/zevv/Nim/tree/zevv-vm-profiler
17:36:58Prestigee.g. if I change the name of an enum in one file, and use the new name in another file, it will say the enum name doesn't exist PMunch
17:37:04Zevvhttps://github.com/zevv/Nim/commit/7c94d10fa4cfa323800965f64030886173d95633
17:37:10PrestigeI'll have to restart my lsp client and then it's fine
17:39:31shashlickZevv: so I am building with your changes - it will just print by default I guess
17:39:46shashlickprints a bunch of stuff while compiling nim itself :)
17:40:06PMunchHmm, that's odd
17:40:33*Jesin joined #nim
17:40:37Zevvshashlick: yeah you better make a nim_temp with that I guess :)
17:40:38PrestigeIt could just be my lsp client PMunch, just curious if you're seeing the same issue
17:40:56ZevvI'm seeing if I can make the output a bit more useful, 85% of the usage is now usually in the stdlibs somewhere
17:41:25Zevvlike iterators or tableimpl
17:43:34shashlickya, most of the output is stdlib itself
17:44:03Zevvideally I should add the time spent to all calls on the current stack frame
17:44:15Zevvso you get an inclusive list
17:44:25Zevvbut then again, I probably should not get started with this at all
17:44:58shashlickits picking lines like `when (NimMajor, NimMinor, NimPatch)`
17:45:21Zevvnah you are imagining things
17:45:23Zevvit's perfect
17:45:26Zevvit would never do that
17:45:32PMunchPrestige, pretty sure mine doesn't do it
17:45:57shashlickthat's what the line numbers correspond to
17:46:11Zevvyeah I know :)
17:46:32Zevvit's messy anyway. If one line emits 50 instructions, these 50 instrucionts are accumulated, but not the line total
17:47:07*Trustable quit (Remote host closed the connection)
17:47:52Zevvlet me see if I can make it target better
17:48:14shashlickwell these values are so low - 5.88e-06
17:49:24Zevvyeah time spent in 1 instruction. use a slower PC if you want them higher
17:49:44shashlicki will do anything for love, but i won't do that
17:52:47Prestigehm
17:53:05shashlickwish the OS procs like copyFile and getFileDate were available at compile time
17:53:32*PMunch quit (Quit: leaving)
17:54:32bebarkerIs there a place where composition (is-a relationships) are discussed in more detail?
17:54:45bebarkermore detail compared to tutorial part 2 that is
17:56:04*narimiran quit (Quit: leaving)
17:58:25*disruptek quit (Ping timeout: 264 seconds)
17:59:01*disbot quit (Ping timeout: 264 seconds)
17:59:02shashlickeven the slowest stuff in my code adds up to just 7ms, whereas the compiler takes 2 seconds from start to finish
17:59:30*narimiran joined #nim
18:00:35shashlickif I use --compileOnly, it goes down to 1.77sec
18:00:50shashlickso most of the time is in the compiler, not much I can do here
18:01:12Zevvyeah, but I'm *not* stopping with this now, you understand
18:01:38shashlickmy code is 2k, but Nim says 122k lines compiled, so ya its not really relevant
18:02:07Zevvyeah but it's compiling these lines to C
18:02:11Zevvnot running them in the VM
18:03:25shashlickya, i just wanted to see if my code was slow, but the 2sec goes way beyond what i'm doing
18:03:47shashlickthrowing out regex reduced the # of files to compile so that really helped
18:03:58Zevvfair enough
18:03:59shashlickunless i reduce the modules i'm using, this isn't going to get any better
18:04:22Yardanicook decided to clone all packages in nimble to try to build the dependency graph between then :D
18:04:24Yardanicothem*
18:04:35YardanicoI love osproc.execProcesses
18:05:11shashlickif i selectively import procs from modules, does that help compile time?
18:05:33ZevvI don't think so
18:08:25shashlickokay i'm done with this - cannot optimize this any more
18:08:38shashlickbut your change is very helpful Zevv, if you can add it to the VM, will be helpful
18:08:45Zevvyeah, and here I am obsessed with another project, profiling the Nim VM
18:08:46Zevvbwah
18:09:29ZevvI whish I had this when I was making NPeg. I spent way too much time scratching my head over performance
18:11:04shashlicknimprof helped greatly with runtime - got toast to run much faster
18:12:22Zevvyeah, thats the kidn of project where profiling really makes sense
18:12:26Zevvchewing a lot of data
18:12:29*disruptek joined #nim
18:13:31*disbot joined #nim
18:15:06*BohlAdmin joined #nim
18:16:13*fredrikhr quit (Quit: Client Disconnecting)
18:23:05*nsf quit (Quit: WeeChat 2.8)
18:23:22*JustASlacker quit (Ping timeout: 246 seconds)
18:23:40*fredrikhr joined #nim
18:28:44FromDiscord<codic> i hope nim runs on cygwin since i'm needing to use windows... let's hope
18:28:53leorize[m]don't use cygwin
18:28:56leorize[m]it's evil
18:28:58leorize[m]go for native
18:29:47FromDiscord<codic> nah cywin ftw
18:30:01FromDiscord<codic> (edit) 'cywin' => 'cygwin'
18:30:06FromDiscord<codic> and i dont have admin here so no wsl
18:30:58leorize[m]uhmmm you can use mingw like a sane person...
18:31:10leorize[m]also cygwin is horrendously slow, use msys2 if you must
18:32:05livcddont use any of that
18:32:14leorize[m]also no, nim don't support cygwin, we just support native windows
18:32:14livcdjust use nim with mingw or whatever
18:32:37FromDiscord<codic> what's wrong with cygin though
18:32:45FromDiscord<codic> mingw is fine yeah but does it have a full shell
18:33:01leorize[m]yes, yes it does
18:33:10FromDiscord<codic> oh why does cygwin still exist
18:33:18leorize[m]cygwin is a posix compatibility layer on top of windows
18:33:21leorize[m]it's not for "I want a shell"
18:33:29livcdwhy does leorize[m] exist
18:33:32livcdsame question :P
18:33:36leorize[m]it's for "I have this posix thing and I wanna run it without modification"
18:33:46leorize[m]source modification*
18:34:54leorize[m]though I'd say that msys2 provide a better environment than cygwin regarding posix compat (mainly because it has pacman) :P
18:35:03FromDiscord<codic> does mingw have pacman?
18:35:12leorize[m]if you want latest gcc, msys2-mingw64 provides it
18:35:15livcdwhy do you need pacman?
18:35:26FromDiscord<codic> i'm used to t
18:35:28FromDiscord<codic> (edit) 't' => 'it'
18:35:36leorize[m]installing dependencies in my case
18:35:48leorize[m]I wrote a cross-platform gtk app (yes, yes it's horrifying)
18:36:14FromDiscord<codic> why not just use qt if you wanan go coss platform
18:36:30leorize[m]do you see a qt binding for nim?
18:37:53FromDiscord<codic> qml binding yes, but how was I to know that you made the app in nim in the first place? :P
18:37:56FromDiscord<codic> Also ignore the typos
18:39:34FromDiscord<codic> i dont use arch btw
18:41:57shashlickmsys has pacman
18:42:04FromDiscord<codic> yeahh
18:42:17FromDiscord<codic> and modern nim!
18:42:17FromDiscord<codic> https://packages.msys2.org/package/mingw-w64-x86_64-nim?repo=mingw64
18:42:42FromDiscord<codic> `pacman -S mingw-w64-x86_64-nim mingw-w64-x86_64-nimble`
18:42:42Araqer, can somebody help me
18:42:56Araqcheckout this PR https://github.com/nim-lang/Nim/pull/14398 please
18:42:57Araqand run
18:42:58disbot➥ 3specialize genericReset
18:43:05disruptekoh lord
18:43:09Zevvshashlick: it now does accumulative VM profiling at the function level. Results are now actually useful
18:43:22shashlicknift
18:43:25Zevvhttp://ix.io/2mJD
18:43:56Araqkoch temp c tests\stdlib\tjsonmacro.nim
18:45:02Araqthe CI claims it works but it doesn't on my machine
18:45:39Araqand ... now it works
18:45:51Araqso strange, maybe I should have a break
18:46:19disruptekseems to work for me.
18:46:25leorize[m]it does run here
18:46:59Araqthanks for the confirmation
18:47:15Zevvsame
18:47:18disruptekcriterion has a bugfix today.
18:47:28disrupteki mean, my fork.
18:47:41Araqok, cool
18:50:39*neceve joined #nim
18:51:52*Guest75573 is now known as dadada
18:52:46dadadaI'd like to have a nameless proc in a statementList by itself, I'm parsing this with a macro
18:52:59dadadaguess I'll have to use a stub name like stub or handler
19:06:59leorize[m]wdym nameless proc?
19:07:47dadadamaybe you like anonymous, or lambda, better, but it's not really a lambda, as my macro will give it its name
19:09:35*BohlAdmin quit (Quit: Do fish get thirsty?)
19:12:51*a_chou joined #nim
19:13:48dadadaI think a feature that would parsing in macros more lenient would be cool, ie. a pragma you can set for macros, so that discards aren't needed infront of procs that return values, and the like
19:13:54dadadas/would/would make
19:14:27dadadamacros are after all code generating code, and not the actual code...
19:15:05dadada(the discard example applies only to typed macros I think)
19:15:20dadada... argument against this is of course further complication of the compiler
19:16:55*a_chou quit (Client Quit)
19:25:29dadadaor how about allowing to set a source filter per macro ... this way some limitations could be circumvented
19:28:08FromDiscord<codic> got msys2. pretty happy with it! now on linux, time to install it with wine... 👿
19:29:13FromDiscord<codic> nice. https://media.discordapp.net/attachments/371759389889003532/712386393837404310/unknown.png
19:31:12Yardanicono
19:31:17Yardanicopls dont
19:31:50FromDiscord<codic> welp. fail
19:31:55FromDiscord<codic> yeah, i'm stupid
19:31:57FromDiscord<codic> cygwin on wine time
19:32:36leorize[m]dadada: it'd be better if we have some context on what you're doing
19:33:53dadadaleorize[m]: I'm developing a lot of macros, most of the time I'm happy, but sometimes the parser trips up on something, it should simply ignore, since the macro writes the code and AFAIK the parser doesn't
19:35:15leorize[m]the parser makes the AST :p
19:35:49dadadayeah, but couldn't he be a bit more lenient when creating the AST when parsing for a macro instead for the actual compiler
19:35:55dadadaI show you something:
19:36:24dadadahttps://play.nim-lang.org/#ix=2mK1
19:36:30dadadaso it trips up because the proc has no identifier
19:36:48dadadabut my macro will rewrite the code anyway and create a special identifier
19:37:13dadadawhat's the point of expecting perfection in the code part of a macro? the macro is the one who should clean that input and bring it there
19:38:19leorize[m]it's about whether the compiler even know how to make the AST :)
19:39:05leorize[m]it can't give you AST if it doesn't know how to create it for that case
19:39:06dadadaall it needs to do is to leave out the name identifier of the ProcTy and I'm happy
19:39:43leorize[m]well, please open an RFC requesting that :P
19:40:06dadadarequest? demand! :P
19:40:33*someunknownuser joined #nim
19:40:44dadadademand = 6 letters, starts with d, dadada = 6 letters, starts with d
19:41:05dadadaand both have an a as the 4th letter
19:41:39dadadaI'm obsessed with comparing words and numbers sometimes
19:42:07shashlickcodic: there's mingw for Linux that cross compiles to windows if you want that
19:42:27someunknownuserDoes anyone, by any chance, have any experience with the following error? lib/system/gc_common.nim(413) prepareDealloc
19:42:29someunknownuserSIGSEGV: Illegal storage access. (Attempt to read from nil?)
19:49:31liblq-devplease post a full stack trace. SIGSEGV is a common error.
19:50:19someunknownuserIt occurs in
19:50:21someunknownuserlib/system/gc.nim(448) newSeq
19:50:29someunknownuserlib/system/gc.nim(440) newObj
19:51:29someunknownuserI was not able to easily reduce it to a minimal example, thats why the full stack trace might not be very useful...
19:52:26someunknownuserI just wanted to know if this is a known issue by any chance or if the error lies in my code.
19:53:29*JustASlacker joined #nim
20:00:09*couven92 joined #nim
20:03:07*fredrikhr quit (Ping timeout: 246 seconds)
20:16:41*JustASlacker quit (Read error: Connection reset by peer)
20:21:09*fredrik92 joined #nim
20:21:44*Trustable joined #nim
20:24:36*couven92 quit (Ping timeout: 265 seconds)
20:25:49FromDiscord<dom96> my gosh, Nim is so copy-happy when it comes to JS
20:29:53*abm quit (Quit: Leaving)
20:30:19leorize[m]someunknownuser: what were you doing?
20:32:52*JustASlacker joined #nim
20:33:07*narimiran quit (Ping timeout: 256 seconds)
20:33:11*couven92 joined #nim
20:33:39someunknownuserI tried to do something using threads.
20:34:11someunknownuserspecifically, I tried to implement asynchronous / threaded communication with nimsuggest using sockets in my editor s
20:34:59someunknownuserI might have fixed the issue now, but I am still not certain, because it seems to occur randomly (probably depending on the gc activity).
20:36:19*fredrik92 quit (Ping timeout: 260 seconds)
20:36:23*Jesin quit (Quit: Leaving)
20:36:31leorize[m]you might need to employ some magic for async + threads
20:36:31someunknownuserI found this issue on GitHub https://github.com/nim-lang/Nim/issues/4622 which seems to be related (even though I use linux)
20:36:32Araqdom96: pssst, can be fixed with arc too
20:36:37leorize[m]dom96 might know a tip or too
20:37:56someunknownuserleorize: sorry, I might have used the wrong terminology. I currently do not use nims async capabilities.
20:38:20someunknownuserits just createThread and joinThread + channels
20:40:25Araqsomeunknownuser, *every* thread and channel must be in a global variable
20:40:40*fredrik92 joined #nim
20:40:45Araqthat's the rule no 1 for Nim's threading
20:42:19someunknownuserAraq: I use allocShared0 / deallocShared, though I now see that it might have been (/ still is) easier to use global variables...
20:42:37someunknownuseras shown in https://nim-lang.org/docs/channels.html#example-passing-channels-safely
20:43:05*jwm2241 quit (Ping timeout: 272 seconds)
20:43:40*couven92 quit (Ping timeout: 256 seconds)
20:46:22dadadathe default formatting of repr for ref objects looks awful, I can't wrap my mind around it
20:46:36*natrys quit (Ping timeout: 272 seconds)
20:46:52dadadaI don't even expect pretty print level optics, but it's like they didn't even try to make it human readable
20:47:22FromDiscord<dom96> Araq: cool, but I'm still waiting patiently for arc/orc to be ready for action
20:51:24Araqwell you can fix async memory leaks too, you know
20:58:57*natrys joined #nim
20:59:01*natrys quit (Client Quit)
21:00:50*B4s1l3 joined #nim
21:01:25*opDispatch quit (Ping timeout: 264 seconds)
21:10:16*fredrik92 is now known as fredrikhr
21:11:52*Jesin joined #nim
21:17:08*couven92 joined #nim
21:17:18*fredrikhr quit (Disconnected by services)
21:17:26*couven92 is now known as fredrikhr
21:21:35*couven92 joined #nim
21:22:06*fredrik92 joined #nim
21:22:32*fredrikhr quit (Disconnected by services)
21:22:42*fredrik92 is now known as fredrikhr
21:28:05*zedeus quit (Ping timeout: 256 seconds)
21:29:26*zedeus joined #nim
21:35:09*fredrik92 joined #nim
21:38:17*konvertex quit (Quit: quit)
21:38:38*couven92 quit (Ping timeout: 256 seconds)
21:38:47FromDiscord<mratsim> Mwahahaha: I ported this raytracer to Nim and Weave, https://www.kevinbeason.com/smallpt/ (though not in 99 lines because I'm not into linegolfing).↵Nim is faster than C++ 😄 (also the raytracer is multithreaded, and we're faster in multithreaded mode as well).↵↵Let's see if I can transform that into a blog post
21:39:33dadadamratsim: post it on hackernews :D !!
21:40:03FromDiscord<mratsim> I have to post the code and write the blog though
21:40:53FromDiscord<mratsim> the thing I don't understand is why I have a 21x speedup on both Weave and OpenMP while I only have 18 cores
21:40:56FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/712419547176632320/unknown.png
21:41:25dadada"only 18 cores"
21:42:06FromDiscord<mratsim> some of my friends have 36 cores 😛 https://github.com/numforge/laser/blob/master/benchmarks/system_profile_Dual_Xeon_Gold_6154.md
21:42:14dadadahas someone written a beautifier for the ref object default output you get with repr?
21:42:43dadadaI don't mean a replacement, something that parses that [[ @[ref] ]] unreadable mess and makes it a bit readable
21:43:25FromDiscord<mratsim> I actually like having the address
21:44:17dadadaI'm not against the address, I'm against the total mess you get, there's no attempt to indent any of that
21:49:37*couven92 joined #nim
21:52:33FromDiscord<mratsim> you didn't try to print object variant or tables at compile-time, you eyes would pop off their sockets 😉
21:52:51*tane quit (Quit: Leaving)
21:53:03*fredrik92 quit (Ping timeout: 265 seconds)
21:53:03*solitudesf quit (Ping timeout: 265 seconds)
21:53:19Yardanicohmm lemme try
21:54:00Yardanicooh lol
21:54:18Yardanicowell I mean yeah, it's not that good looking with repr :D
21:54:21dadadamratsim: I want to keep my eyes for a while, so I won't :-D
21:55:49FromDiscord<mratsim> everytime I work with tables or variants in macros which is often when i need to do slightly complex things, this kills me a little
21:56:02Yardanico@mratsim runtime repr for tables looks worse tbh :P
21:56:28FromDiscord<mratsim> btw, were all the tables corner perf issues fixed?
21:56:43FromDiscord<Clyybber> we have a new hash if you mean that
21:56:56FromDiscord<Clyybber> and its improved the performance quite a bit
21:57:11FromDiscord<Clyybber> btw, genericReset is now gone
21:57:28dadadawhy do our tables allow to have multiple keys with the same key value
21:57:29*jwm224 joined #nim
21:57:32Yardanico@mratsim ^^ https://github.com/nim-lang/Nim/pull/14398
21:57:49dadadaah, wait nevermind, I don't want to know
21:58:08Yardanicolol
21:58:09dadadaI mean, you can simply insert a seq when you want multiple values for a key ...
21:58:32dadadano, I still don't want the answer :-)
22:01:52dadadamratsim: let's congregate to make a better repr
22:02:25Yardanicofwiw repr with --gc:arc is a better than without it
22:02:41Yardanicos/a//
22:03:03Yardanicoyou can study both implementations yourself btw
22:03:08Yardanicohttps://github.com/nim-lang/Nim/blob/devel/lib/system/repr.nim and https://github.com/nim-lang/Nim/blob/devel/lib/system/repr_v2.nim
22:03:40Yardanico@mratsim #14398 will be backported to 1.2.2
22:03:49Yardanicohttps://github.com/nim-lang/Nim/pull/14398/commits/f32c9fc5934230b18871359a5f931c2b3ca25412 you can see the backport tag here :)
22:04:13FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/712425403322466354/unknown.png
22:04:14FromDiscord<mratsim> ?
22:04:32FromDiscord<mratsim> ahI see
22:04:46FromDiscord<mratsim> it's the commit not the PR
22:05:06dadadaYardanico: the code is pretty short, ey... did the format change or just the formattingß
22:05:09dadada?
22:05:12Yardanicodadada: the format
22:05:15Yardanicolemme show
22:05:53Yardanicodadada: https://gist.github.com/Yardanico/dc96337970b726920d55171563c16daa
22:06:17leorize[m]dadada: the answer for why tables can do multiple val per key without a seq is really simple, if you wanna know, that is
22:07:17dadadaleorize[m]: okay, if you can put it into one line, I'll hear
22:07:33leorize[m]Araq wants it for the compiler
22:07:34*D_ quit (Quit: No Ping reply in 180 seconds.)
22:07:41Yardanicoalso it's used in httpclient
22:07:45*neceve quit (Ping timeout: 256 seconds)
22:07:53Yardanicoe.g. you can have multiple headers with same key
22:07:58Yardanico(Set-Cookie)
22:08:29*D_ joined #nim
22:08:32Yardanicoah, not anymore it seems, it uses a seq[string] now
22:09:00dadadaleorize[m]: got it.. multiple keys for a table, but defer is eeeevil .... :D love the guy though
22:09:11dadadahe has written my favorite language/compiler
22:09:23Yardanicovm too
22:09:27dadadatrue
22:11:41dadadaYardanico: new repr looks better, why isn't it enabled for non-arc?
22:11:44*Trustable quit (Remote host closed the connection)
22:12:15Yardanicodadada: idk honestly, but new runtime stuff (destructors, arc, etc) changed quite a lot of things
22:12:43Yardanicoseqs/strings are represented differently with arc as well
22:13:07Yardanicohttps://github.com/nim-lang/Nim/blob/devel/lib/system/seqs_v2.nim https://github.com/nim-lang/Nim/blob/devel/lib/system/strs_v2.nim
22:13:31dadadahmm, new repr doesn't put " around string vals, I think that's a regression, makes it harder to spot strings
22:13:57Yardanicoyou can try it yourself easily btw
22:14:11Yardanicoarc is available on 1.2.0, although there are quite a lot of fixes in devel for it
22:14:52shashlickYardanico - do you know when https://github.com/nim-lang/Nim/issues/14251 will be fixed
22:15:00FromDiscord<Clyybber> dadada: Hmm, good point. I'll fix that
22:15:02Yardanicoshashlick: honestly I don't :D
22:15:27Yardanicoalso https://github.com/nim-lang/Nim/issues/14383 (see a comment there)
22:15:38Yardanicoshashlick: a workaround would be to remove inline pragmas
22:15:39FromDiscord<Clyybber> dadada: The newruntime repr works with the old runtime too with a tiny fix
22:15:46Yardanicoin some places
22:15:49Yardanicofor nim-regex that is
22:15:54shashlickcode is in regex though so I cannot do anything
22:16:16shashlickblocks me with trying arc in nimterop
22:17:01Yardanicowell you can patch nim-regex locally to test arc locally :D
22:18:17dadadaClyybber: are those empty seeming hcode 0 things indicating reserved memory or why do the yneed to be displayed 100 times?
22:18:26Yardanicoyes it's reserved
22:18:38FromDiscord<Clyybber> Clyybber: Not sure what you are referring to
22:18:42Yardanicosee https://nim-lang.org/docs/tables.html#defaultInitialSize
22:18:43FromDiscord<Clyybber> repr ing tables?
22:18:50dadadayes
22:18:56Yardanicodefault initial size for tables is 64 entries
22:18:58Yardanico^ by that const
22:19:00dadadathe link Yardanico sent me comparing repr versions
22:19:02Yardanicoyou can change it youtself
22:19:09YardaniconewTable[string, string](size)
22:19:11FromDiscord<Clyybber> Thats expected, repr prints *everything*
22:19:18Yardanicoand it has to be power of two of course
22:20:38dadadaClyybber: I appreciate that but couldn't a syntax be found that waits until the next non-reserved memory thingy, and then flushes a summary 40*(hcode: 0, key, val: )
22:21:19Yardanicodadada: that's overengineering in my opinion
22:21:55Yardanicowell you can always make a PR :P
22:22:21dadadaYardanico: in mine developing software should be an activity that doesn't create unending headaches, the developer deserves just as much eye candy as everybody else
22:22:29Yardanicorepr is not for eye candy
22:22:32Yardanico"echo x" is for eye candy
22:22:47*someunknownuser quit (Quit: someunknownuser)
22:23:46FromDiscord<Clyybber> dadada: Yeah, but $ is for eye candy, repr is to inspect the internal structure
22:23:51dadadathere are situations where echo x doesn't work and then you want to still understand your data
22:24:06FromDiscord<Clyybber> then you should write some custom proc for that
22:24:10Yardanicothen define `$` for that type :P
22:24:17FromDiscord<Clyybber> because there is no one size fits all solution
22:24:22dadadaYardanico: incidentally I'm writing something that should work for all types
22:24:30Yardaniconice
22:24:41dadadaand getting the address of things is appreciated actually
22:31:06FromDiscord<Clyybber> dadada: Fix for strings and chars is up: https://github.com/nim-lang/Nim/pull/14400
22:31:35Yardanico~stream
22:33:24dadadaClyybber: duuude, awesome! I haven't tested it but it looks like this new format is much closer to being parseable by Nim's own parser, I think it's a no-brainer that this should be made possible, I'd love to use a macro and parseExpr to extract Info from a repr or to reformat the way I want it
22:34:07dadadasorry for using "no-brainer" buzzword :-(
22:35:35dadadaYardanico: where?
22:35:45Yardanicowhere?
22:35:47Yardanicowhat
22:35:50dadada~stream
22:36:10dadadait makes me think you have a stream like disrupt3k
22:36:39Yardanicowell I streamed some things
22:36:44Yardanicoit's ~ystream for my stream
22:36:47Yardanicoalthough disbot is not working rn
22:36:57dadada~ystream
22:37:03FromDiscord<Clyybber> not working :p
22:37:44leorize[m]@Clyybber: actually old repr() also translate non printable to their hex form iirc
22:37:54leorize[m]!eval echo repr "\0"
22:37:56NimBot0x55a8c52592a0"\0"
22:38:16Yardanico!eval echo repr (5)
22:38:18NimBot5
22:38:33leorize[m]this can probably be done with system.escape
22:38:39leorize[m]!eval echo escape "\0\1\2\3"
22:38:41NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'escape'
22:39:43leorize[m]!eval import strutils; echo escape "\0\1\2\3"
22:39:46NimBot"\x00\x01\x02\x03"
22:40:22FromDiscord<Clyybber> leorize: Ah TIL
22:40:53leorize[m]repr is the ultimate debugging tool :P
22:41:34leorize[m]!eval import sugar; echo "".dup addQuoted "\0\1\2\3"
22:41:36NimBot"\x00\x01\x02\x03"
22:41:42Yardanicolol
22:42:27leorize[m]there, dodged strutils :P
22:42:56FromDiscord<Clyybber> haha
22:43:10FromDiscord<Clyybber> new minigame, import dodgin in the stdlib
22:47:44zedeuscompiling nitter with --gc:orc (with a minor jester fix) works, and it seems to run fine. when I add -d:release though, gcc's memory usage grows exponentially till ~6 GB where I have to kill it
22:47:47zedeuswhat do
22:48:01FromDiscord<Technisha Circuit> > Just to clarify, making an android app that uses NimScript as plugins/modules/whatever that get loaded in my code so i can make new items and stuff for example is not a bad idea?↵Thoughts?
22:48:09Yardanicozedeus: yeah
22:48:12YardanicoI tried nitter with orc myself
22:48:20Yardanicocurrently async seems to leak with orc
22:48:30Yardanicoit also happens for asynchttpserver/nimforum
22:48:34Yardanico(i tested them both with orc too)
22:48:54Yardanicozedeus: see https://github.com/nim-lang/Nim/wiki/Status-of-gc:arc-and-gc:orc-(library-compatibility)
22:48:55Yardanicoat the bottom
22:49:01dadadahttps://nimble.directory/pkg/asciigraph <- haha, that looks very cool!
22:49:21FromDiscord<Technisha Circuit> ~~Oof i get ignored~~
22:50:30Yardanicozedeus: ah lol, for me gcc worked fine
22:50:33leorize[m]@Technisha Circuit it's a bad idea
22:50:49YardanicoI mean after doing the workaround for nim-regex
22:55:43zedeushmm, is that still necessary? you marked nim-regex as working after adding the workaround
22:55:57Yardanicowell nim-regex itself works
22:56:07Yardanicobut with some iterators from other modules it doesn't
22:56:10Yardanicoe.g. glob module
22:56:30Yardanicohttps://github.com/nim-lang/Nim/issues/14219 is closed, yeah
22:59:38zedeusoh, I don't trigger #14251 with my wip branch
22:59:43Yardanicooh ok
23:01:56zedeushuh, I am triggering it but only with nim-regex master, 0.11.2 works fine
23:02:21zedeusreally old version lol, I'll look into it
23:02:33Yardanico0.11.2 is almost 1 year old, yeah :D
23:02:54zedeusah I have 0.13.0, not quite as bad
23:06:39zedeusthis rewrite causes it https://github.com/nitely/nim-regex/commit/0570009fe6cd7c9131716bb78223e9f5dfcb05a9
23:07:04*couven92 quit (Quit: Client Disconnecting)
23:08:04Yardanicowell yeah, but I don't think it's good to track it in the nim-regex itself
23:08:13Yardanicoit's better to be fixed upstream since it's not really specific to nim-regex :P
23:08:36Yardanicoand as I said you can fix it temporarily if you remove some inline pragmas from nim-regex's funcs
23:08:42zedeusof course, such a huge commit doesn't help tracking it down anyway
23:08:57zedeus61 procs are inlined, "some" is a bit vague lol
23:08:58Yardanicowell I had to minimize it from the whole src of nim-regex to ~30 lines :)
23:14:07*Satomi-Kowa joined #nim
23:26:08*fredrikhr quit (Read error: Connection reset by peer)
23:26:27*fredrikhr joined #nim
23:26:38*fredrikhr quit (Client Quit)
23:29:35FromDiscord<Technisha Circuit> > @Technisha Circuit Circuit it's a bad idea↵@leorize could you tell me why?
23:32:33leorize[m]the compiler crashes a lot
23:33:21leorize[m]including the compiler with your program is like asking it to crash on the slightest modification of input
23:34:51FromDiscord<Technisha Circuit> I'm using NimScript for adding blocks and stuff
23:47:30zedeuswelp, orc causes async crashes after a few requests anyway
23:47:43Yardanicozedeus: are you on latest devel?
23:47:44zedeusyea
23:47:48Yardanicoit wasn't crashing for me, strange
23:47:53Yardaniconow minimize it and report the issue :P
23:48:00Yardanicowhat's the traceback?
23:48:43zedeushttp://ix.io/2mLS
23:48:51zedeusit's non-deterministic, of course
23:49:09Yardanicowe just need new async :)
23:50:19FromDiscord<mratsim> Here you go: https://github.com/mratsim/weave/pull/148
23:50:33FromDiscord<mratsim> I guess I should add more visual stuff :p
23:51:37FromDiscord<mratsim> @Zachary Carter /@zacharycarter you mentioned a pathtracer a couple weeks ago, is that similar?
23:56:54*krux02_ joined #nim
23:59:07*krux02 quit (Ping timeout: 240 seconds)