<< 15-05-2020 >>

00:00:10FromGitter<timotheecour> oh btw is @leorize and @alaviss the same person ?
00:00:14leorizeyes
00:00:25leorizethe thing that I don't get is how on Haiku, threads are faster :P
00:00:27*elijahr joined #nim
00:00:52*pbb joined #nim
00:01:41dadadaleorize: I used compilesettings with success now, yet nimcacheDir is empty, other settings tend to work ...
00:01:46FromGitter<timotheecour> maybe the selector implementation is not up to par on haiku; idk whether it’s nim’s implementation or haiku issue
00:01:58dadadaleorize: could it be because I use defaults?
00:02:09leorizeno idea then :/
00:02:26leorizetimotheecour: on haiku we use the poll interface (that's the only one here anyway)
00:02:29dom96The main problem with threads is that they are costly
00:02:42dom96how many threads can you actually create on Linux/Windows/BSD?
00:02:46FromGitter<timotheecour> @dadada i fixed it recently see https://github.com/nim-lang/Nim/pull/14277
00:02:48disbotfix https://github.com/nim-lang/Nim/issues/14275 querySetting(nimcacheDir) works even if implicitly set
00:03:05dom96It would be interesting to see some actual benchmarks for this
00:03:36leorizedom96: you can create a decent amount, more than the amount of fd you can create on a typical system :)
00:03:50zacharycartershould read that blog post I linked to dom96
00:03:55leorizeI guess on haiku it's just faster because this is the OS where everything happens in threads :p
00:04:20FromGitter<timotheecour> Well, again, you can combine threads and async
00:04:53leorizeI can, but I wanna establish a baseline
00:05:36*mumble quit (Quit: Going offline, see ya! (www.adiirc.com))
00:05:43*pbb quit (Excess Flood)
00:05:49leorizeI wrote a small pseudo-http client that opens around 100 connections and pull 200Mb from them
00:05:51FromGitter<timotheecour> well poll is fundamentally not as efficient as something like kqueue (or even epoll or window’s equiivalent)
00:07:19dom96surely if threads is all you need we wouldn't have all these fancy async mechanisms in the OS :P
00:08:46leorizewell I'm revamping their http library
00:09:01FromGitter<timotheecour> it’s basically O(1) vs O(n) for epoll vs poll. eg see https://jvns.ca/blog/2017/06/03/async-io-on-linux--select--poll--and-epoll/
00:09:19leorizeand it'll be funny when I set out to rewrite this in async and the current threaded version is fasetr :P
00:09:23leorizefaster*
00:15:59FromDiscord<Gary M> Nim tables aren't contiguous memory right?
00:16:16leorizemaybe I'm not doing async right in C :/
00:16:39leorizegah, I need better numbers, my benchmark is underperforming too much
00:18:16*pbb joined #nim
00:21:48dom96leorize: write it in Nim?
00:22:00FromGitter<timotheecour> @leorize i think what you need is wait_for_objects.h
00:22:50FromGitter<timotheecour> IIUC that’s the haiku way, and selectors.nim should add a `when defined(haiku)` that uses that
00:26:33FromGitter<timotheecour> and now I have a question for you :) regarding flaky tests/stdlib/tfdleak.nim, I’ve noticed the test actually fails about 25% of the time on windows; eg simply instrument tfdleak.nim and simply do the 1st check only `leakCheck(f.getOsFileHandle, "system.open()”)` and run in a loop; guaranteed failure
00:26:37*fredrikhr quit (Read error: Connection reset by peer)
00:26:44*lritter quit (Quit: Leaving)
00:27:59FromGitter<timotheecour> I’m thinking the `getHandleInformation(f.Handle, addr flags) != 0` test has false positives and maybe isn’t the right test
00:30:06FromGitter<timotheecour> @Gary M look at tables.nim implementation, it uses a `seq` so of courses uses contguous memory but the indexes are hashed
00:32:45FromGitter<timotheecour> (basically it uses open addressing, no linked lists)
00:32:54*konvertex quit (Ping timeout: 240 seconds)
00:38:55leorize[m]dom96: a bit slower in nim
00:39:36leorize[m]@timotheecour: that api is useless for actual async work, it doesn't remember what events you want to wait for :)
00:40:17leorize[m]I think there might be a huge overhead in their poll implementation
00:43:22leorize[m]re: tfdleak: yea that might create false positives, but I don't really know if there's any better way
00:46:24FromGitter<timotheecour> on windows, Handle’s are not inheritable by default so IMO there’s no leak to child, and these are 100% false positives
00:47:06FromGitter<timotheecour> also there are other bugs i found, where u mismatched Handle for FileHandle (but that’s probably unrelated to that bug)
00:47:25FromGitter<timotheecour> maybe i can send a PR and u can review it since u have more contxt than others
01:01:29FromDiscord<exelotl> Tried adding for loops to strformat... I almost got there but then it got late :(
01:06:24leorize[m]@timotheecour: handle being equal to filehandle is intentional
01:06:55leorize[m]also native handles are not inheritable by default, but handles created via ISO/POSIX APIs are inheritable by default
01:07:06FromGitter<timotheecour> i think it’s a bug! Handle.sizeof should be int.sizeof but FileHandle.sizeof should be int32.sizeof
01:07:09leorize[m]HANDLE is int32, and FileHandle is int/cint
01:07:14leorize[m]either way it doesn't really matter
01:07:22leorize[m]HANDLE is smaller than FileHandle
01:07:42leorize[m]it's already promoted automatically
01:08:25leorize[m]and on LE architectures trimming int64->int32 should only chomp the later unused 32bits
01:08:50FromGitter<timotheecour> well signature should be correct, it can lead to bugs even if no currently any bugs form it: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-osfhandle?view=vs-2019 shows you’re using it wrong :)
01:09:36FromGitter<timotheecour> and in fact contradicts what’s in lib/windows/winlean.nim ; anyway I’ll fix this in a PR
01:10:00FromGitter<timotheecour> `HANDLE is smaller than FileHandle` that’s not true
01:10:10FromGitter<timotheecour> opposite, on 64 bit
01:10:21leorize[m]uhmm, how come I'm using it wrong?
01:10:37leorize[m]the signature is pretty much placebo, it's using header
01:11:00leorize[m]well but do fix it please :P
01:11:32FromGitter<timotheecour> it’s not placebo, things get’s cast , so no C warnings, and u’ll never know if a true bug creeps in with wrong signature.
01:11:36FromGitter<timotheecour> i will :)
01:11:36*zacharycarter quit (Ping timeout: 272 seconds)
01:11:42disruptekactually, polling is sometimes faster for io.
01:12:57disrupteksimple because interrupts become a bottleneck at high loads.
01:13:43leorizethe problem is that it's not matching my observations :P
01:13:47FromGitter<timotheecour> @leorize reading though https://discuss.haiku-os.org/t/developer-documentation-for-async-networking/3427/7 it shows that `wait_for_objects` is what should be most performant for haiku (and it’s more general than `poll`) ; it’s the “best effort equivalent” of osx’s kqueue (even if not as good since u have to feed fd’s each time) ; I’ll bet 10$ it’s faster than threads
01:15:00*Guest38665 quit (Remote host closed the connection)
01:15:18leorizemaybe it's faster, though I do know that the kernel implementation of it uses poll
01:15:38leorizethe problem is that I have to register the fds again each time I call it
01:16:06*ptdel joined #nim
01:17:18leorizemaybe I can memcpy() the array everytime I call it, but that just sounds slow
01:17:29hongerHey guys, I have a question (strictly out of curiosity), was there a conscious decision made to write everything with American-style spelling (ie Color vs Colour, Gray vs Grey etc) when developing some of the libraries? Or is it just generally easier to use american spelling because so much code uses it that it's kinda standard?
01:17:36leorizewell there's only one way to find out :P
01:18:14leorizehonger: I don't think there is
01:18:41FromDiscord<Rika> Libraries are made by many people, no?
01:18:47leorizemaybe American-English is more popular than English-English?
01:19:19hongerYeah, makes sense. We use Colour in Australia, but it's actually becoming unnatural to type it that way :P
01:19:42FromDiscord<KingDarBoja> I prefer the british flavour
01:20:04disruptekthe accent is sexy, sure.
01:21:30FromGitter<timotheecour> > maybe I can memcpy() the array everytime I call it, but that just sounds slow ⏎ ⏎ Increasing my bet to 30$ ; cmon, context switch dwarfs memcpy (plus, not even sure you need memcpy, u could keep it in memory and update the array as needed after each event)
01:22:37leorizethe events field is overridden by the events that happened for every call
01:23:03leorizemeaning that for events that didn't happen on that one call, you're going to have to re-apply the masks
01:23:39leorizebut I'll give it a go
01:26:28leorizeyep, the tests code suggest that memcpy is the flow to use this
01:26:33leorizeguess I can't avoid that
01:30:28*Hideki joined #nim
01:30:48FromGitter<timotheecour> (if this works, IMO shd be long to stdlib, eg `ioselects/selectors_haiku.nim`); ⏎ isn’t only the `object_wait_info[i].events` where i is returned by `wait_for_objects`the only event that gets modified?
01:30:49*Hideki is now known as Guest28479
01:31:23leorizeofc not :)
01:31:37leorizeelse how would you distinguish between events you registered and events that happened?
01:32:10leorizealso wait_for_objects work like poll(), it returns the number of events happened
01:32:15leorizenot where it happened
01:32:46leorizewould be inefficient if only one event is returned at a time
01:35:03*ftsf joined #nim
01:35:57*chemist69 quit (Ping timeout: 272 seconds)
01:36:54*Guest28479 quit (Ping timeout: 240 seconds)
01:37:28*dddddd quit (Remote host closed the connection)
01:37:35*chemist69 joined #nim
01:41:28FromGitter<timotheecour> okok
01:46:09*ryan_ joined #nim
01:48:47*honger quit (Ping timeout: 260 seconds)
01:51:25*ryan_ is now known as gonger
02:00:16*zacharycarter joined #nim
02:00:51zacharycarterstream's back up - https://www.twitch.tv/zachary_carter - probably will only be on for another hour or two
02:02:36leorize@timotheecour: and the results are in, same speed, if not slower
02:02:47leorizepulling in my profiler now
02:05:34*zacharycarter quit (Read error: Connection reset by peer)
02:05:43*mono joined #nim
02:06:44*zacharycarter joined #nim
02:07:54*monokrom quit (Ping timeout: 240 seconds)
02:12:07*muffindrake quit (Ping timeout: 260 seconds)
02:14:13*muffindrake joined #nim
02:25:23*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:31:27*theelous3 quit (Read error: Connection reset by peer)
02:44:38*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
02:45:14*pbb joined #nim
02:49:10FromDiscord<codic> If I have stdin.readLine, the left and right arrow keys output `^[[D` and `^[[C` respectively. how can i change this to actually move the cursor? Also can I make the up and down keys do nothing? this also applies to other languages but at the moment i need a solution for nim, thanks in advance
02:52:47FromDiscord<Rika> it's somewhat complicated my ide
02:52:49FromDiscord<Rika> (edit) 'ide' => 'idea'
02:52:54FromDiscord<Rika> for that
02:53:32FromDiscord<Rika> i'd say switch the console into raw mode and do it yourself like how linenoise does it but you'd need to learn what `termios` does
02:53:45FromDiscord<Rika> and it'd only work on linux afaik
02:53:49FromDiscord<Rika> or unix-likes
02:54:17FromDiscord<codic> this tool is gonna be for linux only anyways
02:54:42FromDiscord<codic> but how do i use the raw console mode?
02:54:48FromDiscord<codic> And hwat did linenoise do?
02:54:50FromDiscord<codic> what*
02:54:55FromDiscord<Rika> start reading up on this xd https://linux.die.net/man/3/termios and https://nim-lang.org/docs/termios.html
02:55:10FromDiscord<codic> latter, sure
02:55:24FromDiscord<codic> former, nope, I have `man termios` at my hands
02:55:28FromDiscord<codic> wait what
02:55:33FromDiscord<codic> why is the Synopsis c code
02:55:39FromDiscord<codic> Nvm
02:55:48FromDiscord<codic> Mixed it up with the description xd
02:56:18FromDiscord<codic> aaaaaaaaaaaaaaaargh forget it
02:56:21FromDiscord<Rika> not sure if this would be needed too https://linux.die.net/man/4/console_ioctl
02:56:41FromDiscord<codic> o no
02:57:09FromDiscord<codic> also, i've filed a phabricator report for the solus repositories to update nim https://dev.getsol.us/T8979↵Hopefully they do it soon
02:58:04FromDiscord<codic> Wait, is this easier to do with c?
02:58:11FromDiscord<codic> if so I could write a library and `importc` it
02:58:14*zacharycarter quit (Ping timeout: 256 seconds)
02:59:10FromDiscord<Rika> no
02:59:15FromDiscord<codic> aw
02:59:17FromDiscord<Rika> did you see the link i sent
02:59:22FromDiscord<Rika> > and https://nim-lang.org/docs/termios.html
02:59:25FromDiscord<codic> yes
02:59:36FromDiscord<Rika> its the same exact api for c afaik
02:59:37FromDiscord<codic> it's just a wrapper around the c termios
02:59:40FromDiscord<codic> yeah
02:59:48FromDiscord<Rika> why would it be easier in C then
03:01:55FromDiscord<codic> dunno
03:02:03FromDiscord<codic> something like this? https://stackoverflow.com/questions/10463201/getch-and-arrow-codes
03:02:33FromGitter<timotheecour> @leorize how many threads, and how many concurrent connections? I’d assume you should start seeing some advantage over threads for n > threshold
03:02:46FromDiscord<codic> Combined with something like this for impelmenting getch? https://gist.github.com/def-/58c3374c23f120e31872
03:03:13FromDiscord<Rika> you just found how to make the terminal raw
03:03:23FromDiscord<codic> oh
03:03:58FromDiscord<Rika> make sure to copy the whole functions, if you dont, you might fuck up someone's console
03:04:42FromDiscord<codic> Does nim have something like pass?
03:04:58FromDiscord<codic> So i could do something like `if condition: pass` and that will just do absolutely nothing if condition is there
03:05:08FromDiscord<Rika> discard
03:05:22disruptekWHERE ARE THE GOATS
03:05:22FromDiscord<Rika> you can have a bare discard and itll act like pass
03:05:35FromDiscord<Rika> did you check up your ass?
03:05:41FromDiscord<codic> sent a code paste, see http://ix.io/2m5f
03:05:48FromDiscord<Rika> you definitely can
03:05:50FromDiscord<codic> and keep doing the ch thing for each character
03:05:52FromDiscord<codic> > did you check up your ass?
03:05:53FromDiscord<codic> lmao
03:05:53FromDiscord<Rika> except
03:05:59FromDiscord<Rika> ch is not all characters
03:06:02FromDiscord<Rika> its just one
03:06:05FromDiscord<codic> yeah
03:06:08FromDiscord<codic> But i could do
03:06:24FromDiscord<Rika> so that would be first "\e" then "[" then "[" then "A" or "D"
03:06:25*zacharycarter joined #nim
03:07:42FromDiscord<codic> Oh↵`for t in "^[[A]".split(""): if ch == t: discard`
03:07:57FromDiscord<codic> but the problem with that is that i am fine with `[` or `A`/`D` or `]`
03:07:57FromDiscord<Rika> what
03:08:11FromDiscord<codic> so that'd discard those as well, preventing input
03:08:12FromDiscord<codic> hm
03:08:21FromDiscord<Rika> https://nim-lang.org/docs/terminal.html#cursorForward%2CFile%2Cint
03:08:31FromDiscord<Rika> i know what you were gonna ask
03:08:46FromDiscord<codic> frick me
03:08:51FromDiscord<codic> Well
03:08:57FromDiscord<codic> Anyways, the problem is the char by char thing
03:09:14FromDiscord<codic> So if someone said `An idiot, indeed` for example, the `A` would get cut out
03:09:21FromDiscord<codic> and get replaced by the cursor moving backwards
03:10:02FromDiscord<Rika> https://github.com/de-odex/linenoise-nim/blob/master/src/linenoise.nim#L599
03:10:46*zacharycarter quit (Ping timeout: 260 seconds)
03:10:58FromDiscord<codic> o
03:11:12FromDiscord<codic> linenoise, wonder what that even is
03:11:17*gonger quit (Remote host closed the connection)
03:11:35FromDiscord<Rika> https://github.com/antirez/linenoise
03:11:42*gonger joined #nim
03:11:55FromDiscord<codic> ah
03:12:19FromDiscord<codic> aanyways i see a lot of `of *n*.char` but no `of FORWARD.char` or similar. :|
03:12:42FromDiscord<Rika> dude
03:13:09FromDiscord<Rika> https://github.com/de-odex/linenoise-nim/blob/master/src/linenoise.nim#L651-L671
03:13:17FromDiscord<Rika> there is no FORWARD character
03:13:31FromDiscord<Rika> its a sequence of characters, so you need to handle that differently
03:13:38disruptekleorize: this is where i am on the mangle fiasco: http://ix.io/2m5g/c
03:13:58*gonger is now known as burgor
03:13:59FromDiscord<codic> Ahhhhhhhhhhhh
03:14:01FromDiscord<codic> Thank you!
03:14:10FromDiscord<codic> That should prove quite useful..
03:15:02FromDiscord<Rika> read the code 😛
03:15:21FromDiscord<Rika> there are comments (not by me, by the original linenoise author) so it should be easier
03:15:49*zacharycarter joined #nim
03:20:37*zacharycarter quit (Ping timeout: 264 seconds)
03:23:49FromDiscord<codic> you are the author of the nim linenoise?
03:31:53FromDiscord<Rika> uh, translator
03:31:54FromDiscord<Rika> yes
03:42:15*Trustable quit (Remote host closed the connection)
03:42:39*elijahr quit (Quit: Textual IRC Client: www.textualapp.com)
03:44:03*waleee-cl quit (Quit: Connection closed for inactivity)
03:44:27*nekits6 quit (Read error: Connection reset by peer)
03:44:55*nekits joined #nim
03:47:22*pbb quit (Remote host closed the connection)
03:48:57*pbb joined #nim
03:48:57*pbb quit (Client Quit)
03:50:52*zacharycarter joined #nim
03:52:01*pbb joined #nim
03:55:02leorize[m]@timotheecour: 100 concurrent connections spanned over an equal amount of threads
03:55:07leorize[m]one thread per connection
03:55:15*zacharycarter quit (Ping timeout: 260 seconds)
03:55:23leorize[m]this is an issue within Haiku itself
03:55:50leorize[m]a ton of lock contention in the kernel for every select/poll/wait_for_object :p
03:57:21*solitudesf joined #nim
04:02:18*rockcavera quit (Remote host closed the connection)
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:44*supakeen joined #nim
04:09:40*ptdel joined #nim
04:46:24FromDiscord<FromIRC> Uptime - 1 day, 14 hours, 23 minutes, 12 seconds, 808 milliseconds, 963 microseconds, and 105 nanoseconds
04:46:24FromDiscord<Yardanico> !status
04:48:20*ptdel quit (Remote host closed the connection)
04:58:23PrestigeDoes the bot keep crashing or something @Yardanico?
04:59:41FromDiscord<Rika> no hes just checking
05:03:27leorizeit has been up since yesterday and nothing is crashing :)
05:10:12Prestigenice
05:23:48*mwbrown quit (Ping timeout: 256 seconds)
05:34:32*narimiran joined #nim
05:40:12FromGitter<Willyboar> Good morning
06:22:06*mwbrown joined #nim
06:29:14FromDiscord<Yardanico> You too
06:31:48*silvernode joined #nim
06:32:02silvernodeGood morning
06:34:21silvernodeI decided to take a break on my space game. I was thinking inside of a box which made progress difficult. Now I am working on a package manager wrapper to help me learn Nim in a different way. Working with command line arguments, reading files, etc.
06:36:10silvernodeI am looking to find out what documentation to read about taking cmdLine arguments. Basically I want: ./myProg -i tmux , which would install tmux.
06:38:19Yardanicosilvernode: if you're fine with third-party dependencies, use cligen :)
06:38:39Yardanicoif not, use https://nim-lang.org/docs/parseopt.html
06:38:58silvernodeYardanico: I am fine with third party deps but only as a last resort.
06:39:23silvernodelol I was going to ask about parseopt, I had that in my clipboard ready to be linked here
06:39:42FromGitter<Willyboar> there is also https://github.com/docopt/docopt.nim
06:39:42silvernodeSeems like it is a good starting point. I am just trying to understand what the docs are telling me
06:39:51Yardanico@Willyboard it's a third party dep too :)
06:40:04FromGitter<Willyboar> yeap but is an option :P
06:40:14Yardanicoand it wasn't updated in 1 year
06:40:28Yardanicosilvernode: you need to have your own config object where you store the values you got from the parseopt iterator
06:40:32Yardanicogetopt I mean, it's the simplest way
06:41:05silvernodeYardanico: Sounds complicated, ha
06:41:09Yardanicowell it's not :)
06:41:21silvernodeI always have problems like this in programming where I don't understand simple stuff
06:41:23Yardanicoif that's complicated for you, use cligen :P
06:41:55silvernodeI always go for the complicated way since I feel like there is more value in learning that way
06:41:56FromGitter<Willyboar> cligen is powerfull but for me is pain in the a**
06:42:05supakeenI think this `pty.nim` I'm writing might be a future PR for stdlib.
06:42:12supakeenIf I get my shit in order.
06:42:14Yardanicosupakeen: to the fusion you mean
06:42:23Yardanicohttps://github.com/nim-lang/fusion :P
06:42:23supakeenThe fusion?
06:42:45supakeenOh that's nice, is stdlib being split out from the language?
06:43:00Yardanicofusion is something like an extended stdlib
06:43:03Yardanicoextended distribution
06:43:04supakeenAh.
06:43:13Yardanicobut some libs might move from stdlib to it
06:43:15*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:43:17Yardanicolikt htmlparser already did
06:43:20supakeenThat sounds like a good plan.
06:43:27Yardanico(it's still in stdlib, but it's also in fusion)
06:43:34supakeenI'd love it if stdlib can grow separately from nim.
06:43:46*silvernode joined #nim
06:43:54supakeen(I'd also prefer if all stdlib lives in std/* but that's probably just me)
06:44:13supakeen(Perhaps changing import to first look in std/*).
06:44:36Yardanicosupakeen: well you can already use "std" for almost all packages
06:44:37FromGitter<nothratal> is there a difference in calling echo in this two versions? ⏎ ⏎ ```let x = 3 ⏎ ⏎ echo "x=" & $x ⏎ echo "x=", x``` ⏎ ⏎ I mean performance-wise for example [https://gitter.im/nim-lang/Nim?at=5ebe3a5528b53131490859a5]
06:44:39Yardanicoor for all
06:44:39*ryan_ joined #nim
06:45:37Yardanico@nothratal well if you really care about performance use stdout.write :)
06:45:43Yardanicoecho flushes stdout after each write
06:46:10FromDiscord<Rika> afaik no
06:46:13Yardanicoand between these two versions I don't think there'd be a lot of difference, echo basically outputs all arguments it was given
06:46:18Yardanico@Rika ? echo does
06:46:22FromDiscord<Rika> i mean
06:46:24FromDiscord<Rika> not to you
06:46:26FromDiscord<Rika> to noth
06:46:42FromGitter<nothratal> @Yardanico that
06:46:52supakeenYardanico: Anyways I'd love the idea of keeping `std/*` the smallest it can possibly be with non-changing things in there (such as encoding, hashing, perhaps some data structures) and having fusion take care of changing things such as http servers and html parsing indeed.
06:47:10Yardanicowell fusion is immutable though
06:47:17Yardanicoin the sense that packages won't get removed from it
06:47:19Yardanicofor backwards compat
06:47:22FromDiscord<Rika> what does that mean
06:47:23FromDiscord<Rika> ah i see
06:47:24*burgor quit (Ping timeout: 265 seconds)
06:47:28supakeenPerhaps it's even possible to describe the std/* APIs and be able to select which stdlib to use when installing but eh that's probably too much.
06:47:38Yardanicoand if you do breaking changes to the package you'll add it as "packagename2" to fusion
06:47:41FromDiscord<Rika> thats too much lmao]
06:47:42supakeenYardanico: Of course, but it allows for more rapid changes than having to wait for a new nim release.
06:47:49supakeenI'll read up on it nonetheless.
06:48:01Yardanicosupakeen: well yeah that's true, it's supposed to just be a nimble package
06:48:05FromDiscord<Rika> i'm not sure if i like the packagename2 thing
06:48:16supakeenAnyways, writing my pty wrapper has been fun some more work on compatibility and testing to be done.
06:48:18*PMunch joined #nim
06:48:30supakeenLearning this {.importc.} stuff.
06:48:52FromDiscord<Rika> @nothratal, echo uses $ on any argument that is not a string, not sure if the concat. operator is used but that's minor compared to the dollar operator
06:49:18Yardanicowell it uses $ on string too, but $ on string is a no-op anyway :)
06:49:24YardanicoI don't think it uses & though
06:49:28Yardanicolemme check in the compiler
06:49:47FromDiscord<Rika> it probably just does a stdout.write for each
06:49:54FromDiscord<Rika> which *might* be faster? dunno
06:51:55Araqit used to make a big difference but with arc it doesn't
06:52:26Araqbut it doesn't use & so that the file's buffering mechanism gets to do the work
06:52:43*silvernode quit (Ping timeout: 265 seconds)
06:53:01Araqin theory that's better because a file buffer should know best when to flush
07:02:14*dadada quit (Ping timeout: 240 seconds)
07:26:31*AshlyeGraam joined #nim
07:34:08*AshlyeGraam quit (Ping timeout: 256 seconds)
07:36:40*gokr joined #nim
07:43:23*Trustable joined #nim
07:49:03*liblq-dev joined #nim
07:50:53*Trustable quit (Remote host closed the connection)
08:03:23FromGitter<nothratal> @all thanks for the clarification!
08:03:44FromDiscord<Rika> rest in peace the random guy pinged in discord
08:03:53FromDiscord<Rika> yardanico: did you look into this bug?
08:07:42*zacharycarter joined #nim
08:08:25FromGitter<bung87> distinct string `.string` using same pointer?
08:12:23*zacharycarter quit (Ping timeout: 260 seconds)
08:12:30FromGitter<alehander92> @bung87 hmmm! translating typescript async to other async?
08:12:52FromGitter<nothratal> as I read from the documentation: *.cfg-files for configuration should not used anymore, instead I should use nimscript. The documentation mentoins in which order the *.nims are loaded and overwritten. I also read that the *.nimble-file is a nimscript file. So if I build via nimble, is the order of loading *.nims the same? Can I still overwrite parts of the *.nimble with other *.nims?
08:12:55alehander92morniing
08:13:18FromGitter<bung87> @alehander92 I can't recall, you are replying to what?
08:14:20alehander92<3
08:14:25alehander92sorry! to async missing
08:14:28FromGitter<bung87> I checked a issue related to asyncjs ,found replaceReturn recursively
08:14:29alehander92question
08:14:34alehander92but i wonder if its going well
08:14:41alehander92is it breaking
08:15:03FromGitter<bung87> it will replace inner block result
08:15:26alehander92yeah
08:15:34alehander92and i think it might break some templates
08:15:47alehander92but this *might be* a fundamental problem with async i think
08:16:10alehander92sorry, i lied
08:16:15alehander92replacing block returns should be fixable
08:16:19FromGitter<bung87> and then I check `asyncmacro` it using more complixy logic to find the return statement.
08:17:00FromGitter<bung87> so current approach will not work as expected.
08:18:12alehander92you're right !!!
08:18:23alehander92they should probably share that approach
08:18:40alehander92i'll take a look when i have time for that
08:18:58FromGitter<bung87> yeah, maybe just replace some ident share same logic.
08:19:21alehander92yeah
08:19:25alehander92but this approach with replacing
08:19:38alehander92still has one problem
08:19:44alehander92it's great for 95% of cases
08:19:50alehander92but in macro/templates generation
08:20:01alehander92you get new `return` which is not replaced
08:20:06*fredrikhr joined #nim
08:20:18alehander92so that's why `template return` sounds like a cool idea
08:20:24FromGitter<bung87> any statements has nested block will not work...
08:20:24alehander92even if probably too radical
08:21:30FromGitter<bung87> ok, now I move to db issues
08:21:55alehander92yeah, this is probably true
08:22:00alehander92but what i am saying is
08:22:03alehander92even with asyncmacro
08:22:09alehander92we still have one more case to handle
08:22:22alehander92which cant be solved with asyncjs or asyncmacro approach
08:24:04FromGitter<bung87> oh, I got it
08:25:24alehander92because asynmacro seems to add
08:26:14alehander92`retFutureSym`.complete
08:26:32alehander92so if a macro adds a `return`, it doesnt properly add the completion call
08:26:41alehander92maybe we can add `areturn`
08:26:43alehander92for macros
08:26:50alehander92so they can make the right thing
08:27:04alehander92areturn would invoke a template which expands to the complete + return
08:27:46PMunchnothratal, the nims/cfg files are compiler options. The .nimble file is a project description. Typically you wouldn't really mix the two and have one project.nims and one project.nimble file in your project
08:28:55*dadada joined #nim
08:29:18*dadada is now known as Guest18967
08:31:06PMunchHmm, had an idea yesterday as I was walking the dog by the way. I'm considering to add support in nimlsp for specifying extra syntax rules for nimscript files.
08:31:53FromGitter<bung87> @alehander92 so, alleast we can solve asyncjs problem first , then handle another problem..
08:32:57*Guest18967 is now known as dadada
08:33:04PMunchMy Vim install recognises .nimble files as Nim (probably to get syntax highlighting), but this also starts NimLSP for the file. So when I save the file NimLSP will tell be that it's full of errors, because it doesn't know about the stuff that gets appended to the script before it's run and the defines that are set.
08:33:05dadadaany inbuilt procs for finding out the OS name and maybe some other general information about the users system?
08:33:11dadadaie. to detect that I'm running Fedora
08:33:15dadadaor at least which Linux kernel
08:33:26PMunchMaybe something in here: https://nim-lang.org/docs/distros.html
08:33:50*konvertex joined #nim
08:33:53PMunchdadada ^
08:34:08dadadaPMunch: looks very basic, but it's something! thanks
08:34:27FromDiscord<Elegant Beef> Is it possible to get a typedesc's field names and types?
08:34:53PMunchSo the idea is to have a way to tell NimLSP how to modify the file before it passes it to nimsuggest, and to be able to define flags
08:34:56FromDiscord<Elegant Beef> Guess should mention this is for macro
08:35:03PMunch@Elegant Beef, should be possible with getImpl
08:35:40FromDiscord<Elegant Beef> ah so nim node parsing 😄
08:36:45FromDiscord<Elegant Beef> This is perfect though so thanks! 😄
08:36:54PMunchYes https://play.nim-lang.org/#ix=2m5T
08:37:06PMunchJust be aware of distinct types
08:37:16FromDiscord<Elegant Beef> Huh?
08:37:51PMunchhttps://play.nim-lang.org/#ix=2m5V
08:38:43FromDiscord<Elegant Beef> Ah i see
08:38:53PMunchSo you need an extra call: https://play.nim-lang.org/#ix=2m5W
08:40:33FromGitter<bung87> "The application must finalize every prepared statement in order to avoid resource leaks", so what's the meanning of prepare? if it could not be resued?
08:40:46FromGitter<bung87> https://sqlite.org/c3ref/finalize.html
08:41:07PMunchYou can prepare a statement and then call it multiple times
08:42:00PMunchPreparing the statement probably runs the query optimiser and creates an efficient binary representation of your query. Then you can call this many times with little overhead
08:42:04FromGitter<bung87> also make sure it finalize in the end?
08:42:20PMunchAnd finalize them at the end of your program to free up the memory it uses
08:42:22PMunchI assume
08:43:17FromGitter<bung87> so when I provide such a api, then end developer must call finalize himself, as I dont know when it not be used
08:43:26PMunchYes
08:43:38PMunchMost likely
08:43:49PMunchAlthough you could try to use finalisers
08:44:55FromDiscord<Elegant Beef> Is there a way to only accept Objects?
08:45:29FromGitter<bung87> ok , thanks !
08:46:45FromDiscord<Rika> beef, ???
08:46:47FromDiscord<Rika> what do you mean
08:47:02FromDiscord<Elegant Beef> Only accept object types
08:47:21FromDiscord<Elegant Beef> in a proc
08:48:05alehander92bung87 yes, right! but i cant now
08:48:08alehander92ill do it later
08:48:24FromDiscord<Rika> https://play.nim-lang.org/#ix=2m5X @Elegant Beef this?
08:48:49FromDiscord<Elegant Beef> That was simpler than i though
08:48:51FromDiscord<Elegant Beef> I feel daft
08:49:19FromDiscord<Rika> xd
08:49:29FromDiscord<Elegant Beef> That takes an instantiated object
08:49:36FromDiscord<Elegant Beef> I mean a Object Type
08:49:43PMunchHmm, I don't think so
08:49:47FromDiscord<Elegant Beef> Ah
08:49:51PMunchBecause what you're actually getting is a symbol
08:50:02FromDiscord<Rika> https://play.nim-lang.org/#ix=2m5Y xdddd @Elegant Beef
08:50:21FromDiscord<Rika> now the proc is compile time though
08:50:22PMunch@Rika, that works?
08:50:29FromDiscord<Rika> try running it
08:50:32PMunchHe's using it for a macro
08:50:37FromDiscord<Rika> run it
08:50:51PMunchHuh
08:50:56PMunchWell I'll be damned
08:51:13FromDiscord<Elegant Beef> Damn thanks rika
08:51:17FromDiscord<Rika> xd
08:51:28FromDiscord<Rika> compile time only of course
08:51:34FromDiscord<Elegant Beef> Well macro means it's fine
08:51:41FromDiscord<Elegant Beef> Bit issue is distinc objects
08:51:46FromDiscord<Rika> nim generics are intense
08:51:48FromDiscord<Elegant Beef> big issue distincs*
08:51:53FromDiscord<Elegant Beef> Holy shit
08:51:55FromDiscord<Elegant Beef> I cant spell at 3am
08:52:18FromDiscord<Elegant Beef> Cause i can do ` | distinct` but it's going to accept any i assume
08:52:32FromDiscord<Elegant Beef> So guess i just check the syms
08:52:43FromDiscord<Rika> https://play.nim-lang.org/#ix=2m5Z
08:52:48FromDiscord<Rika> xdddddddddddd
08:53:03FromDiscord<Rika> object doesnt accept distinct
08:53:12FromDiscord<Elegant Beef> What?
08:53:34FromDiscord<Rika> typedesc[object] wont accept a typedesc if it's a distinct int
08:53:45FromDiscord<Elegant Beef> But your example just did
08:53:47FromDiscord<Rika> so you add the or distinct
08:53:53FromDiscord<Rika> read the signature
08:53:57FromDiscord<Elegant Beef> Yea line 11
08:54:02FromDiscord<Elegant Beef> I dont want ints to be accepted
08:54:05PMunchBut then it accepts any distinct type :P
08:54:06FromDiscord<Rika> and it doesnt
08:54:14FromDiscord<Rika> i dont understand what you want
08:54:15FromDiscord<Elegant Beef> ent gets accepted
08:54:28PMunchHe wants typedesc[object or distinct[object]]
08:54:32FromDiscord<Rika> if you dont want ent then remove the `or distinct` in l6
08:54:37FromDiscord<Rika> ah
08:54:41FromDiscord<Rika> then do that
08:54:51FromDiscord<Elegant Beef> Well i mean if i knew to do that i wouldnt have asked 😛
08:55:12PMunch@Rika, that doesn't work :P
08:55:36FromDiscord<Rika> im testing out
08:55:48FromDiscord<Rika> i dont think its possible xd
08:56:09FromDiscord<Rika> one moment
08:56:10PMunchMe neither
08:56:26PMunchMaybe with a concept :P
08:56:30FromDiscord<Elegant Beef> I can always just exit and complain
08:56:32FromDiscord<Rika> nothing i try works xd
08:56:47FromDiscord<Elegant Beef> Or not support distincts
08:57:05FromDiscord<Rika> just read the string and check if the type is a primitive (given an array of them xd)
08:57:12PMunch@Elegant beef, just an assert is probably fine
08:57:17FromDiscord<Rika> the name of the type as a string, i mean
08:57:29PMunchWhen compiling a macro it's all compile-time anyways
08:57:41FromGitter<bung87> during exec prepared when error occurs should I finalize it?
08:57:54PMunchYou don't have to
08:57:56alehander92bless ya PMunch
08:58:03PMunchalehander92, huh?
08:58:05alehander92what do you need concepts for
08:58:08*bacterio joined #nim
08:58:16FromGitter<bung87> ok
08:58:34PMunchHaha, you don't. I was just trying to hint at a way it might be possible to do it :P
08:59:33FromDiscord<FromIRC> Uptime - 1 day, 18 hours, 36 minutes, 21 seconds, 20 milliseconds, 935 microseconds, and 540 nanoseconds
08:59:33FromDiscord<Yardanico> !status
09:00:47PMunch@bung87, look at preparing a statement as getting a closure. You call it with some parameters, then you can call this closure how many times you want, and when you're done with it you need to free it (this is done automatically by the GC in Nim, and is what I was talking about with finalisers)
09:01:06*couven92 joined #nim
09:01:37*fredrikhr quit (Disconnected by services)
09:01:42*couven92 is now known as fredrikhr
09:02:35*theelous3 joined #nim
09:02:55*fredrikhr quit (Read error: Connection reset by peer)
09:03:24*fredrikhr joined #nim
09:20:53FromGitter<bung87> but gc doesnot automaticlly call finalise
09:21:04PMunchYes it does
09:21:30PMunchWhet the memory is reclaimed
09:21:52FromGitter<bung87> emm, so every db_* could make prepare proc closure?
09:23:00PMunchThey don't have to be closures, but yeah that should be possible
09:27:09FromGitter<bung87> ok, I just unify the apis for now, may have further work to do with it.
09:28:07*salewski joined #nim
09:29:23salewskiCan someone help him? https://github.com/StefanSalewski/gintro/issues/72
09:29:24disbotrunning example code gives me "cannot open file: gintro/gtk "
09:29:39FromGitter<bung87> how does gc know to call `finalise`, is `finalise` just wipe the memory?
09:30:38PMunchWhat do you mean how does it know?
09:30:45PMunchWhen you create the object you set the finaliser
09:31:04PMunchAnd then Nim stores that for when it frees the memory
09:31:22PMunchAnd calls it before actually calling free on the memory
09:31:27*salewski quit (Client Quit)
09:33:57FromGitter<bung87> I mean sqlite's c api `finalise`
09:35:33PMunchOh no, you would have to wrap it in a Nim object and create a Nim finaliser that calls the SQL finalise
09:36:08*Faulander joined #nim
09:36:37Faulanderhi guys, long time since i needed help. but now i struggle here: Error: unhandled exception: Failed to parse '2020-05-04T08:24:51+02:00' with format 'yyyy-MM-dd'. Parsing ended but there was still input remaining [TimeParseError]
09:37:31PMunchSeems obvious enough
09:37:42PMunchThe T08:24:51+02:00 part doesn't match your format
09:38:05Faulanderi don't get why fileInfo(file).lastWriteTime identifies itself as time, but delivers a complete datetime.
09:38:22PMunchWhat do you mean?
09:39:02FromGitter<bung87> oh Nim's finaliser, have not try use this feature.
09:40:02Faulanderproc parse(input, f: string; tz: Timezone = local(); loc: DateTimeLocale = DefaultLocale): DateTime
09:40:02Faulander first type mismatch at position: 1
09:40:02Faulander required type for input: string
09:40:02Faulander but expression 'lastModDate' is of type: Time ---- BUT if you echo it, it's a full datetime expression like the one i postet above
09:41:51PMunchAh, "Time" is a point in time
09:41:56PMunchIt includes the date
09:42:27Faulanderyes, i guessed so. but i cannot compare a datetime with that time
09:43:10Faulanderthat's why i tried to parse the "Time" into a datetime
09:43:10PMunchNo, for that you either need to convert the DateTime into a Time with toTime
09:43:20PMunchOr you need to create a DateTime object from the Time object
09:43:33Faulanderthe second one is ecactly what i tried
09:43:49PMunchProbably by creating a DateTime object initialised to the epoch and then adding the Time to it as a Duration
09:44:15Faulanderi will try to first aproach
09:44:36Faulanderjust convert the datetime to time with toTime
09:50:03PMunchHmm curious, I compiled my TinyWM with --gc:none, and --gc:arc
09:50:09PMunchThe --gc:arc version is smaller
09:56:45*dddddd joined #nim
09:56:56FromDiscord<kodkuce> @dom96 your nimbox too does not support true color right
10:02:24dom96don't remember
10:02:37*chemist69 quit (Ping timeout: 272 seconds)
10:03:34FromDiscord<kodkuce> .cache/nim/withTermbox_d/@m..@s..@[email protected]@[email protected]@snimbox.nim.c:13:10: fatal error: termbox.h: No such file or directory
10:03:36*chemist69 joined #nim
10:03:54FromDiscord<kodkuce> 😦
10:07:24FromDiscord<kodkuce> oh i needed termbox package on my system not nimble thingy
10:07:36*sunwukong joined #nim
10:12:02YardanicoPMunch: magic :P
10:12:10Yardanicoalso there's a few other things you can use to make your binary even smaller
10:12:28Yardanico--panics:on (defects will not be catchable), -d:noSignalHandlers (no default signal handlers obviously)
10:14:44Yardanicoof course -d:danger --opt:size
10:15:03Yardanicoalso --passC:"-flto" --passL:"-flto"
10:16:03PMunchlto made quite a big change
10:16:21PMunchpanics:on and noSignalHandlers didn't do much
10:16:31PMunchBut this is TinyWM, so not exactly the largest thing to begin with
10:16:44Yardanicoyou can also try adding --os:any -d:posix
10:16:57Yardanicoidk if it will compile then though
10:17:27PMunchHmm no: Error: system module needs: nimLoadLibrary
10:18:11Yardanicohmm lemme see
10:18:33Yardanicoalso try adding -d:linux
10:19:01PMunchSame error
10:19:26Yardanicoyou can try a crazy thing
10:19:28PMunchThe code by the way, if you want to try for yourself: http://ix.io/2m6k
10:19:30Yardanicoinclude system/dyncalls
10:19:43Yardanicohmm lemme try :)
10:22:00Yardanicowell I didn't have success with os any
10:22:04Yardanicobut it gets to 16kb (dynamically linked)
10:22:09Yardanico14392 bytes
10:22:32Yardanicoclang makes the binary 5kb smaller than GCC - with gcc it's 18584
10:22:36dadadahey
10:22:55dadadavscode was great for me at the beginning, but now with a lot of nimsources in my project it is becoming real slow
10:23:11dadadaseems like nimsuggest is the bottleneck a lot of the time
10:23:14Yardanicodadada: idk really, nim extension in vscode has been failing for me lately (I mean nimsuggest integration)
10:23:24PMunchYardanico, yeah I got 19K with GCC
10:23:27PMunchstripped of course
10:23:32YardanicoPMunch: with clang it's even smaller :)
10:23:51Yardanico"wc file" to count individual bytes, because "du -sh" can't always report properly
10:24:27Yardanicowhat's funny is that I get the exact same size wit arc and none
10:24:30Yardanicogc:arc and gc:none
10:24:49PMunch18576
10:24:50Yardanicobyte-to-byte similar
10:24:59YardanicoPMunch: nim c -d:danger --gc:arc --opt:size --cc:clang --passC:"-flto" --passL:"-flto" pafa.nim
10:25:05Yardanicoalthough I'm on clang 10
10:25:13Yardanicowith GCC 9.3
10:25:39Yardanicoah right I forgot panics and signal handlers
10:25:48PMunchWith --gc:none: 18496
10:25:57PMunchnim c -d:release -d:danger --gc:none --panics:on -d:noSignalHandlers --opt:size --passC:"-flto" --passL:"-flto" tinywm
10:25:59Yardanicoah nvm, even with panics and no signal handlers it's the same
10:26:10YardanicoPMunch: you don't need -d:release on the commandline anymore btw :)
10:26:13Yardanicoon nim 1.2.0 or higher
10:26:22PMunchWhat?
10:26:24Yardanico?
10:26:44Yardanicosee my forum post https://forum.nim-lang.org/t/5878
10:26:45Yardanicoand replies
10:26:46PMunch14472 with clang
10:27:05PMunchAh, danger implies release
10:27:15Yardanicoyeah, don't put danger or release in the config though
10:27:39Yardanicohttps://github.com/nim-lang/Nim/issues/14272 :P
10:27:41disbot-d:release -d:danger don't work as expected in user configs ; snippet at 12https://play.nim-lang.org/#ix=2leZ
10:28:03PMunchYeah I've noticed that
10:32:35*Vladar joined #nim
10:36:52FromDiscord<kodkuce> hmm @dom96 https://pastebin.com/bdV2vrxu is your termbox broken i dont detect any mouse events
10:37:39FromGitter<bung87> does the Nim repo ci check could be faster?
10:37:48Yardanicowell it was already optimized a lot
10:38:15Yardanicoyou have to understand it checks 5 different OSes (and both i386 and x86_64 on linux) and tests the whle Nim test suite and all important packages
10:38:47FromGitter<bung87> not as I expected, this is the slowest as I know..
10:42:06*ryan_ quit (Read error: Connection reset by peer)
10:46:57Yardanico@bung87 maybe it just hung up
10:47:05Yardanicoyou mean in https://github.com/nim-lang/Nim/pull/14356 ?
10:47:06disbotadd SqlPrepared api fix https://github.com/nim-lang/Nim/issues/13559
10:47:08Yardanicoah it only was opened 20 minutes ago
10:47:20Yardanicoit finishes in 30-50 minutes usually
10:47:56FromGitter<bung87> ok , that's sounds .. fine
10:48:04Yardanicowell you have to understand how many tests there are
10:48:34Yardanicoif you count with "cloc" (so lines of code without empty lines or comments), it's 100 thousand of lines of Nim code
10:48:36Yardanicoin "tests" directory
10:48:44FromGitter<bung87> yeah, I know it will test agains OSs, make it take longer
10:49:06*filcuc joined #nim
10:49:34Yardanicoit tests against Linux (i386 x86_64), macOS x86_64, Windows x86_64, NetBSD x86_64, OpenBSD x86_64
10:49:50Yardanico@Clyybber yay you managed to fix it?!
10:52:13*FromDiscord quit (Remote host closed the connection)
10:52:22*FromDiscord joined #nim
10:52:24Yardanicofoh no fromdiscord crashed
10:53:10FromDiscord<Rika> ??
10:53:13Yardanico?
10:53:26Yardanicoit autorestarts on crash anyway
10:53:33Yardanico9 seconds downtime
10:54:07dom96what error did it crash with?
10:54:18PMunchSo you've gotta be quick if you want to trash talk the Discord users?
10:54:26Yardanicoyep
10:54:36Yardanicodom96: I posted in offtopic, websocket closed and then dimscord got into infinite recursion for some reason
10:55:31*Trustable joined #nim
10:56:53*fredrikhr quit (Read error: Connection reset by peer)
10:57:23*fredrikhr joined #nim
10:57:23dom96cool, as long as it crashes and can restart that's perfect
10:57:30dom96NimBot has been running that way for years :D
10:58:00Yardanicodom96: one problem is that it's still not running on the nim vps because there's not enough memory to compile devel (yes I need it for some async pragma stuff to work properly)
10:58:11Yardanicoand cross-compilation kinda fails because it's ubuntu 16.04 and glibc 2.24
10:59:00YardanicoI'll try to cross-compile with zig (hehe)
10:59:10Yardanicoto target glibc 2.24
11:00:11dom96Yardanico, just need to enable swap
11:00:36Yardanicowell I don't have the privileges to do that :P
11:00:48dom96or yeah, you can cross compile
11:00:53dom96or use WSL? or a vm
11:00:59YardanicoI'm on Linux anyway
11:01:20Yardanicolet's see if it works
11:01:52dom96yeah, so just copy it to the VPS
11:02:05Yardanicowell I already do the same for my own VPS with scp
11:02:09Yardanicoso yeah, I'll try now
11:03:33Yardanicooh it actually seems to work lol
11:04:24Yardanicowill restart the bridge now
11:04:35*FromDiscord quit (Remote host closed the connection)
11:04:57*FromDiscord joined #nim
11:04:58Yardanicodone
11:05:05Yardanico@Yardanico 123
11:05:12Yardanicoyeah seems to work fine, all praise Zig /s
11:05:45YardanicoThat's the command I use to cross-compile btw https://github.com/Yardanico/ircord/blob/master/zig-compile-vps.sh
11:06:08Yardanico-O2 because it was crashing with SIGILL on the VPS without it
11:08:56Yardaniconot that it needs speed anyway, it typically uses 0-1% CPU anyway (as it should be, praise async)
11:12:52dom96if you're on linux then why do you need to cross compile?
11:12:59Yardanicodom96: my glibc is newer than on the VPS
11:13:05dom96ahh
11:13:32FromDiscord<kodkuce> i think i am tarded, duno how to get mouse event in this termbox
11:14:00FromDiscord<kodkuce> i even tryed adding nb.inputMode = inpMouse
11:14:04FromDiscord<kodkuce> but still nothing
11:19:35dom96Check out the source for my deauther
11:19:44dom96When I created it mouse input worked
11:21:17FromDiscord<kodkuce> lol
11:21:51FromDiscord<kodkuce> i am uber tard i was compiling old file and was whole time getting old output and was like wtf xD
11:25:26*Hideki_ joined #nim
11:30:05*Hideki_ quit (Ping timeout: 256 seconds)
11:31:37*hoijui joined #nim
11:36:06AraqYardanico, just compile on your VPS
11:36:17YardanicoAraq: my VPS is running arch linux :DD
11:36:30Yardanicobut it's fine, I cross-compiled and it runs on the nim vps now
11:37:21Araqbut thanks for reminding me why people care about cross-compiling. gosh, Linux is such a piece of ...
11:37:43*SvetaBilya joined #nim
11:37:58*filcuc quit (Remote host closed the connection)
11:37:58*abm joined #nim
11:38:32*dddddd quit (Ping timeout: 260 seconds)
11:39:57*filcuc joined #nim
11:40:39*dddddd joined #nim
11:41:02*SvetaBilya quit (Client Quit)
11:41:57PMunchHmm, not great: http://ix.io/2m6I
11:46:32*cgfuh joined #nim
11:49:32*sunwukong quit (Quit: Leaving)
11:59:08FromDiscord<Zed> how supported is nim on the pi?
12:01:13FromDiscord<Rika> why would it not be well supported
12:01:23FromDiscord<Rika> a raspberry pi runs linux does it not
12:01:27FromDiscord<Rika> ah well its arm
12:01:27Yardanicoit does
12:01:31Yardanicowell it works on arm
12:01:37FromDiscord<Rika> but it's still a valid c target yeah
12:01:38Yardanicothere are even nightly binary builds for arm/arm64
12:01:45FromDiscord<Zed> i installed nim on my pi and it was a 0.17 release or something
12:01:50Yardanicowell that's from repos
12:01:53FromDiscord<Rika> that's because you didnt use choosenim
12:01:54FromDiscord<Rika> xd
12:01:54Yardanicodownload from https://github.com/nim-lang/nightlies/releases
12:02:08Yardanicoif your distro is aarch64 (not the kernel, the DISTRO), use arm64
12:02:24Yardanicootherwise armv7
12:02:27FromDiscord<Zed> lol, well i guess ill be using nim lol
12:02:53Yardanicodownload this one, it's for 1.2 stable branch https://github.com/nim-lang/nightlies/releases/tag/2020-05-07-version-1-2-75abd4d
12:03:10Yardanicoyou still need to have a C compiler installed of course
12:03:29FromDiscord<Zed> awesome, will do
12:06:01*supakeen quit (Quit: WeeChat 1.9.1)
12:06:16*Hideki_ joined #nim
12:06:44*supakeen joined #nim
12:07:34*rockcavera joined #nim
12:09:56FromGitter<bung87> `PASS: PackageFileParsed C (1374.84 sec)` I have a suggestion , output the each package test time costs
12:10:14Yardanicothere is
12:11:01Yardanico"PASS: https://github.com/treeform/chroma C ( 5.76 sec) PASS: https://github.com/status-im/nim-chronicles C (33.80 sec)" etc
12:11:25Yardanicobtw "PASS: https://github.com/status-im/nim-bncurve C (609.08 sec)"
12:11:38YardanicoI know it takes so long because it runs some calculation heavy tests without -d:release or -d:danger
12:11:42Yardanicois that ok?
12:11:48Yardanico10 minutes for a single package :P
12:12:16Yardanico@bung87 PackageFileParsed is just the end result, it's a sum of all time spent on all packages, you have to see the messages before it
12:12:48FromGitter<bung87> oh , I didnot aware that
12:14:16FromGitter<bung87> almost each package less than 50s , did not aware it grow as that big number
12:15:05Yardanicohttps://github.com/nim-lang/Nim/pull/14358
12:15:07disbotUse `nimble test` for bncurve
12:15:08FromGitter<bung87> lemme take a look at https://github.com/status-im/nim-bncurve
12:15:18Yardanicoit's not bncurve's fault
12:15:28Yardanicosee my pr
12:15:47narimiranYardanico: so you want to replace one slow test with multiple tests (including that one)?
12:15:54Yardanicoit wasn't slow
12:16:00Yardanicowell it was because of no -d:release and stuff
12:16:12narimiranok, add `-d:release`
12:16:23Yardanicowhy not test the whole package?
12:16:32narimiranbecause it will become too slow
12:16:42narimiranlook at the whole file, it is not the only such example
12:16:53Yardanicoit'll still be quite fast, I checked locally too
12:17:12Yardanicothe only test in bncurve which takes a big amount of time is tvectors.nim
12:17:24Yardanicoall others are fast enough
12:17:27narimiranok
12:17:34narimiranwhat is the speedup?
12:18:01narimirancan you test also other slow packages to see if `-d:release` helps there?
12:18:05Yardanicoit should take around 6-10x less time to complete
12:18:06Yardaniconarimiran: ok
12:18:16narimiranif so, add it to the same PR
12:19:56FromGitter<bung87> why imptant package testing using custom command, instead of just using nimble test.
12:20:02Yardanicobecause not all packages have that
12:20:03narimirani just told you
12:20:09Yardanicoand even if they do, it can become too slow as narimiran said :)
12:20:25Yardanicowell nim-unicodedb takes a minute because it uses nimble test but runs tests without -d:release or -d:danger
12:21:05narimirando `nim c -d:release -r tests/tests`
12:21:17narimiranas that is (without release) what `nimble test` does for that package
12:21:24Yardanicoyeah I know, although maybe it's better to just PR upstream?
12:21:28FromGitter<bung87> but your pr just remove custom command...
12:21:38Yardanico@bung87 because it didn't have -d:release or -d:danger
12:21:42Yardanicoand their own nimble test task has that
12:22:02narimiranYardanico: this way it will be faster (to merge and reap the benefits)
12:22:06Yardanicoah okay
12:22:15FromGitter<bung87> ok,that's just important_packages.nim problem.
12:24:12FromGitter<bung87> wait and see how much time your pr reduce :P
12:24:26Yardanicoit'll reduce around 500 seconds for important packages 1
12:24:43narimiranthat's huge!
12:25:01FromGitter<bung87> thats life saving
12:25:10Yardaniconarimiran: that's my point, idk why no one noticed it :D
12:25:19narimiran@bung87 that's exaggeration
12:25:22Yardanicoa package taking 600 seconds to test
12:25:34FromGitter<bung87> hhh
12:25:41Yardanicohmm I guess it's better if I sort all package results by the time to easier see
12:25:55narimiranYardanico: i don't know either how i missed it, because i've spent some time in trying to make packages faster....
12:26:32FromGitter<bung87> atleast this problem should send a mail to core team.
12:26:51narimiran@bung87 what are you talking about? are you trolling?
12:27:28*Hideki_ quit (Ping timeout: 246 seconds)
12:27:58narimiranYardanico: here's a quick list of the slowest: nim-unicodedb, Prologue, nitter, nim_websitecreator, nim-chronos, nim-brainfuck, (bncurve), Arraymancer
12:28:08FromGitter<bung87> eg .mail content as "ci testing take so long about 30minutes"
12:28:19narimiranok, you're trolling
12:28:37alehander92eh, doesn't sounds insane
12:29:06alehander92but i think CI-s have time limits
12:29:07alehander92also
12:29:14dom96yeah, what, that doesn't sound like trolling to me
12:29:25narimiranbtw, the current bottleneck is testing windows build
12:29:28FromGitter<bung87> I dont meat to that
12:29:48narimiranit takes ~45 minutes, while others are in 25-30min range
12:30:07FromGitter<bung87> its almost like a web site log level warning, error
12:30:36narimiranbut we are aware of the usual times the CIs take. it's not like this was some sudden spike
12:31:06narimiranso: nothing unexpected happened here, just Yardanico realizing how to speed up one test
12:31:36Yardaniconarimiran: is brainfuck actually slow?
12:31:48Yardanicoah yeah seems so, hmm
12:31:51FromGitter<bung87> ok
12:32:16narimirani just opened one CI result and copied the slowest ones there. there's some noise in the result, but you already know that :)
12:32:40Yardaniconarimiran: the thing is - it takes 2ms to run on my PC :D
12:32:45YardanicoI mean the tests/compile.nim
12:32:50Yardaniconot 58 seconds
12:33:19narimirandoes `-d:release` help?
12:33:32Yardanicohelp with what? it's already 2ms
12:33:39narimiranoh, without it?
12:34:00Yardanicosame
12:34:06narimiranadd `-d:release` to your PR there, maybe it will help with CIs
12:34:09Yardanicoah ok
12:35:09narimiran(and try to push all the changes at once, not one by one - that will help CIs too :))
12:35:14Yardanicoah yeah ok, sorry
12:35:25YardanicoI will see where I else I can add -d:release
12:40:06Yardaniconarimiran: I made a short nim program to sort by time, https://gist.github.com/Yardanico/1d3db505ed9df79f03fdf96bef686a5d
12:40:10Yardanicothese are the ones which take more than 10s
12:41:51narimiran:)
12:41:54*filcuc quit (Ping timeout: 240 seconds)
12:42:29narimirannim program? real programmers would write vim macro to do that :D :P
12:42:35Yardanico:D
12:42:41Yardanicoand I wrote it in nano XD
12:44:36FromGitter<Vindaar> @Yardanico: damn, ggplotnim is way too fast. I think I need to include all recipes as tests :P
12:45:18*zacharycarter joined #nim
12:46:30Yardanicowe can't do anything about nitter btw, it actually takes that long to compile, but it's fine i guess
12:46:53*ftsf quit (Quit: Leaving)
12:52:00Yardaniconarimiran: I don't think I can change a lot of stuff, I also changed fidget, prologue, unicodeplus, can I push ? :P
12:52:08*filcuc joined #nim
12:53:14Yardanicohmm I will wait for important_packages to finish on my last commit
12:54:23narimiranyeah you can push, and i can cancel the CIs for the previous commit
12:55:47Yardanicoi don't like how you can't see github action CI logs until the task finished
12:56:01*dadada quit (Ping timeout: 264 seconds)
12:56:15narimirancan't you? i can
12:56:25Yardanicoit doesn't work for me for some reason :D
12:56:40Yardanicook it finished for ubuntu
12:57:08YardanicoI pushed
12:57:37Yardanicoyou can cancel all tests except important packages I guess
12:57:46*dadada joined #nim
12:58:04Yardanicowait fsck
12:58:10*dadada is now known as Guest67097
12:58:25YardanicoI forgot to git add fidget, now you can cancel :P
12:58:32YardanicoI don't think there are any more packages worth changing really
12:58:40*narimiran thumb up
12:59:37Yardanicoi didn't do any PRs (I mean merged) to nim repo in 2 years
12:59:42Yardanicoxd
12:59:52narimiranglad to have you back :)
13:01:20*waleee-cl joined #nim
13:05:30narimiranbtw, Yardanico, did you see i've sent you a PM? :)
13:09:31narimiran@Vindaar any chance you could push a new release of ggplotnim? i think our CIs pick the latest tagged version....
13:15:03FromGitter<Vindaar> oh, damn I forgot
13:15:04FromGitter<Vindaar> 1 min
13:17:59FromGitter<Vindaar> @narimiran done
13:18:04narimiranthanks!
13:33:02*Hideki joined #nim
13:33:18*Hideki quit (Remote host closed the connection)
13:33:55*Hideki joined #nim
13:34:18*Hideki is now known as Guest90512
13:34:58*Guest90512 quit (Remote host closed the connection)
13:45:29*Guest67097 quit (Ping timeout: 265 seconds)
13:49:04*zacharycarter quit (Ping timeout: 272 seconds)
13:49:55*zacharycarter joined #nim
13:54:41*dadada joined #nim
13:55:04*dadada is now known as Guest70849
13:58:16PMunchHmm, this gc_ms.nim crash is bothering me a bit..
13:58:35PMunchThis is with --gc:markandsweep by theway
14:02:37*filcuc quit (Ping timeout: 264 seconds)
14:05:22*Vladar quit (Quit: Leaving)
14:07:16PMunchHmm, just got my PR to Unbound merged
14:07:31PMunchSo soon I can move my Unbound Nim plugin to use the new master branch :)
14:09:46PMunchHmm, maybe I should try ARC/ORC. How confident are we that it will work? Push to prod ready?
14:09:53Yardanicokinda :D
14:09:58Yardanicoit'll be prod ready when ORC works with the compiler
14:10:01Yardanicothat's the goal
14:10:11Yardanicojust help test stuff with arc/orc and report bugs
14:10:26PMunchSo I shouldn't try to run our companies latest project with it then :P
14:10:37Yardanicobtw: nimlsp won't work with orc because nimsuggest doesn't really work with it rn (even if you insert all needed nosinks pragmas to callbacks)
14:10:41YardanicoI tried :)
14:10:55PMunchAh, good to know
14:19:26FromGitter<bung87> am thinking using multiple threads make the packages tests more faster?
14:19:44YardanicoCIs don't have a lot of cores
14:20:31FromGitter<bung87> ok, so that make just logically
14:20:33*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
14:21:39*NimBot joined #nim
14:26:54*sacredfrog joined #nim
14:27:23FromDiscord<kodkuce> can i use case statemnent to match 2 stuff with option to second stuff sometimes be anything like * it 🙂
14:27:38Yardanicocase statements are _not_ pattern matching raelly
14:27:40Yardanicoreally*
14:27:48Yardanicotry https://github.com/andreaferretti/patty or https://github.com/alehander92/gara
14:27:53Yardanicofor pattern matching
14:28:26FromDiscord<kodkuce> ye but its just a tuple
14:28:44FromDiscord<kodkuce> i can do case statment plus if in each row but that kinda beh too
14:28:51Yardanicoso use patty or gara
14:29:38PMunchAha, it seems like my fix might've worked after all
14:29:45PMunchI was just running the wrong docker container..
14:32:12*Hideki joined #nim
14:32:35*Hideki is now known as Guest48120
14:34:31*narimiran quit (Ping timeout: 246 seconds)
14:35:42*fredrikhr quit (Read error: Connection reset by peer)
14:36:12*fredrikhr joined #nim
14:39:24*fredrikhr quit (Remote host closed the connection)
14:39:44*fredrikhr joined #nim
14:43:38*Guest48120 quit (Remote host closed the connection)
14:47:31*letto joined #nim
14:49:03*sagax quit (Ping timeout: 260 seconds)
14:50:25*lritter joined #nim
14:55:37*exelotl joined #nim
14:57:50alehander92`case` can be extended in theory
14:57:54alehander92but i doubt it would happen
14:59:56*sagax joined #nim
15:00:09FromGitter<kaushalmodi> In unicode.nim, for many (not all) procs, I see these pragmas: ⏎ ⏎ ```proc isTitle*(c: Rune): bool {.rtl, extern: "nuc$1", procvar.} =``` ⏎ ⏎ 1) Why is the exported `isTitle` prefixed with "nuc" (what does that string mean?) ... [https://gitter.im/nim-lang/Nim?at=5ebeae7849a1b73184789027]
15:01:17Yardanico1) "nim unicode" I guess 2) procvar https://github.com/nim-lang/Nim/issues/2172 3) for nimrtl I guess :P
15:01:24FromGitter<kaushalmodi> Then for `isAlpha` proc, it has the `noSideEffect` pragma too: ⏎ ⏎ ```proc isAlpha*(s: string): bool {.noSideEffect, procvar, rtl, extern: "nuc$1Str".} =``` ⏎ ⏎ I am curious how to know when to use or not use such pragmas [https://gitter.im/nim-lang/Nim?at=5ebeaec4ecc55a312d050b7d]
15:01:40YardaniconoSideEffect is when you mark your proc as having no side effects
15:01:47Yardanicolike accessing global variables
15:03:20FromGitter<kaushalmodi> Yardanico: I understood that, but the adding of noSideEffect doesn't seem consistent
15:03:36FromGitter<kaushalmodi> e.g. the `isAlpha` for Rune doesn't have it, but the `isAlpha` for string has it
15:03:40Yardanicowell not everything is consistent :)
15:03:47Yardanicothey probably weren't created at the same time
15:03:49Yardanicocheck git blame
15:03:54FromGitter<kaushalmodi> hmm, ok
15:04:58FromGitter<kaushalmodi> Regarding procvar, then, it should be safe to just remove it from the unicode (and other) stdlibs?
15:05:00FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/issues/2172#issuecomment-383296306
15:05:07Yardanicoi don't know :P
15:05:08FromGitter<kaushalmodi> @Araq ^
15:05:44Yardanicowell there's only 21 usages of procvar in the whole repo
15:05:48FromGitter<kaushalmodi> I was going to start working on a small PR for that isTitle thing, but then I don't know which pragmas are needed vs not
15:05:50Yardanicoactually a bit less
15:05:59FromGitter<kaushalmodi> locally, that proc works fine without any pragmas
15:06:07*hoijui quit (Quit: Leaving)
15:06:31FromGitter<kaushalmodi> ref: https://github.com/nim-lang/Nim/issues/14348#issuecomment-628850897
15:07:17Yardanicowell one thing is that I think that this isTitle is not the most efficient version
15:07:51FromGitter<iffy> I'm getting `config.nims(16, 19) Error: undeclared identifier: 'absolutePath'` but I thought nimscript included the `os` module?
15:08:12Yardanicono, you need to import it
15:08:19Yardanicowell not really actually
15:08:24Yardanicoif you're on devel, update to latest devel
15:08:30Yardanicoit was removed and then added back because of backwards compat
15:08:33FromGitter<iffy> I'm on 1.0.6
15:08:40Yardanicowhy not 1.2? :)
15:08:41FromGitter<kaushalmodi> Yardanico: Oh well, I'll just drop that effort and add it to my notes.. may be my future self will need that
15:08:56Yardanicowell it's ok @kaushalmodi, I'm not the one who'll judge your PRs :)
15:09:13FromGitter<iffy> Because I'm in the middle of releasing stuff on 1.0.6 and didn't want to upgrade until I finished my other stuff
15:09:26FromGitter<iffy> Even importing os, it still fails
15:10:15FromGitter<bung87> @kaushalmodi I saw your comment, you code should break earlier when it false, and not split whole text
15:10:41FromGitter<bung87> other parts just fine
15:10:44FromGitter<kaushalmodi> @bung87 I did implement many return falses
15:10:56FromGitter<kaushalmodi> without splitting into words, I cannot tell if each word is a title
15:13:55FromGitter<bung87> ok
15:14:17FromGitter<kaushalmodi> @bung87 take this for example "This is a NOT a title"
15:14:50FromGitter<kaushalmodi> or even "This Is Not A title" <-- here isTitle will fail only at the last word
15:15:41FromGitter<bung87> I think you can make it faster
15:15:50FromGitter<kaushalmodi> I am happy to learn
15:15:59FromGitter<kaushalmodi> please comment with a faster version in that issue thread
15:17:07FromGitter<kaushalmodi> that makes me think.. do we have a profiling macro or something in stdlib?
15:17:35FromGitter<kaushalmodi> something like: ⏎ ⏎ ```timeIt: ⏎ # my code``` [https://gitter.im/nim-lang/Nim?at=5ebeb28e0e8a3131e4c2c953]
15:22:07FromGitter<iffy> Even on latest devel, absolutePath isn't defined in config.nims... is that expected?
15:22:21*letto quit (Quit: Konversation terminated!)
15:22:35FromGitter<iffy> (whether I `import os` or not)
15:23:33*dddddd quit (Remote host closed the connection)
15:23:40FromGitter<kaushalmodi> @iffy Related: https://github.com/nim-lang/Nim/issues/14142
15:25:04FromGitter<kaushalmodi> @iffy absolutePath is working for me in config.nims
15:25:12FromGitter<kaushalmodi> I am on latest devel
15:25:20FromGitter<kaushalmodi> @iffy How are you installing devel?
15:25:25FromGitter<iffy> choosenim
15:25:33FromGitter<kaushalmodi> do nim --version
15:25:40FromGitter<kaushalmodi> I bet it's still pointing to 1.2.x
15:25:43FromDiscord<kodkuce> hmm if i incres int bilion times will it crash cuz 32bit haas max value 2,147,483,647 or what
15:25:57Yardanicodepends on if you compile it with -d:danger or not
15:26:02FromGitter<iffy> oh, it's still pointing to 1.0.6... weird
15:26:19FromDiscord<kodkuce> am testing on nimble playground and it just goes up form 2,147,483,647 no error
15:26:31Yardanicohow are you testing?
15:26:34FromGitter<kaushalmodi> My travis started failing recently because of a change in "real" nim devel.. the choosenim installed devel was stale
15:26:35FromDiscord<kodkuce> meyeb wikipedia wrong adn 2,147,483,647 is not max
15:26:41FromGitter<kaushalmodi> so I stopped using choosenim on travis
15:26:54Yardanico"int" in nim is platform-dependent, and on playground it's 64-bit because it's a 64-bit docker image
15:27:04Yardanicoif you want to test for 32-bit int, use "int32"
15:27:17FromGitter<kaushalmodi> @iffy https://github.com/kaushalmodi/std_vector/commit/3f9cfbea5819a8d8095f59177e892b3dc5cdf9a9
15:27:25Yardanicowith -d:release you'll get "Error: unhandled exception: over- or underflow [OverflowDefect]"
15:27:39Yardanicowith -d:danger it'll run forever
15:27:56Yardanicobecause -d:danger disables range checks
15:28:03shashlick@kaushalmodi - consider using https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522 for travis
15:28:06Yardanico(it's called danger for a reason)
15:28:14FromDiscord<kodkuce> oh
15:28:24Yardanicoso as I said, playground is 64-bit
15:28:27FromDiscord<kodkuce> i thinked int was default 32 on evrtyhing
15:28:30Yardanicono
15:28:39Yardanicomax value of int64 is 9223372036854775807 btw
15:28:39FromDiscord<kodkuce> ok got it pls dont hurt me
15:29:02FromGitter<kaushalmodi> shashlick: Your gist also uses choosenim
15:29:13FromGitter<kaushalmodi> does that install the "real" devel version?
15:29:14shashlickya but it handles all the cases
15:29:23FromDiscord<kodkuce> Error: type mismatch: got <int64> but expected 'int'
15:29:28Yardanicoshow code
15:29:30FromDiscord<kodkuce> on nimplayground
15:29:41FromGitter<kaushalmodi> my issue was that choosenim was still installing 1.3.1 when the actual devel was on 1.3.3
15:29:43Yardanicothat usually happens when you're trying to add int64 to an int or something
15:29:49FromDiscord<kodkuce> didnet you say int is playtform specifc
15:29:49shashlickyou need to provide the --latest flag
15:29:58Yardanico@kodkuce it is, but show the code
15:30:09FromGitter<kaushalmodi> shashlick: ok
15:30:17shashlickhttps://github.com/dom96/choosenim/blob/master/changelog.markdown#060---06032020
15:30:37FromGitter<kaushalmodi> will update my travis soon, btw that gist should probably go to the Nim wiki
15:30:51FromDiscord<kodkuce> https://play.nim-lang.org/#ix=2m80
15:30:56shashlicki use it for all my projects and for choosenim and nimble as well
15:30:58FromDiscord<kodkuce> have to put int64
15:31:00shashlickdisruptek also uses
15:31:02FromDiscord<kodkuce> so it works
15:31:07Yardanico@kodkuce yes of course
15:31:18Yardanicobecause 9223372036854775807 won't fit in int32
15:31:19FromDiscord<kodkuce> but you say its platform dependant
15:31:22Yardanicoit is
15:31:29FromDiscord<kodkuce> but if i type just int
15:31:29Yardanicobut nim code is cross-platform and not arch-specific usually
15:31:37Yardanicoso you can't just make an "int" with "9223372036854775807"
15:31:39FromDiscord<kodkuce> shoudnet it bee int64 by default
15:31:40Yardanicobecause int might be 32-bit
15:31:46Yardanicoon 32-bit architectures
15:31:50Yardanicohence you have to specify int64 _explicitly_
15:31:56Yardanicoso it actually works on 32-bit architectures as well
15:32:43FromDiscord<kodkuce> so on 32bit arch if i put just int and rech 32bit max it will crash and if i do same on 64bit it will continue ?
15:32:52FromGitter<iffy> okay, latest nim lets me `import os` and use `absolutePath`
15:33:04Yardanico@kodkuce yes
15:33:20Yardanicoon 64-bit it'll continue until it hits 9223372036854775807
15:33:24dom96kodkuce: shashlick: IMO it's a very bad idea to be testing against a moving target like `devel`
15:34:48FromGitter<kaushalmodi> dom96: It helps catch stuff not caught by nim CI
15:35:10shashlicki have had no issues with chasing devel - i've opened several bugs because of it
15:35:13FromGitter<kaushalmodi> and also help update the packages in sync with devel as a lot of folks (at least I am) use just the devel version
15:35:20shashlickplus i'm writing libraries which need to run across the board
15:35:29shashlickfor a binary, yes it might be less useful
15:35:32FromDiscord<kodkuce> Yard good to know 🙂
15:35:43FromGitter<kaushalmodi> dom96: Also I need features from devel that are not in stable
15:35:49FromGitter<kaushalmodi> like the new `--backend` switch
15:36:14dom96If I'm someone creating PRs against your repo it will be pretty frustrating to get a CI failure because devel changes
15:36:16dom96*changed
15:36:36Yardanicowell it would be dumb to _only_ test against devel, yes
15:36:39dom96kaushalmodi: then you should depend on a commit hash
15:36:41Yardanicounless you actually use features which are only on devel
15:36:51shashlicki've been doing it for a few years now and only occasionally run into failures because devel was broken
15:37:04shashlicki want PR writers to know that their code caused a failure with devel
15:37:06dom96yes, occasional != never
15:37:07FromGitter<kaushalmodi> same here, devel is not "that breaking" for me
15:37:20FromGitter<kaushalmodi> more often, the stable lacks the stuff I like in devel
15:38:05dom96if you consciously want to do it then do it, but don't suggest it to other without a big warning
15:38:10dom96*others
15:38:22shashlickthe travis script i shared doesn't force you to
15:38:22dom96CI builds should be reproducible
15:38:41shashlickthe yml file is controlled by the user and that's where the versions to test are set
15:39:34shashlickwhat does devel have to do with reproducibility
15:39:57dom96everything? If I run the CI build today then I'll get whatever `devel` points to now
15:40:07dom96if I do it tomorrow then where it points to will change
15:40:20shashlickbut the whole point of CI is to test something specific
15:40:27shashlicki want to test my code with latest devel
15:40:37FromGitter<iffy> I run most of my packages against stable and devel, but only fail the build for failures on stable
15:41:10*tane joined #nim
15:41:27dom96iffy: that sounds like a good compromise
15:42:02disrupteki switched to devel ci on a separate branch recently.
15:42:08disruptekwe don't have enough stable releases, imo.
15:42:21FromGitter<iffy> hmm... at least I *thought* I did that. Now that I'm looking, I don't see that logic fork in there anymore
15:42:29FromGitter<kaushalmodi> I strive to have my stuff working for future stable, so I report a bug report if it's something that needs fixing in nim
15:43:28FromGitter<kaushalmodi> It's basically "playing catch-up vs being proactive"
15:44:08dom96The problem IMO is that you are conflating two different objectives under one CI
15:44:24dom96One objective is to test your package for bugs and issues.
15:44:27dom96The other is to test Nim
15:44:50FromGitter<kaushalmodi> exactly :)
15:45:17FromGitter<kaushalmodi> It's trivial to add devel to the testing
15:45:30disrupteknimph only builds with 1.0 but only runs against 1.3, where it runs excruciatingly slowly.
15:45:38disruptekwhat should i be using for ci?
15:45:39FromGitter<kaushalmodi> it stable fails, I fix my project. If devel breaks, I review the breaking commit and open an issue on nim
15:46:29dom96Yes, if you can get it so that PRs are not blocked by `devel` failing then I would be happy with it
15:46:43dom96But from what I can tell shashlick's config does not do that
15:46:54shashlickthe yml file is just an example like i said
15:46:56disruptekit does.
15:47:07shashlickit is the shell script that does all the work
15:47:12dom96It all comes down to me making a contribution to a project, if I open a PR I don't want to get false failures because devel has a bad day
15:47:35shashlicklike I said, it is extremely rare for me
15:49:20disruptekdom96: start with opening a pr.
15:49:28shashlickI agree that not everyone needs to sign up for devel testing but the fact is that marking the build as successful and ignoring devel failures only makes life harder when a new stable comes out
15:49:31disruptekthen we can talk about what a bad experience you've had.
15:51:32shashlickanyway, choosenim for example is still built and tested with 1.0.6
15:51:45dom96shashlick, I just think that a lot of people will not consider this and just blindly copy and paste that config, or maybe even worse "I want devel, I don't care about the stable versions, let me just remove the stable versions and use devel only"
15:52:06shashlickthat's fine since it is a binary release, but anyone wanting to making a PR now and tries 1.2.0 or devel might not have a good time
15:52:12disruptekyou're right, we should find a way to punish these assholes.
15:52:19dom96but yeah, in the grand scheme of things it probably doesn't matter much
15:52:26FromGitter<kaushalmodi> come on guys.. enough bike shedding
15:52:43disruptekbike shedding when we have no bikes is par for the nim course, dontcha know?
15:52:46shashlicki think devel has gotten a lot better at not breaking since the CI is not bypassed as much
15:52:58FromGitter<kaushalmodi> btw has anyone done something like this: https://gitter.im/nim-lang/Nim?at=5ebeb226eb9b6f3162250da6
15:53:27FromGitter<kaushalmodi> disruptek: I am thinking you would already have such a `timeIt:` like macro
15:53:42Yardanicohe has golden
15:53:45Yardanico!repo golden
15:53:46disrupteki cannot read gitter atm, but i am (nominally) maintaining criterion.
15:53:53FromGitter<kaushalmodi> yes, that's why I asked him
15:54:04disruptek!repo criterion
15:54:05disbothttps://github.com/LemonBoy/criterion.nim -- 9criterion.nim: 11Statistic-driven micro-benchmark framework 15 38⭐ 4🍴
15:54:21disruptekif that looks like what you want, open issues on my fork, please.
15:54:28FromGitter<kaushalmodi> sure
15:54:29FromGitter<kaushalmodi> thanks
15:54:30shashlickneed some ascii art for bikeshedding
15:54:46Yardanicoin IRC
15:54:48Yardanico10 lines
15:54:51shashlick@kaushalmodi - i made a timeit for nimterop testing
15:55:06FromGitter<kaushalmodi> really? same name? :)
15:55:15disruptek🚲🏠
15:55:19shashlickhttps://github.com/nimterop/nimterop/blob/master/tests/timeit.nim
15:55:33FromGitter<kaushalmodi> I want to get to testing the nimterop#head but my work stuff is close to a delivery
15:55:40shashlicksince the binary isn't available cross platform
15:55:55FromDiscord<Recruit_main707> this new bridge looks way better
15:55:56shashlickno rush - @jyapayne's fix is about to be merged
15:55:56dom96sooo what's everybody working on this fine weekend?
15:56:06shashlicki'm in the middle of adding var support
15:56:47disruptek~nimconf is missing a landing page for advertisement.
15:56:47disbotnimconf: 11missing a landing page for advertisement.
15:57:01dom96true
15:57:09dom96Anyone got good design skills?
15:57:29disruptek@willyboar
15:57:42*ptdel joined #nim
15:59:13*ptdel quit (Client Quit)
16:00:54shashlickI'm planning on making my conf detection in nimterop a module
16:01:07shashlickSo that others can use it
16:01:10*narimiran joined #nim
16:01:16shashlickAnyone invoking Nim will need it
16:02:45shashlickItching to work on c++ support in nimterop but trying to focus on stability, performance and bug fixes
16:13:35PMunchdom96, I'm working on embedding NimScript in projects, and writing an article or two about it
16:13:59dom96PMunch, cool
16:15:25PMunchOh yeah, we should have a landing page for NimConf
16:15:42PMunchWhat kind of technical solution are we using for it by the way?
16:16:20PMunchIf it's going to be one continuous stream with multiple people dropping in and out I think we should have some graphics to go with it as well
16:16:25disrupteki hope we use twitch. i will write some kinda chat/voip integration if so.
16:16:28PMunchFor stuff like when we are changing
16:17:03PMunchAnd will it only be presentations? QA session? Panel debate?
16:17:22dom96QA session would be cool
16:17:28PMunchYeah
16:17:38dom96We should create some sort of collaborative committee and invite anyone that wants to help organise IMO
16:17:51PMunchI mean I guess each presenter could do a QA after their talks
16:18:07PMunchI assumed something like that was already in place :P
16:18:10dom96yeah, but a QA session with various core devs/contributors could be cool too
16:18:28Yardanicoyou can have it in mumble almost every day :D
16:18:31PMunchYeah that's what I was thinking
16:18:37dom96narimiran, you around? Thoughts about above suggestion?
16:19:03PMunchYardanico, but this will be with video, and the questions will be more IDK condensed?
16:19:04narimirani like the suggestion :)
16:19:10PMunchWould be easier to watch afterwards
16:19:25PMunchInstead of listening to hundreds of hour of mumble recordings :P
16:20:05PMunchOh well, I need to jump in the shower
16:20:34dom96the question becomes, what platform to have the chat room for us on?
16:20:41dom96Discord? IRC? Telegram
16:23:06disruptektwitch already supports irc, and i'm sure there's a discord bridge, too.
16:23:38dom96I mean for our discussions
16:23:41Yardanicobut how you will organize different speakers? disruptek
16:23:44dom96around how to organise the conf
16:24:10FromGitter<kaushalmodi> dom96: there is github discussions
16:24:23dom96no... it needs to be real-time
16:24:31dom96and not so in the open
16:24:40FromGitter<kaushalmodi> Zoom video chat
16:24:45dom96unless anyone has any problems, I'll create a Discord channel
16:25:04disrupteki don't use discord, but go for it.
16:25:28dom96maybe Yardanico can set up a bridge :P
16:25:32Yardanicohaha
16:25:36YardanicoI will
16:25:44Yardanicoit's just a matter of adding 4 more lines to the config
16:28:16dom96okay, created #nimconf on Discord and IRC
16:28:28dom96anyone that is interested in helping organise, join
16:30:08*FromDiscord quit (Remote host closed the connection)
16:30:24*FromDiscord joined #nim
16:30:25Yardanicoadded it to the bridge, #nim-conf :P
16:34:52dom96no, #nimconf
16:34:58dom96I already registered it :P
16:36:16*liblq-dev quit (Ping timeout: 258 seconds)
16:37:27*FromDiscord quit (Remote host closed the connection)
16:37:40*FromDiscord joined #nim
16:38:10*liblq-dev joined #nim
16:38:18Araqomg, #nimconf, it's inconsistent with our other chanels, we will all gonna die
16:39:03FromDiscord<mratsim> please use #nim-conf :/
16:39:29Yardanico;(
16:40:54Araqlol
16:42:13dom96too late
16:42:19dom96it's #nimconf :P
16:42:38dom96It makes more sense too since we will refer to the Nim conference as NimConf
16:45:31*Vladar joined #nim
16:52:21Araqso ... I'm about to write an RFC that `==` for 'ref' should be deprecated. but before I do that I am asking for feedback here
16:53:03AraqNim almost got it right with 'isNil(x)' which is a very different operation from 'x == y'
16:53:16supakeen== for ref has weird semantics that you don't expect.
16:53:25supakeenIt could use a separate method or operator.
16:53:50Araqwell it has the usual refence equality semantics, Python does the same
16:53:56dom96keep `==` for refs and add `===` that has the same semantics as for non-refs j/k
16:53:58Araq*reference
16:54:25disruptekit's the source of the table/ref-key/hash bug, but i thought == nil became idiomatic kinda recently.
16:54:52Araqdisruptek, that is true but the problem is also that equality is hard.
16:55:20Araqwhenever I use '==' on refs inside the compiler, I'm conciously aware that it's really what I want
16:55:50Araqbut it's so dangerous that I don't want it as a default
16:55:54disruptekmaybe `is` becomes a runtime operator.
16:56:12AraqI'm not asking for a new operator
16:56:43supakeenSorry, that's what I meant you have to very clear that you're doing == on a ref.
16:56:56supakeenAnd if you're that clear on it, it's fine to use something more clear instead.
16:57:01disruptekhow does equality work on the ref, then?
16:57:13Araqdisruptek, it simply doesn't compile
16:57:22Araqyou need to introduce your own like
16:57:35Araqproc `==`(a, b: PSym): bool = refEquality(a, b)
16:58:15Araq(everything I said equally applies to .closure procs)
17:00:47disruptekso anyway, give me another operator.
17:01:00Araqfor what?
17:01:07disruptekrefEquality(a, b)
17:05:38*silvernode joined #nim
17:12:41*filcuc joined #nim
17:14:59wgetchis there a simpler way to convert a Table[A,B] to OrderedTable[A,B] without an explicit copy loop? (toOrderedTable expects a seq of tuple pairs, not a Table)
17:15:05*Guest70849 is now known as dadada
17:15:20dadadais there some way to force nim to rebuild everything?
17:15:26Yardanico-f
17:15:31dadadathanks
17:15:31Yardanicoor --forceBuild if you like longer names
17:18:02dadadahmm, still doesn't rebuild everything apparently, and now I'm just confused
17:18:15Yardaniconimterop?
17:18:43dadadano, my own application, it's probably some temp file stuff that's wrong
17:19:12*Trustable quit (Remote host closed the connection)
17:21:31FromDiscord<exelotl> What's wrong with == for ref?
17:22:00Araqhttps://github.com/nim-lang/RFCs/issues/224
17:23:14Araqwgetch, no and it'll always be slow. better start with an OrderedTable
17:23:26Araqexelotl: read my rfc
17:24:32leorizeis this gonna be expanded to ptr?
17:25:29AraqI dunno, 'ptr' is low level "I know what I'm doing"
17:25:37wgetchinteresting. thank you
17:26:05Araqleorize, but you can argue either way, I don't mind doing the same for 'ptr'
17:32:23*Hideki joined #nim
17:32:46*Hideki is now known as Guest12857
17:37:04*Guest12857 quit (Ping timeout: 272 seconds)
17:39:20*filcuc quit (Ping timeout: 256 seconds)
17:39:21FromGitter<Willyboar> @disruptek i am here
17:40:12FromGitter<Willyboar> I am away from pc for the weekend
17:41:03FromGitter<Willyboar> Only mobile.. do you want something?
17:43:17FromGitter<kaushalmodi> Araq: From an earlier discussion on gitter, I learned that the procvar pragma is relic of the past. Would it be safe to remove the procvar pragma use in these instances: http://ix.io/2m8K
17:43:28FromGitter<kaushalmodi> If they should not be removed, what does that pragma do?
17:44:45leorizeI think it's safe to remove them now
17:44:53leorizeyou can grep the compiler for procvar
17:45:15FromGitter<kaushalmodi> above: I grepped the whole repo.. but may be I should relax that regex in there
17:45:16leorizeif there's no more than just the code to recognize it, you can probably remove it
17:46:24FromGitter<kaushalmodi> In manual.rst, there is ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ebed57028b53131490a0586]
17:46:33FromGitter<kaushalmodi> but what does implying procvar mean :)
17:47:52FromGitter<kaushalmodi> in compiler/, I see `wProcVar` and `sfProcVar`, but I don't know the compiler code at all to make any sense out of those
17:48:20*PMunch quit (Quit: leaving)
17:50:28FromGitter<kaushalmodi> ok, I am not the first one to go down this rabbit hole :) https://github.com/nim-lang/Nim/issues/12975
17:55:54leorizeyou can remove the code
17:56:02leorizefrom what I'm seeing here sfProcVar is no-op
17:56:19leorizeie. no code check for it
17:57:40FromGitter<kaushalmodi> I'll send a PR to remove it from stdlib and tests. I am not comfortable touching compiler, etc
18:10:33disruptekfinally.
18:10:38disruptekstupid mesa.
18:11:49leorizegot your new gpu?
18:12:17disruptekhad upgraded mesa by a single 0.1.0 (one minor) and it broke.
18:12:28disrupteksemver for the mfw.
18:13:03leorizemesa don't use semver
18:13:03FromDiscord<kodkuce> there no add at pos for seq ?
18:13:13leorizeit's called `insert()`
18:15:04disruptekall the more reason to shit on semver.
18:15:13disrupteki'm the idiot for assuming it was a thing.
18:16:20dadadaif someone can make nimsuggest faster in vscode, you'll be kind of an idol for me
18:18:34leorizedisruptek's IC work when done might do just the trick
18:18:52disruptekhar har har
18:22:10dadadahow far is he/you!
18:22:16dadadainquiring minds want to know
18:24:17disruptek~stream
18:24:18disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
18:24:30disruptekcome watch the failures accumulate.
18:24:57*filcuc joined #nim
18:29:36FromGitter<bung87> dadada is it very slow?
18:32:54*solitudesf- joined #nim
18:35:37*solitudesf quit (Ping timeout: 264 seconds)
18:38:25*solitudesf- is now known as solitudesf
18:38:40exelotlif someone can make nimsuggest faster in vscode, you'll be kind of an idol for me
18:39:09exelotloops I didn't mean to copy that message >_<
18:39:52*jason joined #nim
18:40:15*jason is now known as Guest16294
18:40:31*Guest16294 is now known as jasonjones
18:42:00FromDiscord<exelotl> irc exelotl is not very competent...
18:45:53*jasonjones quit (Quit: Leaving)
18:54:24*Vladar quit (Remote host closed the connection)
18:55:05leorizelol
18:56:01*filcuc quit (Ping timeout: 264 seconds)
18:59:13*dddddd joined #nim
19:13:17*Jesin quit (Quit: Leaving)
19:19:00*Jesin joined #nim
19:23:03FromDiscord<kodkuce> is freenode down?
19:30:46Prestigenope
19:33:45*bok joined #nim
19:35:37bokHi, I am getting this error: "missing closing ' for character literal" despite the fact the I seem to have it? here is the line in quaestion: (left, right): '─',
19:37:14dom96is that utf-8?
19:37:21dom96you can't have utf 8 in a character literal
19:37:25bokah
19:37:35bokthat would be the issue
19:37:41bokthanks
19:49:39*filcuc joined #nim
19:56:35*hoijui joined #nim
20:09:09FromDiscord<kodkuce> progress on my tmux + Micro = vsmicro 🙂 https://media.discordapp.net/attachments/371759389889003532/710946895287287859/tmuxmicroALPHA.webm
20:09:23*opal quit (Ping timeout: 240 seconds)
20:09:51PrestigeNice @kodkuce
20:11:22FromDiscord<kodkuce> its still alpha like 0.001 version, and hopfully by end of summer micro will get lsp so should have autocomplete
20:11:54FromGitter<kaushalmodi> kodkuce: What are your demonstrating in that?
20:12:30FromGitter<kaushalmodi> Is that whole thing made in Nim? If so, what is the relationship between that and tmux?
20:13:31FromDiscord<kodkuce> nothing really just some junk ugly code, only thing i am atm writing in nim is that side << dir browser with option to send to tmux to open in tab of big pane
20:13:46*bebarker joined #nim
20:14:48FromDiscord<kodkuce> i am just gluing stuff, tough i would love to know how to make myself term editor, but anyway i like micro so am binding stuff together to make nice dev setup
20:14:59bebarkerWhat are the memory requirements of compiling nim and nim programs in general? Is it typically not a problem on the Raspberry Pi line of computers, for instance (1-4GB RAM)? I've used a few heavily typed languages (e.g. Haskell) that do not fare well on such platforms.
20:15:36*Trustable joined #nim
20:15:39FromDiscord<kodkuce> dont think its big but i am newb 🙂
20:16:03FromGitter<kaushalmodi> bebarker: I compiled few dummy programs using nim on my phone using Termux, but that's about it
20:16:11FromGitter<kaushalmodi> it all worked fine
20:16:21FromGitter<kaushalmodi> I know some folks here using nim on RPi too
20:16:22dom96bebarker, depends what you're compiling, if you want to compile the Nim compiler then you usually run out of ram on an RPI
20:17:08bebarkerdom96, ok, thanks - that's good info, though unfortunate. Still, we'll keep getting more RAM in future generations I imagine..
20:17:49Yardanicobebarker: you can always add swap
20:18:09*opal joined #nim
20:18:13Yardanicodom96: some rpi have 2gb or 4gb of ram
20:18:14bebarkerYeah, guess i'll give it a try on my pinebook pro
20:18:23Yardanicofor nim compiler ~1 gb is enough I think
20:18:23FromGitter<kaushalmodi> bebarker: you an try downloading pre compiled nim binaries for RPi (armv6 I believe?) from here: https://github.com/nim-lang/nightlies/releases/download/2020-05-15-version-1-2-d2d401c/nim-1.2.1-linux_armv6.tar.xz
20:18:34Yardanicoarmv7 will work as well
20:18:43Yardanicoor even arm64 if they have an arm64 distro
20:18:57FromGitter<kaushalmodi> ok, this link has all: https://github.com/nim-lang/nightlies/releases/tag/2020-05-15-version-1-2-d2d401c
20:18:58Yardanico(most rpi cpus are actually aarch64 - arm64, but official distro is armv7)
20:19:14bebarkermy experience with other languages is that certain libraries will stress the compiler/typechecker more than the compiler code itself (for self-hosted languages like Nim)
20:19:27Yardanicobebarker: yeah it's true for nim
20:19:29FromDiscord<Rika> huh?
20:19:39FromDiscord<Rika> i mean huh regards the distro thing
20:19:40Yardaniconim compiler doesn't make use of stuff like macros, generics, etc
20:19:48Yardanico@Rika don't ask me, ask the rpi guys
20:19:54*filcuc quit (Ping timeout: 240 seconds)
20:20:19bebarker@Rika yeah it is unfortunate :-( not sure what is up with that
20:20:30Yardanicoyou can use community distros
20:20:40bebarker(but the Pinebook Pro does have a 64bit os)
20:21:36bebarkerso assuming i make it past the first hurdle, any libraries that come to mind that might be particularly good examples of using a lot of memory to compile?
20:21:55Yardanicobebarker: I don't know of any libs which would actually use more memory than the compiler for compilation
20:22:03bebarkerOK
20:22:15Yardanicoyou also have to consider the C compilation step, it uses memory as well
20:22:32*silvernode quit (Ping timeout: 256 seconds)
20:25:46FromDiscord<Elegant Beef> So i do have to ask did someone already make a macro to automate constructor creation?
20:26:15FromDiscord<Elegant Beef> I mean i did it last night/today but just curious, as it was a nice macro learning but want to see if someone has a nicer version
20:26:28FromDiscord<Rika> wdym nicer tho
20:26:32FromDiscord<Elegant Beef> <https://github.com/beef331/constructor>
20:26:42FromDiscord<Elegant Beef> If you notice i use strings to specify the variables
20:27:34FromDiscord<Rika> i dont understand the usage
20:27:54FromDiscord<Rika> `bool indicates exporting` exporting what
20:28:07FromDiscord<Elegant Beef> exporting the created constructor proc
20:28:35FromGitter<kaushalmodi> Elegant Beef: how is it different from the default `foo = Foo()`
20:28:35FromDiscord<Elegant Beef> This creates a proc that takes those values that iuse in the next line and put them in `awesome` and `coolInt`
20:28:50FromDiscord<Elegant Beef> It doesnt used name params
20:28:52FromDiscord<Rika> you're required to pass in the variables or something
20:29:21FromDiscord<Rika> cant you do varargs[untyped]
20:29:57FromGitter<kaushalmodi> Elegant Beef: May be you need to update the README on what your package does or makes easier compared to the in built object construction
20:32:17FromGitter<kaushalmodi> start by why you would use the constructor package vs https://play.nim-lang.org/#ix=2m9P
20:40:42*hoijui quit (Quit: Leaving)
20:43:06FromGitter<iffy> Is there a way to add an additional config file to be read? A config file that's not in the normal places. Something like `nim c --config:path/to/my/config.nims thing.nim`
20:43:49FromDiscord<Elegant Beef> There i think it's better now
20:45:54Yardanico@iffy well I don't know about that, but nim also will try to read configs from ~/.config/nim/config.nims
20:45:59Yardanicoand ~/.config/nim/nim.cfg
20:47:00FromGitter<iffy> Right; my use case is: one of the libraries I'm using has a config.nims with several params (paths to static libraries to link in, --threads:on, etc...) and I'd like to use the existing file instead of duplicating it
20:47:23FromGitter<iffy> I don't want a global config change
20:50:35FromGitter<iffy> I suppose I could move the config.nims up to a shared-parent directory... though in this case that seems to broad of a change
20:50:47FromGitter<iffy> *too
20:53:06FromGitter<kaushalmodi> you can `include` the config file
20:53:27*xet7 quit (Quit: Leaving)
20:53:47FromGitter<kaushalmodi> I maintain my global config.nims file in a repo and then I git pull and include it in other project repos: https://github.com/kaushalmodi/std_vector/blob/master/config.nims
20:54:09FromGitter<kaushalmodi> that way, my global config is effective on travis too
20:55:52FromGitter<kaushalmodi> note that I need that git pull only on travis. Locally that global config lives in the usual ~/.config/nim/
20:58:07*clemens3 quit (Ping timeout: 246 seconds)
21:01:00*narimiran quit (Ping timeout: 272 seconds)
21:09:44*solitudesf quit (Quit: Leaving)
21:12:02FromGitter<bung87> `proc alloc*[T](self:typedesc[Buffer],size:int,fill = none(T)): Buffer =`
21:12:24FromGitter<bung87> I want do something like this , this not work
21:12:44Yardanicowhat exactly doesn't work there?
21:13:16FromGitter<bung87> none is proc T is generic
21:13:27FromGitter<bung87> `Error: cannot instantiate: 'T'`
21:14:42Yardanicobut how did you call it?
21:14:58Yardanicoyou should call it like alloc[int32](Buffer, 15)
21:14:58*filcuc joined #nim
21:16:50FromDiscord<Rika> you cant infer a generic from a default
21:16:53FromGitter<bung87> let me check
21:17:18FromDiscord<Rika> or rather that signature doesnt give any info
21:17:31FromDiscord<Rika> are you sure its not Buffer[T]?
21:18:04FromGitter<kaushalmodi> @bung87 hmm, this works: https://play.nim-lang.org/#ix=2m9Z
21:18:33FromGitter<bung87> give generic `first type mismatch at position: 2`
21:19:56*liblq-dev quit (Quit: WeeChat 2.8)
21:26:55FromGitter<bung87> so simple solution will not possible.
21:28:23*leorize quit (Ping timeout: 240 seconds)
21:34:40FromDiscord<KrispPurg> Yardanico, the infinite recursion will be fixed in the next few commits to devel, I'll either use an interval for 2 secs.
21:35:17Yardaniconice
21:36:00FromDiscord<KrispPurg> Also, @Technisha Circuit have you seen my message on github?
21:40:08FromGitter<Nickiel12> @Yardanico have you had a chance to look at why libvlc hasn't been working?
21:40:19Yardanicoi fixed it, on linux at least
21:40:20Yardanicoit works fine
21:40:33FromGitter<Nickiel12> 1) 1.0?
21:40:33Yardanicoyou need to maybe place libvlc.dll with all its dependencies in the same folder as the binary
21:40:58FromGitter<Nickiel12> ok, I will try that
21:41:21*exelotl quit (Remote host closed the connection)
21:42:01*exelotl joined #nim
21:42:01FromGitter<Nickiel12> I am still getting this error https://gist.github.com/Nickiel12/0b03ca834f2132a6f74afde08a162853
21:42:18Yardanicoah not 0.1.0
21:42:20Yardanicoinstall latest libvlc
21:42:28YardanicoI didn't tag it
21:42:52Yardanicoremove that 0.1.0 install and do nimble install libvlc@#master
21:43:59*exelotl quit (Client Quit)
21:44:19FromGitter<Nickiel12> same error
21:44:35*exelotl joined #nim
21:44:46Yardanicodid you remove .nimble\pkgs\libvlc-0.1.0\ folder?
21:44:49Yardanicoand then tried again?
21:44:56YardanicoI mean after installing newer libvlc
21:44:57FromGitter<Nickiel12> no, i will try
21:47:07*filcuc quit (Ping timeout: 246 seconds)
21:47:13FromGitter<Nickiel12> it had the same error, I have updated the gist with the output
21:47:28FromGitter<Nickiel12> do I need to update nimterop?
21:47:36Yardanicono i think I was using 0.5.2 just fine
21:47:58YardanicoI honestly don't have a lot of experience with nimterop and how to debug it, and I don't have a dev environment set up on windows :(
21:48:13FromGitter<Nickiel12> ok
21:48:33FromGitter<Nickiel12> you said to put the .dll with the binary, but it won't compile
21:48:52FromGitter<kaushalmodi> @Nickiel12 You can ask the nimterop questions directly on https://gitter.im/nimterop/Lobby
21:49:07FromGitter<Nickiel12> what should I ask?
21:49:40FromGitter<kaushalmodi> I don't know.. whatever is not working with nimterop
21:49:46FromGitter<Nickiel12> ok
21:50:10FromGitter<kaushalmodi> you are start by showing the compile error and steps to reproduce that issue
21:50:19FromGitter<Nickiel12> ok
21:52:04FromDiscord<Technisha Circuit> How do i use my compiler of choice for Nim?
21:52:12*filcuc joined #nim
21:52:14Yardanicodepends on what C compiler it is
21:52:19FromDiscord<Technisha Circuit> Wdym?
21:52:22Yardanico??
21:52:30Yardanicowdym "my compiler of choice"?
21:52:41FromDiscord<Technisha Circuit> What do you meant what C compiler it is?
21:53:04FromDiscord<Technisha Circuit> > wdym "my compiler of choice"?↵Like how would i use clang instead of gcc for example
21:53:10FromDiscord<Technisha Circuit> Clang is only an example
21:53:12Yardanico--cc:clang
21:53:15Yardanicoclang is a C compiler
21:53:19FromDiscord<Technisha Circuit> Okay, thanks
21:55:27Yardanicoyou can see all supported compilers there https://github.com/nim-lang/Nim/blob/devel/compiler/extccomp.nim
21:55:35Yardanicoalso some compilers mimic the existing ones
21:55:41Yardanicolike emscripten and "zig cc" mimic clang
21:55:54Yardanicobecause they're based on clang :)
21:56:01FromDiscord<Technisha Circuit> Thanks!
21:57:26FromGitter<kaushalmodi> Technisha Circuit: Are you on devel?
21:57:32Yardanicoare you a devil?!
21:57:46bebarkerLooks like Nim built ok on the Pinebook Pro, and according to this, only took < 200MB of RAM to build:
21:57:47bebarkerCC: nimble.nim
21:57:47bebarkerHint:  [Link]
21:57:47bebarkerHint: 143115 LOC; 41.522 sec; 180.082MiB peakmem; Release build; proj: /home/brandon/workspace/Nim/dist/nimble/src/nimble.nim; out: /home/brandon/workspace/Nim/bin/nimble [SuccessX]
21:57:56Yardanicothat's for nimble
21:58:00Yardanicothere's much more output before that
21:58:04FromDiscord<Technisha Circuit> > Technisha Circuit: Are you on devel?↵Wdym?
21:58:04bebarkerah ok
21:58:47FromGitter<kaushalmodi> Technisha Circuit: hehe, that probably answered it :) I meant: Are you building nim from devel branch?
21:58:48bebarkerone thing i wasn't sure about - I had a binary install of the latest Nim compiler before building, but build_all.sh still seems to download the C sources
21:59:03Yardanicobebarker: yes
21:59:05Yardanicofor bootstrapping
21:59:42bebarkerMaybe i don't understand, Yardanico - I thought Nim was self-hosting, so it would only need bootstrapping if you don't have a Nim compiler
22:00:25Yardanicobebarker: it needs to do that to ensure that csources still work
22:00:30Yardanicoyou can always do ./koch boot
22:00:37FromGitter<kaushalmodi> Technisha Circuit: The reason I asked that question is because this was added few days back: https://github.com/nim-lang/Nim/commit/c64db68f0b2ff8e0f94baa583b94fd9409c77057
22:01:11bebarkerYardanico, ah gotcha, thanks for the pointer
22:04:17*q4 joined #nim
22:04:24*filcuc quit (Ping timeout: 258 seconds)
22:22:28*cgfuh quit (Quit: WeeChat 2.7.1)
22:38:32*tane quit (Quit: Leaving)
22:50:24*pbb quit (Remote host closed the connection)
22:51:40*pbb joined #nim
22:54:52*q4 left #nim ("Free web-based IRC: https://www.cloud.webchat.ovh")
22:59:20*Jesin quit (Quit: Leaving)
23:01:36*Jesin joined #nim
23:03:11*abm quit (Quit: Leaving)
23:04:55PrestigeJust found out about the Nim conference, that's exciting
23:11:58FromDiscord<exelotl> Whenever I add a NimNode to a seq[NimNode] it gets cloned...? Is that correct behaviour? Can I make it not get cloned?
23:12:30*exelotl quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
23:13:33shashlickNimNode is a ref though
23:20:00dadadacould I make the members of an object/ref unaccessible within the same module?
23:20:16dadadaso you would have to go through a proc?
23:20:27FromGitter<timotheecour> @cooldome are you herre?
23:22:04FromDiscord<exelotl> shashlick: ah, it specifically happens if the NimNode came from parseStmt
23:27:23Prestigedadada: not sure but could you just extract that out into another file?
23:27:54dadadaPrestige: ya, I just want a different solution for convenience
23:28:04dadadasure I now the idiomatic way to do this
23:28:28dadada... okay different question: can all vars be deleted by the programmers/nim
23:28:47dadadaor is there a way to create a var that can never be deleted until the program exits?
23:30:54Prestigedadada: Are you trying to have a member of an object not take up memory or something?
23:31:46dadadaPrestige: I'm trying to create a unique object within a module (not from outside), that should never get deleted
23:32:09dadadaI set myself this challenge
23:39:28disruptekjust create a compile-time var.
23:39:40disruptekthey cannot be redefined because stupid.
23:44:27FromDiscord<Rika> dadada: a singleton?
23:45:13*xet7 joined #nim
23:45:46dadadaRika: yes, I don't use that name, because they have a bad image, I call them by different names and hope nobody mentions what I really mean on IRC :-(
23:46:38disruptekkinky.
23:47:44disruptekvar singleton {.compileTime.} = "goatse"
23:52:26FromDiscord<Rika> dadada: that just makes it impossible to understand what you mean, does it not
23:56:17dadadaRika: you have to be cryptic, if you don't want to repeat certain endless discussions on the internet
23:56:42*xet7 quit (Remote host closed the connection)
23:57:06FromDiscord<KingDarBoja> lolwut?
23:57:11dadadaRika: google singletons and you'll find a million opinions why they're bad, and I've used them with success (but rarely), so who's right?
23:57:12*xet7 joined #nim
23:57:17FromDiscord<KingDarBoja> https://refactoring.guru/design-patterns/singleton
23:57:24FromDiscord<KingDarBoja> 😛
23:58:40FromDiscord<Rika> if that endless discussion happens, it is not the failure of the asker, but the moderators