<< 28-09-2019 >>

00:03:14*Hideki_ quit (Ping timeout: 240 seconds)
00:12:33*whaletechno joined #nim
00:18:06*ng0 quit (Quit: Alexa, when is the end of world?)
00:18:29*Hideki_ joined #nim
00:32:00*Hideki_ quit (Remote host closed the connection)
00:32:39*Hideki_ joined #nim
00:37:17*Hideki_ quit (Ping timeout: 276 seconds)
01:11:28*Hideki_ joined #nim
01:17:14*Hideki_ quit (Ping timeout: 240 seconds)
01:23:19*doesntgolf joined #nim
01:37:06*owl_000 joined #nim
01:38:23*owl joined #nim
01:41:33*owl_000 quit (Ping timeout: 245 seconds)
01:48:45*neceve quit (Remote host closed the connection)
01:50:00*Jjp137 quit (Ping timeout: 268 seconds)
01:51:13*Jjp137 joined #nim
01:53:08*Hideki_ joined #nim
02:03:38*exelotl quit (Ping timeout: 245 seconds)
02:09:17*Hideki_ quit (Ping timeout: 240 seconds)
02:36:00owlcould not load : libcrypto and libeay64, nimble , https://i.ibb.co/YTb6c08/Capture.png
02:36:01*doesntgolf quit (Read error: Connection reset by peer)
02:37:07*thomasross quit (Remote host closed the connection)
02:37:35*thomasross joined #nim
02:37:35owlinstalled using choosenim, nim 1.0.99
02:38:21owlwindows
02:40:29shashlickDownload the dlls zip file and extract it in .nimble/bin
02:42:16shashlickhttps://github.com/dom96/choosenim/issues/53
02:42:57*mal`` quit (Ping timeout: 245 seconds)
02:44:24*Hideki_ joined #nim
02:44:43FromGitter<gogolxdong> ./koch --latest nimble
02:45:52*mal`` joined #nim
02:46:32owli think, previously nim version 1.0.0 was in my path, in the issue dom said `needsDllInstall` return false, maybe this is the reason. because in that directory there are all the dlls.(i removed the path after using choosenim)
02:48:36*Hideki_ quit (Ping timeout: 240 seconds)
02:51:25owlchoosenim and the procedure for installing nim in nim website is not compatible.
02:53:50shashlickThere's a PR already to fix that issue
02:55:24shashlickhttps://github.com/dom96/choosenim/pull/135
02:57:38owlin the nim site, for windows it is a zip of precompiled files. rather it should be choosenim, than if the platform is windows it will download binary (stable switch) more unified procedure.
02:57:51owlacross os
02:59:21shashlickThat's the goal, both options are available
03:00:09FromGitter<gogolxdong> suggest installing Nim from source.
03:00:26FromGitter<gogolxdong> do you have koch?
03:00:56owlyes, i have now working nim (after adding the zip)
03:01:03owlnimble
03:22:18*endragor joined #nim
03:56:11*chemist69 quit (Ping timeout: 276 seconds)
03:57:40*chemist69 joined #nim
04:12:33*dddddd quit (Remote host closed the connection)
04:14:11*teimosso quit (Quit: teimosso)
04:40:26*endragor quit (Ping timeout: 240 seconds)
05:03:33*endragor joined #nim
05:06:22*uu91 quit (Ping timeout: 265 seconds)
05:08:08*nsf joined #nim
05:22:02*theelous3 quit (Ping timeout: 240 seconds)
05:42:25*solitudesf- joined #nim
05:45:02*narimiran joined #nim
05:52:26*owl quit (Ping timeout: 240 seconds)
06:09:21*Hideki_ joined #nim
06:11:09*traviss joined #nim
06:11:15*Traviss__ joined #nim
06:12:24*Traviss__ quit (Client Quit)
06:12:24*traviss quit (Client Quit)
06:12:44*traviss joined #nim
06:13:59*Hideki_ quit (Ping timeout: 276 seconds)
06:14:16*solitudesf- quit (Ping timeout: 240 seconds)
06:38:29FromGitter<zacharycarter> morning
06:40:40Zevvoi o/
06:44:39sealmovemorning!1!1
06:49:29sealmoveWhat'
06:49:35sealmoveWhat's up?
06:49:49sealmoveI'm ready to try npeg finally :>
06:50:39FromGitter<zacharycarter> working on loading iqm models atm - or about to start anyway
06:52:08sealmoveawesome
06:53:16sealmovezachary if you have to write a iqm parser for that, consider using: https://kaitai.io/
06:53:32sealmoveyaml is easier :>
06:54:38FromGitter<zacharycarter> meh - I don't want to introduce any new dependencies and I don't think writing an IQM parser is that difficult
06:56:13sealmoveIt doesn't introduce any dependancies. simply generates a parser based on a yaml description in the language of your choice (currently I am working on Nim support). But well, just trying to advertise KS because it's cool project. :>
06:56:34FromGitter<zacharycarter> ah
06:56:45FromGitter<zacharycarter> that does sound neat - so wait, you can already generate parsers for Nim?
06:56:57sealmoveno :( but soon!! wait for it
06:57:15FromGitter<zacharycarter> oh cool
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:06*owl_000 joined #nim
07:03:17sealmoveNim will hit the dashboard soon: https://ci.kaitai.io/
07:03:26sealmoveSome code has already been merged
07:03:53sealmoveAlso very happy that it will hit it with version 1 :)
07:04:48*gmpreussner joined #nim
07:05:34FromGitter<zacharycarter> niceeee
07:20:01Zevvoi sealmove, what's your project?
07:21:13sealmovenothing yet, but I am seriously considering writing that shell, because I am not satisfied with any shell (unlike general purpose programming languages land where Nim is perfect :))
07:22:29*Vladar joined #nim
07:22:34sealmovebtw fun fact, the guy who wrote Kaitai Struct is a maintainer of one of the best bash tutorials: http://mywiki.wooledge.org/BashGuide
07:26:41ZevvIIRC varriount was also doing shell stuff
07:26:59Zevvah yes https://github.com/Varriount/commandant
07:28:37*thomasross quit (Remote host closed the connection)
07:29:05*thomasross joined #nim
07:31:26sealmove2 months ago, this is fresh
07:31:32Zevv:)
07:33:33ZevvEvery repo 60 days stale deserves an obituary!
07:34:57ZevvI have this cronjob committing something every two days, it keeps the vultures away
07:36:07*thomasross quit (Remote host closed the connection)
07:36:30*thomasross joined #nim
07:40:07sealmove:D
08:01:58*asymptotically joined #nim
08:03:37*navinmistry joined #nim
08:05:53*navinmis_ joined #nim
08:09:03*navinmistry quit (Ping timeout: 245 seconds)
08:09:15*nsf quit (Quit: WeeChat 2.5)
08:09:30*ng0 joined #nim
08:12:58sealmoveFor options, can't you just do something on the lines of `var x: Option[int] = 5`? Do you actually have to write var x: Option[int] = some(5)?
08:15:47Zevvleorize: what is the expected behaviour of nim.nvim on a new file that has not hit disk yet?
08:15:53Araqyou write var x = some(5)
08:16:19Zevvleorize: not this I guess? https://asciinema.org/a/ApdZ2d9SzGfxWlLhRITF6DPsN :)
08:16:19leorizeZevv: it depends
08:16:53leorizehmm
08:19:03*navinmis_ quit (Ping timeout: 245 seconds)
08:20:07sealmovecan I have Option[seq[int]]? (optional seq)
08:21:07ZevvI don't see why not?
08:21:58FromGitter<zetashift> Anybody know how to get the length of a list: https://nim-lang.org/docs/lists.html#DoublyLinkedList ?
08:22:01*ng0 quit (Remote host closed the connection)
08:22:12sealmoveso then to get the value you do `get(myOptionalSeq)[index]` I guess
08:22:46Zevvzetashift: iterate and count
08:23:07FromGitter<zetashift> ah cool, thought the stdlib might have some proc I was not seeing
08:23:25*ng0 joined #nim
08:24:02ZevvIf you need to know the number of elements often, you might not have picked the optimal data structure for the task
08:27:32Araqsealmove: usually 0-length seqs do fine, no need to make it optional
08:28:08FromGitter<zetashift> yea but seq's didn't work in this case so I'm just trying this out.
08:28:36*navinmistry joined #nim
08:28:49sealmoveAraq: oh useful advice
08:38:21leorize@zetashift: what's your use case?
08:38:59leorizeZevv: what version of neovim are you on?
08:39:13ZevvNVIM v0.3.4
08:43:40*navinmistry quit (Remote host closed the connection)
08:45:50*navinmistry joined #nim
08:47:04leorizecan you reproduce the bug, then after the first error message was shown, send me the actual function content. You can get this via :function {<number>}
08:47:58*navinmistry quit (Remote host closed the connection)
08:48:45*Trustable joined #nim
08:50:00*navinmistry joined #nim
08:54:23*navinmistry quit (Ping timeout: 246 seconds)
08:54:25*navinmis_ joined #nim
08:55:47*navinmistry joined #nim
08:56:54Zevvwell that was an interesting session: https://asciinema.org/a/cScSr6C9kFGquBJPvtOx4UASc
08:57:10ZevvI could just have sent you the function output in an ix snippet I guess :)
08:57:45*navinmistry quit (Remote host closed the connection)
08:58:07*navinmistry joined #nim
08:58:26*navinmis_ quit (Ping timeout: 240 seconds)
08:58:27Zevvhttp://ix.io/1XdF
09:01:46*navinmistry quit (Remote host closed the connection)
09:02:00sealmoveI have to close stream manually always?
09:03:36FromGitter<zetashift> @leorize dungeon generation, but seq's should work, I think I have a looping logic error in my code.
09:04:38FromGitter<zetashift> The dungeon generation uses Python so I'm trying to keep it as Nim-ish as possible(even learned about bit fields!)
09:05:35leorizeZevv: update your neovim :P
09:05:39leorizethis is certainly a neovim bug
09:05:44Zevvsir yes sir
09:06:29Zevv~NVIM v0.3.8
09:06:32Zevvstill
09:06:45*navinmistry joined #nim
09:08:40leorizealright, try this:
09:09:00Zevvimpornvim: /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/eval/executor.c:119: eexe_mod_op: Assertion `false' failed.
09:09:04ZevvBwah that's with latest
09:09:18leorizeadd 'echom string(a:data[0])' to autoload/nim/suggest/utils.vim:30
09:09:41leorizealso 'echom a:stream' after
09:09:53leorizethen send me the output of ':messages'
09:09:54*navinmistry quit (Remote host closed the connection)
09:10:13leorizewhen it errors, of course
09:10:44leorizeZevv: yea I never understand how neovim just crashes like that in certain setups...
09:11:01leorizemaybe you can ask around in #neovim?
09:11:07leorizec
09:11:09leorizecould be a bug
09:11:23Zevvyeah probably. It died on me in production the other day and I was pretty nastily pissed about that
09:11:31ZevvI take crashes from a lot of things, but not from my editor
09:12:12ZevvI probably did the wrong thing: http://ix.io/1XdH
09:12:16ZevvI'll ask in neovim
09:12:20Zevvthanks anyway!
09:12:52*Zevv goes back to mending his wardrobe
09:13:02sealmovehey guys, how do I set the path in VSCode? I can run nim from the integrated terminal but I get a warning message that nim is not in my path, and I guess as a result the vscode nim plugin can't use it.
09:13:56leorizeZevv: well guess that's a motivation for me to work on vim8 support :P
09:14:10Zevv\o/
09:14:58FromDiscord<Kiloneie> @sealmove have you ran finish.exe from nim's folder ?
09:16:02FromDiscord<Kiloneie> i have a video setting up Nim and Vs Code for Nim 1.0
09:16:04sealmoveKiloneie: I am on Linux
09:16:08FromDiscord<Kiloneie> ah
09:16:28FromDiscord<Kiloneie> i don't know much about that, but you need to somehow add nim to your path
09:16:44sealmovethat's exactly my question :P how?
09:16:54FromDiscord<Kiloneie> https://nim-lang.org/install_unix.html
09:17:07narimiransealmove: i think you need to add nim to /etc/profile for vscode to see it
09:17:08FromDiscord<Kiloneie> the information is here, i sadly don't have linux here
09:17:27sealmovebut of course I have nim in my shell path
09:17:35narimiransealmove: i have a simple script in /etc/profile.d
09:17:48sealmovebut VSCode seems to use paths from elsewhere
09:17:57*nsf joined #nim
09:18:14sealmovenarimiran: what does it do?
09:19:21narimiranPATH=/home/miran/nim-lang/Nim/bin:/home/miran/.nimble/bin:$PATH ; export PATH
09:20:22FromGitter<zetashift> there is no way to set nim executable path in the VSCode settings.json it should be indeed in your path
09:20:41sealmoveok programming question :P I've made an object type that have a field which is a FileStream. Is it possible to make a destructor that closes the stream automatically? Will this work with GC?
09:21:17*krux02 joined #nim
09:22:23sealmoveok I guess VSCode only looks for path in bash, zsh etc, and not the hipster shell I'm currently using.
09:22:47FromGitter<alehander42> Araq
09:22:53FromGitter<alehander42> do you know why can .gensym.
09:23:19FromGitter<alehander42> produce an error for redefinition
09:23:26FromGitter<alehander42> i plan to try to manually generate an ident
09:24:33narimiransealmove: fish?
09:25:02sealmoveelvish
09:25:05FromGitter<zetashift> Anybody know what I'm doing wrong here? https://play.nim-lang.org/#ix=1XdM
09:26:08narimiranfor starters, you don't need line 2 :)
09:26:41FromGitter<zetashift> ah I wasnt sure about that
09:27:08narimiranwhat is `self.cellWalls.key`?
09:27:46sealmove`self` is valid?
09:27:55sealmoveI think it is experimental feature?
09:28:07FromGitter<zetashift> yea it's godot-nim and it uses self to refer to the current node
09:28:08narimiranif you want to keep the track of (un)visited stuff, i would go with a set, net seq
09:28:20FromGitter<zetashift> cellWalls is a table where the keys are vectors
09:28:43sealmovehttps://nim-lang.org/docs/manual_experimental.html#automatic-self-insertions
09:29:22planetis[m]hi
09:30:08sealmovehey
09:31:09planetis[m]cant wait for October
09:31:28FromDiscord<as1ndu> Whats in October?
09:31:44planetis[m]Hacktoberfest ofc!
09:31:44sealmovezetashift: are `+` and `in` correctly overloaded for Vector2?
09:32:25icyphoxwe need nim in gsoc
09:32:33narimirancan you try to put parentheses here: `if (cell + n) in unvisited`?
09:34:15planetis[m]sealmove: works fine with gc destructors
09:34:58planetis[m]just write a =destroy function and write ``if stream != nil: close(stream)``
09:36:10sealmovegreat, thanks
09:36:45*SebastianM joined #nim
09:37:41FromGitter<zetashift> @sealmove yes and I got it working using a mixture of Ordered and HashSets, thanks narimiran!
09:38:12*SebastianM quit (Client Quit)
09:38:51leorizeyou don't need gc destructors to use destructors
09:39:10*SebastianM joined #nim
09:39:59*SebastianM` joined #nim
09:40:29*SebastianM` quit (Client Quit)
09:40:29*dddddd joined #nim
09:42:17*Sebastia` joined #nim
09:42:32*Sebastia` quit (Client Quit)
09:42:47*SebastianM quit (Remote host closed the connection)
09:45:53*SebastianM joined #nim
09:47:31*navinmistry joined #nim
09:48:39*SebastianM quit (Client Quit)
09:49:43*SebastianM joined #nim
09:49:57*SebastianM quit (Client Quit)
10:11:25*Hideki_ joined #nim
10:15:36*Hideki_ quit (Ping timeout: 240 seconds)
10:16:11*traviss quit (Ping timeout: 265 seconds)
10:21:51*clyybber joined #nim
10:22:58sealmovehow do I get rid of unsureAsgnRef error?
10:23:09sealmovewhen using options + cast?
10:24:09*endragor quit (Remote host closed the connection)
10:25:15FromGitter<alehander42> why do you need to cast
10:27:12leorizethe `cast` is definitely your problem :P
10:28:56clyybberrayman22201: Btw, why does this andrewbriggs downvote every PR you send out on github?
10:29:10sealmoveok let me explain
10:29:50sealmovei have an initializer proc. my object has a bunch of fields plus some extra fields that reference the previous fields.
10:30:52*navinmistry quit (Remote host closed the connection)
10:31:22sealmovehttps://play.nim-lang.org/#ix=1Xe5
10:32:15*navinmistry joined #nim
10:32:37sealmovehttps://play.nim-lang.org/#ix=1Xe7
10:32:52sealmovethe reference may cast the field to a different type
10:33:43sealmovein general i need a way to access the underlying bytes of `result` and do low-level things with them (I read them from a stream)
10:33:43FromGitter<alehander42> but why would it cast it
10:33:48FromGitter<alehander42> doesnt sound typesafe
10:34:16FromGitter<alehander42> hm, what is result
10:34:18FromGitter<alehander42> MyObj
10:34:19FromGitter<alehander42> ?
10:34:33sealmoveresult could be another type
10:34:56FromGitter<alehander42> ok, so i guess you can always cast it as a byte array or something like that
10:35:33sealmovehere is the full code.. if it helps: https://play.nim-lang.org/#ix=1Xea
10:37:01FromGitter<alehander42> but hm
10:37:19sealmovealways reading as byte array would be ugly, currently I use procs from stream library like readUInt32 etc
10:37:42FromGitter<alehander42> there is a small thing
10:37:57FromGitter<alehander42> docs cant be casted to
10:37:59FromGitter<alehander42> uint32
10:38:01FromGitter<alehander42> i mean
10:38:04FromGitter<alehander42> i see what you do
10:38:07FromGitter<alehander42> you replace its bytes
10:38:12FromGitter<alehander42> but seq can be 8 bytes
10:38:15FromGitter<alehander42> and uint32 4
10:39:14sealmovewhich line?
10:39:16FromGitter<alehander42> ah wait
10:39:24FromGitter<alehander42> i thought you set root.foo =
10:39:25FromGitter<alehander42> sorry
10:39:27FromGitter<alehander42> didnt get it
10:43:52FromGitter<alehander42> not sure how to reproduce it , sorry, where does the unsureAsgnRef problem happens
10:46:01sealmoveline 48
10:46:07*Metrime joined #nim
10:49:12sealmoveI think I should just re-read from stream though
10:49:21sealmovecasting from another variable seems worse
10:49:43narimirangah, i know i'm old when i start typing forum reply and before sending it i just say "naaah, it isn't worth it" and just close the tab....
10:51:01*navinmistry quit (Remote host closed the connection)
10:51:59*navinmistry joined #nim
10:54:42FromGitter<alehander42> good for you :P
10:54:46*Metrime quit (Quit: Konversation terminated!)
10:55:39narimiran...and for everybody else who now don't have to read my rants :D
10:56:04narimiranbut disappointing to see my youth gone :)
10:56:31*endragor joined #nim
10:57:26FromGitter<alehander42> sealmove do you get /home/al/nim/lib/system/gc.nim(250) unsureAsgnRef โŽ /home/al/nim/lib/system/gc.nim(183) incRef โŽ SIGSEGV: Illegal storage access.
10:57:43FromGitter<alehander42> narimiran, oh reminds me of my julia forum long posts
10:57:56FromGitter<alehander42> i should've been shorter and more to the point there
10:57:59sealmovealehander42: yes exactly this error
10:58:11FromGitter<alehander42> sealmove, well it just means that
10:58:12FromGitter<alehander42> hm
10:58:51*traviss joined #nim
11:00:01FromGitter<alehander42> yeah so the problem is
11:00:21FromGitter<alehander42> result.someInt
11:00:27FromGitter<alehander42> should be a valid pointer
11:00:35FromGitter<alehander42> because basically that's what you make nim beleive
11:00:43FromGitter<alehander42> so the gc tries to dereference this value
11:01:01FromGitter<alehander42> c.refcount = c.refcount +% rcIncrement
11:01:07FromGitter<alehander42> where c = result.someInt
11:01:42*endragor quit (Ping timeout: 245 seconds)
11:01:46FromGitter<alehander42> ok, its not exactly this
11:01:49sealmoveis result.someInt not a valid pointer? why?
11:01:53FromGitter<alehander42> but its a pointer based on that
11:01:58FromGitter<alehander42> well, is it
11:02:03FromGitter<alehander42> i cant debug your program
11:02:11FromGitter<alehander42> but thats how i can reproduce it
11:02:22FromGitter<alehander42> if i cast a int which is not valid pointer
11:03:55sealmovei see, thanks!
11:03:56FromGitter<alehander42> the bigger problem is
11:04:01FromGitter<alehander42> it cant be valid
11:04:03FromGitter<alehander42> possibly
11:04:16FromGitter<alehander42> because someInt is not 64bit
11:04:28FromGitter<alehander42> and at least on some arch like mine, pointers are 64bit
11:17:54*Hideki_ joined #nim
11:24:21*navinmistry quit (Remote host closed the connection)
11:24:32*navinmistry joined #nim
11:26:32dom96So this is fun https://twitter.com/d0m96/status/1177907262104522753
11:26:42dom96My Nim program suddenly started to repro a macOS bug
11:26:46dom96Guess it's time to upgrade
11:29:42*Hideki_ quit (Remote host closed the connection)
11:30:45*Hideki_ joined #nim
11:35:44*Hideki_ quit (Ping timeout: 276 seconds)
11:52:47FromGitter<alehander42> is there a lib
11:52:52FromGitter<alehander42> for git diff parsing
12:07:14*navinmistry quit (Remote host closed the connection)
12:11:10*Hideki_ joined #nim
12:11:34FromGitter<alehander42> i can parse it for my needs
12:11:34FromGitter<alehander42> for now
12:16:02*Hideki_ quit (Ping timeout: 276 seconds)
12:21:46Zevvparsing a diff, and then what?
12:24:12*nif quit (Quit: ...)
12:24:35*nif joined #nim
12:30:19*nif quit (Quit: ...)
12:30:29*nif joined #nim
12:42:14FromGitter<alehander42> ok it works
12:42:20FromGitter<alehander42> well, i was doing a prototype for wok
12:42:23FromGitter<alehander42> work
12:42:42*NimBot joined #nim
12:42:49FromGitter<alehander42> so i can just iterate and check for 1-2 string matches
12:43:07FromGitter<alehander42> while passing -U:hugenumber to get a whole file context diff
12:45:16planetis[m]sealmove, why don't you use inheritance everything seems to inherit from DefaultEndianExprIsBe, no? also you cast from an object type to a one with different layout
12:46:07*Hideki_ joined #nim
12:47:45sealmovethe other types don't inherit anything from DefaultEndianExprIsBe, they are simply contained within it.
12:48:04sealmoveyeah, the cast is completely wrong, I found a better way to do it.
12:49:03sealmove(i want to have an explicit tree structure, not inherit stuff)
12:51:57planetis[m]right :) you are doing pretty complex stuff, what are these for, making anything in particular?
12:52:16*endragor joined #nim
12:53:44*LargeEpsilon joined #nim
12:56:26*Hideki_ quit (Ping timeout: 240 seconds)
12:58:53*Trustable quit (Remote host closed the connection)
12:59:56*navinmistry joined #nim
13:00:14*endragor quit (Ping timeout: 276 seconds)
13:00:17FromDiscord<Shield> websocket keeps closing and kills my bot, heartbeats work fine, anybody can help?
13:01:00FromDiscord<Shield> I get 'Exception message: Connection was closed before full request has been made Exception type: [ProtocolError]'
13:01:56planetis[m]why every vector lib in nim does ``sqrt(x*x+y*y)`` and not ``hypot(x, y)`` is it better?
13:04:47*navinmistry quit (Ping timeout: 276 seconds)
13:05:26*daddoo joined #nim
13:05:27*owl_000 quit (Ping timeout: 245 seconds)
13:07:49*Vladar quit (Remote host closed the connection)
13:12:14*gangstacat quit (Quit: ฤœis!)
13:14:25*Hideki_ joined #nim
13:15:47*Hideki_ quit (Remote host closed the connection)
13:15:52*Vladar joined #nim
13:15:55*gangstacat joined #nim
13:17:27sealmoveplanetis: working on a Nim backend for Kaitai Struct: https://kaitai.io
13:20:14sealmoveso the code you saw is also auto-generated with scala
13:21:40dom96hah, I found the problem. Even kernel panics are caused by doing the wrong thing. I was starting a new async proc for each network message I was receiving, and this async proc was scheduling more and more events causing more and more traffic. Still, if this got into the wrong hands it could be a pretty good way to kill people's macs
13:26:17*Hideki_ joined #nim
13:31:26*Hideki_ quit (Ping timeout: 276 seconds)
13:39:57dom96ooh, GitHub tweeted about Nim v1
13:39:59dom96Awesome
13:50:12lqdev[m]dom96: did you just say kernel panic? show me how
13:50:16lqdev[m]I want to experience it on my own computer
13:50:29dom96not really a panic tbh
13:50:35dom96it killed the network stack
13:50:48dom96can't show the code, it's proprietary :P
13:51:14Zevvdom96: seriously, you killed the network stack beyond recovery from userspace?
13:51:45*mibr quit (Ping timeout: 265 seconds)
13:55:16dom96yep
13:57:57dom96Zevv, https://twitter.com/d0m96/status/1177902838451716096
13:58:48Zevvha fun stuff!
14:00:37*endragor joined #nim
14:00:58sealmoveguys, do you think I should use g++ backend instead of gcc?
14:01:09sealmovei never cared but now it's code in production running on travis...
14:01:17sealmoveso maybe it's more important. any suggestions?
14:04:59clyybbersealmove: It doesn't matter unless you use the cpp backend
14:05:09*exelotl joined #nim
14:05:46sealmovei meant c vs cpp backend
14:06:27FromDiscord<mratsim> if you use a lot of exceptions, you probably should use C++
14:06:31*Hideki_ joined #nim
14:06:59FromDiscord<Rika> why so?
14:07:26FromDiscord<mratsim> because it will use use C++ native zero-cost exceptions with the dwarf table magic
14:07:51FromDiscord<mratsim> in C, Nim has its own implementation
14:10:13sealmoveFor now I don't use many exceptions but maybe I will later. So I guess the only reason to go with c instead of cpp is c interoperability? Otherwise cpp is superior?
14:13:53disruptekthe c backend is far better tested and exceptions work as expected. i wouldn't use cpp unless you need to run cpp code.
14:15:23FromDiscord<mratsim> cpp is now part of the test suite though.
14:16:30sealmovei see, thanks guys
14:16:31FromDiscord<mratsim> One issue I've had is when compiling C code (not wrapping) in C++ mode, sometimes the C++ compiler complains because the C code was using C only capabilities like VLAs or C99 constructs
14:17:07*Hideki_ quit (Ping timeout: 245 seconds)
14:18:57*LargeEpsilon quit (Ping timeout: 240 seconds)
14:19:20ZevvYeah I had a similar issue when trying to compile C++ with a C compiler, it complained because C++ code was using things like classes and templates
14:19:26Zevv:)
14:20:59disruptekweird.
14:21:25disruptekboy you play with some crazy tools over there, Zevv. ๐Ÿ˜›
14:22:23Zevvwell, I do my best. I lose a finger or a eye every now and then, but everything for science, right
14:29:09*clyybber quit (Quit: WeeChat 2.6)
14:33:17planetis[m]what was the reasoning for deprecating basic2d? I mean besides needing maintainance (obvious), it is more documentation than any other vector lib in nimble.
14:34:20planetis[m]*it has
14:35:17*traviss quit (Quit: Leaving)
14:37:20sealmovehow to add a ci job for nim? >_< https://github.com/kaitai-io/ci_targets https://github.com/kaitai-io/ci_targets/blob/master/.travis.yml
14:38:42*owl_000 joined #nim
14:50:26*solitudesf joined #nim
14:50:30*Hideki_ joined #nim
14:54:37*Hideki_ quit (Ping timeout: 240 seconds)
15:04:04shashlickCheck out the choosenim Travis
15:05:17shashlickNimble actually
15:05:21shashlickhttps://github.com/nim-lang/nimble/pull/714/files
15:05:30shashlickThat pull request has Windows enabled too
15:07:17*theelous3 joined #nim
15:12:03*owl_000 quit (Ping timeout: 240 seconds)
15:12:26FromDiscord<Kiloneie> What does the echo procedure do in the background to make int +/*- float operations work, but not when using variables of type int and float ?
15:13:54FromDiscord<Rika> is there a guide for test writing
15:14:08sealmoveRika: for the Nim project specifically?
15:14:56*navinmistry joined #nim
15:15:23FromDiscord<Rika> uh no generic test writing for any project in nim
15:18:49FromDiscord<Kiloneie> What voodoo happens in the fourth line ? https://play.nim-lang.org/#ix=1Xg2
15:19:28*navinmistry quit (Ping timeout: 245 seconds)
15:19:42FromGitter<alehander42> i daydreamed again about having a toy lang framework
15:19:43FromGitter<alehander42> https://gist.github.com/alehander42/d207c2f9a681e7c1e37c64b9576c2de7
15:20:13FromGitter<alehander42> i really feel like if we had something like that, it might be simpler to pull out indepent impl-s of smaller/newer langs
15:21:14FromDiscord<Rika> @Kiloneie it seems like its more of how literals work rather than how echo works
15:21:40FromDiscord<Rika> @Kiloneie
15:21:40FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/627525338607386645/unknown.png
15:22:25FromDiscord<Kiloneie> i gotta explain this, if my watcher tries to echo it without variables, they will wonder what the hell is going on... i do too
15:22:51FromDiscord<exelotl> @Rika if you make a new package with `nimble init` it should generate a 'test' folder for you with a simple example
15:23:37FromDiscord<Kiloneie> i don't get it, since if echo is made using untyped, it should work with variables as well...
15:23:55FromDiscord<Rika> @exelotl ah thanks, didn't realize
15:24:19FromDiscord<exelotl> np :)
15:26:09FromDiscord<Kiloneie> Well till someone explains me this voodoo, i will have to jump over it for my video <.<
15:26:56*nsf quit (Quit: WeeChat 2.5)
15:28:04FromDiscord<Rika> im looking into it
15:29:35sealmoveRika: There is the unittest module
15:30:27sealmoveSadly if you use unittest you have to write everything on 1 file
15:31:15*filcuc joined #nim
15:31:51*LargeEpsilon joined #nim
15:32:09filcuci'm developing a qtcreator plugin for nim that uses nimsuggest and i use the --refresh options. I see a continous creation/deletion of temp_$random_number.nims files in the project root dir
15:32:32FromDiscord<exelotl> sealmove: not really, if you run `nimble test` and there are multiple files in the tests directory, it will run all of them
15:32:39filcucor could be causes by nimble --task command?
15:32:43sealmovehelp? :? https://travis-ci.org/sealmove/ci_targets/jobs/590819104
15:32:44filcuccaused
15:32:47Araqalehander42: modern languages are complex beasts and "simple" doesn't cut it. it's not accidentical complexity either
15:33:19Araqfilcuc: nimsuggest doesn't create .nims files, something else must be going on
15:33:19filcucyes
15:33:35filcucAraq: got it is the "nimble tasks"
15:33:57filcucAraq: catched with inotifywait
15:34:01Araqalehander42: take 'closures' for example. spent in total probably 6 months on it
15:34:39Araqthere is nothing "simple" about it, it's just that every language has it and nobody thinks about it
15:34:59Araqthe interaction between generics and subtyping also leads to complexity
15:35:22Araqand again, nothing that programmers think about, but that doesn't make it "simple"
15:36:30FromDiscord<Kiloneie> @Araq Can you explain me why the fourth line works but not the 5th ? https://play.nim-lang.org/#ix=1Xg2
15:37:00narimiranbecause there is a difference between variables and literals
15:37:36filcucdom96: can you give a workaround for these file creation
15:39:00filcucor is there a way to call nimble tasks from a different directory?
15:39:10Araqyou think like "3 + 4 is an expression and it has a type, I can encode it in a language agnostic AST and then translate X to Y to Z", but more realistic is obj.field.array[if cond: i else: j+4] = f(typeof g())
15:39:10filcucin order to create these files somewhere else
15:40:37FromDiscord<Kiloneie> Thanks narimiran, went to google and found my answers... constants wii
15:41:00Araqand obj.field might mean obj[].field, stuff is only simple when you look at silly FP 'fib' examples all day long
15:41:05FromDiscord<Kiloneie> i didn't know constants were also called literals
15:48:50filcucdom96: ping
15:49:34FromGitter<alehander42> Araq, i agree but thats not what i am proposing
15:49:41*endragor quit (Remote host closed the connection)
15:50:12FromGitter<alehander42> I am aware one would need to mostly write down all the semantic checking manually
15:51:29FromGitter<alehander42> But still there are several things :there are other not so original parts of compilers which can beach reused more :llvm already proves it for some backend passes
15:52:25FromGitter<alehander42> And if you write down a independent implof a language, you dont havr to design it again, you can look at how it is designed and just try to implement that
15:59:50filcucAraq: personal question (you know those who do, do the other complain). Don't you think that the language has too much freedom (partial case insensitive, multiple syntax for calling a function, multiple way to return a function value, multiple memory managers)
16:00:53FromGitter<alehander42> And there is nothing automatic here :you specify how you check dot access and how is it converted to e.g. IR and what code is generated, it just adds some convention and something like a big Lib of helpers to leave only the actual language logic and not the "here it's this algorithm to build a tree, here this one to generate our own custom backend builder, here is our own custom debug info and custom hash logic" etc
16:02:08FromGitter<alehander42> Those make perfect sense in an actual impl, but i am aiming for the prototype and reimpl of small lang
16:02:15FromGitter<alehander42> UzecZe
16:02:23FromGitter<alehander42> Usecase
16:05:00FromGitter<alehander42> Tl dr, this is mostly an idea, i dont have much time for it, i hoped zevv would build it
16:05:14FromGitter<alehander42> (sorry zevv i am a free loader
16:06:56*traviss joined #nim
16:07:12*Traviss__ joined #nim
16:09:46*uu91 joined #nim
16:14:39*rockcavera quit (Remote host closed the connection)
16:19:21Zevvneed what?
16:19:50disruptekalehander42 wants you to whip up a lisp for him.
16:20:17Zevvis a forth or a basic ok?
16:20:35disrupteki doubt it. this is a road that only leads to lisp.
16:20:35Zevvthose are from the 70's as well
16:20:56disrupteki don't think it's vintage he's after, sadly.
16:21:19FromGitter<alehander42> Oh no all lang are fine
16:21:28FromGitter<alehander42> Forth is a good example thanks
16:21:32Zevvhm ok, i can make that, but he has to provide the eval and apply
16:22:10disruptekhah
16:22:18Zevvbut seriously, what is it you need, i missed the beginning
16:22:44disruptekhe wants an irc client with scrollback. seems that you need one too. ๐Ÿ˜œ
16:23:03ZevvI have that. but I'm lazy
16:23:33Zevvsorry, Im a bit of a freeloader
16:26:14*rockcavera joined #nim
16:27:27ZevvI read back. He wants a pony with free lunches
16:28:01disrupteksounds about right.
16:28:39disrupteki can provide a dog with a saddle if you can handle the shipping.
16:30:48Zevvit better be gold
16:31:07FromDiscord<treeform> disruptek, here are the APIs I use: https://github.com/treeform/googleapi/tree/master/src/googleapi
16:31:22disruptekwhich one first?
16:31:57FromDiscord<treeform> For my blog I use the drive API to get document JSON objects. Lets go with that one.
16:32:12disruptekand you have signing somewhere?
16:32:29FromDiscord<treeform> oops sorry not drive, its document API, but I use the drive API to get the list
16:32:37FromDiscord<treeform> https://github.com/treeform/googleapi/blob/master/src/googleapi/documents.nim#L7
16:32:39disruptekor if you have a spec i can impl it.
16:33:00FromDiscord<treeform> Here is how I do the signing: https://github.com/treeform/googleapi/blob/master/src/googleapi/connection.nim#L36
16:33:27FromDiscord<treeform> Its kind of complex and you need to keep refreshing the token when it gets stale...
16:34:10disruptekthat's okay, this looks pretty easy compared to amazon's.
16:34:20disruptekyou may have just saved christmas.
16:34:25FromDiscord<treeform> It requires another library jwt that has the "meat"
16:34:42FromDiscord<treeform> and that requires openSSL lib of the right version some times
16:35:07FromDiscord<treeform> https://github.com/treeform/jwt
16:35:16disruptekdo you have tests or a link to some sample values?
16:35:20disrupteksomething i can publish?
16:35:36Zevvalehander42: its a nice thought that something like this would exist indeed. Its one of those problems you meet a number of times in your career, and each time it is just too much work to get it all the way right. some kind of toolkit of libs would also be a good start, it doesnt need to generate your lang end to end, but having the proper legoes that fit eachother could really ease the task
16:35:55FromDiscord<treeform> disruptek, I don't want to publish my private API key?
16:36:15FromDiscord<treeform> disruptek, is that what you are asking?
16:36:17disrupteki know, just wondering how you built this? just guessing?
16:37:00disruptekeg. https://github.com/disruptek/sigv4/blob/master/sigv4.nim#L249
16:37:14FromDiscord<treeform> disruptek, I build it by getting a google account, and creating a service account which gives you a json blog you use, then hitting endpoints I need till it worked.
16:38:03FromDiscord<treeform> disruptek, the JWT lib has the tests like this: https://github.com/treeform/jwt
16:38:17disruptekyeah, i use google; i was just hoping to be able to provide tests that confirm that signing works as i do with amazon. no biggie. we should have all google services working by the end of the day. ๐Ÿ˜
16:38:38FromDiscord<treeform> I think you will find that at the end of the readme
16:39:04disruptekyeah, that should be enough to satisfy a signing test.
16:39:20FromDiscord<treeform> its not quite as good as your aws thing
16:39:58disruptekwhy not?
16:40:34disruptekshould be just as good, i think. why did you have to fork from yuriy's stuff?
16:40:35rayman22201@clyybber andrewbriggs is a troll that has decided to personally attack me. Long story... Please just ignore him. I'm sorry for any inconveniences from him...
16:41:37FromDiscord<treeform> disruptek, I think there was some thing I needed to edit
16:42:13disruptekit looks like you are behind his branch. i should use your branch, right?
16:42:24FromDiscord<treeform> disruptek, some stupid windows issue: https://github.com/yglukhov/nim-jwt/compare/master...treeform:master
16:42:50FromDiscord<treeform> Also added windows DLLs which are very hard to find or build.
16:43:04narimiranrayman22201: heh, i was wondering what was going on there
16:44:25FromDiscord<treeform> disruptek, I don't know up to you. If you are not on windows it probably does not matter.
16:44:37disruptektreeform: GoogleExcpetion* = object of Exception ... spelling?
16:45:05disruptekeh it doesn't matter, but there's no harm in using your branch if you are okay with maintaining it. all the apis will rely upon that code.
16:45:09FromDiscord<treeform> disruptek, yglukhov is also a fork, this is the original: https://github.com/ekarlso/nim-jwt
16:45:23disruptekright, but i don't want to go all the way back to that.
16:45:45rayman22201So annoying. He has been harrassing me for years. Sorry :-/
16:45:55FromDiscord<treeform> disruptek, sorry about the spelling
16:46:18disruptekjust thought you might want to adjust it in your code.
16:46:32FromDiscord<treeform> disruptek, yeah ill fix it really quick
16:47:25FromDiscord<treeform> disruptek, I wish there was just a pure nim way to sign JWT. I the openSSL dependency has been a pain.
16:48:11planetis[m]can someone explain me whats wrong with basic2d module, would it be hard to maintain it?
16:49:07disruptekwell, i'll just simplify this for the generated apis and once we know it works, we could experiment with other options as they become available.
16:50:23disruptekwanna make a release of your jwt branch?
16:51:17FromDiscord<treeform> disruptek, what do you mean by release? Like a github one?
16:51:35disrupteksure; just something i can put a dependency on.
16:52:38FromDiscord<Rika> in the doc for unittest it mentions something called `testament`
16:52:51FromDiscord<treeform> disruptek, never done this before
16:53:05FromDiscord<treeform> disruptek, is this good? https://github.com/treeform/jwt/releases/tag/0.0.1
16:53:22disrupteklooks great, thanks.
16:55:09*rockcavera quit (Remote host closed the connection)
16:57:42FromDiscord<treeform> @Rika `testament` is tool to run compiler tests for nim
16:58:21FromDiscord<treeform> @Rika you don't need it if you are not writing compiler or standard library changes
17:02:31sealmoveguys, do you know proper way to set PATH in travis? https://travis-ci.org/sealmove/ci_targets/jobs/590848061
17:03:27sealmove`echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile` didn't work
17:04:45*endragor joined #nim
17:05:19FromDiscord<Rika> @treeform sounds like something to indicate in the docs for unittest
17:06:06narimiranbut that's just not true
17:06:28narimiransince recently, you can use testament not only for compiler and stdlib
17:07:02narimiranthe reason why testament is mentioned in unittest docs is to draw your attention to it
17:10:02*endragor quit (Ping timeout: 240 seconds)
17:10:03FromDiscord<Rika> who is right here ;n;
17:10:18disrupteknarimiran
17:10:31narimiranyay, i win! :D
17:10:51disruptek<-- the final arbiter of truth.
17:13:48*mibr joined #nim
17:19:40FromDiscord<treeform> narimiran, wins
17:30:10*clyybber joined #nim
17:32:06Araqfilcuc: no, I don't think that and I haven't seen the flexibility cause bugs.
17:32:38*aEverr quit (Ping timeout: 265 seconds)
17:32:39Araqwhich is an objective criterion.
17:33:06*Hideki_ joined #nim
17:33:16Araqsyntax which causes bugs was removed like '.. <' instead of '..<'
17:33:16*aEverr joined #nim
17:34:02clyybberAraq: Hi, I did the injectdestructors refactoring without the pExpr/pStmt split
17:35:18clyybberAm still waiting for cooldomes feedback, since he had some problems which only surfaced in his own code;
17:35:23shashlick@filcuc those files are created by nimble
17:35:27shashlickWhat's your concern
17:37:56Araqclyybber: ok
17:39:57*filcuc quit (Ping timeout: 240 seconds)
17:48:03FromGitter<alehander42> Zevv thats ehat i want yeah
17:48:17FromGitter<alehander42> Basically like rails for front-ends
17:48:21*filcuc joined #nim
17:48:21FromGitter<alehander42> Of compilers
17:48:32clyybberAraq: Also https://github.com/nim-lang/Nim/pull/12268 can now be merged, GULPF has merged the PR and published a new version on nimble so the tests are now green.
17:49:02Araqalehander42: flex + bison + LLVM IR, done
17:49:09Araq;-)
17:49:11FromGitter<alehander42> You write down your compiler yourself it just gives you stuff for free
17:50:13FromGitter<alehander42> Well, I'd argue it's something similar but with more
17:50:14FromGitter<alehander42> Ah
17:50:30FromGitter<alehander42> I need to write a simple example project to demonstrate
17:50:42FromGitter<alehander42> It's just hard to explain without example
17:50:59Araqflex + bison + Ocaml's sum types + LLVM IR ?
17:51:42AraqI can see it working if you don't base it on pegs (sorry Zevv !)
17:52:17Araqbut you need to watch out that "extensibility" doesn't mean I get to do string comparisons for node kinds
17:52:58Araqthe ideal AST is not extensible, the ideal is that you can enumerate every case to ensure you covered it all
17:53:29ZevvOh, sure, that's not what pegs are good for IMHO.
17:54:55Zevvalehander42: I kind of feel where you're going with this, but my cynism kicks in here: this stuff is the pot of gold tens of thousands of CS people have been dreaming of for ages. *something* must be pretty hard here.
17:54:59Araqalehander42: the x[].f example wasn't random, it shows how language specific constructs end up in the AST even in place where you didn't anticipate it
17:56:34Araqor maybe consider how we map Nim to JS, the value types are actually quite hard to emulate (and there are still bugs left)
17:57:26Araqhere is what you do: "gah, this concrete problem is hard (mapping Nim to JS) so instead I'll think about it more abstractly where it's still easy"
17:57:39FromGitter<alehander42> Yes maybe i need to say
17:57:44FromGitter<alehander42> Type providers
17:57:46Araqand that's why I'm not buying it.
17:58:06FromGitter<alehander42> Like my point is you still write your compiler
17:58:12FromGitter<alehander42> Its nothing like py2nim
17:58:16Araqso Nim->JS is hard but you take X->Y and claim it can be solved, easily.
17:58:34FromGitter<alehander42> Just a set of helper libraries and some scaffolding
17:58:41FromGitter<alehander42> No
17:59:07FromGitter<alehander42> I specifically talk about small core languages and compiling them to native code here
17:59:13FromGitter<alehander42> Its really nothing special
17:59:23FromGitter<alehander42> Just a toolkit plus some convention
17:59:40Araqok, what's this "small core". FP? imperative?
17:59:56Zevvand it's always *just* a bit too small
18:01:20FromGitter<alehander42> Whatever
18:01:26*clyybber quit (Quit: WeeChat 2.6)
18:01:33FromGitter<alehander42> Scheme Nim go
18:01:40FromGitter<alehander42> You write your own language
18:01:47*nsf joined #nim
18:01:48FromGitter<alehander42> Nothing automatic and stuff
18:02:04*Hideki_ quit (Remote host closed the connection)
18:02:04FromGitter<alehander42> I will give an exam please project these days to show the structure
18:02:07*filcuc quit (Ping timeout: 265 seconds)
18:02:17*LargeEpsilon quit (Ping timeout: 240 seconds)
18:02:17FromGitter<alehander42> You are thinking of the x2y
18:02:27FromGitter<alehander42> Projects but its a different idea
18:02:36Araqok, I'm listening
18:02:51disruptekyeah it's easy as long as you don't want to do anything useful.
18:03:03FromGitter<alehander42> Cheers from plovdiv
18:03:08FromGitter<alehander42> Bb
18:03:12Zevvplovdiv?
18:03:20*Hideki_ joined #nim
18:04:12FromDiscord<treeform> if you are compiling from X to Y you should compile to "mal" - Make a Lisp, it has interpreter in every other language: https://github.com/kanaka/mal
18:04:44FromDiscord<treeform> it has an interpreter even using make files
18:04:44disrupteklol
18:05:11FromDiscord<treeform> there is even a nim version, so you can write nim to mal to nim ๐Ÿ˜ƒ https://github.com/kanaka/mal/tree/master/nim
18:05:45Araqtype T = array[5, T]
18:05:58Zevv(sorry, makefiles?)
18:06:14Araqthat uses 2 features of a language, type aliases and the 'array' type constructor
18:06:23Araqand it's not even a valid program
18:06:38Araqyet you need to detect it to produce a good error message
18:06:51Araqthat's how hard programming languages really are.
18:07:17Araqthat's why it takes a decade to create every single one of them, roughly
18:07:50FromDiscord<treeform> Zevv, https://github.com/kanaka/mal/blob/master/make/step9_try.mk make has a built in scripting language, you can use it to write an interpreter.
18:07:53ZevvLanguages come in level of complexities.
18:08:08*Trustable joined #nim
18:08:20*Hideki_ quit (Ping timeout: 276 seconds)
18:08:50Araq!eval type T = array[5, T]
18:08:52NimBotCompile failed: /usercode/in.nim(1, 6) Error: illegal recursion in type 'T'
18:09:13*Araq cheers
18:09:54sealmoveAll GP languages roughly have the same set of problems to solve. I don't think GP language differ a lot in complexity compared to each other.
18:10:30Araqsealmove: no, you got that wrong, Nim is special because it offers you 'result' :P
18:10:32ZevvI feel that typing adds a *lot* to the complexity. Lua for example is pretty generic and complete, but the lack of typing makes the implementation pretty consice
18:10:33disruptekhow do you figure that?
18:10:59disruptektell me how fortran is equally complex to rust.
18:11:16FromDiscord<DeltaPHC> Dynamic typing pushes the complexity of type checking onto the developer :P
18:11:28ZevvIndeed! so the compiler can be more simple.
18:11:41FromDiscord<DeltaPHC> But then the developer can get it wrong
18:11:48AraqZevv: that's correct. DT is a great simplifier.
18:12:05ZevvBut DT is what brought me here
18:12:07Araqif you want a simple language, make it dynamically typed
18:12:26*daddoo quit (Quit: Leaving)
18:13:41ZevvMy forth has only one type, but is it static or dynamic? :)
18:15:23FromDiscord<treeform> you need two types some sort of composition type and some sort of terminal type?
18:15:37FromDiscord<treeform> like cons cell and symbol in lisp?
18:17:16AraqZevv: one type == dynamic.
18:17:36Zevvno wonder it's so small then!
18:17:41Araqyup
18:17:46Zevv:)
18:18:17AraqC's precursor, BCPL also had only one type
18:18:46Zevvbut would you argue that was a dynamic language?
18:19:14FromDiscord<DeltaPHC> Has it ever been considered for Nim to have some kind of extensible type system? Perhaps like how some languages can treat types as values at compile time
18:19:17Araqyeah. dynamic typing means "one type"
18:19:41AraqZevv: there is no "argument" here, every type theorist agrees.
18:19:54ZevvI trust you
18:20:06FromDiscord<treeform> Araq, I think BCPL had pointers?
18:20:17Araqno, it had 'words'.
18:20:25Araqyou can deref any word
18:20:39FromDiscord<treeform> yeah I guess 1 type you could use both ways
18:20:47Araqmemory is an array of words.
18:22:03TrustableFYI: Geany 1.36 is released including rudimentary Nim support :) https://github.com/geany/geany/releases/tag/1.36.0
18:22:11Araq"dynamic typing" makes no sense really, types are always static by definition.
18:24:19Araqbut that's smart-assing
18:26:39Zevv(everybody agrees in silence)
18:27:02FromDiscord<demotomohiro> I'm trying to implement "If on Windows, path and base do not agree on the drive letter, return `path` as is" in os.relativePath.
18:27:02FromDiscord<demotomohiro> But there are many way to specify a root of path like "c:\", "\\server\share\", "\\.\c:\", "\\.\UNC\server\share\", "\\.\volume{...}", etc on windows.
18:27:02FromDiscord<demotomohiro> Should it support paths with "\\.\" or "\\?\" prefix on windows?
18:29:08Araqwell we have file normalization that you can try
18:29:16Araqpathnorm module or similar
18:29:24Araqa recent addition
18:32:25FromDiscord<demotomohiro> does that normalization normalize path like "\\.\c:\foo" to "c:\foo"?
18:33:32Araqmaybe.
18:34:09AraqI doubt it though because I never understood \\
18:36:08FromDiscord<demotomohiro> This is page about File path formats on Windows systems
18:36:08FromDiscord<demotomohiro> https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
18:37:04FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/SeVo/image.png)
18:37:09*Hideki_ joined #nim
18:37:32sealmovewow Geany supports Nim?
18:38:05FromDiscord<demotomohiro> C drive can be "c:\", "\\.\c:\" or "\\?\c:\".
18:40:14FromDiscord<demotomohiro> There is `PathIsSameRootW` windows API, but it returns wrong result when I use "\\.\" prefix.
18:41:29FromDiscord<demotomohiro> Maybe most of peope don't use path "\\.\" prefix?
18:42:46FromDiscord<demotomohiro> Maybe DOS device paths are added to windows recenty and not much used.
18:43:16*actuallybatman joined #nim
18:45:13FromGitter<zacharycarter> I guess my iqm model loader worked :)
18:45:17Araqdemotomohiro: it helps to think in the terms "worse or better" rather than "right or wrong"
18:48:18FromGitter<awr1> what's the problem with npeg? is it that it only takes in strings as input?
18:50:37*Hideki_ quit (Ping timeout: 240 seconds)
18:50:41disruptekwhere to begin?
18:50:55FromGitter<awr1> i haven't used npeg that much so forgive me
18:53:02Araqmost peg implementations are slower than DFAs
18:53:46Araqand pegs encourage you to conflate the lexing and the parsing step and I don't like that
18:54:48FromGitter<awr1> well that's kinda what i was referring to, npeg takes in a string and not, for instance, a seq of lexed tokens
18:55:09FromDiscord<demotomohiro> @Araq
18:55:09FromDiscord<demotomohiro> `relativePath(r"c:\hoge", r"d:\piyo")` still returns ..\..\c:\hoge in latest devel.
18:55:09FromDiscord<demotomohiro> So, just checking drive latter make it better.
18:55:53Araqindeed :-)
18:58:53FromDiscord<Kiloneie> Here i go again: https://youtu.be/aa5WKYzqZI4
19:00:08FromDiscord<treeform> @Kiloneie at this rate you will have 100s of hours of lessons ๐Ÿ˜ƒ
19:00:40FromDiscord<Kiloneie> Thank you ๐Ÿ™‚
19:00:59*sealmove quit (Quit: WeeChat 2.6)
19:01:12FromDiscord<Kiloneie> i got lazy though, this was made in 3.5 hours, compared to insane amount that went into the intro, and about 8-10 hours on the second one, i got better, so i go lazy D:
19:01:25FromDiscord<Kiloneie> should make the next one 10 minutes long.
19:01:43FromDiscord<treeform> You might just be getting better at videos
19:01:56FromDiscord<Kiloneie> yeah writting them and recording editing
19:02:08FromDiscord<Kiloneie> today i also fixed waveform problems finally <.<
19:02:21FromDiscord<Kiloneie> editing based on listening sucks hard
19:05:07shashlickEveryone - what's your top irritation with your editor
19:05:08FromDiscord<Kiloneie> Tomorrow i gotta make something more interesting, a calculator hopefully, last few videos were just learning about programming, not much actual applications
19:05:35FromDiscord<Kiloneie> i don't think i have an irritation with VS Code...
19:06:10FromDiscord<Kiloneie> it's just... great :), although when a problem occurs besides telling me explanation from nim's compiler it can't offer any solutions... i guess that one
19:06:10Araqshashlick: auto-complete without me using an explicit control-space
19:06:24FromDiscord<Kiloneie> omg you are right
19:06:28FromDiscord<treeform> shashlick, I also don't really have an irritation with VS Code...
19:06:58FromDiscord<Kiloneie> you write a type section and you wanna go to the next line but it will autocomplete instead D:
19:07:17disrupteknot enough bugs.
19:07:30FromDiscord<treeform> shashlick, before VS code was was really irritated and wrote my own editor that i used for 5 years. Now I use VS code.
19:07:44FromDiscord<Kiloneie> xD maniac
19:07:45shashlickSounds fair
19:08:03shashlickI cannot accept 1gb+ ram usage
19:08:11FromDiscord<treeform> yeah that suxs
19:08:21FromDiscord<treeform> I used sublime for a bit
19:08:29shashlickI intend adding lsp support to feud
19:08:33disrupteknvim: 300m
19:08:38FromDiscord<treeform> I have ton of editor ideas though...
19:08:49shashlickI want to make the best editor in Nim
19:09:01shashlickNow that I'm unblocked, I'll be going all in
19:09:03FromDiscord<treeform> this is 10 years old but ideas are still cool: https://www.youtube.com/watch?v=PsPX0nElJ0k
19:09:04disruptekeditor doesn't support STOMP. ๐Ÿ™
19:09:17FromDiscord<treeform> shashlick, can you get on discord we can maybe talk or PM?
19:09:23FromDiscord<treeform> talk with voice
19:09:36FromDiscord<Kiloneie> but aporia was full Nim IDE...
19:09:50FromDiscord<Kiloneie> which i only read about o,o
19:09:59shashlickSure @treeform, I can create an account
19:10:03*mibr quit (Ping timeout: 246 seconds)
19:10:07*navinmistry joined #nim
19:10:08shashlickWhat's your time zone
19:10:18shashlickNot about to right now
19:10:24FromDiscord<treeform> America/Los_Angeles
19:10:49shashlickOk 2 hours behind, makes it easy
19:11:17FromDiscord<Kiloneie> that video seems interesting
19:12:26FromDiscord<treeform> This is great too: https://kakoune.org/why-kakoune/why-kakoune.html
19:12:36FromDiscord<Kiloneie> omg someone make this IDE
19:14:28*navinmistry quit (Ping timeout: 245 seconds)
19:18:01FromDiscord<Kiloneie> there are so many awesome software coming out in the last few years
19:18:21FromGitter<genotrance> I'd try kakoune if it wasn't Linux only
19:19:11shashlick@treeform l'll ping you later to talk
19:19:17FromDiscord<treeform> I like the idea of "reversing" the vi commands, the after reading that the vi commands feel kind of backwards
19:19:17shashlickWhat editor did you make
19:19:38FromDiscord<treeform> https://github.com/treeform/asterisk
19:20:57FromGitter<zacharycarter> ooph coffeescript
19:20:58FromGitter<zacharycarter> :P
19:21:48FromDiscord<treeform> zacharycarter, I did a ton of coffeescript, too bad its basically dead at this point.
19:22:01FromDiscord<treeform> I hate everything js now
19:23:35FromGitter<zacharycarter> well - besides the fact that your projects with it die with it
19:23:40FromGitter<zacharycarter> I don't think cofeescript dying is a bad thing :P
19:23:44FromGitter<zacharycarter> it was pretty awful IMO
19:23:56FromGitter<zacharycarter> and yes - I agree, the modern web is a shit show
19:24:17disruptekhuh, i liked it.
19:24:26FromGitter<zacharycarter> weirdo
19:24:39disrupteki mean, it had flaws, sure, but to me it was a net win.
19:24:52FromDiscord<treeform> I like coffeescript too, it allowed me to write "python" on the web
19:25:04FromDiscord<treeform> yeah it had flaws
19:25:16FromDiscord<treeform> main JS flaws though
19:25:19FromGitter<zacharycarter> it just didn't fix many things that were wrong with JS
19:25:21FromDiscord<treeform> mainly JS flaws though
19:25:22disruptekkinda pointless these days, but it was more valuable years ago.
19:25:25FromGitter<zacharycarter> nothing really has
19:25:35FromGitter<zacharycarter> because you can't fix something that is inherently broken
19:25:53FromGitter<zacharycarter> you can only replace it with something that isn't
19:25:55Araqshashlick: look at NimScript for my attempt at solving the problem
19:25:57FromDiscord<treeform> wasm soon โ„ข
19:25:59Araqer
19:26:03Araqlol, NimEdit.
19:26:27shashlickI will - need to look at aporia and Nim edit
19:27:00Araqyou need "terminal" integration
19:27:03shashlickTreeform - what os is your main driver
19:27:05Araqand doing that is hard
19:27:18Araqyou can steal NimEdit's code to do it
19:27:18FromDiscord<Kiloneie> wait wait, you scrapped aporia because it wasn't up to what competition had, and decided to remake it as NimEdit ?
19:27:24FromDiscord<treeform> My editors main feature - it was for web dev. Is that you could host the backend part of the editor on any server, and edit stuff through any computer - like a chromebook, but still have nice fonts and mouse.
19:27:38AraqKiloneie: no.
19:28:11FromDiscord<treeform> shashlick, home: Windows, work macOS.
19:28:14shashlickMy idea for that is remote editing
19:28:15FromGitter<zacharycarter> I feel like building an IDE for Nim is putting the proverbial cart before the horse
19:28:17Zevvawr1: interesting point - at this time NPeg takes an sequence of Char, I'll investigate to see if it would be feasible to have it eat a sequence of whatever T. Then you could pass it a token stream and only use the grammars to define - well - the grammar
19:28:35FromDiscord<treeform> shashlick, I used Chrome OS for a year.
19:28:36FromGitter<zacharycarter> and IDEs in general stink
19:29:09AraqI wrote NimEdit to tinker with immediate mode UIs and to see if I could implement my ideas, a GTK based solution couldn't do that
19:29:20FromDiscord<Kiloneie> make what that video earlier showed as a concept, i will throw money at you if you do, once i acquire some xD...
19:29:30shashlickHow did Nim edit deal with terminal
19:29:30FromDiscord<treeform> Araq, do you use Visual Code now?
19:29:33FromDiscord<Kiloneie> That's cool
19:29:34Araqyes
19:29:45FromDiscord<treeform> Visual Code is just winning and winning
19:29:52FromDiscord<treeform> it has its flaws but we all use it ...
19:29:55FromDiscord<Kiloneie> so when was NimEdit made, before or after Aporia ?
19:30:43FromGitter<zacharycarter> github has the answer
19:31:23FromDiscord<treeform> I think they both stopped evolving in 2018?
19:32:02shashlickNimedit was later
19:32:05FromGitter<alehander42> Araq, sorry
19:32:09FromGitter<alehander42> i confused you i think
19:32:27FromGitter<alehander42> in my proposed `Lang`
19:32:39FromGitter<alehander42> you still do the same: you write code and implement a compiler
19:33:00FromGitter<alehander42> of course, it's not trivial
19:33:06FromGitter<alehander42> and you have to support the nuances
19:33:09FromGitter<alehander42> of your language
19:33:10shashlick@treeform - feud is Windows only right now, but porting to Linux and osx wouldn't be too bad since I use scintilla
19:33:34FromGitter<alehander42> all i am saying is, you receive some convention, generators and helper libs
19:33:52FromGitter<zacharycarter> https://gist.github.com/zacharycarter/d41365c3c196b0c1558446e63ad794d5
19:34:05FromGitter<zacharycarter> driver code for the screenshot I posted earlier
19:34:36FromGitter<zacharycarter> still need to work on lighting / deferred rendering
19:34:42FromGitter<zacharycarter> as well as entities and physics
19:34:43Araqshashlick: for NimEdit I had a killer feature in mind
19:34:49FromGitter<zacharycarter> but I should be able to start on my golf game next week :)
19:35:36Araqsyntax agnostic editing, "need to write C# for work? don't show the curlies and render it like Nim/Python". You like curlies? Render the Nim code with {}
19:36:18AraqPrefer 'end if' instead? another syntax theme in your editor
19:36:59Araqyou can't do that with Scintilla or other prebuild editor components
19:37:11Araqyou need to write your own editor for this
19:37:16Araqand so that's what I did
19:37:25FromGitter<alehander42> i think its doable with plugins in today's editors
19:37:29FromDiscord<Kiloneie> that sounds fun
19:37:32FromGitter<alehander42> i did something similar as a plugin
19:37:33FromGitter<alehander42> for sulbime
19:37:58FromGitter<alehander42> not exactly plugin maybe, but it was doable
19:38:00shashlickSounds fun but scintilla allows me to build a ux for the near term
19:38:16FromDiscord<Kiloneie> Anyone heard of this ? apparently a Visual Studio Code fork or something... https://theia-ide.org/
19:38:19Araqyou need to be able to show fake tokens that don't really exist, I doubted that plugins can do that
19:38:26FromGitter<alehander42> you can create another "view" and run a watch which constantly updated all the views to the same "module"
19:38:37FromGitter<alehander42> well, maybe not in the same file i agree
19:38:49FromGitter<alehander42> but i imagined you can replace it with a "fake" file
19:39:22shashlickOnly challenge is that scintilla maintains the editor buffer, i'd rather Nim maintained state
19:39:45FromGitter<alehander42> i actually had such a library, that renders the same "tree" with different user-defined bidirectional grammars
19:39:56FromGitter<alehander42> but never put it in an editor
19:40:04FromGitter<alehander42> it was buggy :( :D
19:40:21FromGitter<alehander42> but wasnt that nimedit thing an extension of nim syntax skins?
19:41:11Araqsyntax skins are worse because then you end up with a mess ;P
19:41:12FromGitter<alehander42> the cool thing was that the user could define the syntaxes he wants with simple pseudo code like https://github.com/alehander42/hivemind/blob/master/syntaxes/pythonic.syntax
19:41:31FromGitter<alehander42> (this file is a grammar which should work both for parsing and printing ast)
19:41:41FromGitter<alehander42> but the whole thing was very messy as well :P
19:43:03shashlickDo you prefer using the mouse or keyboard shortcuts
19:43:29FromGitter<alehander42> shashlick, how similar is feud to nimedit
19:43:37FromDiscord<treeform> Both?
19:43:38FromDiscord<Kiloneie> Why not both ?
19:43:45FromGitter<alehander42> keyboard
19:44:09FromDiscord<Kiloneie> till you learn the shortcuts, you will definitely love mouse clicking
19:44:42FromGitter<alehander42> you mostly use 2-3 programs imo, its better to learn shortcuts
19:45:24FromDiscord<Kiloneie> one can always have a toggle button to hide any and all shortcut buttons
19:46:39*filcuc joined #nim
19:46:56FromGitter<awr1> my "irritating problem" in emacs is that flycheck and autocompletion don't work
19:47:00FromGitter<zacharycarter> https://imgur.com/a/cNROkhT
19:47:01*endragor joined #nim
19:47:05FromGitter<awr1> but i've grown to not really depend on them
19:47:28shashlickFeud doesn't have any buttons
19:47:47shashlickNothing to click really
19:48:08shashlickIdea is to try a cli interface with GUI performance
19:48:46FromGitter<awr1> what is feud
19:48:48FromGitter<awr1> also nice @zacharycarter
19:48:56FromGitter<awr1> ohhh wait nvm
19:49:00FromGitter<awr1> i remember what feud is
19:49:04shashlickFeud uses scintilla and a plug-in system where even the ui is a plug-in
19:49:20shashlickSo allows any sort of extensibility
19:49:47shashlickAnd since it is Nim, super fast to add functionality
19:50:02filcucshashlick: the files created by nimble bother me because i've a filesystemwatcher watching the nimble project directory
19:50:21filcucshashlick: and the watcher gets triggered everytime i execute "nimble tasks"
19:50:32shashlickI'm able to use it full time with just a couple months of work
19:50:40FromGitter<awr1> i had a pie-in-the-sky idea in my head for a long time for a modern spacemacs-like editor built in nim
19:50:50filcucshashlick: this in turn causes a project rescan in my plugin
19:50:51FromGitter<awr1> but i don't really have any time to work on such a thing
19:51:17*endragor quit (Ping timeout: 240 seconds)
19:51:32shashlick@filcuc I understand but we have to run nimble files in the project dir since all files are relative to that path
19:51:39filcucshashlick: i would like to know if there's a way to create them in a different directory...perhaps by executing nimble from a different directory
19:51:53FromGitter<zacharycarter> @awr1 thanks
19:51:57FromGitter<zacharycarter> that's all with opengl
19:52:15shashlickNot currently
19:52:20filcucshashlick: maybe by providing a directory argument
19:52:22FromGitter<zacharycarter> so basically two days worth of coding
19:53:23shashlick@zacharycarter - the feud plug-in system is back online
19:56:54*LargeEpsilon joined #nim
19:59:06FromGitter<zacharycarter> nice - what'd you do?
19:59:22disruptektreeform: couldn't use your jwt to build on linux.
20:00:11*endragor joined #nim
20:02:00FromGitter<zacharycarter> shashlick: ?
20:04:27*endragor quit (Ping timeout: 240 seconds)
20:09:21shashlickhttps://github.com/nim-lang/Nim/issues/12286
20:12:04disruptekthat comment is interesting but not all that helpful.
20:12:23disrupteki'm still surprised that this isn't more common.
20:16:01FromDiscord<kodkuce> 1 question tought? how does nimble know what to download form, am guessing it dosent search whole github/gitlab for stuff?
20:16:55disruptekhere's a question for you, shashlick: are you able to confirm that it's actually the GC_ALL_INTERIOR_POINTERS codepath that breaks you? it seems like `no`.
20:19:05FromGitter<zacharycarter> so short answer is boehm?
20:19:49disruptekjust wondering if turning it on also provokes the crash; ie. it's due to a side-effect of invoking the function.
20:19:50FromGitter<zacharycarter> glad you got it figured out - but this should have always worked ;P
20:20:46FromGitter<alehander42> Araq, ill think a bit more about my example project until monday, and ill show a toy example
20:21:16FromGitter<alehander42> while waiting for people to bikeshed on https://github.com/nim-lang/RFCs/pull/169
20:21:26FromGitter<alehander42> no bikeshedding at all people
20:23:47disrupteki really don't like `?a` because it doesn't real well aloud, to me.
20:23:55disruptek^read well, either.
20:24:38disrupteki'd say `nilable` is the most obvious.
20:35:16*navinmistry joined #nim
20:36:03*narimiran quit (Ping timeout: 240 seconds)
20:36:33*exelotl quit (Read error: Connection reset by peer)
20:38:23dom96filcuc, these .nims files are created because Nimble uses `nim e` to evaluate them, and in order to preserve the import paths this file needs to be placed beside the .nimble file.
20:38:32dom96I really dislike this too.
20:38:37dom96I'm afraid there isn't a workaround though
20:39:02dom96Best we can do for the future is enable `nim e` to take a file via stdin
20:39:32dom96please create an issue for this so that I can track who else considers this a problem :)
20:39:44*navinmistry quit (Ping timeout: 252 seconds)
20:41:52FromGitter<awr1> commented @alehander42
20:42:23FromGitter<alehander42> disruptek `nilable` is a good one , i admit
20:42:33FromGitter<alehander42> but you know, i see a very simple problem with it
20:42:36FromGitter<alehander42> it's long to type
20:42:40FromGitter<awr1> i suggested `bin T`
20:42:45FromGitter<awr1> or `could T`
20:43:21FromGitter<alehander42> and whenever you have something that is long to type, and you type it often, people instead alias and add a common prefix, e.g. โŽ people would just write NValue = nilable Value โŽ and use NValue
20:43:36FromGitter<awr1> the reason i said `can nil` in the past was b/c of orthagonality but if we really want to throw `not nil` out the window
20:43:47FromGitter<alehander42> so thats why i prefer to make it easy to just use directly: but thats just a subjective thesis maybe wrong
20:43:58FromGitter<alehander42> @awr1 yes, those are shorter
20:44:23FromGitter<alehander42> what does `bin` mean here
20:44:32FromGitter<awr1> bin as a receptacle
20:44:42FromGitter<awr1> it could contain something, it could not contain something
20:45:06FromGitter<alehander42> hm, good one
20:45:20FromGitter<alehander42> but seems not so obvious to me
20:45:30FromGitter<alehander42> and you can confuse it with binary
20:45:57FromGitter<alehander42> i think `maybe`was your idea?
20:46:02FromGitter<awr1> ya
20:46:25FromGitter<awr1> or `plug T`, since it's a pointer and it "links" to something, could be plugged or unplugged
20:49:12*LargeEpsilon quit (Ping timeout: 245 seconds)
20:49:25FromGitter<awr1> i also suggested `box T`, which is similar to rust. but rust uses optional for nils, not necessarily Box<T>
20:49:41FromGitter<awr1> Naming things, the hardest thing in computer science
20:50:51FromGitter<alehander42> i answered there as well
20:51:05FromGitter<alehander42> `plug` is creative as well
20:51:26FromGitter<alehander42> but i think its too creative maybe, very hard to guess how its different than just ref
20:51:54FromGitter<alehander42> i think `maybe` and `nilable` are the closest to obvious and
20:52:13FromGitter<alehander42> even that `nilable` is a bit more exact than `nil`
20:52:27FromGitter<alehander42> but `maybe` sounds a bit like option
20:52:53FromGitter<alehander42> disruptek its true `?` isnt obvious to pronounce, but people can easily say "maybe" or "nilable" after they see it 1-2 times
20:53:16FromGitter<alehander42> and we already have it in two other langs, so i dont think thats critical, but its a valid thing to say
20:55:11disrupteknilable is stunningly obvious. if it's too long to type, how about `nilly`?
20:56:19FromGitter<spielerei> trying to understand this syntax: next*: <//>(ref DoublyLinkedNodeObj[T])
20:56:38disruptekit's a holdover from newruntime.
20:56:39FromGitter<spielerei> where is it documented: the <//>(...) part
20:56:53disruptekit means `owned`. you can ignore it.
20:57:07*Vladar quit (Remote host closed the connection)
20:57:30FromGitter<spielerei> ty
20:57:44disruptekbasically just a shim to represent `owned` in a compiler than might not know how to parse that keyword.
20:59:09FromGitter<awr1> introducing the all new keyword for nim, `schrรถdinger T`
20:59:21disrupteki think nim is expressive and succinct enough that we don't need to drop characters here and there just to reduce the column count.
20:59:28disruptekit's just not the priority.
21:02:02disruptektype MaybeNode = holds Node # ie. nilable ref
21:02:53filcucdom96: thank you
21:02:54disruptektype MaybeNode = may ref Node
21:03:41disruptek# ie. one month out of the year it refers to a Node
21:05:39*beatmox quit (Remote host closed the connection)
21:06:10*beatmox joined #nim
21:07:32*solitudesf quit (Ping timeout: 245 seconds)
21:08:35FromGitter<alehander42> disruptek, you might be right, thats just my opinion
21:08:52FromGitter<alex65536> Hello, I have a question
21:08:54filcucdom96: https://github.com/nim-lang/nimble/issues/720
21:08:58filcucdom96: thank you
21:09:07FromGitter<alex65536> I have a matrix class with seq[seq[float]] inside
21:09:12Araq'may ref T'?
21:09:19disruptekyeah.
21:09:37Araqhmm that's something that will grow on me, I think
21:09:55FromGitter<alehander42> the problem is not in type sections: its not a problem to type it there, but in normal code, e.g. in proc declarations: โŽ imo it's a smell to have to do `MaybeNode = may ..` , its better to just use `may Obj` or `?Obj` everywhere
21:09:55disruptekit's short and it reads well.
21:10:11FromGitter<alehander42> does it sound well in english?
21:10:17Araqit also fits the rest of the language
21:10:19FromGitter<alehander42> i am bad at that stuff
21:10:41Araqalex65536: we're listening even if it might not look this way
21:10:50disrupteki'm biased; ask dom.
21:11:03FromGitter<alex65536> And I want to return a row from it with operator `[]`
21:11:16Araqproc foobar(x: may T; y: may S): may Q
21:11:25FromGitter<alehander42> `maybe Object` sounds as very correct english to me, but `may Object` sounds as something wrong
21:11:25FromGitter<alex65536> If the matrix is non-const, I just
21:11:29FromGitter<alehander42> but maybe my english is wrong
21:11:33*Trustable quit (Remote host closed the connection)
21:11:54Araqwhat about this:
21:12:12Araqproc foobar(x: nil T; y: nil S): nil Q
21:12:16FromGitter<alex65536> do `proc [](a: var Matrix, i: Natural): var seq[float]`
21:13:02disruptekto me, it's like you're painting the type with a nil brush.
21:13:12FromGitter<alehander42> well, this is the default idea i think `nil`
21:13:28FromGitter<alex65536> When I'm trying to the same thing without `var` to handle the case when the matrix is constant, it seems that the row is copied
21:13:29disruptekbut the type isn't nil per se; it's merely nil-able. could be nil.
21:13:35FromGitter<alehander42> but i agree a bit that `nil A` in literal sense suggests "nil values from A"
21:13:36AraqI think I like it best, so it's a 'nil ref T'
21:13:47FromGitter<alex65536> Is there any way to prevent this?
21:14:04FromGitter<alehander42> and nilable/maybe/? is better in "value from A which might be nil"
21:14:05Araqproc `[]`(a: Matrix, i: Natural): lent seq[float]
21:14:26Araqalex65536: or make the accessor a template
21:14:33Araqthen you don't need both variants
21:14:48FromGitter<alex65536> Thanks :)
21:14:50disruptekproc foo(x: may ref T; y: may ref S): may ref T
21:14:59FromGitter<alex65536> And what does `lent` do?
21:15:00disruptekie. x may refer to a T
21:15:12disruptekthe implication is that it may also be nil.
21:15:24Araqalex65536: it gives you an immutable view into the data
21:15:32*asymptotically quit (Quit: Leaving)
21:15:37Araqjust like C++'s 'const& T'
21:16:00FromGitter<alex65536> Nice, thank you :)
21:17:25disrupteki guess it's not backwards compat, which kills it.
21:18:16disruptekof course, nilable isn't, either, right?
21:19:04FromGitter<alehander42> disruptek ``may refer
21:19:06FromGitter<alehander42> very smart
21:20:06FromGitter<alehander42> hm, i dont think thats a limitation
21:20:16disrupteknot according to your spec. surprised me.
21:20:16FromGitter<alehander42> i just think `?Value`
21:20:18FromGitter<alehander42> is very good
21:20:28FromGitter<alehander42> it asks a question
21:20:32FromGitter<alehander42> and questions are part of life
21:20:54disruptekit's not crazy, but i think it's easy to overlook.
21:21:02FromGitter<alehander42> iirc i didnt mention backward compat there
21:21:21FromGitter<alehander42> but my impression was it isnt an issue for those `newident` ref T
21:21:22FromGitter<alehander42> ideas
21:21:37AraqI still like 'nil ref T' best
21:21:42disruptekno, but if `ref T` is not nilable, that's an issue.
21:21:46FromGitter<alehander42> except if somebody had written his own macro which is called nilable
21:22:32Araqor *maybe*: 'nilable ref T'
21:22:51disruptekaaaaand we're full circle.
21:22:59Araqbut if it should be short than 'nilable' we might as well use 'nil' instead of 'may'
21:23:04Araq*shorter
21:23:56disrupteki think the concept it conveys is that it "may refer to" versus "it's a nil ref", and that's why i prefer "may".
21:24:57FromGitter<alehander42> i still think `?` is even shorter
21:25:06FromDiscord<DeltaPHC> `mayhaps ref T` :P
21:25:29disruptekcan ref T
21:26:02FromGitter<alehander42> i think we need a twitter vote
21:27:05*Hideki_ joined #nim
21:27:17FromDiscord<DeltaPHC> Well, official language decisions should be made in the RFC process, not on Twitter, lol
21:27:28disruptekmaybe what you really want is a word that denotes that it's not nilable, so that the code is backward compatible.
21:27:38disruptekie. is ref T
21:28:24Araqdisruptek: no you don't, we had that 'ref T not nil', it never worked well
21:28:54FromGitter<alehander42> DeltaPHC, you're right, i was kinda joking
21:28:56Araqbut maybe I'm wrong
21:29:02FromGitter<alehander42> but was I
21:29:10Araqand only the implementation bugs made it unusable
21:29:31*sagax quit (Read error: Connection reset by peer)
21:29:41FromDiscord<exelotl> oh yeah about the RFC process, how do we move forward with https://github.com/nim-lang/Nim/issues/12216 ?
21:29:45FromGitter<alehander42> i think we should try to find out
21:30:01FromGitter<alehander42> if nilable or not-nilable refs would be more often the best fit for a ref
21:30:15FromGitter<alehander42> like, which one should be used more often
21:30:34FromGitter<alehander42> i know that nilable should probably be only used for recursive types
21:30:34FromDiscord<DeltaPHC> From a correctness perspective, the default should be to have references never be nil
21:30:41disruptekso you said that a nilable ref type is a different type from a non-nilable ref.
21:30:51disruptekis that still true?
21:31:01Araqexelotl: you implement it?
21:33:02*sagax joined #nim
21:33:03FromGitter<alehander42> but this means `option refs` should be good enough, so people like me stop using `nilable refs` as `option` as well
21:33:34disrupteki just hate having to check for nil all the time and i wish i could dispatch on nilable versions of types to prevent that.
21:33:52disruptekbut i understand that might not make sense from any perspective other than that of this user.
21:34:47FromGitter<alehander42> i made a macro to overload on case object cases
21:34:54FromGitter<alehander42> it makes sense to me disruptek
21:35:01FromGitter<alehander42> you're beautiful
21:35:19Araqer...
21:35:27disrupteki know it, but it's still nice to hear every once in awhile.
21:35:33FromDiscord<DeltaPHC> Well, the idea is that if non-nilable is the default, any refs you pass around would be guaranteed to be initialized to something. You wouldn't be able to declare and pass around a ref without first setting it to something
21:35:37disruptek๐Ÿ˜˜
21:36:14disruptekyeah, i get the idea. we still have to deal with code from people like alehander42 though. ๐Ÿ˜œ
21:37:29disrupteki'm still surprised you don't mind breaking existing `ref` semantics.
21:37:46FromGitter<alehander42> DeltaHPC yes
21:37:51FromGitter<alehander42> PHC*
21:38:13FromGitter<alehander42> disruptek yeah, i have a great idea for `Option`
21:38:47disruptekmaybe ?Foo should be Option syntax.
21:39:08disruptekthat makes much better sense to me.
21:39:15FromDiscord<DeltaPHC> I'm guessing that the default semantics won't change until 2.0 or something
21:39:29FromDiscord<DeltaPHC> because backwards compatibility
21:39:32FromGitter<alehander42> DeltaPHC but we would produce warnings at first
21:40:40FromGitter<alehander42> disruptek i dont think so, because `?` is used for nulable types in other langs
21:41:10FromGitter<alehander42> and Maybe is often similar to Option
21:41:12FromGitter<alehander42> iirc
21:41:41disruptekthen you may as well use ? because you won't want to use it for anything else.
21:41:47FromDiscord<DeltaPHC> I mean, I have no problem just writing `Option[T]` like it is currently
21:42:16disrupteki was thinking more like ? could be a deref operator for an Option value.
21:43:29disrupteklet foo: string = ?optional or "default"
21:43:37AraqI think we'll let the community vote on the syntax
21:43:46Araqbut the implementation can already start
21:43:54FromGitter<alehander42> but it's hard to make a poll in github
21:44:06*Hideki_ quit (Remote host closed the connection)
21:44:32FromGitter<alehander42> disruptek ah something like the elvis operator
21:44:38FromGitter<alehander42> i meant something else tho
21:44:47disruptekyeah.
21:44:49FromGitter<alehander42> what if we do the flow typing narrowing
21:44:52FromGitter<alehander42> of the type of `a`
21:44:54zedeusdisruptek: PMunch's library does that
21:44:55FromGitter<alehander42> for options as well
21:44:55zedeushttps://github.com/PMunch/nim-optionsutils
21:44:58FromGitter<alehander42> not only for ref
21:45:04disruptekyeah, there's one out there already.
21:45:06FromGitter<alehander42> e.g. โŽ if a.isSome: โŽ just use a
21:45:12FromGitter<alehander42> dont do b = a.get
21:45:20*Hideki_ joined #nim
21:47:01FromGitter<alehander42> but this would require something like Option having a {.narrow: isSome, get.} pragma
21:47:04*Hideki_ quit (Remote host closed the connection)
21:47:06FromGitter<alehander42> but it might be too out there
21:47:20*Hideki_ joined #nim
21:47:51FromGitter<alehander42> Araq, what should be the first thing in impl? reordering where the cfg is built?
21:51:12shashlick@disruptek - sorry was napping :)
21:51:43disruptekjust thinking you could throw a 1 in there and see if your code still crashes.
21:51:55shashlickI can try it out
21:52:35shashlickI have tried without it and it works fine
21:53:51*daddoo joined #nim
21:53:51disruptekright, but maybe the issue really has nothing to do with the flag itself but more to do with when/how it's installed.
21:55:59shashlickOk well I have no way to try right now, will tomorrow evening
21:56:16disruptekgoin' for maximal suspense, huh?
21:56:33FromGitter<alehander42> hm, crystal uses `?` as well
21:57:17*Hideki_ quit (Remote host closed the connection)
21:57:40shashlickAt the beach ๐Ÿ˜Ž
21:57:45shashlickhttps://github.com/ivmai/bdwgc/blob/ddd788fc3c3701405efde47c3f540bdf01c878dd/misc.c#L2433
21:57:53FromGitter<alehander42> and kotlin
21:58:05shashlickLooks like setting this before init is appropriate
21:59:14disruptekwell, we'll see. if i'm wrong, that's good. better if i'm right.
21:59:21*Hideki_ joined #nim
21:59:56FromGitter<alehander42> but python's mypy didn't choose `?`: they did choose non-nullable by default and `Optional` https://github.com/python/mypy/issues/73
21:59:58Araqalehander42: I'm not sure tbh.
22:00:32Araqit belongs into sempass2
22:00:40Araqwhich doesn't use a CFG
22:00:55Araqmost of this stuff is already implemented in sempass2
22:01:03*endragor joined #nim
22:01:07Araqare we certain we need a CFG for this?
22:02:06shashlickBut interior pointers is enabled by default
22:02:28shashlickTurning it off generally for Nim feels wrong
22:02:46shashlickMight make sense as an optimization for a specific app
22:02:47Araqshashlick: we can use a --define for this
22:02:54disruptekcrashes feel worse.
22:02:54shashlickhttps://github.com/ivmai/bdwgc/blob/40fcb59ed30f55076b5e6bbfca798ad0cad0302c/README.md#general-description
22:03:06shashlickSee 4th paragraph
22:03:47*Hideki_ quit (Ping timeout: 245 seconds)
22:05:16Araqbut I need to sleep now, good night
22:05:35shashlickI'd understand if we have a define to turn it off if someone wants it
22:05:43*endragor quit (Ping timeout: 265 seconds)
22:05:59shashlickBut more importantly, we need to understand why we end up with interior pointers in the first place
22:06:16shashlickI'll do your test disruptek
22:06:41disrupteki know. wish we had a repro that ran on linux.
22:13:12*nsf quit (Quit: WeeChat 2.5)
22:14:17shashlickIt should compile on Linux
22:14:30shashlickExcept for the window plugin
22:14:35shashlickI think
22:15:02shashlickWhich can be disabled with the allowed.ini
22:15:07shashlickHaven't tried though
22:16:18FromGitter<alehander42> Araq, i already wrote a seemingly working impl of similar behav with AST
22:17:12FromGitter<alehander42> so i think its doable, but i thought in cfg there are less cases to analyze
22:17:19FromGitter<alehander42> i am not sure, you use cfg more
22:17:29FromGitter<alehander42> good night
22:19:01*Serrellanos joined #nim
22:21:02*Serrellanos quit (Client Quit)
22:24:46*daddoo quit (Quit: Leaving)
22:32:38*endragor joined #nim
22:35:49*Hideki_ joined #nim
22:37:15*endragor quit (Ping timeout: 240 seconds)
22:47:17*Hideki_ quit (Ping timeout: 240 seconds)
22:49:32*Hideki_ joined #nim
23:00:44*filcuc quit (Quit: Konversation terminated!)
23:03:54*oprypin quit (Quit: Bye)
23:04:03*oprypin joined #nim
23:04:40disruptekshashlick: problem is, i can't build winim.
23:09:23disruptektreeform: pushed a GCP with signing; give it a shot. works for me with the json-based call format, but we need to decide how to handle empty strings for parameters (omit them?).
23:10:18*krux02 quit (Remote host closed the connection)
23:14:50*oprypin quit (Quit: Bye)
23:16:04*oprypin joined #nim
23:16:34shashlickOnly window should need winim right?
23:16:41disruptekgot me.
23:17:18disrupteki guess, yes.
23:20:56shashlickRemote is also not building
23:21:19shashlickBut you just need two plugins and feud itself
23:21:37disruptekokay.
23:25:01disruptekthis is in my wrappers/scintilla.nim >> {.passC: \"-DGTK".}
23:26:33disrupteki guess it's not pulling in win32/scintilla stuff so i get a missing Scintilla_RegisterClasses symbol. can i omit that somehow?