<< 01-07-2019 >>

00:02:02*dddddd quit (Remote host closed the connection)
00:11:38travissI am trying to use https://github.com/JustinRyanH/nimflecs which depends on c2nim and nimgen with windows and nim 0.20. `nimble setup` fails saying gcc is an unknown command. However, I have configured nim to use clang by supplying cc=clang and clang.path=... in nim.cfg. Anyone have any idea whats going on here? Here is the output: https://pastebin.com/yWZDRF7v
00:41:02FromGitter<JasperJenkins> I don't believe nimgen uses nim.cfg to select the preprocessor. It looks like you have to set the CC/CPP env var for nimgen.
00:42:22travissoh, thank you. i'll look into how to do that.
00:44:24shashlick_You can set it on your local env with a set command
00:45:24shashlick_Or you can set it in the nimgen cfg file
00:45:31shashlick_c_compiler="$CC"
00:45:32shashlick_cpp_compiler="${CPP}-arm"
00:46:16shashlick_Unfortunately Nim doesn't tell us what the current compiler is configured to
00:46:22*lestus joined #nim
00:46:39*lestus left #nim (#nim)
00:58:14travissok well using c_compiler="$cc" in nimflecs.cfg and `set cc=F:\Users\Travis\AppData\Local\LLVM-8\bin\clang` got past that error. But now i'm getting this one: `Error: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError]`
00:59:13travisswhich is coming from this command: `cmd /c "c2nim --stdcall --header:headerflecs --out:nimflecs/flecs.nim temp-flecs.nim.c"`
00:59:45travissdoes that mean i need to pass -d:nimOldCaseObjects to c2nim?
01:01:06*theelous3_ joined #nim
01:03:48shashlick_Looks like you have a broken version of c2nim
01:04:14shashlick_Do you have older versions of Nim installed
01:04:17shashlick_Choosenim?
01:05:22travissi re-installed today a binary download of 0.20 and ran finish. I couldn't get choosenim to work.
01:06:19travissI previously had built nim from source but that was a little annoying
01:06:52travissjust having to stash my config changes when i wanted to pull latest master.
01:08:18travissi reinstalled c2nim and nimgen with nimble uninstall after reinstalling nim.
01:08:37shashlick_You need to pass -d:nimOldCaseObjects to c2nim at compile time
01:08:42shashlick_Here's a suggestion
01:08:48shashlick_Uninstall c2nim
01:08:54shashlick_And then nimble install c2nim
01:09:14shashlick_Basically nimgen pulled an older version of c2nim
01:09:17shashlick_Due to another bug
01:09:30travissoh i see. will do.
01:09:35shashlick_Will be easier than getting an older Nim installed
01:10:55travissit seems to have installed the same version of c2nim which was uninstalled: 0.9.14.
01:12:05FromGitter<JasperJenkins> maybe `nimble install c2nim@#head`?
01:13:10shashlick_That is the latest looks like
01:13:55FromGitter<JasperJenkins> I didn't bump the version when I added `-d:nimOldCaseObjects` :-/
01:14:24travissthat seems to have worked, but now its still showing an error: `nimflecs\temp-flecs.nim.c(58, 7) Error: expected ';'`
01:15:26travissI noticed this in the output when installing c2nim: Verifying dependencies for [email protected]
01:15:40shashlick_@JasperJenkins - have you done c2nim PR's?
01:15:56travissEven though I'm on 0.20
01:17:04FromGitter<JasperJenkins> Just the one.
01:18:47*synshroud quit (Quit: ZNC 1.7.4 - https://znc.in)
01:41:19travissi was able to complete nimble setup by switching from clang to gcc with `set cc=path\to\gcc`. i see the output `Generating nimflecs/flecs.nim
01:41:19travissProcessing nimflecs/flecs.nim
01:41:19traviss Appending keys for wildcard *.nim` but I don't see any flecs.nim file. shouldn't that file have been generated? sorry i'm still new to c2nim.
01:52:10travissnvm... i'm a dumb and forgot to `nimble install`
02:45:15*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
02:45:40*laaron joined #nim
02:49:54*rockcavera joined #nim
03:03:09*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:21:31*vlad1777d__ quit (Ping timeout: 246 seconds)
03:30:54travisscan anyone recommend an entity component system to use with nim for a game? i think i'm giving up on building flecs for now. i want to use it along with the framework nico: https://github.com/ftsf/nico
03:44:01*theelous3_ quit (Ping timeout: 248 seconds)
03:45:01FromDiscord_<Samantac8cd> 18+ Dirty Photos For Guys Only 👉 https://viewc.site/QYHhZv?tx=x1
03:45:48*theelous3 quit (Read error: Connection reset by peer)
04:13:36*traviss quit (Quit: Leaving)
04:14:23FromGitter<zacharycarter> is there any way to prepend items to a sequence?
04:14:35shashlick_Deque
04:15:15shashlick_Nimgen flecs not working?
04:15:32FromGitter<zacharycarter> thanks
04:18:46FromGitter<zacharycarter> shashlick_: is there an easy way to spread a sequence? would I use apply or something if I wanted to prepend all items in a sequence to my dequeue?
04:22:50FromGitter<zacharycarter> I'll just do it the verbose way for now
04:26:09*oculux quit (Ping timeout: 248 seconds)
04:30:48*oculux joined #nim
04:34:24*nsf joined #nim
05:37:24FromGitter<zacharycarter> traviss: do you really need an ECS?
05:40:24*vlad1777d__ joined #nim
05:43:25*dwdv joined #nim
05:43:35*ertp07 quit (Ping timeout: 250 seconds)
05:43:47*ertp07 joined #nim
06:04:34*solitudesf joined #nim
06:09:50*narimiran_ joined #nim
06:11:10*ertp07 quit (Ping timeout: 252 seconds)
06:14:24*ertp07 joined #nim
06:21:57*brakmic joined #nim
06:27:26*brakmic_ joined #nim
06:30:03*brakmic quit (Ping timeout: 245 seconds)
06:30:05*brakmic__ joined #nim
06:31:42*brakmic_ quit (Ping timeout: 258 seconds)
06:32:41*purebadger joined #nim
06:35:17*purebadger quit (Client Quit)
06:36:48*PMunch joined #nim
06:39:16*purebadger joined #nim
06:39:34*purebadger quit (Client Quit)
06:43:00*purebadger joined #nim
06:51:56*narimiran_ is now known as narimiran
06:54:54*krux02 joined #nim
06:55:28*ertp07 quit (Ping timeout: 258 seconds)
06:57:05*ertp07 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:35*gmpreussner joined #nim
07:05:22*ertp07 quit (Ping timeout: 244 seconds)
07:13:23*ertp07 joined #nim
07:34:31FromDiscord_<djazz> Ugh, we got a spambot on the discord side. Samantac8cd#6006
07:38:04*solitudesf quit (Ping timeout: 246 seconds)
07:54:53*couven92 joined #nim
07:57:19*ertp07 quit (Ping timeout: 246 seconds)
07:57:51*ertp07 joined #nim
07:58:13*ertp07 quit (Read error: Connection reset by peer)
07:58:35*ertp07 joined #nim
08:01:01FromGitter<mratsim> @narimiran who can update the sponsors page? https://forum.nim-lang.org/t/4939
08:01:31narimirani think Araq should have the exact numbers, and then i could update it
08:02:35*ertp07 quit (Read error: Connection reset by peer)
08:05:14*ertp07 joined #nim
08:07:40Zevvthanks for the ptr pull mratsim
08:12:19FromGitter<mratsim> btw I updated the post @narimiran : https://github.com/nim-lang/needed-libraries/issues/77
08:12:45FromGitter<mratsim> @Zevv, you're welcome, I didn't do much
08:13:25*Sencatsu joined #nim
08:15:39*hoijui joined #nim
08:16:18*Senketsu_ quit (Ping timeout: 245 seconds)
08:18:18FromGitter<mratsim> @Araq: do you have an example of this: https://github.com/nim-lang/Nim/commit/d37c4e44d3243acd91ffd91515e8a1807c979bad#diff-4f776abc4638b87f4340e44e09871c2aR208 ⏎ ⏎ Couldn't that prevent graph data structure represent as pointers?
08:19:11*floppydh joined #nim
08:24:25*solitudesf joined #nim
08:24:26FromGitter<gogolxdong> There is some issue of toJson of karax/jjson, it cast literal boolean value to 0 or 1, and in some scenes , fields requires boolean value literally. ⏎ ⏎ ```var c = %*{"a": true} ⏎ echo cast[JsonNode](true).toJson ⏎ echo c.toJson``` [https://gitter.im/nim-lang/Nim?at=5d19c33a490abf627a53ed0b]
08:26:04FromGitter<arnetheduck> lol @mratsim we absolutely *need* a library for `QUantum Expression and Lattice Field Theory`, much more so than something as pedestrian as a the tree collection in the std lib :)
08:29:16narimiran@mratsim nice update, i'm glad to see the progress therer!
08:39:01Araqwhat's a "tree collection"?
08:39:05AraqSortedTable?
08:40:23FromGitter<arnetheduck> yeah
08:40:35FromGitter<mratsim> @arnetheduck we all need a Higgs-Boson :p
08:41:56*Vladar joined #nim
08:49:37*ertp07 quit (Ping timeout: 248 seconds)
08:54:25*ertp07 joined #nim
09:04:05*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
09:04:22*tjmac joined #nim
09:05:26*laaron joined #nim
09:16:20*purebadger quit (Quit: WeeChat 2.5)
09:16:49*purebadger joined #nim
09:46:17*abm joined #nim
09:49:33Araqer, why was https://github.com/nim-lang/Nim/pull/11626 red and now it's green?
09:52:17FromGitter<alehander42> how to check if i am compiled with threads:on
09:52:21FromGitter<alehander42> hasThreadSupport ?
09:54:15Araqwhen compileOption("threads")
09:54:17Araqiirc
09:54:38narimiranAraq: it was red because one travis test timed out. so i restarted just that test and now it is green
09:54:39FromGitter<alehander42> yep
09:54:42FromGitter<alehander42> thanks
09:55:07*laaron quit (Remote host closed the connection)
09:56:09*laaron joined #nim
10:11:58*ertp07 quit (Ping timeout: 272 seconds)
10:19:31*ertp07 joined #nim
10:20:54*ertp07 quit (Read error: Connection reset by peer)
10:22:01*ertp07 joined #nim
10:28:27FromGitter<alehander42> https://paste.ofcode.org/34MQZ95vkEAuMU7VSr2aMZD
10:28:34FromGitter<alehander42> how stupid is this
10:29:01FromGitter<alehander42> i mean i have some code that uses big array-s and assumes the index is always in bounds
10:29:09FromGitter<alehander42> and i wanted to lazily convert it to seq-s
10:29:21FromGitter<alehander42> without adding manually bound checks and resizes
10:29:32leorizemy bigger question is why are you using `cast` everywhere?
10:32:17FromGitter<alehander42> well, i can borrow?
10:32:22FromGitter<alehander42> i guess thats what you mean
10:32:32FromGitter<alehander42> but i cant borrow [] and []= because i override them
10:33:17Araqyou should use type conversions, not 'cast'
10:34:48*ertp07 quit (Read error: Connection reset by peer)
10:36:18FromGitter<alehander42> hm
10:37:02FromGitter<alehander42> ok almost works
10:37:07*ertp07 joined #nim
10:37:25FromGitter<alehander42> https://paste.ofcode.org/SgDrK99PcfXcmtuehe6LVY
10:37:30*ertp07 quit (Read error: Connection reset by peer)
10:37:50*ertp07 joined #nim
10:37:53FromGitter<alehander42> this works but why do i need to `a = SeqTranslator(a2)`
10:37:56FromGitter<alehander42> in []=
10:38:23FromGitter<alehander42> i mean i see that i need to `var a = ..` to "borrow" []= from seq
10:38:48FromGitter<alehander42> because i cant type convert (or cast to ) var seq directly
10:38:53leorizethat introduces a copy
10:38:57FromGitter<alehander42> yes
10:39:03FromGitter<alehander42> and i want to not introduce it
10:39:12leorizealso you don't need backticks for borrowing len and/or setLen
10:39:28FromGitter<alehander42> oh right
10:39:39FromGitter<alehander42> forgive me
10:40:07FromGitter<alehander42> but i cant see how to borrow []= from seq[char] and renaming it so i can use it the override without confusion
10:40:16FromGitter<alehander42> the other option is to directly access `.data`
10:40:17leorizeyou can just map the normal `[]` for seq to a proc
10:40:43leorizewait
10:42:15FromGitter<alehander42> ok so this is good idea
10:42:21FromGitter<alehander42> but i guess it still introduces a copy
10:42:59FromGitter<alehander42> i think i should be able to say nim "hey this is actually var seq[char], just accept it and call []= on it"
10:43:09FromGitter<alehander42> without two type conversions
10:43:22leorizehere's a hacky way: https://play.nim-lang.org/#ix=1Nps
10:43:44FromGitter<alehander42> something like proc setKey(a: var SeqTranslator, b: int, c: char) {.borrow: "[]=".}
10:44:09FromGitter<alehander42> ah nice thats how you get data with
10:44:11FromGitter<alehander42> yeah
10:44:42*purebadger quit (Ping timeout: 258 seconds)
10:47:34*purebadger joined #nim
10:47:54*stefanos82 joined #nim
10:49:08leorizealehander42: apparently this also works: https://play.nim-lang.org/#ix=1Npu
10:51:30FromGitter<alehander42> huh
10:51:39FromGitter<alehander42> i think i tried something like that
10:52:30*purebadger quit (Ping timeout: 272 seconds)
10:52:39FromGitter<alehander42> hiih
10:53:06FromGitter<alehander42> so if a is var seqchar () actually converts it to var seq[char]
10:53:08FromGitter<alehander42> in a way
10:53:32FromGitter<alehander42> so yeah it works
10:53:44FromGitter<alehander42> if a is var SeqT... *
10:55:46*purebadger joined #nim
10:56:05lqdev[m]how can you set the C compiler to be used by Nim?
10:56:20Araq--cc:vcc / gcc / clang
10:56:24lqdev[m]ah, --gcc.exe
10:57:49FromGitter<alehander42> i wondered if anybody tried to do a x86 asm compiler
10:57:55FromGitter<alehander42> for the nim backend for fun
10:58:16Araqdom96 did
10:58:30FromGitter<alehander42> iirc nim generates relatively simple stuff on this level (and similar to three address code?)
10:58:33FromGitter<alehander42> ohh good
10:58:37FromGitter<alehander42> is it open source
11:03:16*abm quit (Read error: Connection reset by peer)
11:04:50*clyybber joined #nim
11:05:55Araqwow that --newruntime is full of bugs
11:06:27Araqtsimpleclosure.nim(44, 11) Error: '=' is not available for type <owned proc (){.gcsafe, locks: 0.}>; requires a copy because it's not the last read of 'say'
11:06:53Araqthat's true but 'say' doesn't have an environment so it doesn't matter
11:10:03*abm joined #nim
11:10:59clyybberI can't figure out that double free bug :/
11:12:52Araqclyybber, we should do some pair-programming
11:16:56Araqor you stream and I'm in the chat shouting at you
11:19:00*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
11:19:32*laaron joined #nim
11:22:41*ertp07 quit (Ping timeout: 248 seconds)
11:26:09*dddddd joined #nim
11:27:35*ertp07 joined #nim
11:38:22*tjmac quit (Ping timeout: 258 seconds)
11:40:00clyybberAraq: Oh yeah we could do that
11:55:53FromGitter<rokups> you guys do pair programming via vscode-live-share and stream it so we can shout at you both from chat
11:57:25clyybberdoes this work: https://www.twitch.tv/clyybber ?
11:58:19FromGitter<rokups> it does, but quality sucks
11:58:24clyybberah fuck
11:58:38clyybberwell, thats the max my connection allows I guess
11:58:44FromGitter<rokups> says 628p (source) under quality setting
11:59:04clyybberoof
11:59:13clyybberdo you see firefox or irc window?
11:59:30FromGitter<rokups> firefox, some .rst open
11:59:39clyybberok thank you
11:59:57FromGitter<rokups> reading text is possible, but half the time its brain auto-correcting text because it can be hardly seen
12:01:03narimiranthe quality is ok
12:01:14clyybbermmh, that sux, especially since my terminal font is kinda small
12:01:42narimiranclyybber: for streaming/recording, increasing font-size is a must
12:02:01*Snircle joined #nim
12:02:07clyybberyep, i see. gotta get rid of that bitmap font
12:02:27narimiranit takes some practice to have less information than usual on the screen, but your viewers will be very thankful
12:03:03narimiranoh, now i see your terminal and it is unreadable as it is/was
12:03:22narimirani think you can use ctrl+shift+= to increase font size
12:04:01clyybberim using alacritty and I dont think it supports it.
12:05:32narimiranok, lets see if a different font improves readability....
12:07:06narimiranyep, this is readable
12:07:15clyybbernice
12:07:35clyybberwell, guess I'll wait for araq
12:07:52clyybberalso I think twitch chat has a fuckload of delay right?
12:08:09solitudesf~5 seconds
12:08:27FromGitter<alehander42> still cant see the letters
12:08:31narimirandon't know, but there is a delay between twitch stream and stuff written here (when you show your IRC client)
12:08:38*lf-araujo joined #nim
12:08:51FromGitter<alehander42> but i can see them in the tiled window
12:08:57AraqI can hear no sound
12:09:08FromGitter<alehander42> is there sound
12:09:12narimiranno sound here also
12:09:19FromGitter<alehander42> what is clippy wat
12:09:27narimiranthat's kakoune editor
12:09:32FromGitter<alehander42> wow
12:09:56clyybbermy mic is shite
12:10:12narimiranfor me it is really nice to see all the different editors used in nim videos/streams
12:10:33narimiranfrom what i can recall, so far we had vs code, emacs, neovim, kakoune, kate
12:10:36clyybberI guess the sound is crap?
12:10:45FromGitter<alehander42> there is no sound
12:10:49Araqthere is no sound and the font is unreadable
12:11:00Araqand if you're on Linux, use
12:11:03Araq-d:useMalloc
12:11:07FromGitter<alehander42> oh yeah
12:11:10Araqand run it through valgrind
12:11:12clyybberI do
12:11:13narimiranthat's his IRC font. in his terminal, the font is okayish
12:11:25narimirannow there's a sound, but lots of static hissing/noise
12:11:25FromGitter<alehander42> good sound now
12:11:36Araqyay sound
12:11:53FromGitter<rokups> there is bit of static though
12:11:55FromGitter<alehander42> i think the sounds was ok
12:11:58*lritter joined #nim
12:12:05narimiran"sound test" heard loud and almost clear :)
12:13:10*jfoutaise quit (Ping timeout: 246 seconds)
12:13:19FromGitter<alehander42> no sound again
12:14:13clyybberok nice
12:14:17clyybbersound should be back
12:14:48narimiranit is back now
12:14:51clyybberunfortunately my screen is 16:10
12:15:37narimiranyou lucky guy!
12:15:49narimiranif only there were more 16:10 monitor nowadays....
12:18:55FromGitter<rokups> isnt 16:9/16:10 a standard nowdays?
12:20:21narimiran16:9 is. although it looks like minor difference, 16:10 gives you some nice extra vertical space (e.g. 1920x1200 vs 1920x1080)
12:22:04FromGitter<rokups> 120 pixels.. i guess thats something
12:29:47leorizeI'm using a 10px sized font, so that's > 10 extra lines of code on screen :)
12:33:36*hoijui quit (Ping timeout: 252 seconds)
12:33:58Araqbbl
12:37:21clyybberleorize: scientifica?
12:37:26Calinouon the other hand, 16:10 is worse for most games
12:37:34clyybberexcept for space engineers
12:37:38Calinouit's not *just* upsides :P
12:37:53Calinoupeople are quick to call 16:9 a downgrade, but it's a steep upgrade for most use cases, which is why it happened
12:38:08Calinounow, it probably means you should adjust your desktop layout if you still use two bars like in GNOME 2 :)
12:38:38clyybberno bars master race
12:38:43*ertp07 quit (Ping timeout: 250 seconds)
12:39:00FromGitter<rokups> i had ultra-wide monitor at one point. so much horizontal space, can fit so many windows, right? turns out im happier with something that has a standard resolution
12:39:13Calinouwell, the issue with ultrawide is that many games don't support it :(
12:39:33narimirani currently have 21:9, which is nice when you have only one monitor
12:39:45narimiranbut i don't play games....
12:40:05FromGitter<rokups> games ran fine. idk maybe there was one that i had to suffer black bars. but still... with many things i came to a conclusion that path of least resistence is using what most people are using
12:40:33FromGitter<rokups> same with spaces, light kde breeze theme, monitors and cmake... :D
12:40:49Calinouheh, I use Breeze Dark and it works pretty well overall
12:41:02Calinouthe main issue are forms in Firefox on some websites
12:41:53FromGitter<rokups> see, this is exactly the thing why i said "fuck it"
12:42:07FromGitter<rokups> no point in spending energy fighting these issues..
12:42:53FromDiscord_<Samantac8cd> 💋 18+ Dirty Photos For Guys Only - https://nakedphotos.club/QYHhZv
12:43:29Calinouwebsites can fix it, so can userstyles
12:43:47Calinou(on the other hand, Chromium doesn't suffer this issue, last time I checked)
12:43:54FromGitter<rokups> nonono... this is so wrong. websites should not have to fix stuff for my PC
12:44:05CalinouFirefox is visibily not going to fix it, so websites will have to :P
12:44:13Calinouvisibly*
12:44:19narimiranthere is even nim issue about that :D
12:46:02Calinouthere is also https://addons.mozilla.org/en-US/firefox/addon/fix-dark-theme-input-boxes/
12:46:43FromGitter<rokups> tbh i have no idea why would a browser inherit styles from OS to begin with
12:46:49FromGitter<rokups> this is so wrong
12:46:51Calinou#JustFirefoxThings
12:47:47FromDiscord_<Samantac8cd> 😍 18+ Dirty Photos For Guys Only 👉 https://privatepage.vip/QYHhZv
12:48:57*ertp07 joined #nim
12:49:27FromGitter<rokups> what if i want dirty photos for girls. what kind of sexist garbage is this
12:52:42clyybberAraq: Well, looks like that didn't fix it.
12:52:49clyybberEven if it *should*
12:53:05clyybberstill 7 allocs, 9 frees; segfault
12:57:33*hoijui joined #nim
13:00:08PMunchHmm, anyone knows who wrote pakku?
13:02:07clyybberthe pacman wrapper?
13:04:32leorizeclyybber: I use Iosevka
13:05:43FromGitter<rokups> pacman wrapper? btw i use archlinux :trollface:
13:05:55leorizefirefox was designed to be a kind of "electron" iirc
13:06:23FromGitter<rokups> well it still is. all ff UI is written in html/js
13:06:45leorizethey're moving away from that
13:07:00leorizefirefox used to be an application on the mozilla platform
13:07:05CalinouI ran ./koch doc locally, what does this do? It seems to try uploading stuff via Travis CI
13:07:07leorizenow the platform is firefox
13:07:17Calinou@rokups https://github.com/nim-lang/Nim/pull/11632 :P
13:08:15leorizeadd "-moz-appearance: none" to the box as well
13:09:25leorizethat should get rid of any additional styling that firefox can apply
13:10:55Calinouthere doesn't seem to be a visible difference here, but I'll do it to be sure
13:11:27PMunchclyybber, yes
13:11:53PMunchrokups, I use Arch as well
13:25:38xacePMunch: no but what did you have in mind in regards to pakku? I find it really lacking and annoying, but i still use it...
13:26:42PMunchI was just going to ask if it could put a bell character when it shows a prompt
13:27:04PMunchSo many times I have a terminal in the background running some upgrade just for it to stop when it asks me a question which I don't notice
13:27:34PMunchBut my terminals are set up to show up as important if they have a bell character in them (and I have a bell character in my PS1)
13:28:41leorizeanyone here use musl libc exclusively?
13:29:17xacePMunch: I see... It feels like someone has written a hook somewhere else to deal with that sort of thing
13:31:07xaceleorize: i reckon you could find such people over at suckless
13:32:19clyybberleorize: I tried to, but ultimately failed
13:32:39leorizeI'm actually running gentoo/musl atm
13:34:14leorizefor some reason the stdout here buffers until `\n`, which means if you emit any control character it would stay in the buffer until `\n` appears
13:34:37leorizewhich kinda broke most tui applications here (sans ncurses-based)
13:35:00leorizenot sure if it's my terminal emulator (alacritty) or the libc :/
13:35:42clyybberthat sounds really bad
13:35:47clyybberI dont think its alacritty
13:35:50clyybberusing it here
13:35:55*ertp07 quit (Ping timeout: 250 seconds)
13:35:59clyybberwhat tui doesnt work?
13:36:19leorizenimble init
13:36:30leorizestdout.write(': '); stdin.readLine
13:36:42leorizewhich will read the line before printing ": " to stdout
13:37:50leorizemy "fix" for this is to insert stdout.flushFile before any input
13:38:36leorizebut it's not really pleasant to patch every tui application out there that doesn't do so
13:39:12leorizeesp when the devs probably can't reproduce it on their machines
13:49:23clyybber-g3 is a godsend for valgrind
13:50:08*lf-araujo_ joined #nim
13:51:48*lf-araujo quit (Quit: lf-araujo)
13:51:49*lf-araujo_ is now known as lf-araujo
13:53:28FromDiscord_<Samantac8cd> 18+ Dirty Photos For Guys Only - https://nakedphotos.club/QYHhZv
13:54:59solitudesfmusl nimble is broken here too
13:56:07leorizehere's my fix: http://ix.io/1Nq0
13:56:13leorizenot sure if I should upstream this
13:57:47solitudesfis there some other cli that is broken for you?
14:00:48leorizeany handwritten cli with the pattern of print("input: "); readline
14:01:10*ertp07 joined #nim
14:01:15leorizemost of the cli apps I use are ncurses-based, and they seem to be fine with this
14:05:33lf-araujoI have the following object: https://i.imgur.com/QVo181H.png
14:05:58lf-araujoHow do I make the first one date, be initialize as a date format?
14:06:08lf-araujoWhat is the proper date type on Nim?
14:06:17leorizetimes.DateTime
14:06:22lf-araujoamazing, thanks
14:09:43lf-araujoI know the format it is in, is it possible/recommended to initialize it with a format. Or this is something to do during the manipulation of the data?
14:10:13disruptekleorize: any tricks to gentoo/musl? i was trying to use it for a docker image in my nvlm->klee pipeline but i ran into some kind of build problem and decided it wasn't worth the effort.
14:10:16FromGitter<mratsim> you mean, choose how it's converted/printed to string?
14:10:55disrupteklf-araujo: yes, you can parse dates. see the docs.
14:11:01*nsf quit (Quit: WeeChat 2.4)
14:11:15leorizedisruptek: when something broke, look for the same software in void linux or alpine linux
14:11:23leorizethey'll probably have patches for those
14:11:45leorizealso llvm 8 or higher is recommended with musl
14:12:05disruptekare you running it under a full wayland env? chrome? or...?
14:12:21leorizei3 + ff
14:12:37leorizeand flatpak for electron apps / gog games
14:12:40disruptekkk, thanks, maybe i will try it again.
14:26:49noonienhow do i turn off a specific warning?
14:27:05noonienfor example Uninit, --warningUninit:off does not seem to work
14:27:16leorize`--warning[Uninit]:off`
14:27:26noonienwell, actually, it says it's an invalid option
14:27:27noonienoh ok
14:32:31*PMunch quit (Remote host closed the connection)
14:41:13*ertp07 quit (Ping timeout: 258 seconds)
14:41:51*ertp07 joined #nim
14:42:58leorizenoonien: you can annotate variables / procs with `{.used.}` pragma to suppress Uninit warnings
14:43:56noonienhmm, what?
14:44:07nooniendoes it? doesn't make much sense
14:45:50leorizeoh, sorry, misread the warning :p
14:46:37noonienthis is the code that produces the warning: http://ix.io/1NlG
14:46:44nooniencompiled with --verbosity:3
14:47:17leorizeresult.len might be better than sizeof
14:48:18noonienoh yeah, my bad
14:48:40leorizeinteresting, have you filed a bug?
14:48:50leorizebug report*
14:49:01noonienwell, i asked here yesterday as well
14:49:09noonienbecause i'm unsure if its a bug
14:49:50*lf-araujo quit (Quit: lf-araujo)
14:49:59*lf-araujo joined #nim
14:51:38noonieni mean, perhaps i don't assign the entire array
14:52:06noonienwould result have a zero value? or will it be uninitialized?
14:55:42leorizeyea, result is initialized by default
14:55:50leorizeunless you annotate the proc with `{.noinit.}`
15:04:52noonienhmmm
15:05:05noonienwhat does noinit do
15:05:13nooniendoes it just not memset to 0?
15:05:43leorizeyea
15:06:07noonienah, cool, so in this case, i can optimize using that
15:06:31leorizethe compiler got some optimization on that and can infer {.noinit.} iirc
15:06:37leorizeprobably @mratsim can comment on that
15:07:12noonieni see, i wonder why i get that warning though
15:07:26noonieni'm guessint it makes sense when it's a reference type
15:07:41FromGitter<mratsim> yes noInit avoids memset, it can be applied to function (so the result is not zero init) or variables
15:07:50noonienbut in the case of an array, which is not a reference type, i don't think i should be getting it, so it might actually be a bug
15:08:21leorizeI'd say that a warning that doesn't pop up on lower optimization level is a bug already
15:08:48FromGitter<mratsim> the "not initialized" part of the compiler is still in flux iirc. Personally I don't really take it into account
15:09:09FromGitter<mratsim> but yeah for an array of byte it's a bug
15:10:53*purebadger quit (Ping timeout: 245 seconds)
15:13:21noonienhmm, in the case of `proc foo(): array[10, byte] =` and i set all elements of the array
15:13:38noonienis {.noinit.} superfluous?
15:17:10Zevvah sorry, went to bed yesterday
15:17:42ZevvI feel it might be a bug: warnings should come out at normal verbosity level as well, so if it was a real warning, youd see it without --verbosity:3
15:18:08Zevvthe fact that you only see it when you *do* set verbosity makes me suspect something is fishy
15:18:38Zevvyou properly set all the elements of the result array, so the warning itself is wrong as well
15:19:53Zevvor if I'm just wrong, it could be that nim thinks the result *might* be unintialized because it can not prove your code, but this warning is muted at normal verbosity because nim knows it is jus ta suggestion
15:20:19ZevvI guess araq should be able to answer this from the top of his head
15:23:38*UNIcodeX joined #nim
15:24:44*UNIcodeX quit (Remote host closed the connection)
15:27:01*UNIcodeX joined #nim
15:27:44*clyybber quit (Quit: WeeChat 2.5)
15:39:28FromDiscord_<Queena26d> 👅 🥰 18+ Dirty Photos For Guys Only 👉 https://nakedphotos.club/QYHhZv
15:39:45FromGitter<rokups> wee made websockets work with jester+websockets.nim. in the process found out that that `{.async.}` totally messes up error reporting
15:44:11*lf-araujo quit (Ping timeout: 250 seconds)
15:47:00FromDiscord_<djazz> Another discord spambot :/
15:47:22leorizewho is the moderator for Nim's discord anw?
15:47:56FromDiscord_<djazz> @treeform is online
15:55:58*jxy quit (Quit: leaving)
15:57:06*jxy joined #nim
16:06:21FromDiscord_<treeform> I don't know how I got moderator status, but I banned the spam bots.
16:11:18*ertp07 quit (Read error: Connection reset by peer)
16:12:42*ertp07 joined #nim
16:38:11disruptekhttps://github.com/nim-lang/Nim/issues/11592 -- is there a semantic difference between type instantiation when it is (or conversely, is not) assigned to a variable?
16:41:21*jfoutaise joined #nim
16:42:04disruptekor is it more like a validation that we are better able to perform in that case? or an optimization whereby we can omit that validation on the other hand? or...?
16:46:03*floppydh quit (Quit: WeeChat 2.5)
16:47:35*jfoutaise quit (Remote host closed the connection)
16:53:13*clyybber joined #nim
16:53:40*shadowbane joined #nim
16:55:11clyybberlightning rods are a godsend
16:55:42clyybberalso fuses
17:05:07*purebadger joined #nim
17:06:38FromDiscord_<djazz> ⛈
17:07:39Zevvdoc/destructors.rst \o/
17:08:18*jfoutaise joined #nim
17:22:34*laaron quit (Remote host closed the connection)
17:27:01noonienhmm, i think i've discovered a sigsegv in the gc
17:27:15noonienbut i'm not sure how to reproduce it
17:27:26Zevvwait, I'm looking something up for you
17:27:57*xace quit (Ping timeout: 245 seconds)
17:28:09Zevvhttps://github.com/nim-lang/Nim/wiki/Hunting-crashes:-The-ultimate-guide
17:28:42noonienawesome, thanks! will read, try some poitners and come back
17:29:10Zevvnot in the list, but try to compile your code with a debugging version of the compiler, if you know how to make that
17:29:26Zevvdoing ./koch temp in the nim top level directory will build that for you
17:30:11noonieni tried --verbosity:3, and am getting a lot of GcUnsafe warnings, however, i'm not sure how valid they are
17:31:13noonienmost of the code is async, and i've written concurrent code for quite a while now, i'm not saying i don't have a bug, but i'm unsure how it would trigger a sigsegv showing a stacktrace in the gc
17:34:42*lf-araujo joined #nim
17:34:44Zevvthe unsafe GC warnings have been bothering me since day 1 on Nim, and after getting it explained a dozen times, I still do *not* understand why I get these
17:34:55*Kaivo joined #nim
17:35:06Zevvapart from that, running with a debug compiler is probably the first thing to try
17:35:59noonienhmm, my test suite triggers the bug reliable on each run, but with -d:release, it doesn't seem to trigger
17:36:14*xace joined #nim
17:36:22noonienboth refc and markAndSweep bug, boehm doesn't work, i'm missing libgc
17:36:39nooniengoing to try the other flags
17:38:14Zevvcan you share your code?
17:38:34nooniensadly i can't
17:38:42noonienthat's why i'm trying to reproduce
17:40:49noonienboth --d:useSysAssert and --d:useGcAssert trigger assertions, if both are used, GCASSERT is triggered first
17:41:08noonieni can share the stack trace if that helps
17:41:21noonienhmm, it seems to have something to do with sharedtables
17:41:27*hoijui quit (Ping timeout: 264 seconds)
17:41:32*ertp07 quit (Ping timeout: 268 seconds)
17:41:33noonieni'm getting the assertion in a `withKey`
17:43:10ZevvI don't see an assertion in withKey? what file:line?
17:43:27*lf-araujo quit (Ping timeout: 252 seconds)
17:43:53noonienno, withKey is just part of the stack trace, just a second, i'll post both
17:44:25*nsf joined #nim
17:46:59noonienhere are the stack traces: http://ix.io/1NqZ
17:47:50noonieni'm using 2019-06-29-devel-3606e03
17:48:47*ertp07 joined #nim
17:50:17*lf-araujo joined #nim
17:50:27nooniens/goo/foo
17:51:24noonienthing is, i managed to not get the SIGSEGV by just doing some echos, whici makes me thing this will be kinda hard to repro
17:55:57*clyybber quit (Quit: WeeChat 2.5)
17:57:07*sz0 joined #nim
17:57:52*ertp07 quit (Ping timeout: 258 seconds)
18:00:46*ertp07 joined #nim
18:01:51*clyybber joined #nim
18:02:28*xace quit (Ping timeout: 246 seconds)
18:03:11*xace joined #nim
18:03:19Zevvare you using unsafe things or shallowCopy?
18:03:44*purebadger quit (Ping timeout: 268 seconds)
18:03:53Zevvs/or/like/
18:04:00noonienyes, i am using shallowCopy
18:04:47ZevvI ran into that once - there's something with shallowCopy and consts
18:04:50Zevvlet me see if I can find something
18:05:06Zevvhttps://github.com/nim-lang/Nim/issues/4053
18:05:15Zevvwith apologies from Araq :/
18:05:44Zevv"Be careful with the changed semantics though! There is a reason why the default assignment does a deep copy of sequences and strings."
18:06:17noonienhttps://github.com/JeffersonLab/serializetools/blob/master/serializetools/serializebin.nim#L37
18:06:34noonienhmm, should i just "copy(" instead?
18:06:41Zevv`=` ?
18:07:02noonienoh, i'm dumb
18:07:08noonienheh, will give that a try
18:07:27*ertp07 quit (Ping timeout: 258 seconds)
18:07:38Zevvno sure what the intention was there
18:08:55noonienthat did not appear to have been the issue, i don't think it matters in case of integers, in this case anyway
18:10:06*ertp07 joined #nim
18:10:28Zevv:(
18:11:31Zevvhard to file an issue if you don't have a minimal reprocuing snippet
18:12:49*xace quit (Ping timeout: 248 seconds)
18:13:07noonienyeah :(
18:13:21noonienwill compiling a debug version of the compiler provide me with more helpful info?
18:14:58*xace joined #nim
18:15:04Zevvit might - something might trigger an assertion that is not enabled in a release version
18:15:20Zevvif it is a bug in the compiler this will provide essential info
18:15:29noonienoh, i see, i'll give that a try
18:16:11noonienthe good thing is the sigsegv seems to trigger at about the same time every time
18:17:34nooniendamn, it happens with a specific value in the test, if i change the value, it never segfaults, i guess i got pretty lucky to get it during tests
18:23:01narimirananybody wants to create nim version? http://www.nicolas-hahn.com/python/go/rust/programming/2019/07/01/program-in-python-go-rust/
18:24:13nooniennarimiran: why don't you do it? looks easy enough, good oportunity to learn
18:25:43*narimiran time to put my newly-acquired hat.... :P
18:25:56narimirannoonien: i don't really have much free time currently
18:28:37narimiran...but maybe there's somebody else here who would like to take this learning opportunity
18:30:17noonieni think the benchmark game would be a better place for benchmarks
18:30:42noonienhttps://benchmarksgame-team.pages.debian.net/benchmarksgame/
18:30:54narimiranthey don't accept any new languages
18:31:09*purebadger joined #nim
18:31:12*tiorock joined #nim
18:31:12*tiorock quit (Changing host)
18:31:12*tiorock joined #nim
18:31:13*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
18:31:13*tiorock is now known as rockcavera
18:31:19narimiranand those were already implemented in nim, just as some other benchmarks out there (e.g. kostya)
18:34:59*lf-araujo quit (Remote host closed the connection)
18:37:53noonienTIL
18:39:25Zevvnoonien: you ok with building a debug compiler?
18:39:48noonienyes, i've got nixos, it's just a matter of removing -d:release from the build script
18:40:16ZevvBuild it and save a copy, it might come in handy later
18:40:26Zevvyou don't want to use it by default, as it is much slower
18:40:38narimiranwhy not just `koch temp`?
18:40:44noonienhttps://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/nim/default.nix
18:40:55Zevvnoonien: he's not building nim from source I believe
18:41:08noonieni already had an overlay for having a different version, i just needed to patch the buildPhase
18:41:09noonieni am
18:41:15noonienwell, nix is building it for me
18:41:17Zevvwhy not just `koch temp`? :)
18:41:25*lmariscal joined #nim
18:41:56noonienwell, i prefer to use nix to build/package stuff, this way i can switch back and forth, or make any changes/patches i need
18:42:11noonienwithoug having to keep track of binaries, paths, and such
18:42:18narimiranthis way you would have both `nim` (release build) and `nim_temp` (debug build)
18:42:53narimiran...at the same time, without modifying the build script
18:43:13*purebadger quit (Ping timeout: 248 seconds)
18:43:18Zevvyou know you're on r/programming narimiran?
18:43:19noonieni'm not comfortable enough with nim to be making changes to the compiler, so i don't pllan to compile often
18:43:32Zevvoh you submitted that yourself :)
18:43:40narimiranZevv: yeah, some guy miran1 submitted it :P
18:43:41*lmariscal quit (Client Quit)
18:44:47Zevvah traffic deaths - that's something different isn't it
18:45:03Zevvtoday a new law was activated here: 95 euros fine for driving a bike with a phone in your hand
18:45:17*lmariscal joined #nim
18:46:35narimiranwhy not the round €100? :)
18:46:47narimiranZevv: but my best articles are in croatian :P
18:47:04Zevvbecause of the hot weather: they let you keep 5 euros to buy yourself an icecream
18:47:24narimiranyou can have an icecream in your hand while on a bike?
18:47:37Zevvthat's a pretty good question
18:52:24AraqZevv: var x = 0 &* 10 # create an array with 10 elements
18:53:07clyybberAraq: Hey, the same test case is causing another segfault, this time somewhere else
18:53:23clyybberIt's in the destructor of a seq[string]
18:53:32Araqyeah, I know you hate it. :P but it makes sense for provably complete initializations
18:54:19Araqclyybber: gist what your transformation produced
18:54:21noonienhmm, i'm not getting a call depth limit reached in a debug build, while doing a debug build of the latest nightly release
18:54:44clyybberAraq: It's the same transformation I streamed earlier
18:54:49nooniens/not/now
18:55:13clyybberThe first invalid read happens in the string destructor which gets called from the seq[string] destructor
18:55:25clyybberThis I found out with valgrind+gdb
18:58:34Araqexcuse me that I don't remember the produced code in detail
18:58:45*lmariscal quit (Quit: I'm out!)
18:59:03clyybberAraq: I'll have a gist ready in a minute, didn't expect you to :D
18:59:05*lmariscal joined #nim
18:59:31FromGitter<Varriount> Zevv: Whatcha up to?
19:00:37Zevveuh not much really, why?
19:01:26*Trustable joined #nim
19:02:25clyybberAraq: https://gist.github.com/Clyybber/afed2c3201619d58f50af25ec4bedef6
19:04:25FromDiscord_<demotomohiro> It seems there is no explanation about block expression in Nim manual. That means block expression is not officially supported or could be removed in future?
19:05:54FromDiscord_<demotomohiro> But there is a sample code that use block expression in Nim manual.
19:06:19ZevvWhat exactly do you mean with 'block expression'?
19:07:45clyybberZevv: Probably "something = block: ..."
19:07:49FromDiscord_<demotomohiro> const foo = block: "bar"
19:08:02FromDiscord_<demotomohiro> Something like this
19:08:43FromDiscord_<demotomohiro> last expression under the block is the value of block expression.
19:11:16*lmariscal quit (Quit: I'm out!)
19:11:35ZevvVarriount: you?
19:11:41FromDiscord_<demotomohiro> Just someone forget to write about block expression or it is not recommended thing?
19:11:50*lmariscal joined #nim
19:11:57ZevvI've never seen it before :)
19:12:32clyybberdemotomohiro: I've never heard about them being not recommended, so I guess its an oversight
19:12:47ZevvI only use it as a statement, never as an expression
19:14:29*purebadger joined #nim
19:14:34Zevvstdlib never seems to use it as an expression either
19:15:09*lmariscal quit (Client Quit)
19:15:27*lmariscal joined #nim
19:20:18*jjido joined #nim
19:24:32*natrys joined #nim
19:27:03FromDiscord_<demotomohiro> I found template that declare new constant initialized with strformat can be written simply with block expression.
19:27:03FromDiscord_<demotomohiro> https://wandbox.org/permlink/l2NM9SV0WCYCVOoj
19:28:11FromGitter<zacharycarter> how can I get this to compile? https://gist.github.com/zacharycarter/4acb7eb22c69774451325fb2a64452bb
19:28:12*purebadger quit (Read error: Connection reset by peer)
19:28:57FromGitter<zacharycarter> do I just need to use a generic instead?
19:29:32FromGitter<zacharycarter> well a generic works so I'll go with that
19:29:37*purebadger joined #nim
19:30:36Araqclyybber: here is my guess
19:30:49Araqadd(s,
19:30:49Araq `=`(:tmpD142113, a)
19:30:49Araq :tmpD142113)
19:31:18Araqdoesn't empty the 'tmp' afterwards so it's destroyed at scope exit
19:31:42Araqbut it's already part of 's' so when s's destructor runs you get a double-free
19:32:18noonien`bin/nim cc -r tools/niminst/niminst --var:version=0.20.99 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini` seems to fail, here is the complete build log: http://ix.io/1NrC
19:32:31noonienthe recursion error is at the end
19:32:48*thelounge30 joined #nim
19:33:45Zevvnoonien: that's your bug with a debug compiler?
19:34:02*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:34:13Zevvso there's a loop in your AST
19:34:24noonienheh, not yet, this is me trying to compile the latest nightly with debug
19:34:47Araqnoonien: I think 'niminst' doesn't work with a debug build of the compiler
19:34:56AraqI mean, for nobody.
19:35:11Araqit's been this way since quite some time, nobody fixed it
19:35:20clyybberAraq: Yeah, I can confirm that with a few printf's
19:35:36clyybberbut I wasn't too familiar with how the strings work internally
19:35:40noonieni see, i'm unsure what calls niminst, or what it does
19:35:45clyybbers/wasn't/am not
19:35:52*jjido joined #nim
19:36:08*jjido quit (Client Quit)
19:36:21Zevvnoonien: I guess building nim the nim way would be easier here
19:36:25clyybberAraq: So whats the fix? It doesn't seem obvious to me
19:36:27Zevvdo the ./koch temp instaed
19:37:07FromDiscord_<demotomohiro> @zacharycarter, you can declare bars as seq[Foo] type by casting new(Bar) to Foo.
19:37:07FromDiscord_<demotomohiro> https://wandbox.org/permlink/DnYAIS2QYllUQqhz
19:37:14Araqclyybber: you miscompile the builtin system.add
19:37:26Araqit doesn't communicate the 'wasMoved' idea
19:37:37Araqprobably a ccgexprs.nim bug
19:37:49FromGitter<zacharycarter> demotomohiro: thanks - that's a good suggestion
19:38:07Zevvdemotomohiro: Yeah, but I guess he was looking for a way to do a conversion like seq[Foo](bars) instead
19:39:48*jjido joined #nim
19:40:15*LeonardoMariscal left #nim ("User left")
19:42:29Araqhttps://davmac.wordpress.com/c99-errata/ the C spec makes no sense, confirmed.
19:42:48*lmariscal quit (Changing host)
19:42:48*lmariscal joined #nim
19:43:52*ehmry quit (Quit: leaving)
19:44:10FromGitter<arnetheduck> I'd say the users:issues ratio of `C` is pretty decent
19:44:25*thelounge30 quit (Quit: The Lounge - https://thelounge.chat)
19:44:57Araqyou can say the same for JavaScript
19:45:15Araqwhat you're really saying here is that "life is good when you got no competition"
19:45:20*hoijui joined #nim
19:45:45FromGitter<arnetheduck> survivor bias?
19:47:15Zevvboth darwinian languages
19:47:32*hoijui quit (Remote host closed the connection)
19:47:41clyybberAraq: Sorry I can't follow, so we need wasMoved again?
19:50:58*lf-araujo joined #nim
19:54:20solitudesfnarimiran, reimplemented the diffimg thing in nim https://github.com/SolitudeSF/diffimg, sadly its ~30% slower than rust one, and im using my own image library, so i have no none to blame. but at least entire implementation is under 50 lines
19:55:13*purebadger quit (Ping timeout: 248 seconds)
19:57:06Araqclyybber: nope, proc add[T](x: seq[T]; y: sink T) needs to call =move internally
19:57:43*nsf quit (Quit: WeeChat 2.4)
19:58:06Araqand the 'y' needs to be passed byref
19:58:34*PMunch joined #nim
19:58:49Araqthere is no 'wasMoved' in the spec. and if the spec is correct there must not be a wasMoved in your implementation either
19:59:27clyybberalright, so I change the signature of add
19:59:39clyybberand that will make it pass byref automatically
19:59:50clyybberas sink parameters are passed like that in the new spec
20:00:25Araqthe signature of 'add' is already correct
20:00:33clyybberbut there is no sink?
20:00:48Araqproc add*[T](x: var seq[T]; value: sink T) {.magic: "AppendSeqElem", noSideEffect.}
20:01:24clyybberoh, I was looking at the string version, sry
20:01:32*ehmry joined #nim
20:02:03Araqand if the signature were missing the 'sink' your transformation wouldn't introduce the copy...
20:02:24Araqas the tranformation doesn't special case mAppendSeqElem
20:03:19Araqinstead of add(s, (tmp = f(); tmp)) you need
20:03:31Araqadd(s, (tmp = f(); addr(tmp))
20:04:06Zevvsolitudesf: you're counting image loading time or only the getDiffRatio?
20:05:19solitudesfim timing built binary. and actually when im not outputting the image, but only getDiffRatio, my program is more than twice faster
20:07:16ZevvI guess you might be able to speed it up if you allow your code to get vectorized
20:08:20solitudesfif i was above 100iq i might woudve known how to do this
20:08:45nooniendoes anyone run nim code in production? and, have you encountered any big issues with the language?
20:09:57PMunchYes, and no
20:10:14PMunchSince it compiles to binaries you're mostly fine for stuff that you have deployed
20:10:34dom96noonien, have you used the forum? It's written 100% in Nim :)
20:10:46dom96Been running smoothly for years
20:11:01noonienawesome!
20:12:43noonieni'm not asking if nim is a good language, it is, it's why i'm using it. but i've had a few issues i had to report, and i'm not really using it for that long. perhaps i'm going into uncharter territory
20:13:10solitudesfha, i removed the saving from my and rust version and my version is 3 times faster
20:13:16solitudesfso the bottleneck is in stb_image
20:14:55Araqnoonien: threading and async are still quite rough, even after all these years... I think it's simply hard
20:15:38noonienhehe, yeah, i've mostly been writing async networking code, i've not done any threading just yet though
20:16:24noonienoh, cool, i managed to get the debug version up, and now i get a traceback with the gc sigsegv, but it doesn't appear to be helpful
20:16:49*Trustable quit (Remote host closed the connection)
20:17:38noonienhmm, this time i'm getting the SIGSEGV in decRef, i remember the failing assert was in incRef
20:18:03dom96Araq, s/quite/a little/
20:18:16dom96I disagree in general though. Async is one of the most tested parts of Nim
20:18:35FromGitter<Varriount> Zevv: Writing Python code
20:18:44Araqyou fixed a leak only recently, dom96
20:18:58Araqthat was in there for who-knows-how-long
20:19:40dom96Yes, but we've known about /a/ leak for a long time
20:19:52dom96I'm becoming more and more confident that this is /the/ leak
20:20:07dom96Are there other issues that we're aware of that have been as big as the async leak(s)?
20:20:13FromGitter<mratsim> is that the new /leet/ speak?
20:20:52dom96It's poor man's italics
20:21:32Araqthere also was a codegen bug that introduced leaks
20:22:04Araqmostly affecting async code, of course
20:23:05Araqthe SSL wrapper also gives me nightmares
20:24:57ZevvVarriount: at least you're writing code. I've been doing nothing but plumbing the last few months, except for my spare time projects
20:25:04noonienhere are the traces with the debug build: http://ix.io/1Ns5
20:25:09noonienno changes that i can see
20:25:15noonienperhaps this is the async leak? hehe
20:26:09Zevvnoonien: dang, that's a tough one. I can't think of anything else for now. I've seen it with the shallowCopy once, and that's about it
20:26:10dom96do you have smallish code that you can share reproducing this?
20:27:15nooniensadly, no, even changing some values makes the bug not trigger anymore
20:27:18*brakmic joined #nim
20:27:28noonienis there more logging i can enable? gc traces?
20:27:30lf-araujoWhat should I use to cast a string into float?
20:27:38*brakmic__ quit (Read error: Connection reset by peer)
20:28:06AraqincRef interiorPtr is already quite telling
20:28:14Araqdo you use shallowCopy()?
20:28:21Zevvhe does :)
20:28:30nooniennot anymore, i've taken that out
20:28:35Zevvnoonien: all of them?
20:28:43noonienas far as i can tell, yes
20:28:47noonienlet me sift thought the dependencies as well
20:29:24Zevvput an echo() in system.nim shallowCopy() proc
20:29:27Zevvyou'll see it happen
20:29:36noonienoh, cool, just a second
20:30:32noonien`proc shallowCopy*[T](x: var T, y: T) {.noSideEffect, magic: "ShallowCopy".}`
20:30:35AraqZevv: I don't think that works
20:30:37nooniendoes this still work?
20:30:44Zevvoh :/
20:31:03Zevvah it's magic, right
20:32:18noonieni'll just rename the original, create a new one, echo and call the original
20:33:48noonienheh, echo is not defined, nor is stdin or os
20:34:10nooniennot assert
20:36:00*a_b_m joined #nim
20:36:56lf-araujoI am trying to create a small proc for terminal interaction, a simple readline, but it should return a float:
20:37:04lf-araujohttps://i.imgur.com/vx0p1Ha.png
20:37:13lf-araujobut code like:
20:37:51lf-araujohttps://i.imgur.com/AQ1OkVw.png
20:38:12narimiranlf-araujo: use https://nim-lang.github.io/Nim/strutils.html#parseFloat%2Cstring
20:38:40lf-araujohttps://i.imgur.com/XXfeAGr.png
20:39:03lf-araujonarimiran: excellent, thanks
20:39:17dom96noonien, emit some C code :)
20:39:34*PMunch quit (Remote host closed the connection)
20:40:14*abm quit (Ping timeout: 272 seconds)
20:40:26noonienhmm, it looks like shadow is indeed called
20:40:32noonienshallowCopy*
20:40:42noonienis there an easy way of printing stacktraces?
20:43:11*sz0 quit (Quit: Connection closed for inactivity)
20:45:39lqdev[m]writeStackTrace()
20:46:37noonienyeah, i tried that, adding it in a function at the end of lib/system.nim, it's undeclared :(
20:46:43noonieneven though i can find it in the file
20:47:26lqdev[m]strange
20:47:41lqdev[m]is nimpretty usable at this point in time?
20:49:44*narimiran quit (Ping timeout: 272 seconds)
20:50:35*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:52:54lf-araujoWhat is wrong with error handling in the excerpt:
20:53:02lf-araujohttps://i.imgur.com/PbJQkCh.png
20:53:25lf-araujoIt is giving me: Error: ':' or '=' expected, but got 'echo'
20:53:42solitudesfyou declare return variable and dont specify the type
20:53:52solitudesfalso you dont have to declare it explicitly, nim has implicit return variable
20:55:01lf-araujosolitudesf: thank you
20:55:11solitudesf*result variable
20:56:18lqdev[m]uh seems that nimsuggest didn't add nimpretty to my path
20:56:33lqdev[m]choosenim*
20:56:33lqdev[m]not nimsuggest
21:00:05Araqlqdev[m]: definitely usable. afaict.
21:09:51noonienhmm, is writeStackTrace magic?
21:10:06noonieni can't seem to find how stack traces are generated
21:11:24*Vladar quit (Remote host closed the connection)
21:14:25*stefanos82_ joined #nim
21:15:31*stefanos82_ quit (Client Quit)
21:15:55*stefanos82_ joined #nim
21:16:01*stefanos82_ quit (Remote host closed the connection)
21:16:18*stefanos82 quit (Ping timeout: 245 seconds)
21:22:22noonienis `raise` completely in the compiler?
21:23:27Araqno, but I doubt knowing about system/excpt.nim helps you much
21:25:54noonienah, auxWriteStackTrace seems to get the stacktrace, cool
21:29:37noonieni'm still trying to determine where shallowCopy is being called, outside the stdlib, so i can make sure it's not me
21:31:49*solitudesf quit (Ping timeout: 244 seconds)
21:38:20Zevvquite the hunt
21:39:14noonienit's turtles all the way down
21:44:09noonienhah, lib/nintendoswitch
21:44:16lqdev[m]I'm so pedantic I don't even need nimpretty lol. just tried it on a few files and there aren't any differences
21:45:20*brakmic quit ()
21:45:41clyybberAraq: Currently extracting a test case to see why 'y' isnt getting moved in add(x: var seq[T], y: sink T); but now getting =destroy operator not found for int
21:48:57Araqwell
21:49:04Araqint has no =destroy
21:49:58clyybberyeah, is there some helper function in the compiler so I can make genDestroy skip those?
21:50:10clyybberthose primitives?
21:50:41Araqjust check if t.destroy.isNil
21:50:53clyybberthanks :)
21:59:41nooniencan i disable catching SIGSEGV?
21:59:59Araq-d:noSignalHandler
22:03:24*dwdv quit (Quit: quit)
22:04:57FromGitter<juancarlospaco> `nim-0.20.0/lib/pure/strtabs.nim(301, 45) Error: undeclared identifier: 'getEnv'` blocks importing several modules into NimScript, but `getEnv` does exist on NimScript, same error for lots of modules on NimScript mode, I dunno maybe a workaround is possible. :) /cc @kaushalmodi
22:07:07*a_b_m quit (Read error: Connection reset by peer)
22:11:04*abm joined #nim
22:13:55clyybbergn8
22:13:58*clyybber quit (Quit: WeeChat 2.5)
22:23:52*lf-araujo quit (Remote host closed the connection)
22:24:10*lf-araujo joined #nim
22:34:15*ertp07 quit (Ping timeout: 258 seconds)
22:45:33*lf-araujo quit (Remote host closed the connection)
22:45:50*lf-araujo joined #nim
22:48:47*natrys quit (Quit: natrys)
22:53:05noonieni've put my program into gdb, put a breakpoint on all shallowCopy calls, and let the program run until sigsegv
22:53:28noonienshallowCopy doesn't seem to be called directly nowhere outside the stdlib
22:55:04noonieninterestigly, it mostly seems to happen when doing `await`, `asyncCheck`, an array slicing, and a StringStream.write(byte(something))
22:55:52noonieni'll try to check if the awaits are just there because they're just in the stacktrace, because they eventually end up doing StringStream.write
23:09:36*krux02_ joined #nim
23:12:39*krux02 quit (Ping timeout: 264 seconds)
23:19:44*lf-araujo quit (Remote host closed the connection)