<< 01-05-2018 >>

00:02:09*Lord_Nightmare quit (Ping timeout: 264 seconds)
00:06:41*Lord_Nightmare joined #nim
00:29:40*jrbrt quit (Quit: jrbrt)
00:41:57*CodeVance quit (Read error: Connection reset by peer)
00:47:44*CodeVance joined #nim
01:14:37CodeVanceI'm trying to run opengl/glfw in nim
01:19:58*athenot joined #nim
01:22:11*athenot_ joined #nim
01:25:02*athenot quit (Ping timeout: 276 seconds)
02:00:17*CodeVance quit (Quit: Leaving)
02:01:28*leorize quit (Quit: WeeChat 2.1)
02:18:31*skrylar joined #nim
02:32:08*vivus quit (Quit: Leaving)
02:41:46*skrylar quit (Quit: Leaving)
03:02:52*BitPuffin quit (Remote host closed the connection)
03:08:57*GaveUp quit (Ping timeout: 240 seconds)
03:21:38*GaveUp joined #nim
03:26:26*Lord_Nightmare2 joined #nim
03:29:05*Lord_Nightmare quit (Ping timeout: 248 seconds)
03:30:17*gangstacat quit (Quit: Ĝis!)
03:31:47*skrylar joined #nim
03:33:21*Lord_Nightmare2 quit (Ping timeout: 264 seconds)
03:37:58*Lord_Nightmare joined #nim
03:45:01*skrylar quit (Remote host closed the connection)
03:48:13*dddddd quit (Remote host closed the connection)
03:48:40*darithorn quit (Quit: Leaving)
03:51:47*gangstacat joined #nim
03:54:28*Lord_Nightmare2 joined #nim
03:55:45*Lord_Nightmare quit (Ping timeout: 248 seconds)
03:55:46*Lord_Nightmare2 is now known as Lord_Nightmare
04:07:21FromDiscord<2vg> Is there something to get the display width of multibyte characters with Nim? Does anyone know?
04:31:46*CodeVance joined #nim
04:34:16*CodeVance quit (Client Quit)
05:20:21*athenot_ quit (Ping timeout: 240 seconds)
05:24:49*arecaceae quit (Remote host closed the connection)
05:25:13*arecaceae joined #nim
05:31:27*Cthalupa quit (Ping timeout: 240 seconds)
05:37:44*athenot joined #nim
05:38:25*Cthalupa joined #nim
06:01:40*miran joined #nim
06:02:04*nc-x joined #nim
06:02:08nc-xxmonader,
06:02:36nc-xlook at the error message
06:03:05nc-xit shows that it is trying to #include the .so file, i.e. it is trying to load it as a header file
06:04:58nc-xhmm.. looks like the bridge is still down?
06:09:20*nc-x quit (Ping timeout: 260 seconds)
06:15:05*FromGitter joined #nim
06:19:11FromGitter<nc-x> 1st example means that there is a dynamic library which contains a function named SDL_Init that we have to call
06:20:26FromGitter<nc-x> 2nd example means that we are not directly linking to libc but using the header file `stdio.h`. As nim compiles to C, it means that the example when compiled will use the C printf function.
06:21:18FromGitter<xmonader> crystal thanks! :)
06:22:32FromGitter<nc-x> We can use header for SDL also but it is convenient to share dynlibs 😄
06:22:59FromGitter<nc-x> It is mostly personal preference or whether you have access to the source code or only the dynlib
06:25:52*NimBot joined #nim
06:27:27Araqactually the .header way will never work with NLVM and produces dependencies to the atrocious -dev Linux packages
06:27:56Araqthat's not personal preference.
06:32:36FromGitter<xmonader> dynamic linking all the way then
06:32:45FromGitter<xmonader> cstring(nil) is the only representation to NULL in c?
06:37:44*yglukhov joined #nim
06:38:58FromGitter<xmonader> ```proc magic_file(p:MagicPtr, filepath: cstring): cstring {.importc, dynlib: libName.} ``` ⏎ ⏎ in this case i mean, to pass a NULL for filepath u would do cstring(nil) [https://gitter.im/nim-lang/Nim?at=5ae80b82dea1b95c10f1c797]
06:39:35*sz0 quit (Quit: Connection closed for inactivity)
06:39:47*xkapastel quit (Quit: Connection closed for inactivity)
06:40:18Araqwell you can just write 'nil' without the cstring type conversion
06:40:43FromGitter<xmonader> yep It worked thanks @Araq :)
06:45:11*Lord_Nightmare2 joined #nim
06:45:53*Lord_Nightmare quit (Ping timeout: 248 seconds)
06:46:05*Lord_Nightmare2 is now known as Lord_Nightmare
06:49:41*Lord_Nightmare2 joined #nim
06:52:04*Trustable joined #nim
06:52:17*Lord_Nightmare quit (Ping timeout: 248 seconds)
06:55:29*Lord_Nightmare2 quit (Ping timeout: 248 seconds)
06:59:16*Lord_Nightmare joined #nim
07:06:33*yglukhov_ joined #nim
07:06:34*yglukhov quit (Read error: Connection reset by peer)
07:26:43FromGitter<xmonader> https://github.com/xmonader/nim-magic binding with a simple tutorial on what i learned today
07:32:45FromGitter<nc-x> @xmonader Why are you `import system`? https://nim-lang.org/docs/lib.html#pure-libraries-core -> `It is imported implicitly by the compiler. Do not import it directly. It relies on compiler magic to work.`
07:34:14FromGitter<xmonader> @nc-x you're correct, i thought i saw an error while using cstring or something but when removed now and retried it's workign fine thanks :)
08:06:19*yglukhov joined #nim
08:06:20*yglukhov_ quit (Read error: Connection reset by peer)
08:24:49*Lord_Nightmare2 joined #nim
08:27:45*Lord_Nightmare quit (Ping timeout: 248 seconds)
08:28:11*Lord_Nightmare2 is now known as Lord_Nightmare
08:33:19*Lord_Nightmare2 joined #nim
08:33:24*Lord_Nightmare quit (Ping timeout: 268 seconds)
08:34:08*Lord_Nightmare2 is now known as Lord_Nightmare
08:42:26FromGitter<xmonader> @zacharycarter I'm not able to install deps for your nim playground project
08:47:16*miran quit (Quit: Konversation terminated!)
08:55:06*xet7 joined #nim
09:09:52*noonien joined #nim
09:10:37*nsf joined #nim
09:11:59*Vladar joined #nim
09:52:28*Ven`` joined #nim
09:52:29*Ven`` quit (Client Quit)
09:53:03*Ven`` joined #nim
10:02:53*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:03:18*Ven`` joined #nim
10:28:38*alehander42 joined #nim
10:29:10alehander42hm it seems gitter is down (or only for me?)
10:31:46*nc-x joined #nim
10:48:51*nc-x quit (Quit: Page closed)
10:54:57*CodeVance joined #nim
10:56:56*yglukhov quit (Remote host closed the connection)
10:57:46*yglukhov joined #nim
11:02:05*nc-x joined #nim
11:02:25*yglukhov quit (Ping timeout: 248 seconds)
11:08:52*alehander42 quit (Quit: Page closed)
11:15:06*PMunch joined #nim
11:19:26*nc-x quit (Quit: Page closed)
11:41:17dom96alehander42: yeah, there are issues with it.
11:45:46*yglukhov joined #nim
11:50:09*yglukhov quit (Ping timeout: 260 seconds)
11:55:11*yglukhov joined #nim
12:11:23*BitPuffin joined #nim
12:15:39*krux02 joined #nim
12:16:05krux02hmm, gitter is on "maintenance" (down).
12:16:18krux02seems like I have to use irc today.
12:29:55yglukhovjust found that nim allows return in finally, and it is somewhat strange. is there any reasoning? Araq?
12:30:27Araqyglukhov: Python allows it :P
12:31:08Araqit's can be a lie though outer finallys are still run
12:31:27yglukhovyes, java allows it as well. but it was a surprise to me that you can stop exception propagation if you return in finally
12:31:41Araqwell
12:31:51Araqit should stop the propagation
12:31:55Araq*should not
12:32:12yglukhovjava works similarly
12:32:33Araqwell yeah, just do what java/Python does here
12:32:40yglukhovnewer java emits a warning on return-in-finally. but has to keep it for backwards compat
12:33:04yglukhovso i wonder, maybe it is a good time to disallow return in finally now?
12:33:12Araqthat would be an argument against exceptions fwiw, unclear rules.
12:33:15yglukhovto not make java mistake
12:33:33AraqPython allows it and nobody ever complained
12:33:55Araqthat would require an RFC, I'm afraid. it's subtle.
12:34:17yglukhovi don't think anyone really thinks about it. it came to me only when i tried to figure how the transformation should work
12:37:02yglukhovAraq: python return in finally stops exception propagation, lol
12:37:55yglukhovisn't it a nice argument that even you don't understand how that works? =)
12:39:11yglukhovbut hey, nim has surely copied python and java behavior correctly :D
12:39:52Araqgood, because back then I looked at how Python does it.
12:40:28Araqthe fact that I misremember is not a particularly good argument given that I don't use exceptions often :P
12:41:35yglukhovhrm, actually, now that i'm googling, newer java seems to disallow returns-in-finally. and it looks like c# has never allowed them from day 0
12:41:51Araqwe can play some political games now. Like: "you are allowed to deprecate 'return' in 'finally' when I get to deprecate 'defer'
12:41:56Araq"
12:42:03Araq:P
12:42:42yglukhovah, return in defer needs to be deprecated, yeah. but why deprecate defer?
12:42:54Araqbecause I don't like it.
12:43:34yglukhovit allows cool things. what's the alternative?
12:43:54Araqthe only reason that it "Kind of" works is that the other control flow constructs are block-structured
12:44:34Araqtry to replace 'try finally' with 'defer' and 'if' with a new block-less 'unless' construct and see how well that works out
12:45:28yglukhovwhat is "new block-less 'unless'"?
12:47:21AraqI don't know. :-)
12:47:55Araqlike
12:48:09Araqfoo; unless cond: bar; baz # -->
12:48:22Araqif not cond: bar
12:48:26Araqfoo; baz
12:48:33Araqlike 'defer' works.
12:52:07yglukhovsorry, i'm lost
12:52:30dom96I'd be okay with 'defer' being removed, it still holds a sense of fragility to me and so I never use it.
12:52:38Araqnever mind then
12:53:18dom96And I do tend to agree with Araq's desire to remove features, others seem to agree too: https://www.reddit.com/r/nim/comments/8fwu36/what_needs_nim_to_grow_up_more_the_community/dy8ed8e/
12:53:20Araq'defer' is not Nim. Nim is "language constructs we couldn't use macros for and then macros"
12:53:39dom96indeed
12:53:49dom96destructors will work much better than 'defer' anyway
12:54:11dom96Is it too late to make destructors work well enough to be used in the stdlib and to remove the need for worrying about 'close'ing things?
12:54:24Araqdom96: no. :-)
12:54:44dom96Then I vote for that direction :)
12:55:12dom96Araq: also yay, you answered the guy on Reddit
12:56:05Araqalso Python added a 'with' statement, not 'defer'
12:56:18Araqand Nim can do 'with' easily too.
13:02:33yglukhovdestructors will likely remove the need for defer indeed.
13:02:40yglukhovwith is not an option, imo
13:02:42CodeVanceI like pythons with block. Most boilerplate is removed with it?
13:02:45*smt` quit (Ping timeout: 264 seconds)
13:03:00CodeVanceYa we need an official with macro
13:03:50*nixfreak joined #nim
13:06:01*yglukhov quit (Remote host closed the connection)
13:07:13CodeVanceDestructors is a proc that is called when a variable goes out of scope, right?
13:07:15*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:11:07*krux02 quit (Remote host closed the connection)
13:17:10*xkapastel joined #nim
13:20:20*dddddd joined #nim
13:22:49euantorI'm happy with defer going, I prefer not to use it as I like to be clear where something is closed/disposed of
13:23:23euantorSOmehting like `with` or C#'s `using` is easy to do with a macro, and looks much nicer IMO
13:27:49PMunchHmm, where does choosenim pull it's versions from
13:28:03euantorGit tags I believe
13:28:29PMunchI'm updating the parsetoml package to be up to 0.4.0 spec (and adding validation stuff), but it's nimble file says nim >= 0.10.2 so I wanted to see if that still works :P
13:29:19PMunchHmm, 0.10.2 is a tag though
13:29:44*smt joined #nim
13:30:17PMunchHmm, it appears to try and download from http://nim-lang.org/download/nim-0.10.2.tar.xz
13:30:55PMunchBut I don't have list rights on http://nim-lang.org/download so I can't simply look for valid ones..
13:32:52CodeVanceGithub releases?
13:33:23PMunchIt seems 0.11.0 is the oldest I can get
13:33:54PMunchCodeVance, 0.10.2 is a GitHub release though
13:34:15PMunchI think it just tried to grab it from http://nim-lang.org/download/nim-<version number>.tar.xz
13:34:31nixfreakI see the domain "learnnimthehardway" is taken now
13:34:51CodeVanceBad!
13:34:58PMunchHaha, who registered that? :P
13:35:05nixfreakwhy bad ?
13:35:05CodeVanceDont go that route T_T
13:35:17CodeVanceHard way is stupid ay
13:35:19CodeVanceWay
13:36:01nixfreakhmm interesting , what do you think , in your opinion is a better way to learn nim ?
13:36:39shashlickthe way I started was to port a python script I had already written into Nim
13:37:07nixfreakI was thinking porting (trying to ) port security tools to nim
13:37:10nixfreakjust to learn
13:37:22CodeVanceFirst idiomatic nim with only inbuilt macros. Learning to use the compiler, and the c compiler, learning wrappers, ...
13:38:50nixfreakThats what I am learning now, question does nim support LLVM debugger ?
13:39:10CodeVanceHow to program the nim way, procedural oriented programming, procs (all the different ones), types, refs and ptrs, var let const, casting, code flow
13:40:27PMunchnixfreak, the LLVM debugger? Nim outputs C code, so it supports C debuggers like GDB
13:42:43nixfreakyep but running on osx using clang
13:42:48nixfreakso its lldb then
13:46:40euantorlldb should work, yeah. I've never tried it though
13:47:39nixfreakhttps://github.com/arnetheduck/nlvm
13:51:11Araqwhat does it take to make 'master' the default branch?
13:51:52shashlickyou go into settings and change it under branches
13:53:20Araqhmm ok thanks
13:54:15CodeVanceNixfreak, programming is hard, and i agree with that. But i dont believe repitition is equal to learning when it comes to programming.
13:56:13nixfreakI agree thinking like a computer scientist is a must if you truly want to know how to program
13:57:29*nc-x joined #nim
14:00:19CodeVanceWell since learn nim the hard way is taken (i think the lpthw author was the one who took it btw) why not "computer science with nim"
14:06:32nixfreakgood point; probably because its "fad name"
14:08:01*Pisuke quit (Ping timeout: 248 seconds)
14:08:32CodeVanceOr he doesnt want others to move into his turf
14:20:40PMunchhttps://github.com/ziotom78/parsetoml/pull/9
14:20:50PMunchAdded v0.4.0 support to parsetoml :)
14:30:32*lxdong joined #nim
14:32:07lxdongIs there any SignPKCS1v15 library in Nim?
14:35:56nc-xAre there any plans to add an option to the docs that hide all the deprecated procs? Right now, it is pretty much irritating because CTRL+F finds deprecated procs and with the overloading there are many procs of same name but half of which are deprecated.
14:36:26nc-xTherefore, even the index at the side becomes useless because of overloaded procs.
14:39:09*nixfreak quit (Ping timeout: 260 seconds)
14:39:18Araqnc-x: good idea but for 0.19 we want to remove deprecated procs
14:40:06nc-xGreat. But IMO the option should still be added (if someone has time), who knows how much more deprecation to come in the future.
14:40:29PMunchOr in other libraries
14:41:30nc-xI will open a "Wish" ticket on nim repo.
14:42:46Araqsure, it is a good thing
14:43:04*lxdong quit (Quit: Page closed)
14:45:33nc-xDone https://github.com/nim-lang/Nim/issues/7744
14:46:23*nixfreak joined #nim
14:47:29nc-xBTW Araq, is nimpretty coming for 0.19? Looking at the repo for zig lang, the most recent commits there are regarding the comment handling for `zig fmt`.
14:49:13nc-xIt would be good if the tools get some love for 1.0rc1
14:51:38Araqnot sure, somebody else can also work on nimpretty
14:52:32Araqimport the lexer, copy parser.nim and edit it to output a token stream
14:53:54Araqbut hey, that would be "work", better let the guy do it who does all the other work already anyway
14:55:16*nc-x quit (Quit: Page closed)
14:56:30*PMunch quit (Quit: leaving)
14:56:31CodeVanceAraq delegate
14:57:10*nixfreak quit (Quit: Page closed)
14:57:45AraqCodeVance: ok, do it.
14:58:12*nc-x joined #nim
14:58:31*pigmej quit (Ping timeout: 265 seconds)
14:58:57CodeVanceHeh, what do i have to do. Or who do i ask
15:00:22nc-xWell, I would say it also has to do with the fact that the majority of the nim tooling source code has no docs at all. For a newbie to nim's source code, it is difficult to understand the code without much trial-error.
15:01:35CodeVanceA nim dev doc?
15:02:38CodeVanceYeah, thats not gonna happen for a while
15:03:11CodeVanceMaybe if everyone pitched in to make notes
15:03:15*Ven`` joined #nim
15:03:19Araqhttps://nim-lang.org/docs/intern.html#the-compiler-s-architecture
15:03:21*vegax87 quit (Remote host closed the connection)
15:04:56Araqit's still suprisingly up-to-date.
15:06:08CodeVanceOk
15:06:38*yglukhov joined #nim
15:06:51*Ven`` quit (Client Quit)
15:08:39*pigmej joined #nim
15:10:57*yglukhov quit (Ping timeout: 256 seconds)
15:11:49*nc-x quit (Ping timeout: 260 seconds)
15:12:57*vegax87 joined #nim
15:16:52*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
15:17:21*vegax87 quit (Ping timeout: 240 seconds)
15:17:25*CodeVance joined #nim
15:17:51*pigmej quit (Ping timeout: 240 seconds)
15:19:15CodeVanceis the gitter bridge working?
15:22:45*pigmej joined #nim
15:24:01*CodeVance quit (Read error: Connection reset by peer)
15:28:05*pigmej quit (Ping timeout: 276 seconds)
15:28:47*Guest59116 joined #nim
15:32:19*leorize joined #nim
15:37:29*CodeVance joined #nim
15:38:21*CodeVance quit (Client Quit)
15:40:48*darithorn joined #nim
15:42:49*miran joined #nim
15:44:25*natrys joined #nim
15:48:06*CodeVance joined #nim
15:52:13FromGitter<krux02> I think there is a common unreadability in things that were invented so long ago.
15:52:22FromGitter<krux02> regex, printf format string, APL
15:52:47FromGitter<krux02> now we realized that inventing operators for everything isn't a good idea
15:52:58FromGitter<krux02> making everything is compact as possible, neither
15:53:14FromGitter<geotre> Like this? :) ```(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:a-z0-9 (?:[a-z0-9-]*[a-z0-9])?\.)+a-z0-9 (?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f
15:53:14FromGitter... \x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])```
15:53:15FromGitter<krux02> things should be readable and predictable.
15:53:30FromGitter<krux02> well I can read that :P
15:53:59FromGitter<krux02> but that is not because it is very readable, but because I just wrote a lot of regular expressions
15:54:35FromGitter<krux02> but trust me in rx, it doesn't become much clearer
15:54:52FromGitter<krux02> but `rx` allows you to put indentation in the regular expression
15:55:05FromGitter<krux02> and comments
15:55:16FromGitter<krux02> so you can comment of parts of that expression
15:55:21FromGitter<krux02> that makes it readable
15:55:32FromGitter<geotre> That sounds useful
15:56:28FromGitter<krux02> here is an example
15:56:28FromGitter<krux02> https://github.com/nim-lang/nim-mode/blob/master/nim-rx.el#L62
15:56:57FromGitter<krux02> just ignore the , for a while
15:57:08FromGitter<krux02> what is in the (rx ...) is important
15:57:24FromGitter<krux02> it compiles to a regular expression in a macro
15:58:36FromGitter<krux02> and you can compose the regular expression
16:00:41FromGitter<mratsim> Obviously you never tried the J language :P https://en.wikipedia.org/wiki/J_(programming_language)
16:00:56FromGitter<mratsim> quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)
16:01:18FromGitter<krux02> that is true I never tried the J language
16:01:28FromGitter<krux02> I kind of don't like languages that start with a J
16:02:29CodeVancewhat happened to nimio.us?
16:04:56FromGitter<krux02> well I mentioned APL, J reminds me of it, but I haven't programmed in APL either
16:05:01FromGitter<krux02> I just know it exists
16:09:37*leorize quit (Ping timeout: 260 seconds)
16:10:05*leorize joined #nim
16:10:57*Ven`` joined #nim
16:11:37*Sembei joined #nim
16:11:46FromGitter<data-man> Gitter works now! :)
16:12:36*Sembei quit (Client Quit)
16:12:41CodeVancei saw
16:13:00*Sembei joined #nim
16:17:50*vegax87 joined #nim
16:19:14*jrbrt joined #nim
16:27:34*jrbrt quit (Quit: jrbrt)
16:36:36*xkapastel quit (Quit: Connection closed for inactivity)
16:37:58*Sembei quit (Quit: WeeChat 2.2-dev)
16:38:42shashlicksudden surge in activity, was wondering why it's so quiet
16:38:46*Sembei joined #nim
16:39:09FromGitter<krux02> @data-man I think it is funny that you and me had the same idea for a PR.
16:39:23FromGitter<krux02> do you agree that "smart..." is always a stupid name for something?
16:40:07*jrbrt joined #nim
16:40:13FromGitter<mratsim> smart contracts say hi ;)
16:40:20FromGitter<mratsim> smartmontools too
16:40:45FromGitter<krux02> what are those?
16:40:52*Sembei quit (Client Quit)
16:40:56FromGitter<mratsim> smartcontrats: blockchain
16:41:04FromGitter<mratsim> smartmontools is HDD health monitoring
16:41:17FromGitter<mratsim> Also when Iwas kid we had a lot of smarties: https://en.wikipedia.org/wiki/Smarties
16:41:19*Sembei joined #nim
16:41:36FromGitter<krux02> smart constracts are an oxymoron.
16:41:52*xkapastel joined #nim
16:42:03*jrbrt quit (Client Quit)
16:42:04FromGitter<krux02> hdd like in hard disk drive?
16:42:09FromGitter<mratsim> yes
16:42:21FromGitter<mratsim> https://en.wikipedia.org/wiki/S.M.A.R.T.
16:42:32FromGitter<krux02> health monitoring on a hard disk, or of a hard disk?
16:43:02FromGitter<mratsim> S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology; often written as SMART) is a monitoring system included in computer hard disk drives (HDDs), solid-state drives (SSDs)[1], and eMMC drives.
16:43:27FromGitter<mratsim> smartmontools is a unix tool to query the HDD about its smart info
16:44:44FromGitter<krux02> how is the info smart?
16:44:48FromGitter<krux02> can the info think?
16:44:52FromGitter<krux02> and make smart decisions?
16:45:15FromGitter<mratsim> I didn’t want to capitalize smart that’s all ;)
16:46:23FromGitter<krux02> Dunning–Kruger effect
16:46:35FromGitter<krux02> on algorithms
16:56:01shashlicktrying a fresh nim install on Windows based on instructions
16:56:30*yglukhov joined #nim
16:57:41shashlickalready found first issue - finish crash since there's no PATH variable in the registry
16:57:49*yglukhov_ joined #nim
16:58:03FromGitter<data-man> @krux02: "smart..." is always a stupid name for something?" ⏎ Yes.
16:58:23*yglukhov quit (Read error: Connection reset by peer)
16:58:51miranshashlick: i have recently istalled nim on windows and it was surprisingly easy and problem-free....
16:59:11shashlicki know the tricks to get it working but am trying like a lay user to see what the challenges can be
16:59:13*athenot quit (Remote host closed the connection)
16:59:42CodeVanceAre there any working opengl nim packages ?
16:59:55*athenot joined #nim
16:59:56FromGitter<krux02> Araq: I really like that nil seq/string is now just equivalent of the emtpy seq.
17:00:08FromGitter<krux02> no more = @[] anymore
17:00:11miran+1
17:00:34FromGitter<krux02> it doesn't work on the vm yet, though.
17:00:43FromGitter<krux02> CodeVance: yes there are
17:01:05*jrbrt joined #nim
17:01:21CodeVancekrux02 please be so kind as to direct me to a package that I can use that doesn't have errors in it :)
17:01:37FromGitter<krux02> I use glad
17:01:49FromGitter<krux02> it generates bindings
17:01:57FromGitter<krux02> and just those bindings that you want
17:02:20FromGitter<krux02> CodeVance: http://glad.dav1d.de/
17:02:30FromGitter<krux02> it's not perfect though
17:02:40FromGitter<krux02> but much better than the official bindings (imho)
17:02:57FromGitter<krux02> you just generate the binding and then add the generated file to your project.
17:03:07FromGitter<krux02> no external nimble package.
17:04:40FromGitter<krux02> to load the functions use doAssert gladLoadGL(glGetProcAddress)
17:04:52FromGitter<krux02> glGetProcAddress is from sdl2 btw.
17:05:01FromGitter<krux02> so you don't need the other wrappers.
17:05:15FromGitter<krux02> glfw has an equivalent I guess.
17:05:38CodeVancethanx krux :)
17:05:38*yglukhov_ quit (Read error: Connection reset by peer)
17:05:47FromGitter<krux02> you are welcome
17:05:54CodeVanceare we going to get a nim 0.19?
17:06:05FromGitter<krux02> CodeVance maybe soon you will be able to write the shaders in nim :P
17:06:05*yglukhov joined #nim
17:06:07CodeVancesince the non-nil thing is in
17:06:29CodeVanceYa I just want to experiment with the basics in nim, for me graphics is basic.
17:06:29FromGitter<krux02> it feels like 18 just released, so I don't know
17:06:37FromGitter<krux02> maybe maybe not it is not really scheduled
17:06:53CodeVancedom was talking about CI for nim
17:06:55FromGitter<krux02> I show you want I want to support
17:06:59CodeVanceor CD
17:07:22FromGitter<krux02> http://ix.io/19aH
17:07:36FromGitter<krux02> CD?
17:07:40FromGitter<krux02> compact disc?
17:07:50miranCodeVance: i asked the same question (because of the same reason) few days ago
17:08:08FromGitter<data-man> CD = Change Directory :)
17:08:08miranand i didn't like the answer i've got from our BDFL ;)
17:08:20CodeVanceContinuous Deployment
17:08:37FromGitter<krux02> ah, ok
17:08:38CodeVancebasically always latest
17:08:55FromGitter<krux02> I guess a compact disc is not continuous deployment :P
17:09:21CodeVancemiran what he say?
17:09:36CodeVanceoh I think I read it already
17:09:50CodeVanceHe not want to add new features before RC1?
17:09:51*jrbrt quit (Quit: jrbrt)
17:10:03miranhe wants to release RC1
17:10:33FromGitter<krux02> CodeVance, I would like to know if you would like to work with something I am working on. And when not what the reasons are.
17:10:38miranno, i asked if RC1 means no new features, but there was no answer on that queston....
17:10:59FromGitter<krux02> RC1 normally means no new features
17:11:08miran'normally' ;)
17:11:11*jrbrt joined #nim
17:11:20CodeVancekrux02 go ahead
17:11:56FromGitter<krux02> it normally means, I think we are done, this is version 1.0 but experience shows that version 1.0 always has bugs, so just lets call it RC1 and expect there to be several others
17:12:05CodeVanceI can wait for features. Iron out bugs first. I think we shouldn't put too much pressure on bdfl
17:12:12FromGitter<krux02> CodeVance: this is the code I just posted http://ix.io/19aH
17:12:16FromGitter<krux02> you see a render call
17:12:23miranit would be nice if we would have 0.19 before RC1 - there are some nice new features, and it would be nice to have a stable version including them
17:13:04FromGitter<krux02> basically everything in that block will be translated to GLSL. accessing symbols from outside of that block will trigger the gererations of attributes/uniforms
17:13:31CodeVancekrux02 you need some macro wizardry?
17:13:41FromGitter<krux02> I am doing some macro wizardry
17:13:53FromGitter<krux02> I am doing a lot of macro wizardry I guess
17:14:07FromGitter<krux02> but I want it to work and to be as frictionless as possible.
17:14:17CodeVancekrux why not just generate all attributes/uniforms possible. Is there a limit in gl?
17:14:55FromGitter<krux02> yes there is a limit
17:14:56CodeVanceor ... no
17:14:57CodeVanceT_T
17:15:15FromGitter<krux02> but apart from that it is like saying generate all possible `let` sections.
17:15:42FromGitter<krux02> I guess you just realized.
17:15:46CodeVancewouldn't it be easier to declare the attributes beforehand
17:15:58CodeVanceI think its easier AND more descriptive
17:16:04FromGitter<krux02> they are declared beforehand
17:16:11FromGitter<krux02> but not in the shader
17:16:34CodeVancemake a block say... shader: then put all attributes inside it
17:16:36dom96krux02: no, it means there is no breaking changes, not no new features
17:16:39FromGitter<krux02> in that example I do it via vertex
17:17:25CodeVancekrux add the P, V, M to the do block
17:17:29FromGitter<krux02> dom96: I would disagree on that. When an RC detects a critical bug that requires a breaking change it is gonna happen.
17:17:31*athenot_ joined #nim
17:17:33CodeVancedo call
17:17:53FromGitter<krux02> what do you mean?
17:18:04dom96krux02: Yes, well, it's a release candidate
17:18:07dom96Presumably for v1.0.0
17:18:35dom96It's a chance to ensure we haven't missed anything
17:18:36CodeVancekrux don't try to get the attributes from the context it is declared in, rather make it explicit
17:18:57*athenot_ quit (Remote host closed the connection)
17:19:01CodeVancedom can't you just call it v1.0.0-rc1?
17:19:19*athenot_ joined #nim
17:19:21*athenot quit (Ping timeout: 240 seconds)
17:19:30CodeVancesemantic versioning
17:19:31dom96CodeVance: indeed, I would call it that
17:20:16CodeVanceit is v1 for all intents, until a desasterous bug is discovered
17:20:18CodeVancebut sorta beta
17:20:41CodeVanceand if a week goes by without new bugs rc2 then release?
17:20:48*jrbrt quit (Quit: jrbrt)
17:21:22mirani'm afraid that we would have to wait for a long long time until 1.0.0-rc1, and releasing 0.19 would happen much quicker because of less pressure because of its name....
17:21:51CodeVanceI think we shouldn't put so much attention to the name
17:22:05CodeVanceBut v1 will still mean a new start
17:22:14CodeVancev1 should do away with the old
17:22:29miranour BDFL puts 'so much attention to the name' ;)
17:22:30FromGitter<krux02> hey people there won't be a v1 RC very soon.
17:22:46FromGitter<krux02> There are still some breaking changes on the TODO list and they have to be done before 1.0
17:22:54FromGitter<krux02> even a 1.0-RC1
17:23:02CodeVancemiran, its publicity. v1 would recieve more attention (both good and bad)
17:23:14miranthat's why i'm proposing 0.19 once notNil strings/seqs work - to get it out sooner
17:24:11CodeVanceThere's no reason for nim official to have to make a releae. Building nim only takes a small time. Someone can make their own build
17:24:15FromGitter<krux02> CodeVance, I am not automacically gathering attributes, attributes are defined by the VertexType of the mesh
17:24:56miranCodeVance: nim beginners will not build nim manually. and having notNil as default will be great for them
17:25:42FromGitter<krux02> miran: tutorials should stop suggesting all the beginners to use ref typas for everything.
17:25:53FromGitter<krux02> that would fix the problem.
17:26:04FromGitter<krux02> not using ref == not nil
17:26:06FromGitter<krux02> done
17:26:18FromGitter<krux02> problem solved once and for all.
17:26:26CodeVancekrux, to be honest, I was wholly unfamiliar with ptr and ref. So I don't really know which to use. ref sounds safer
17:26:38FromGitter<krux02> neither
17:26:55FromGitter<krux02> just use object without ref or ptr
17:27:06CodeVancewhat about MyObjType = ref object of RootObj
17:27:19FromGitter<krux02> nope
17:27:32FromGitter<krux02> just use object
17:27:38CodeVancehow then ? just MyObjType = object?
17:27:42FromGitter<krux02> yes
17:27:58FromGitter<krux02> don't ask "how do I do inheritance then?"
17:27:58CodeVanceBut then the compiler complains I think
17:28:11dom96You should prefer 'object' but there are cases when 'ref object' is useful
17:28:12FromGitter<krux02> no that part is completely fine
17:28:30mirankrux02: how do i stop suggest them not to use "result = @[]", if they have to do that in the latest stable version?
17:28:45CodeVanceAnd what about people having a "Ref type" and a "normal type"
17:28:45miran(too many negations there)
17:28:52FromGitter<krux02> dom96: yes, if you want to create arbitrary graph structures.
17:29:20dom96or if you want to avoid writing 'var T' everywhere :P
17:29:36FromGitter<krux02> CodeVance, you never need both the ref type and the normal type.
17:29:42FromGitter<krux02> or better said almost never
17:29:52CodeVanceas I understand it ref referes to a variable (Cause it won't work if I don't declare a variable and just create an object)
17:29:55FromGitter<krux02> so it is bad design to provide both "just to be sure"
17:30:16FromGitter<krux02> ref is basically a pointer
17:30:23FromGitter<krux02> it has pointer indirection
17:30:27dom96Reference objects are allocated on the heap, normal objects on the stack. That's the difference.
17:30:30FromGitter<krux02> the object needs to be allocated on the heap
17:30:34CodeVancekrux02 I think it would be easier to not have "ref type" aliases. Should we go through nim-by-example and remove those?
17:30:53FromGitter<krux02> dom96: well that is not really that simple
17:31:07FromGitter<krux02> CodeVance: yes
17:31:11FromGitter<krux02> I would agree on that
17:31:39FromGitter<krux02> I don't see anything wrong with using ref types, but I personally would prefer it if they are explicit
17:31:43CodeVancecause you can always just use ref NormalType but getting the opposite is difficult
17:31:49dom96Ehh no
17:31:54FromGitter<krux02> the type is without `ref` and when you need it, you jupt put it there
17:32:09FromGitter<krux02> dom96: Ehh yes
17:32:33CodeVancedom96 how would you get the NormalType from RefType
17:32:40dom96If a library expects a type to be used as a ref what's the point in having the user explicitly write 'ref' everywhere?
17:32:45dom96You wouldn't
17:32:49dom96Because you shouldn't
17:32:57CodeVanceC would expect it though XD
17:33:07CodeVanceAnd I understand
17:33:15FromGitter<krux02> dom96: I library shouldn't expect ref types if it can avoid it.
17:33:41CodeVanceBut maybe like declaring the RefType = ref NormalType; NormalType = object is a bad example for beginners?
17:33:53FromGitter<krux02> and unless a library stores away a reference to that object (which a library shouldn't do), a ref type isn't required.
17:35:02*Sembei quit (Quit: WeeChat 2.2-dev)
17:35:30CodeVancehttps://nim-by-example.github.io/oop/ can I change this to not use `ref object of RootObj` and such
17:35:49dom96That would break the example
17:35:55CodeVanceOr is this the right place
17:35:59CodeVanceto use it
17:35:59*Sembei joined #nim
17:36:07CodeVancefor multi methods
17:36:41FromGitter<krux02> unref a type: http://ix.io/19aP
17:37:11FromGitter<krux02> CodeVance: multi methods are unloved
17:37:26*nixfreak joined #nim
17:37:30CodeVanceCause they are hard to follow
17:37:46CodeVanceI want to know exactely which proc is used
17:39:22FromGitter<krux02> CodeVance: that example is exactly the right example to show ref types. So you shouldn't change it
17:39:29FromGitter<krux02> but for actual code I would change it
17:39:45dom96The only places with ref types in there are to explain what a ref type is
17:39:50dom96unless I'm missing something
17:40:03CodeVanceCan't this be a inbuilt library? https://nim-by-example.github.io/oop_macro/
17:40:28CodeVanceno it was to explain oop with nim
17:42:07miranCodeVance: read pmunch's reddit post about ref types, if you didn't already
17:42:19miranhttps://peterme.net/nim-types-originally-a-reddit-reply.html
17:42:42CodeVancemiran, I'm new
17:43:05miranthat post was very helpful to me.
17:43:18CodeVanceLet us add this to my list of nim links
17:43:31miranit took me couple of readings and experimenting until i understood it clearly
17:43:33FromGitter<krux02> CodeVance: please no to all the OO crap
17:43:46FromGitter<krux02> Nim is great because it isn't OO
17:44:02CodeVancekrux02 I don't really care as long as it works
17:44:09CodeVanceEither way is fine
17:44:17CodeVanceBut you still need data
17:44:42FromGitter<mratsim> I think I have a use case for multi method: dealing with the mess of addressing modes (Immediate, indexed) + the various operations (ADD, SUB …) for an super nes emulator.
17:45:29dom96krux02: To continue the old discussion: if a library does have to use 'ref' types, it should just define them as 'ref' types, instead of writing 'ref' for every damn proc and expecting the user of the library to do the same.
17:45:32FromGitter<mratsim> there are 12 adressing modes and a bit more than a hundred of ops and dealing with that with case statement or even a table is tedious
17:46:14FromGitter<mratsim> with multi method you can deal with that elegantly by dispatching on both the adressing mode and the operation involved
17:46:15dom96mratsim: That sounds like it would make your emulator significantly slower.
17:46:29CodeVancemratsim, remember that methods are procs with a method pragma attached, at least that's what I read
17:46:34*nixfreak quit (Quit: Page closed)
17:46:36dom96That probably doesn't matter too much, but I played around with creating a macro to program these opcodes.
17:47:21FromGitter<krux02> CodeVance: tada without ref types: http://ix.io/19aS
17:47:30dom96def-'s SNES emulator uses metaprogramming too IIRC
17:47:34FromGitter<krux02> and yes ther isn't a common "animals" seq anymore
17:47:52FromGitter<mratsim> @dom96 what is important is not having a single point of dispatch, so after each opcode you need to read, preload the next opcode and dispatch directly. Instead of looping and dispatching in a huge case statement which will trigger cache miss 99.9% of the time.
17:48:17FromGitter<mratsim> it just uses templates and a function table, iirc
17:50:14FromGitter<mratsim> I’ve added about half of my resources on interpreter optimization here: https://github.com/mratsim/super-nim/blob/master/resources/internet-resources.md, the Bochs interpreter (x86 interpeter) is also very interesting to read.
17:51:25CodeVancekrux, you can't solve oop by taking out the object
17:52:36FromGitter<mratsim> anyway, when I was looking to use methods for neural networks, I’ve benched them vs pure proc and found them only 3x slower: https://github.com/mratsim/Arraymancer/blob/master/benchmarks/implementation/proc_method_closure_bench.nim (well they are not in the critical path for neural net compared to interpreter so I was ok with that)
17:53:28*jrbrt joined #nim
17:53:33dom96mratsim: I basically spent most of my emulator development trying to get the thing to work, never mind optimising it. Never could get it completed, but I blame the JS implementation I was using as a reference and the overall lack of material for GB emulators.
17:54:13dom96mratsim: I guess you're planning to hook the neural net into the internals of the emulator?
17:54:22FromGitter<krux02> dom96: why did you develop for the JS backend?
17:54:34dom96krux02: I didn't. I used a JS implementation as a reference.
17:54:43FromGitter<krux02> ah
17:54:44FromGitter<krux02> ok
17:54:44FromGitter<mratsim> For emulators switch vs table vs something else is the core part so I think it’s necessary to spent time on design
17:55:12*athenot_ quit (Remote host closed the connection)
17:55:41*athenot joined #nim
17:55:50FromGitter<mratsim> Emulator was interesting because of Nimbus (since we have to write a Ethereum VM at Status), and also because I could reused it to demo/train neural nets yes.
17:56:35FromGitter<mratsim> but for now I’d rather move on directly on Arraymancer because both are quite time consuming.
17:59:03*athenot quit (Remote host closed the connection)
17:59:41*athenot joined #nim
18:07:07*yglukhov_ joined #nim
18:10:29*yglukhov quit (Ping timeout: 255 seconds)
18:13:25shashlickis there a case insensitive == for strings?
18:14:05FromGitter<krux02> in strutils I think
18:14:23FromGitter<krux02> (do not cmpIgnoreStyle it is wrong)
18:17:07shashlickcmpIgnoreCase() <= thanks krux02
18:19:53*nsf quit (Quit: WeeChat 2.0.1)
18:20:07shashlickis there a neater way to `let a = 213` in a try/except without having to make the let a var outside?
18:21:25CodeVanceWhy isn't str.lower automatically imported? it shouldn't be something you'd have to import on your own... Or rather is there a way to add strutils to be automatically included with your code?
18:22:36CodeVancekrux the nim binding is somewhat buggy. Sometimes it makes empty variables
18:24:33FromGitter<krux02> CodeVance: what do you mean?
18:25:01FromGitter<krux02> CodeVanced the strutils package is quite limited it only works on ASCII
18:25:08CodeVancewas `proc findExtensionsGL() =` changed it to `proc findExtensionsGL() = discard`
18:25:14FromGitter<krux02> so ÜÖÄ to üöä conversion doesn't work
18:25:26CodeVance# # Extensions
18:25:26CodeVance# var
18:25:29CodeVanceI had to comment it out
18:25:39FromGitter<krux02> ah yea
18:25:50FromGitter<krux02> wasn't that supposed to be fixed?
18:26:02FromGitter<krux02> yea I told you it's not perfect
18:26:26CodeVanceIt's good enough if you just want your own
18:28:17*miran quit (Quit: Konversation terminated!)
18:28:35FromGitter<krux02> https://github.com/Dav1dde/glad/issues/136
18:28:44FromGitter<krux02> i thought it was fixed
18:32:04*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:34:43shashlickdo you think it is cool to add GUI popup dialogs for finish.exe?
18:34:52shashlickversus the current CLI mode
18:35:54dom96CodeVance: include prelude
18:36:00livcdshashlick: what are you going to use for the gui interface ?
18:36:11*Ven`` joined #nim
18:36:39shashlickjust win32 api
18:36:55shashlickjust need yes/no questions answered
18:36:59CodeVanceshashlick, it actually doesn't matter.
18:37:08CodeVanceBut it is cool
18:37:44livcdshashlick: ahh i have no opinion about the installer. Just curious about what are you going to use to develop it.
18:38:24shashlicki'm making some bug fixes in finish.exe so might as well add some simple enhancements
18:38:59*jrbrt quit (Quit: jrbrt)
18:39:24dom96shashlick: Be sure to make separate PRs for this though.
18:39:41shashlickmakes sense
18:43:03livcdlooking forward to see your installer
18:43:05*Guest59116 quit (Ping timeout: 276 seconds)
18:43:08*vegax87 quit (Ping timeout: 256 seconds)
18:43:13shashlickwell, i'm still taking baby steps
18:43:31shashlicki don't want to get rid of finish or choosenim without a fair test
18:43:52shashlicki'd love to make a new one but will simply end up with installer #3 that is half ass too
18:44:12shashlickso am making some fixes in finish and choosenim as I go and then build towards a better overall solution that merges all this into one
18:46:19shashlickone problem with finish.exe is that the user has already downloaded the entire package by the time it runs, so the program has to handle an incompatible gcc vs. nim arch
18:46:35shashlickinstead, you'd want to download finish by itself and it should download the right nim package for you
18:46:36*xkapastel quit (Quit: Connection closed for inactivity)
18:47:15shashlickbut it has several dependencies such as 7zip, urlgrab and what not which come bundled with nim
18:48:14*pigmej joined #nim
18:54:59Araqthat's not a "problem" of finish.nim, that is what it was designed to do
18:55:13shashlickwell, ya it handles it no doubt, but you
18:55:17Araqit uses the mingw that might already exist and tries to play nice
18:55:33shashlickyou'd rather download the full binaries after knowing about the compiler
18:55:42Araqand plenty of bugfixes went into this tool too
18:55:54Araqand it has zero valid open bugs iirc
18:56:23shashlicki'm testing finish and am going to PR some bug fixes
18:56:36*enthus1a1t joined #nim
18:56:43Araqfixes for what?
18:56:48shashlickdid you have any opinion on the GUI popups vs the command line?
18:58:40shashlickAraq: it's all minor stuff - https://github.com/nim-lang/Nim/issues/7747
18:58:41*enthus1ast quit (Ping timeout: 248 seconds)
18:58:54Araqthe GUI popups are fine with me and a full UI for this tool would have been nicer
18:59:06Araqbut as I said, I gave it libui based frontend
18:59:30Araqbut considered the interaction of libui's event loop with Nim's async download event loop too fragile
18:59:49Araqan ugly robust installer is better than one that crashes
18:59:52shashlickwhat did you want to have in the GUI besides answering these questions?
19:00:12shashlick1. add nim to path, 2. add mingw to path 3. add to start menu
19:00:35Araqnothing
19:01:10shashlicki'd like to have finish.exe pulled out of the binary package and be standalone, and use choosenim behind the scenes to handle the multi-nim setup
19:01:36Araq"Crashes when reading PATH for current user if it doesn't exist in registry" -- that should be gone long ago
19:01:51livcdI like installers that are not very talkative
19:01:58Araq"Looks for nim and mingw only in current user PATH and not global " -- what is "global"?
19:02:00shashlickya I saw the tryGetUnicodeValue, it was just missed in one place
19:02:12shashlicklocal machine path
19:02:23shashlicki have the PR reay
19:02:33CodeVanceshashlick then it isn't finish anymore :)
19:02:36Araqok thanks
19:02:45shashlicklike I said, all minor stuff
19:02:47livcdBe smart by default else let me try to configure everything at once not by interacting with you that much
19:03:13shashlickCodeVance: ya it'd become the official installer
19:03:18CodeVanceis there a VirtualEnvironment for nim?
19:03:26shashlickchoosenim does that for you
19:03:40CodeVancemake a venv?
19:03:56*vegax87 joined #nim
19:04:14CodeVanceshashlick, finish could remain a cli app. the official installer could just call it after intstallation with the commands already set
19:04:16shashlickAraq: I'd also like to clean up the windows install instructions on the website
19:04:38Araqoh yeah, go for it please
19:04:50livcdCodeVance: that's how it should be!
19:05:16shashlickso installation is a conversation with the user and there's multiple things to do
19:05:25shashlickI've tried to capture it here: https://gist.github.com/genotrance/534e3a49138eec2894299881f5e60105
19:05:58shashlickfinish does some of it, choosenim does other stuff, and there's some holes
19:06:17shashlickit might take time but i'd prefer step by step improvements to get there
19:08:05shashlickaraq: do you still want to ask to "patch Nim's config to use this" even when mingw is in the path?
19:08:26Araqsure
19:08:35shashlickI just feel it is redundant
19:08:47Araqit nails the config to this mingw
19:09:31shashlickI've not gone into that level of detail but if there's multiple mingw detected, does the user get to choose the one they want?
19:09:56AraqI think so, it's been a while
19:10:13shashlickin that case it makes sense to patch the cfg, but in this particular case, mingw is already in the path so there's no reason to patch the cfg
19:10:23shashlickanyway, I think I need to read that code path to be sure what all it does
19:10:27dom96I think for simplicities sake it'd just be better to always use the Nim-installed MINGW
19:10:46dom96especially for finish.exe since that is already bundled anyway
19:10:53dom96choosenim needs to download it, which is why the choice is there
19:11:14dom96but I might remove that choice because it causes issues
19:11:46shashlicknot sure I understand - the case we are talking of is mingw already existing, not finish downloading it
19:11:52shashlicki've not tested that code path
19:12:05Araqshashlick: the PATH can change and you might want to nail what is known to be work
19:12:25Araq"but in this particular case, mingw is already in the path so there's no reason to patch the cfg" -- that is simply not true.
19:12:43CodeVanceI think the patch to nim.cfg is good for venvs
19:13:14shashlickwell then it might be worth it to change the message from "Not required since it's in your PATH!" to something that encourages patching the cfg
19:13:50Araqwell I don't know if we want to "encourage" it, but it makes sense to offer it
19:14:11Araqand as you noticed, this code has no tests and testing it has to be manually
19:14:26Araqwhich means you need to be extra careful :P
19:14:52Araqand yes.
19:15:07AraqI tested every code path (once).
19:16:16livcdthe first time i installed nim it was kinda painful (due to my f.cked up environment variables)...the second time it went kinda smooth when I let it handle everything (its own mingw)
19:16:23*vivus joined #nim
19:16:33CodeVancehow to get a cstringarray
19:16:47dom96What's so bad about always using Nim's MINGW?
19:17:02dom96If the user wants to use their own they can always manually modify the config
19:17:12FromGitter<zetashift> choosenim worked fine for me, only minus point was that (on windows) it only had 32bit version
19:17:22CodeVancedom96, I followed the instructions in install and downloaded mingw beforehand XD
19:17:41livcddom96: i think that should be the preferred default
19:17:52dom96CodeVance: That's bad, which instructions? We need to fix them
19:18:05livcdI honestly did not know about choosenim before and I do not mentione anyone mentioneing it on IRC oO when I was actually installing Nim and struggling
19:18:29CodeVancedom96, Installation on Windows
19:18:32CodeVance-----------------------
19:18:32CodeVanceInstall Nim by downloading and unzipping the ``nim_$version.zip`` file.
19:18:32CodeVanceRun ``finish.exe`` to detect and setup your MingW environment.
19:18:32CodeVanceCurrently, the following C compilers are supported under Windows:
19:18:32CodeVance- | Microsoft's Visual C++
19:18:32CodeVance | http://msdn.microsoft.com/visualc
19:18:33CodeVance | (You need the SDK too - but not the full one: Only
19:18:35CodeVance the win32api header files and import libraries are essential.)
19:18:37CodeVance- | Gnu C Compiler (the mingw version; the cygwin version has not been tested!)
19:18:41CodeVance | http://www.mingw.org/download.shtml
19:18:43CodeVance- | LLVM with Clang or GNU C/C++ frontend
19:18:45CodeVance | http://llvm.org/releases/download.html
19:18:47CodeVanceHowever, most testing is done with GCC.
19:19:06Araqyeah
19:19:07CodeVanceNo mention was made that it would install mingw if it wasn't detected
19:19:23dom96CodeVance: Please don't paste so much into IRC
19:19:36CodeVanceOk sorry
19:22:14*jjido joined #nim
19:22:30livcdoh nim on chocolatey is very outdated
19:25:10dom96CodeVance: also I'm still not sure where that is, is it install.txt?
19:25:28CodeVanceyes install with the txt extention
19:25:35dom96This is another thing we should fix, there is too many places with installation instructions
19:25:42dom96and they all differ
19:38:15shashlicksorry had to run for a bit
19:38:28CodeVancehow do you get the value of a ptr? Is it still with []
19:39:30shashlickdom96: ya i'm going to fix the windows instructions as well, they are pretty confusing
19:41:27shashlickso what's the deal with niminst? is it still alive/used or is it dead?
19:41:28Araqdom96: I don't know if that's true on github the installations refer to "building from source", on the website it refers to the installers
19:41:32*jrbrt joined #nim
19:42:11Araqand the .zip has to have an install.txt file or something comparable
19:42:30Araqshashlick: niminst is alive and used to produces the zips/tar.xzs
19:42:48dom96Perhaps we should remove install.txt
19:42:54shashlickokay but does it have anything to do with actual end user install?
19:42:54dom96or remove the instructions on the website
19:43:03dom96and tell people to "read the install.txt"
19:43:13Araqshashlick: no. niminst is an "installer generator"
19:43:26shashlickweb instructions should be - download ZIP, extract to location and run finish
19:43:27Araqdom96: that's not convenient.
19:43:32CodeVanceinstall.txt should be exactely the same as on the website
19:43:56Araqmaybe.
19:44:24shashlickcompiler dependencies on web site should be caveated saying they are only required if not already present, or not using finish to do the install
19:44:28*PMunch joined #nim
19:44:37shashlickother DLLs should make it clear that nim binary download doesn't need it
19:44:38dom96We could get the website to embed install.txt
19:45:29PMunchdom96, ref my issue earlier. Why is 0.11.0 the first chooseable version with choosenim?
19:46:21*vegax87 quit (Ping timeout: 240 seconds)
19:46:28dom96PMunch: probably because there is no .tar.gz for 0.11.0
19:46:34dom96er, pre-0.11.0
19:46:37PMunchWell yeah
19:46:42PMunchBut why is that?
19:47:21*sz0 joined #nim
19:47:25dom96because I didn't create them
19:47:32dom96default releases are in a tar.xz
19:49:46shashlickhttps://github.com/nim-lang/Nim/pull/7748
19:50:08dom96it sucks because I have to rearchive each release just for choosenim
19:50:28dom96hrm, actually, choosenim uses the .tar.xz on Unix
19:53:00*CodeVance quit (Quit: Leaving)
19:55:01dom96oh, Linux only https://github.com/dom96/choosenim/blob/c1c03bbcf2dea2b2fbf3890b02744fc3cfcd9769/src/choosenim/cliparams.nim#L103
19:55:17dom96If you're on Linux it might work
19:57:03*CodeVance joined #nim
19:58:27shashlickI thought it downloaded the git archive
20:03:36*vegax87 joined #nim
20:08:35*dddddd quit (Remote host closed the connection)
20:11:57dom96if you ask for a git commit hash or branch then it does
20:11:59*Vladar quit (Quit: Leaving)
20:12:40*yglukhov_ quit (Ping timeout: 256 seconds)
20:16:30*jrbrt quit (Quit: jrbrt)
20:20:27PMunchdom96, I'm on Linux and it doesn't work
20:20:35dom96What does --verbose show?
20:20:43PMunchchoosenim get's a 404 trying to get it
20:21:13PMunchhttp://ix.io/19bB
20:21:35dom96oh, so that one doesn't exist either
20:21:37dom96Pity
20:21:47dom96You can also try `choosenim #v0.10.2` :)
20:23:12PMunchWell it downloads at least
20:23:16PMunchNot that I need it anymore
20:23:23PMunchHad to bump the version to 0.15.0
20:25:27*jrbrt joined #nim
20:26:35PMunchOops, build failure
20:27:14PMunchhttp://ix.io/19bG
20:28:05dom96Ahh, the C sources can't build it
20:28:11dom96too new
20:29:04shashlickprobably check out an older version of csources
20:29:10shashlickhttps://github.com/nim-lang/csources/releases
20:31:27*enthus1ast joined #nim
20:31:44*Trustable quit (Remote host closed the connection)
20:31:56*enthus1a1t quit (Ping timeout: 256 seconds)
20:39:00*jrbrt quit (Quit: jrbrt)
20:42:21shashlickaraq: https://github.com/nim-lang/Nim/pull/7748 build succeeded, although I checked code only into finish
20:45:54*yglukhov joined #nim
20:46:15*noonien quit (Quit: Connection closed for inactivity)
20:46:53*jrbrt joined #nim
20:48:45dom96Yeah, I don't think it's worth supporting such old releases.
20:49:19shashlickno I mean if PMunch wants to build an older release, he'll need to download an older csources as well
20:49:37PMunchYeah, it's not much point
20:50:21PMunchI was updating the TOML library and it said nim >= 0.10.2 in the .nimble file so I just wanted to see if that was still possible with my changes
20:50:54*enthus1a1t joined #nim
20:52:51*enthus1ast quit (Ping timeout: 240 seconds)
20:54:13FromGitter<data-man> @dom96: Please create devel branch for c2nim. For compatibility with Nim/devel. Because of this: https://github.com/nim-lang/c2nim/commit/baa12be128d3719065248b534fec42b65332eb4a
20:54:57dom96data-man: why do you need that?
20:55:18dom96building c2nim via Nimble should work even on devel
20:55:50FromGitter<data-man> I'm using Nim/devel only. And c2nim depends from compiler's sources.
20:57:13*jrbrt quit (Quit: jrbrt)
20:57:54dom96yes, you can build it via `nimble build`.
20:58:00shashlickdom96, Araq: can we make finish.exe add ~/.nimble/bin to the path as well
20:58:15dom96It will use a pinned version of the compiler
20:58:19dom96avoiding all issues
20:58:45dom96shashlick: If it doesn't already do that then it's broken :)
20:59:03shashlickok i'll push that shortly
20:59:28AraqI still hate .nimble/bin
20:59:30Araq;-)
21:00:18Araqor rather the fact that nimble starts its directory with a dot
21:00:37Araqit's source code, don't hide it!
21:00:49FromGitter<data-man> I'm not using nimble. I still hate all package managers.
21:01:35shashlickwell, on one hand there's discussions to move more stuff out of stdlib
21:01:45shashlicki'm quite happy with stdlib and nimble how they are
21:03:24*jrbrt joined #nim
21:04:56shashlickshould finish just add ~/.nimble/bin to the path when nim is added or ask a separate question for that? I think former is appropriate
21:06:48dom96data-man: why? Package managers provide a way to pin dependencies. You'll always be chasing different targets otherwise and have constant build failures for someone.
21:07:37dom96Araq: Don't worry, it's not hidden on Windows. :)
21:07:47dom96But I wouldn't be surprised if MS decides to adopt this hah
21:08:03FromGitter<data-man> I prefer manual control. Old school and soon. :)
21:08:30Araqdom96: try to navigate to it on OSX with VSCode
21:08:48dom96I blame Apple for that
21:09:11Araqblame who you want, but fix it.
21:09:36dom96Then we'll have people complaining that it's clogging up their ~
21:09:52Araqthese can change the default.
21:10:46Araqand ~ is usually messy already.
21:11:09dom96I'm happy to have an RFC about this
21:11:22AraqI always use ~/projects and I've seen plenty of others do this too.
21:12:00shashlickmeh, adding multiple changes to a single file across PRs is a pain, have to wait for merge else it'll become a mess
21:12:13AraqRFC my ass, change it or leave it, but if you leave it, it sucks and you know it.
21:13:02*CodeVance2 joined #nim
21:13:31*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
21:13:39*CodeVance2 is now known as CodeVance
21:13:57dom96I want to learn about this. Every package manager does it this way, so there must be a good reason behind it.
21:13:58*PMunch quit (Quit: leaving)
21:14:08CodeVancewhat is this link for git.io/gHZGCg?
21:14:20dom96In an RFC somebody might give me an insight into this reasoning.
21:14:52Araqbecause it would "clutter up my ~ "
21:14:53FromGitter<data-man> Tests and https://github.com/nim-lang/c2nim/pull/130 works with compiler/devel on my PC. :(
21:15:00Araqyou gave the reasoning yourself.
21:15:24*rockcavera quit (Remote host closed the connection)
21:15:47*jrbrt quit (Quit: jrbrt)
21:16:03dom96data-man: sorry, but you can't escape package managers
21:16:07federico3dom96: isn't the nimble path configurable?
21:16:11dom96federico3: it is
21:16:24dom96federico3: What are your thoughts on this?
21:16:32federico3dom96: what's the question exactly?
21:16:44dom96What should the default Nimble directory be? It currently is ~/.nimble
21:16:50dom96Araq wants it to be ~/nimble
21:17:30federico3first, it should not change unless there's a very compelling reason.
21:17:42shashlickpip, cargo, etc. all do the same thing
21:17:44CodeVancev1 is compelling
21:17:48dom96yeah, it's a big change too
21:17:52shashlicki think the inconvenience is on macos
21:17:58federico3CodeVance: a version is not a reason
21:18:06CodeVance. makes it a hidden folder
21:18:12dom96It's not just a question of s/.nimble/nimble/ in Nimble's source code
21:18:21CodeVancefederico3, v1 is allowed to change things
21:18:21federico3and forcing a non-hidden directory as a default it's really odd
21:18:28dom96CodeVance: That's... not a reason
21:18:41dom96CodeVance: That's a situation that allows the the change to occur
21:19:43dom96Indeed, it's a pain in macOS' file browser. You have to press Cmd+Shift+. to view the hidden files
21:19:51dom96Every time.
21:19:52*rockcavera joined #nim
21:20:00CodeVanceAnd Linux
21:20:04federico3for reference, the XGD spec https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
21:21:01CodeVanceosx can use another directory. or they can just make a bookmark can't they?
21:21:34CodeVancepip is inside %appdata%/local
21:22:06dom96That's even more annoying to find :)
21:22:47federico3no, python's virtualenvs and ruby's rbenv are commonly created as hidden dirs at ~
21:23:46federico3and .nimble is used to compile Nim stuff and to run nimble-distributed tools but it's usually not a runtime dependency
21:23:48CodeVanceNuGet is not prefixed with .
21:24:13CodeVancewait nuget is prefixed with .
21:26:34*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:29:09Araqdom96: just leave it as it is and give us "workspaces"
21:29:36Araqthen I can ignore this issue altogether unless you create a dotted directory in the workspace
21:29:53*jrbrt joined #nim
21:30:29CodeVancehttps://www.google.com/search?q=macosx+reveal+hidden+files+permanently
21:30:30dom96You can already get workspaces, just use --nimbleDir:./myWorkspace
21:31:56dom96Just need a way to make that permanent for a project, somehow in the .nimble file maybe
21:32:01dom96But I want a generic solution for this
21:32:10dom96not yet another key in the .nimble file
21:32:46Araqah yeah but then I get these versionized directories in my workspace that pretend DVCSs haven't yet been invented
21:33:45Araqbut that's a story for another day.
21:34:03dom96might as well just use git's subrepos then ;P
21:34:34Araqif they worked, sure.
21:35:18dom96in what way do they not work?
21:36:50shashlickquestion: what are you doing in the nimble directory anyway?
21:37:21shashlickas a nim/nimble developer, okay, but as a common user?
21:38:34CodeVanceWhat happens if a nimble package isn't maintained anymore?
21:38:55federico3shashlick: user? You mean a developer? .nimble contains build deps
21:39:33shashlickya regular consumer of nim, why do you have to go into the nimble directory?
21:39:51dom96shashlick: To fix a broken package
21:39:58dom96or to learn about a package's internals
21:40:47federico3very rarely, so to speak
21:40:56shashlickbut it's not a daily routine, similar to .vim where I had to git clone a bunch of plugins but after that, I rarely care
21:41:01dom96not very rarely
21:41:34dom96maybe rarely
21:46:19federico3well, with nimble you don't even have to enter .nimble to install/list/remove packages
21:50:38*jrbrt quit (Quit: jrbrt)
21:57:56*yglukhov quit (Read error: Connection reset by peer)
21:58:33*yglukhov joined #nim
22:07:17CodeVanceThe nim-glfw package is out of date/broken
22:07:32CodeVanceThere's another repo with a fix
22:13:29*xet7 quit (Quit: Leaving)
22:14:55*Ven`` joined #nim
22:16:41*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:40:57*athenot_ joined #nim
22:41:13*athenot quit (Read error: Connection reset by peer)
22:45:23*leorize quit (Quit: WeeChat 2.1)
23:18:10*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:34:21*enthus1ast joined #nim
23:34:51*BitPuffin quit (Remote host closed the connection)
23:36:49*enthus1a1t quit (Ping timeout: 268 seconds)
23:39:04*enthus1ast quit (Ping timeout: 265 seconds)
23:39:35*enthus1ast joined #nim
23:46:52FromGitter<krux02> CodeVance: just use sdl2, it is better.
23:47:01FromGitter<krux02> but not the official one
23:47:43FromGitter<krux02> for everybody who cares, ast_pattern_matching got an operator for custom conditions.
23:48:22CodeVancesdl2_nim?
23:50:48*enthus1a1t joined #nim
23:53:29*enthus1ast quit (Ping timeout: 260 seconds)
23:56:52FromGitter<krux02> yes
23:58:17CodeVanceokay, so opengl with sdl got it XD
23:58:25*enthus1a1t quit (Ping timeout: 248 seconds)