<< 11-05-2017 >>

00:08:21*def-pri-pub joined #nim
00:15:52*zachcarter quit (Quit: zachcarter)
00:57:54*vlad1777d quit (Quit: Leaving)
01:20:03*pie_ joined #nim
01:23:50*brson quit (Quit: leaving)
01:24:13*brson joined #nim
01:25:55*pie_ quit (Ping timeout: 260 seconds)
01:30:19*arnetheduck joined #nim
01:38:09*brson quit (Ping timeout: 260 seconds)
02:01:31*chemist69 quit (Ping timeout: 264 seconds)
02:02:19*adeohluwa quit (Quit: Connection closed for inactivity)
02:13:17jsgrant_omIs 'Frag' decently mature? Want to try to dip my toes with it, to learn a little Nim.
02:14:02jsgrant_omhttp://fragworks.io/ If not clear what I'm talking about.
02:15:00ftsfi think it's pretty recent, haven't tried it myself, but give it a go =)
02:15:17*chemist69 joined #nim
02:15:57jsgrant_omGame-loop looks pretty nice, albeit a little verbose; That said much of that might be my said inexperience with Nim. :^)
02:16:45ftsftrying to get a nimble task to build my example app =\ task example, "runs example app": exec "nim c -r examples/paintout"
02:17:08ftsfwhen i run `nimble example` it does nothing except print "example runs example app" =\
02:17:28jsgrant_omRelated to nimble, should that ship with standard Nim? Doesn't seem to be available in Fedora.
02:17:49ftsfi think it should, but distros may decide otherwise, is there a separate nimble package?
02:18:08ftsf(or at least be a dependent package)
02:18:24jsgrant_omftsf: Only 'dnf search' result for nimble is "rubygem-prawm".
02:18:38jsgrant_omIs Nimble newer?
02:18:39ftsf=(
02:18:55jsgrant_omMaybe it just isn't in currently shipping version of Nim in Fedora.
02:19:13ftsfwhich version?
02:20:30jsgrant_omOh farts... well that will do it. Fedora must not package Nim at all currently in main repo... must be mixing this box up with NixOS boxen. :^U
02:20:46jsgrant_omJust 'nim --help' and got a command not found... :^U
02:21:14ftsfahh
02:21:23jsgrant_omWhich I'm sure they don't have a nim2nix yet.
02:21:28ftsfwell probably explains why there's no nimble =)
02:21:55*jsgrant_om will check copr, may have a go at making an rpmspec if there is none for it.
02:22:51jsgrant_omThere's a nim-stable in copr, but last updated 10 months ago.
02:23:36jsgrant_omAlmost makes me miss Arch/Aur.
02:23:43ftsfmmm arch <3
02:24:16jsgrant_omCopr is nice, but too new & userbase is too little compartiviely me thinks.
02:25:25jsgrant_omWill eventually probably move full-time to NixOS... but somewhat commited to Fedora is my day-to-day box for the next-year at least. Somefactor of "good enough" till you run into one of these gotchas.
02:25:36ftsfhttps://nim-lang.org/0.11.3/nims.html A project.nims file can also be used as an alternative to a project.nimble file to specify the meta information... i'm guessing that's no longer true?
02:26:20jsgrant_omAll thing said though, shocked with the typical user-spread of Fedora -- that no-one packaged it in the main repos though.
02:26:33jsgrant_omDouble-though-combo.
02:26:44ftsfit could be you!
02:28:12jsgrant_omftsf: Most I'd commit likely would be a copr spec, as-said not sure if going to be on Fedora for a year & you make a loose agreement to package to somefactor of maintain and/or pass on privs eventually. :^P
02:28:50jsgrant_omThat being said, modern copr spec would be nice. Even "nim-devel" on copr right now is 6 months old & said last build failed.
02:31:05ftsf=(
02:31:23ftsfgonna try get my nim game in PAX indie showcase ^_^
02:31:33jsgrant_omftsf: Link?
02:32:17ftsfhttps://twitter.com/impbox/status/861756652311072768 pixel racing game
02:33:22jsgrant_omftsf: ++
02:33:27pydsignerNoice
02:33:28jsgrant_omVery cool.
02:34:27*jsgrant_om finds it hard to commit to making actual games; Mostly have made toys & lil sandboxes over the years; Want to start getting into gamejams next-year to force me to get a full project out.
02:34:45ftsfyeah game jams are great! just did ludum dare for the 2nd time using nim, lots of fun
02:35:16ftsfjust make little stuff until you find something that's fun then keep working on it and release it
02:36:41FromGitter<Varriount> We need blog posts to submit to reddit and hacker news
02:37:40ftsfdoes anyone read those? =p
02:37:56ftsfjsgrant_om, https://ldjam.com/events/ludum-dare/38/smalltrek my last ludum dare game
02:37:58jsgrant_omftsf: People only watch sassy con-talks.
02:38:19FromGitter<Varriount> ftsf: People on Reddit and Hacker News
02:38:52jsgrant_omBasically half of Bryan Lunduke's Resume.
02:41:11FromGitter<Varriount> If anyone needs VGM artists, there's a bunch on bandcamp
02:41:24jsgrant_omftsf: Neat.
02:42:42jsgrant_omPixel art is haaaard. Rather I probably just don't have the patience.
02:42:48jsgrant_omVoxel is pretty fun though.
02:43:27ftsfhmm i love doing pixel art, can work in a low res so it's very fast to make. haven't tried doing voxel stuff yet
02:54:03FromGitter<Varriount> ftsf: @zacharycarter might need your help then... he needs assets for an example game for frag
02:55:46ftsflooks like frag is going for a more high res style with the spline and stuff compared with nico which is mostly for pixel art type stuff
02:57:14*libman quit (Quit: Connection closed for inactivity)
03:02:00*Ieuan quit (Quit: ZNC - 1.6.0 - http://znc.in)
03:18:01*def-pri-pub quit (Quit: leaving)
03:20:58jsgrant_omYeah, I'll shop around some more. More-lkely I'll settle on the Rustier side of things from the little I've looked about; But kinda peeking around the landscape & poking bushes atm.
03:27:03*sz0 quit (Quit: Connection closed for inactivity)
03:34:29*ftsf_ joined #nim
04:02:43*chemist69 quit (Ping timeout: 255 seconds)
04:06:02*ftsf_ quit (Ping timeout: 240 seconds)
04:07:17*chemist69 joined #nim
04:21:30*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:24:09*zachcarter joined #nim
04:44:54*BennyElg quit (Remote host closed the connection)
04:45:02*dexterk_ quit (Ping timeout: 240 seconds)
04:45:06*dexterk__ joined #nim
04:45:19*Trioxin2 joined #nim
04:48:07*Trioxin quit (Ping timeout: 240 seconds)
04:55:49*Trioxin2 is now known as Trioxin
04:59:10TrioxinMy fledgling software company is starting to do good. Once we're doing great, I'm going to donate to Nim project.
04:59:39TrioxinI think what Nim really needs is some marketing
05:00:32Trioxinactually, I can contribute that already. who to talk to?
05:21:05*ludocode quit (Ping timeout: 240 seconds)
05:24:35*zachcarter quit (Quit: zachcarter)
05:31:39*ludocode joined #nim
05:49:54*gokr joined #nim
06:15:13*rauss quit (Quit: WeeChat 1.7.1)
06:23:17*chemist69 quit (Ping timeout: 240 seconds)
06:26:06*chemist69 joined #nim
06:29:49*enthus1ast quit (Ping timeout: 260 seconds)
06:30:26*enthus1ast joined #nim
06:34:15*BennyElg joined #nim
06:48:00*nsf joined #nim
06:53:08*couven92 joined #nim
07:03:09AraqTrioxin: me. :D
07:49:07gokrAn entertaining article by Robert Martin (known guy): http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html
07:49:47Araqhey, this guy is usually full of bullshit
07:51:49FromGitter<andreaferretti> @Araq I did not try nawabs yet, but will soon!
07:51:58*PMunch joined #nim
07:56:22gokrWell, I admit not being a C++ guy, so I haven't read much from him over the years. But that article was kinda fun and as much as I can tell (since I am 48) it's historically correct.
07:58:02gokrThe only thing I disagree with was his claim that it was static typing of Java that made it "win" over Smalltalk.
08:02:52FromGitter<andreaferretti> not only that, it looks like an article written in 2006
08:03:08FromGitter<andreaferretti> in the last decade, types are definitely coming back
08:03:22FromGitter<andreaferretti> scala, swift, go, rust...
08:03:43FromGitter<andreaferretti> I can barely think of recent popular untyped languages
08:03:56FromGitter<andreaferretti> maybe clojure
08:06:04Araqthe idea that "100% test coverage" will make static typing irrelevant is ridiculous. how do you test for the absence of a race condition?
08:06:27Araqstatic typing proves things about your program. testing proves nothing.
08:06:56FromGitter<andreaferretti> I guess mostly everyone agrees these days
08:07:05FromGitter<andreaferretti> less so a few years ago
08:07:07Araqplus types are also about getting an efficient storage layout.
08:07:56Araqhistorically, dynamic typing never was as successful as static typing.
08:08:20Araqthere wasn't a war going on. professionals used static typing and keep using it :P
08:09:48gokrYou are narrow minded.
08:09:50euantordom96: I've never seen that message before from Mailgun
08:10:25Araqgokr: no, just trying to be controversial ;-)
08:11:18gokrAraq: I agree with parts of what you are saying (various usefulness of static type systems) - but other parts are plain wrong. :)
08:11:46euantorRegarding the above testing discussion, I've also seen tests with bugs in several times, which helps nobody
08:12:20gokr"testing proves nothing" - in a mathematical sense perhaps, but in the real world it actually does help a LOT with good testing. That doesn't mean people can't go apeshit overboard on it though.
08:12:21euantorAN automatic type system is a much better helper (I haven't yet read the article shared above)
08:13:25gokreuantor: There are various things to say on that. Typing only catches a certain set of errors. But it can also cost a lot in "burden".
08:13:59Araqno, every bug can be formulated as a type violation (in some type system).
08:14:24gokrAraq: Further, "professionals used static typing" - well, let's just say that you are plain wrong and end it there.
08:14:34euantordom96: Thanks for getting recaptcha live by the way, hopefully that will solve some of the complaints there have been regarding captchas
08:14:35Araqthat was the controversial part ;-)
08:14:44gokrFalse part.
08:15:41FromGitter<andreaferretti> @Araq @dom96 looks like nawabs and choosenim do not work together
08:15:58gokrSince I can disprove your claim by simply finding a single professional (or hey, I can give you whole teams, whole companies) that actually, eh, yeah - believe it or not - did (and do) use dynamic typing successfully. Like me.
08:16:11FromGitter<andreaferretti> whenever I run nawabs, I get `Error: cannot open '/home/papillon/.nimble/lib/system.nim'`
08:16:35FromGitter<andreaferretti> I think nawabs expects the stdlib to be located in a precise position wrt the nim binary
08:16:46FromGitter<andreaferretti> which does not hold when using choosenim
08:17:13Araqgokr: could have said "real programmers" instead ;-)
08:17:32Araqdidn't mean to offend you.
08:17:54gokrSo you mean I wouldn't be offended by being a non real programmer?
08:18:43Araqyeah because http://www.smart-jokes.org/real-programmers.html
08:19:30gokrI know you are joking, but, not all might understand that.
08:19:47AraqI'm sorry.
08:20:33gokreither way, to be slightly more deep/constructive - the thing I find saddening is that here in Nim (which I love although I love Smalltalk too) we are battling the very low level pieces of software engineering.
08:21:25Araqandreaferretti: so choosenim breaks Nim ;-)
08:22:01Araqto bring up a different point: hardware stopped getting faster so things we take for granted are disputed again like GCs.
08:22:54gokrSaddening in the sense that... people aren't even aware of how far some other tooling have come. One may make fun of Smalltalk - but a lot of the stuff going on in that community is very interesting - mainly due to the fact that the IDE is reflective etc.
08:23:25FromGitter<andreaferretti> well, I though either you or @dom96 would be interested :-)
08:24:26AraqI'm not fixing my software to work with this .nimble/bin shit.
08:25:02Araqit didn't work with /usr/bin, it won't work with .nimble/bin, it's the wrong idea
08:25:38Araqeither you have a system that uses relative addressing or you have a broken system.
08:27:29Araqgokr: the tooling is even better with static typing ;-)
08:27:54gokrWell, it's not that simple IMHO.
08:28:14gokrBut when Nim's preferred IDE comes close to say Pharo - then come back to me.
08:28:43gokr(obviously I understand the value of added type information - but you don't seem to recognize the cost of it)
08:29:35*chemist69 quit (Ping timeout: 258 seconds)
08:31:28Araqwhich costs? writing down what's in my head anyway?
08:32:13gokrDon't pretend that you don't know what I mean.
08:32:37*chemist69 joined #nim
08:33:03gokrThere is a reason why dynamically typed languages very often show huge productivity advantages.
08:33:44Araqnever experienced this myself, sorry.
08:34:14gokrEh, but have you really ever used a dynamically typed language then?
08:34:49Araqyeah, Lua, Python, JavaScript
08:35:11gokr(note my emphasis on "really")
08:35:27Araqproductivity is the result of a good library ecosystem, dynamic typing doesn't help it.
08:35:55gokrHehe, well, I give up.
08:36:28PMunchgokr, dynamic typing is definitely both a pro and a con
08:37:12gokrOf course it is.
08:37:16PMunchThe benefit as you say is in the short term development time. Problem comes with larger projects were a bug could take forever to track down and even put critical systems at risk.
08:38:04Araqthe short term development time has never been proven in any scientific sense and in theory there are lots of reasons against it and none in its favour
08:38:14PMunchThe way I see it is declaring my types make the compiler able to check those thing for me before the product ever hits the customer
08:38:31gokrPeople keep claiming that, yeah, and I agree that it may be a problem (I have seen it quite a few times, for example in a huge Perl system which was ... abhorrant) - but I can also point at huge Smalltalk systems which haven't experienced it.
08:38:57PMunchAraq, for scripts it's definitely a notable difference when writing in dynamic languages
08:39:03PMunchAt least that's what I feel.
08:39:10AraqI write my scripts in Nim ;-)
08:39:11gokrSo people tend to think that "there are no big systems built with dynamic languages" - and that's just plain wrong too.
08:39:26PMunchOh yeah, that's not what I'm saying
08:39:38PMunchYou could definitely write large systems with a dynamic language
08:39:46Araqthe argument is more like "all the big system better would have built with static types" ;-)
08:39:54PMunchBut it's easier to ensure that it's correct in a statically typed language.
08:39:57Araq*been built
08:39:57gokrAraq: Nope.
08:40:51gokrJust read this: http://www.cincom.com/pdf/CS040819-1.pdf
08:41:07*yglukhov joined #nim
08:41:20*zachcarter joined #nim
08:43:30*yglukhov quit (Remote host closed the connection)
08:43:54gokrI just hope the Nim community can pick more good stuff from the dynamic side - not just a GC :) And actually realize that the world is not black & white.
08:44:29Araqthat's a nice marketing brochure
08:45:03Araqit contains the beliefs of successful people, but no science.
08:45:06gokrI know, there is more material however and I have talked to several of those developers myself.
08:45:23Araqit's called "computer science", we should have some science.
08:45:51gokrThe system is still very much alive IIRC, and was built by a team of about 30 if I remember correctly. And it generated/generates HUGE amount of money.
08:46:30gokrAnd key to the success was a) very fast dev time and b) very good complex modelling capabilities and meta development.
08:47:15gokrAraq: Smalltalk came out of PARC you know.
08:47:38PMunchI've also talked to developers who swears by a static type system for much the same reasons.. That doesn't prove anything!
08:48:53gokrWhat I mean is that I have talked to the developers working on that specific system.
08:49:25Araqhttps://courses.cs.washington.edu/courses/cse590n/10au/hanenberg-oopsla2010.pdf
08:51:58gokrSo ok, they let people write a parser (very specific domain) and they concluded no difference. And I can of course point to the Capers Jones paper etc, that showed big differences. I would argue again, it's not black & white. Sometimes it doesn't matter, sometimes it matters a lot - and in both directions.
08:52:04*Arrrr joined #nim
08:52:04*Arrrr quit (Changing host)
08:52:04*Arrrr joined #nim
08:52:12gokrBut to claim a single truth here is IMHO narrow minded.
08:53:17gokrBut hey, I gotta get back to writing dynamically typed code for pay, so, ah, professionally I guess then.
08:53:45*yglukhov joined #nim
08:56:31*couven92 left #nim ("Leaving channel")
08:56:38*couven92 joined #nim
08:56:54couven92f*** wrong CTRL+W :P
08:57:21couven92turns out that also closes channels in Nim, not just tab panes in Edge :D
08:57:35couven92(err... HexChat i mean)
08:59:40FromGitter<zacharycarter> fyi @ftsf the spine integration with frag is optional - frag is perfectly suited for pixel art style graphics as well
09:00:01FromGitter<zacharycarter> I just can't do any art besides 3d art
09:02:28FromGitter<andreaferretti> @dom96 it seems that for the same reason, choosenim also breaks nimble!
09:02:52FromGitter<andreaferretti> when I run nimble, it is not able to interpret my nimble files as nimscript
09:03:06FromGitter<andreaferretti> because `Error: cannot open '/home/papillon/.nimble/lib/system.nim'`
09:07:40*dddddd joined #nim
09:11:59Araqgokr: actually they conclude dynamic typing makes for faster development ;-)
09:12:22Araqbut the paper is as flawed as everything else
09:13:01*aziz joined #nim
09:18:27yglukhovdom96: so I've thought a bit more about reproducibility and came to conclusion that vendoring-in-local-folder way is likely to solve most of my issues. Besides it looks like its much easier to implement, and can decouple nim from nimble completely.
09:19:10yglukhovso i guess i'll just delete my repo with better nimble doc, because nimble is already really close to that.
09:21:29FromGitter<andreaferretti> I think that the way nimble works now is actually fine
09:22:11FromGitter<andreaferretti> I just would like people to avoid mentioning `nimble install` so much
09:22:30FromGitter<andreaferretti> many other package managers have a shared lib folder
09:22:52yglukhovandreaferretti: but nimble can't guarantee reproducible builds
09:23:23*chemist69 quit (Quit: WeeChat 1.7.1)
09:23:53FromGitter<andreaferretti> it just needs to store the dependencies actually used in a lock file after resolution
09:23:54PMunchHmm, I've got a "type EaseFunction = proc(t:float):float" and I want to define one such function. Is there a shorter way to write it than EaseFunction(proc(t:float):float = <body>)?
09:24:07FromGitter<andreaferretti> there is no need to put all deps in the local folder
09:24:08*chemist69 joined #nim
09:24:30FromGitter<andreaferretti> provided nimble is able to suggest the paths correctly to nim
09:24:37FromGitter<andreaferretti> which it currently does
09:25:04couven92PMunch, `var f: EaseFunction = proc(f: float): float = 42.42`
09:25:06yglukhovandreaferretti: i see a couple of reasons why local folder is better
09:25:44couven92the explicit type is probably not necessary as it can be inferred...
09:26:16couven92you can probably assign any matching function to an `EaseFunction` variable if you want to
09:26:23yglukhovandreaferretti: if you're working with dependencies that do not maintain their version tags for some reasons, nimble will have to store the dependency of a specific VCS revision.
09:26:24PMunchcouven92, that's just as long.. And I'm putting this in a table so I've got "const easingFunctions = {Bezier.easeInQuad: EaseFunction(proc(t:float):float = t*t)}.toTable
09:27:34yglukhovandreaferretti: this may lead to lots of same package but different revisions in global folder. because there will be no way to track "references" to them
09:27:58FromGitter<andreaferretti> that makes sense *but* I'd rather push people to actually *tag* their versions
09:28:00couven92PMunch, `proc foo(f: float) = 42.42 * f` and then `const x = foo`, type's inferred
09:28:17FromGitter<andreaferretti> this is one of the culture problems I am mentioning
09:28:25FromGitter<andreaferretti> it takes a second to git tag
09:28:30FromGitter<andreaferretti> yet nobody does it
09:29:23FromGitter<andreaferretti> for instance, nimx has no tags :-)
09:29:28zachcarterI don’t tag builds
09:29:40yglukhovandreaferretti: i really can't see why forcing proper versioning is still considered a good opensource practice.
09:29:53zachcarterbut then again I don’t maintian versions either atm
09:29:53yglukhovandreaferretti: closed source as well
09:30:15FromGitter<andreaferretti> @zachcarter this creates a problem for other people
09:30:25FromGitter<andreaferretti> why aren't you using tags?
09:30:38zachcartera couple of reasons
09:30:39PMunchWell, problem is that tables doesn't have a regular constructor. So "const easeFunctions: Table[Bezier,EaseFunction] = {Bezier.easeInQuad: EaseFunction(proc(t:float):float = t*t)}.toTable" will actually create an array of tuples [(Bezier.easeInQuad, EaseFunction(proc(t:float):float = t*t))] and then convert that to a table. So type inference doesn't work..
09:30:40FromGitter<andreaferretti> it seems you do this intentionally, so I am trying to understand
09:30:54zachcarterit’s not that I do it intentionally
09:31:18gokrAraq: Several Smalltalkers consulted in that paper (Ungar, Hirschfeld, Haupt), from Hasso Plattner. And I agree, the conclusion was... cloudy at best. Which just reinforces my point - its not black & white.
09:31:42zachcarterit’s A) I don’t know when the propper time to version something is really and being quite honest I’ve never worked at a software shop that has done a great job of release management so tagging isn’t something I do at work either
09:31:55FromGitter<andreaferretti> I bump version and tag every few commits
09:32:06zachcarterB) Most of my projects haven’t reached a point I’d even like to consider alpha yet
09:32:10zachcarterB )
09:32:23FromGitter<andreaferretti> this is even a better reason to tag more often
09:32:24zachcarterso I figured I’d leave them at 0.1.0 until they reach maturity
09:32:26zachcarterthen bump the verison
09:32:30FromGitter<andreaferretti> if the API is not stable yet
09:32:43FromGitter<andreaferretti> upgrading will break client code
09:32:43zachcarterinteresting
09:32:45yglukhovandreaferretti: here's a use case. your proprietary project includes a lot of proprietary subprojects. every day you do a couple of commits to many of those subprojects, a lot of those commits are coupled with updating hypothetical "nimble.lock".
09:33:12FromGitter<andreaferretti> so clients need to refer to a tag that actually works for them and upgrade at their own pace
09:33:15yglukhovandreaferretti: adding tagging procedure to this flow adds a whole lot of work.
09:33:35FromGitter<andreaferretti> tagging is less necessary when everything is stable
09:33:36yglukhovandreaferretti: first, you have to recall the last tag
09:33:46FromGitter<andreaferretti> `git tag`
09:33:51FromGitter<andreaferretti> will show you :-)
09:34:07FromGitter<andreaferretti> or, you know, it's written in the nimble file
09:34:20yglukhovandreaferretti: its just error prone, because such flow requires more manual actions
09:34:21FromGitter<andreaferretti> it is literally changing a line a `git tag newtag`
09:34:42FromGitter<andreaferretti> I can hardly think less work
09:34:58Araqjust say "this build is known to work" and that's what nawabs does for you
09:37:00Araqno need for tagging, no need to keep versions accurate in a .nimble file
09:37:20Araqdeps are project specific
09:37:24FromGitter<andreaferretti> I am trying nawabs right now
09:37:29*Vladar joined #nim
09:37:41FromGitter<andreaferretti> I cannot figure out how to make it work
09:38:02FromGitter<andreaferretti> I see that `nawabs task taskname` should run a task in a nimble file
09:38:10FromGitter<andreaferretti> but apparently it does nothing
09:39:58Araqcan you be more specific?
09:40:06Araqworked for me :-)
09:41:41PMunch"const easeFunctionsArr = {Bezier.linear: EaseFunction(proc(t:float):float = t)}.toTable" is so long winded... Is there really no better way?
09:42:09FromGitter<andreaferretti> I will try to produce an example
09:42:57FromGitter<andreaferretti> for instance clone this repo https://github.com/unicredit/csvtools
09:43:04FromGitter<andreaferretti> then `nawabs init`
09:43:07FromGitter<andreaferretti> `nawabs tests`
09:43:13FromGitter<andreaferretti> apparently, nothing happens
09:43:13AraqPMunch: use a template?
09:43:17FromGitter<andreaferretti> `nimble tests`
09:43:22FromGitter<andreaferretti> something happens :-)
09:43:53Araqnawabs task tests
09:44:04FromGitter<andreaferretti> sorry, `nawabs task test`
09:44:10FromGitter<andreaferretti> it is named differently
09:44:15FromGitter<andreaferretti> yet it does nothing
09:44:23FromGitter<andreaferretti> `nimble test` runs tests
09:44:37FromGitter<andreaferretti> the same seems to happen with every repository I have tried
09:48:03PMunchHmm, a template would work, if I could figure out how to write it. I tried "template easeFunction(body:untyped):untyped = EaseFunction(proc(t:float):float = body)" but when I tried to call it with "t" it just complained t wasn't initialised..
09:48:50Araqtask tests, "some description here":
09:48:50Araq echo "run the tests here"
09:49:02Araqnawabs tests
09:49:02AraqHint: used config file '/Users/andreasrumpf-mac/projects/nim/config/nim.cfg' [Conf]
09:49:02Araqrun the tests here
09:49:08Araq^^ works for me
09:49:35FromGitter<andreaferretti> for me, it just prints `Hint: used config file '/Users/andreasrumpf-mac/projects/nim/config/nim.cfg' [Conf]`
09:49:41FromGitter<andreaferretti> but then the tests are not run
09:50:30Araqwhat do you do in your tests?
09:51:06Araqalso, why would it print for you '/Users/andreasrumpf-mac/...' ? :P
09:51:56FromGitter<andreaferretti> well, you get the idea :_D
09:52:04Araqok
09:52:29FromGitter<andreaferretti> the tests are like this
09:52:30FromGitter<andreaferretti> https://github.com/unicredit/csvtools/blob/master/csvtools.nimble
09:56:29*aziz quit (Remote host closed the connection)
09:57:08Araqok, can reproduce, thanks :-)
09:57:17Araqyou use setCommand()
09:59:44dom96euantor: I think they want a credit card number which I'm not eager to give. I don't want them charging me if somebody abuses the forum and ends up sending thousands of emails.
10:00:30yglukhovAraq, andreaferretti, i also think that setting version in nimble file is a pita. I've already fucked up a couple of jnim release because of that.
10:01:10dom96yglukhov: That's fine, if you want vendoring we can give it to you. In the spirit of making Nimble modular, it should be a separate project though. This is how it's done in cargo (https://github.com/alexcrichton/cargo-vendor).
10:02:01dom96andreaferretti: Interesting. I know why that Nimble error occurs, but choosenim should have warned you about it. (unless you're still using 0.1.0)
10:02:26dom96So maybe you have created a set of circumstances where it didn't warn you?
10:02:43dom96What's `nimble -v` and which Nim version have you selected with choosenim?
10:05:11dom96The reason nawabs doesn't work is because it contains code copied from Nimble which is broken...
10:05:47*Tiberium joined #nim
10:05:57dom96https://github.com/Araq/nawabs/blob/master/nimscriptsupport.nim#L110
10:06:02dom96The fix is easy: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L191
10:06:40dom96(inb4OMG_ENV_VARS, that's just a fallback because I am tired of seeing people with this error, at least now they'll be able to set an env var to work around it)
10:07:37FromGitter<andreaferretti> @dom96 running devel, `nimble -v` outputs `nimble v0.8.6 compiled at 2017-05-11 10:03:43`
10:08:18FromGitter<andreaferretti> `choosenim -v` gives `choosenim v0.2.0 (2017-05-09 17:34:41) [linux/amd64]`
10:08:55Araqandreaferretti: when you do setCommand("c"), tell it to do 'nawabs c' which doesn't do anything :-)
10:09:00dom96that's weird. Does `nimble install` work for that package?
10:09:09FromGitter<andreaferretti> @Araq I see
10:09:13euantordom96: Weird. I use Mailgun myself and have never given them a credit card number. I wonder if it's a new policy for new setups?
10:09:22dom96euantor: what do you use it for?
10:09:31dom96euantor: do you send email using them?
10:09:50FromGitter<andreaferretti> @Araq is there a way to tell nawabs to compile with a given ste of flags defined in nimscript, like I am doing here?
10:09:52AraqI think we need to move away from setCommand to nimexec("c foo")
10:09:54euantorAlso, did you follow the instructions to enable NoScript support for recaptcha? https://developers.google.com/recaptcha/docs/faq#does-recaptcha-support-users-that-dont-have-javascript-enabled
10:10:11FromGitter<andreaferretti> nimexec breaks building flags with functions etc
10:10:15euantordom96: Yeah, I send email from a forum using their SMTP system. Have been for about a year and a half
10:10:22FromGitter<andreaferretti> much better to treat flags as actual values
10:10:27FromGitter<andreaferretti> not as an opaque string
10:10:37Araqandreaferretti: agreed, will think of a solution
10:10:45FromGitter<andreaferretti> thanks!
10:10:54Araqthat said, I think it doesn't work correctly with nimble either
10:11:25FromGitter<andreaferretti> @dom96 no, `nimble install` fails with the same error
10:11:45FromGitter<andreaferretti> by the way, it happens with every single nimble file I have tried
10:11:53Araqdom96: it's not broken, NIM_LIB_PREFIX is not documented anywhere, you choose to introduce another can of worms
10:11:55FromGitter<andreaferretti> it is not specific of a particular file
10:12:21dom96andreaferretti: Do you have a ~/.nimble/lib folder?
10:12:58FromGitter<andreaferretti> I do
10:13:08dom96Where did it come from?
10:14:31dom96Araq: It is documented in Nimble's readme
10:14:52FromGitter<andreaferretti> it contains libRMath.so
10:15:05FromGitter<andreaferretti> I am trying to figure out how it did end up there
10:15:18FromGitter<andreaferretti> I think some library tried to vendor a c dependency
10:15:25FromGitter<andreaferretti> by compiling it there
10:15:47dom96hah
10:15:53dom96Amazing.
10:16:17dom96I need to make my check stricter I suppose.
10:16:44FromGitter<andreaferretti> well, I can delete the directory anyway
10:16:50FromGitter<andreaferretti> if this will help
10:16:55FromGitter<andreaferretti> I am not using the library
10:17:02dom96It will, but who knows how many more will be affected by this.
10:17:08dom96It would be good to figure out what creates this.
10:17:21FromGitter<andreaferretti> great, that worked!
10:17:41FromGitter<andreaferretti> I am mentioning this in the issue
10:17:50dom96thanks
10:17:55FromGitter<andreaferretti> (I can close it or leave it open, as you prefer)
10:18:31dom96Maybe I should just have choosenim detects this
10:19:08dom96or release a new nimble that checks for lib/system.nim
10:19:45dom96But then I worry about that file moving.
10:20:25yglukhovdom96: are you saying that its better to keep all dependencies global?
10:22:20dom96I'm saying it's better to implement lock files.
10:22:32dom96But I am willing to offer both options.
10:23:35yglukhovyglukhov: lockfiles i agree 100%, but where do you want to keep the dependency tree built from lockfile?
10:24:35FromGitter<andreaferretti> there is no need to materialize the tree
10:24:43FromGitter<andreaferretti> the actual dependencies can be global
10:25:01FromGitter<andreaferretti> and nimble can choose the relevant paths using the lock file
10:25:11FromGitter<andreaferretti> this way, deps will be shared
10:25:47dom96yeah, that sounds right.
10:25:50yglukhovandreaferretti: in such case the non-tagging approach would likely litter the global folder
10:26:17dom96Oh right, I also believe that versions should be tagged.
10:26:51yglukhovdom96: have you read about my use-case?
10:27:29yglukhovand the about my jnim pita?
10:28:31yglukhovand again, why create artificial limitations when the software can solve the underlying problem automagically
10:28:42dom96I don't really understand the jnim pita, but yes, I understand the use case you described.
10:29:25yglukhovdom96: the jnim pita is that i've done a couple of releases on github without bumping the version in nimble file
10:29:41dom96Because the more magical something is, the more prone it is to situations where you have no idea what the hell it is doing.
10:29:44euantorOh yeah, I've done that too
10:30:16dom96So your solution is to get rid of versions completely?
10:30:21yglukhovdom96: that statement is from some java world =))
10:30:43yglukhovdom96: my solution is to make versioning/tagging completely optional.
10:32:08yglukhovdom96: version conflict resolving should be done automatically in favor of the constraint defined in the root package, or fail if the root package is not aware
10:32:41yglukhovthats it, in such way the root package will always be able to take control of the dependency tree, if it wants to
10:33:27dom96okay, but that's just describing how lock files could operate.
10:33:49yglukhovyup
10:33:57yglukhovdo you see any more issues?
10:34:19dom96I think we all should read up on how other package managers solve this, especially cargo since it's revered as "the best".
10:34:33yglukhovyeah, done already
10:34:37yglukhova couple of times
10:35:00dom96Okay, I still haven't, so I don't really have a concrete answer as to how this should be solved.
10:35:11dom96What did you learn from Cargo?
10:35:20euantorYeah, from what I've used of Cargo it seems very solid and well designed
10:36:57dom96I'm fairly sure that Cargo doesn't vendor packages by default.
10:36:59yglukhovdom96: it allows a cool way of specifying dependency origin/version.
10:37:26yglukhovdom96: the origin may be git and hg besides cargo registry
10:37:52dom96Are you aware that Nimble offers the same thing? :)
10:38:28yglukhovdom96: version can be specific revision/tag, or branch, in which case lockfile will be updated accordingly with the tip of the branch.
10:38:58yglukhovdom96: yes, but revision spec in nimble is a bit flaky
10:39:13dom96how so?
10:40:12yglukhovdom96: well, i guess the problem is that lockfiles are not implemented yet. otherwise, its pretty ok.
10:40:19dom96ahh :)
10:40:46dom96Right, but what about the issues we are arguing about here, how does cargo handle them?
10:41:01yglukhovdom96: cargo allows local overrides, but that i'm now solving by modifying nim.cfg
10:41:18*yaiyan joined #nim
10:41:24yglukhovcargo allows target specific dependencies.
10:41:43dom96The first one is also on Nimble's roadmap
10:42:10dom96but will have to be integrated with lock files anyway
10:42:14yglukhovcargo allows dev specific dependencies, which are checked out only for the "root" package. like some unittesting libs or smth
10:42:30*yaiyan is now known as Ieuan
10:42:33euantorYeah, Cargo doesn't vendor packages which I'm well aware of, but they have good lock files :) They also allow you to have subpackages within one repository I believe
10:42:33dom96not sure what you mean by "target specific", like OS specific?
10:42:38yglukhovdom96: overrides should bypass the lockfile i think
10:42:52yglukhovdom96: yep, os/arch
10:43:10dom96Pretty sure we have those too
10:43:32yglukhovunfortunately, no, and it is not that easy to implement.
10:43:37dom96dev specific deps are also on my roadmap (at least in my brain :))
10:43:57yglukhovbecause target is not the one which you are sitting on, but the one, for which you are building
10:43:59dom96no? Is it not just a case of: when defined(windows): requires "winlean" ?
10:45:00yglukhovcargo allows passing options "features" to dependency configs
10:45:04dom96hrm, that's true, Nimble doesn't support cross-compilation yet.
10:45:38dom96euantor: yeah, I like that too. I may relax Nimble's "one-nimble package per repo" policy
10:46:16dom96But once again, Cargo doesn't vendor packages, and that is what we should be discussing.
10:46:27dom96There are many features that Cargo implements which Nimble doesn't (yet)
10:46:50dom96(Sorry, if Mozilla was paying me and a couple other people then maybe we would have those features)
10:46:58yglukhovdom96: maybe i should clarify what i mean by vendoring
10:47:18dom96brb, need to walk the dog :)
10:47:30euantordom96: btw, sorry if I caused you headaches by mentioning vendoring on the forum :P
10:47:51euantorNot sure if anybody else was talking about it before I mentioned it might be nice to have
10:52:13yglukhoveuantor: does vendoring mean that the dependencies are all located in a local-to-proj subfolder?
10:52:23euantoryes
10:52:42euantorSuch as COmposer for PHP or npm for node.js
10:53:00yglukhovyglukhov: do you know how cargo works?
10:53:09euantorWhere you have project specific dependencies at project level, with the option to install packages globally (usually used for binaries)
10:55:21euantorThough Nimble's global directory structure solves the problem that vendoring solves elsewhere. In Composer and NPM and Go, all packages go into one folder regardless of version. For instance, both euantorano/sysrandom-1.0.0 and euantorano/sysrandom-1.0.1 end up in ./packages/euantorano/sysrandom, with the most recently installed one overwriting the existing
10:55:21euantorone. n Nimble, versions are appended to package names in the directory structure which helps
10:59:27yglukhovi cant find any info about where cargo stores packages
11:01:25euantorI'd guess it's in the $HOME/.cargo directory, but I don't have Rust installed on my machine here at work
11:02:06euantorhttp://doc.crates.io/environment-variables.html
11:02:23*Snircle joined #nim
11:02:26euantorYeah, it's based upon a CARGO_HOME environment variable
11:02:53Araqdom96: that's in a nutshell the whole problem with your way of thinking. everything has to be like Rust ignoring the fact we don't have the resources to do what they do. and when I say "ok, we're not like Rust, we can get away with something much simpler (like nawabs)" it's considered heresy.
11:04:51Araqat the same time even Cargo wouldn't address my pain points.
11:04:55*Syneh_ quit ()
11:05:10*Syneh_ joined #nim
11:06:53dom96back
11:07:24couven92what do we think about NuGet? you can specify one or more feed adresses from which you get you packages and they are stored together with the package name and version number in their directory names
11:08:29PMunchhttp://ix.io/to4 Any idea what this is?
11:09:01couven92PMunch, it's a stack trace from the Nim compiler :P
11:09:10PMunchYeah, no shit..
11:09:14euantorI use NuGet at work and it's pretty nice
11:09:59PMunchAtom doesn't complain about anything, but when I compile the code it complains about an internal error.
11:10:26dom96yglukhov: here is what ~/.cargo contains on my machine https://gist.github.com/dom96/5a046d3292eb936a56bba174d32607ab
11:11:17dom96Indeed, packages are inside pkgName-ver directories.
11:11:38dom96So we must be doing something right :)
11:12:20*Matthias247 joined #nim
11:12:48dom96So about email, it seems that Google Apps might be the best option.
11:12:55dom96Anyone have any better alternatives to mailgun?
11:14:22euantorhttps://aws.amazon.com/ses/
11:15:52PMunchApparently it's this bug: https://github.com/nim-lang/Nim/issues/5015 so changing my const to a let works fine..
11:15:54euantorSES also allows receiving an email, and running a lambda function against it that could, for example, create a post/topic from an email
11:17:05dom96I have similar reservations about Amazon's services as I do about Mailgun
11:17:12dom96They are not really upfront about the cost.
11:17:24euantoryeah, you'd need to have rate limiting in place
11:17:29dom96It's always "oh, if you exceed this many we will start charging"
11:17:55euantorI can't remember if Google Apps has a limit on emails/day or not
11:18:59dom96looks like it's per user per month
11:19:00dom96but ugh
11:21:18dom96it seems that zoho is free
11:21:46PMunchUnfortunately an e-mail server is about the only thing we're not allowed to set up in our University server room. Otherwise I could've probably set something up for you there dom96 :(
11:22:18dom96I'm wondering whether I should just set up postfix
11:22:53euantorIf you're setting up a local one, make sure to do it properly with DKIM and SPF and everything
11:23:08euantorIt's very easy to get a self hosted server blacklisted, and very difficult to reverse that
11:27:06dom96Hrm, maybe i'll try this https://github.com/atech/postal/
11:27:16euantorI've used this before: https://mailinabox.email/
11:27:49yglukhovdom96: thats interesting. i wonder what cargo does about git-branch-originated packages
11:28:03yglukhovdoes it store them in the global dir as well?
11:28:20dom96yglukhov: not sure
11:29:57yglukhovdom96: i don't really mind to store them in the global dir. deleting the dir from time to time and redownloading everything looks like although hacky but practical solution.
11:31:19yglukhovdom96: however i think it could be an external option to nimble about where to store the dependencies. either local or global. also it would be nice to set global dir in env var for build machines usecase, so that dependencies are stored in the build machine cache
11:34:15*adeohluwa joined #nim
11:34:52dom96yglukhov: I'm happy with an env var, but you'll need to convince Araq too.
11:41:10*matkuki joined #nim
11:46:05*Tiberium quit (Remote host closed the connection)
11:46:43*Tiberium joined #nim
11:58:43*Tiberium quit (Remote host closed the connection)
11:59:01*Tiberium joined #nim
11:59:02*Tiberium_ joined #nim
11:59:28*user0 joined #nim
12:03:39*zachcarter quit (Quit: zachcarter)
12:06:29*vlad1777d joined #nim
12:12:06FromGitter<nortiero> Pardon me, I came here for another reason, but I see you are talking about nimble... one pain point (for me) is that tags may refer to completely different packages, with different contents: example: glfw 0.2.1 vs glfw 3.2.0. Am I wrong to think that this makes .nimble dependancies a bit flaky?
12:13:43*Tiberium_ quit (Quit: Leaving)
12:14:17dom96hey nortiero, is that because there are two different packages with the same name? (glfw)
12:15:05FromGitter<nortiero> yes, package name is the same
12:17:23*Tiberium quit (Remote host closed the connection)
12:17:40*Tiberium joined #nim
12:17:41*Tiberium_ joined #nim
12:17:48FromGitter<nortiero> ok now I understand. It just happens that package name == tag name, and there are two packages with the same name, albeit different contents.
12:18:24dom96no, unless 'tag' means something else to you
12:18:28dom96the 'tag' is the version
12:18:43dom96how can that be the same as the package name?
12:19:33dom96But yes, this is a problem.
12:19:38FromGitter<nortiero> This is what I see: ⏎ nim-glfw: ⏎ url: https://github.com/EXetoC/nim-glfw/ (git) ⏎ tags: library, glfw, opengl, windowing, game [https://gitter.im/nim-lang/Nim?at=591456deac693c532ae172da]
12:20:00*Tiberium quit (Remote host closed the connection)
12:20:00*Tiberium_ quit (Remote host closed the connection)
12:20:01*rokups joined #nim
12:20:04FromGitter<nortiero> i was referring to tags as in "nimble search glfw"
12:20:17*32NAAKZLC joined #nim
12:20:17*18VAA5IDG joined #nim
12:20:18*Tiberium_ joined #nim
12:20:24dom96I see.
12:20:43dom96Why is that a problem?
12:22:44FromGitter<nortiero> No serious problem, I was under the impression that "install" took a tag instead of a package name, leading to ambiguities. That was not, just bad luck by my side, because there are two package with the same name.
12:23:10*32NAAKZLC quit (Remote host closed the connection)
12:23:10*Tiberium_ quit (Remote host closed the connection)
12:23:10*18VAA5IDG quit (Remote host closed the connection)
12:24:05*Tiberium joined #nim
12:25:19*Tiberium quit (Remote host closed the connection)
12:25:37dom96Ahh, ok.
12:25:46*Tiberium joined #nim
12:29:58*Tiberium quit (Remote host closed the connection)
12:30:19*Tiberium joined #nim
12:32:00FromGitter<nortiero> Just another question -- I'm playing with nim features -- why this compiles and runs: ⏎ ⏎ template wat(): var typed = 12 ⏎ echo wat() [https://gitter.im/nim-lang/Nim?at=591459c32b926f8a67447d36]
12:35:42*chemist69 quit (Ping timeout: 264 seconds)
12:37:29*Trustable joined #nim
12:39:00FromGitter<nortiero> It has no consequences, just a syntax issue if I'm not mistaken. Unfortunately I have not enough experience to check under the bonnet
12:40:12*chemist69 joined #nim
12:41:35*Tiberium quit (Quit: Leaving)
12:47:15*Tiberium joined #nim
12:49:27*user0 quit (Quit: user0)
12:54:42*zachcarter joined #nim
12:58:33*Serenitor joined #nim
12:58:54*gokr quit (Ping timeout: 240 seconds)
12:59:32Serenitortype color = tuple[r, g, b, a: uint8]
12:59:32Serenitorvar c: color = (255, 255, 255, 255)
12:59:32Serenitor# Error: type mismatch: got ((int, int, int, int))
12:59:32Serenitor# but expected 'color = tuple[r: uint8, g: uint8, b: uint8, a: uint8]
12:59:32Serenitoris there a way for nim to derive the correct int types from the int literals?
13:01:17euantoryes, use `255'u8`
13:01:40euantorThe `u8` means that the literal is a unit8, you can do `i8`, `i16`, etc. too
13:02:03euantorIn an array context you only need to use the suffix for the first value, but I don't think that applies to a tuple
13:03:32*gokr joined #nim
13:06:36Serenitorah, that's at least a bit shorter than
13:06:36Serenitor(255.uint8, 255.uint8, 255.uint8, 255.uint8)..
13:06:36Serenitorbut there isn't something akin to color(255, 255, 255, 255) for tuples I guess?
13:11:39Serenitoranyways, thanks euantor
13:16:26*Arrrr quit (Quit: Leaving.)
13:17:23PMunchvar c = color(255,255,255,255)
13:18:07yglukhovdom96: how do env vars relate to Araq? that would be solely nimble's feature, wouldnt it?
13:18:53Araqreproducible builds that depend on env vars cannot be taken seriously.
13:19:10dom96yglukhov: nim needs to be aware of it too, unless you do not wish 'nim' to be aware of your packages at all.
13:20:42PMunchSerenitor, something like this works: http://ix.io/toA
13:21:03gokrdom96: I signed up for Sparkzone now recently when I set up a discourse installation. No idea how good it is, but it was recommended first by discourse. 10k free/month IIRC.
13:22:19gokrdom96: Sparkpost I mean.
13:22:54dom96hrm, looks good, but I already set up postfix :)
13:26:34dom96lol, SpamAssassin check: "ham"
13:32:25*Tiberium quit (Remote host closed the connection)
13:33:41*Tiberium joined #nim
13:35:07dom96woop. Email works!
13:35:27Araqandreaferretti: fixed nawabs, but setCommand() is really a bad idea -.-
13:35:51Araqwe should deprecate it and make a better nimexec()
13:40:35*adeohluwa quit (Quit: Connection closed for inactivity)
13:42:12*PMunch quit (Quit: leaving)
13:43:38*ftsf_ joined #nim
13:48:35*ftsf_ quit (Ping timeout: 240 seconds)
13:51:11FromGitter<andreaferretti> thank you!
13:55:13FromGitter<andreaferretti> now it works, although it does not handle the `--run` flag
13:55:18FromGitter<andreaferretti> I am not sure about other flags
13:55:31FromGitter<andreaferretti> and it still conflicts with choosenim :-P
14:08:00*pie_ joined #nim
14:08:15Araq --define: foo and see whether test.nim picks that up for nimble
14:08:51Araq--run setCommand("c") is a bad hack that never was supported IMO.
14:10:04Araqnimsuggest also conflicts with choosenim, *shrug* so don't use choosenim
14:11:01*rauss joined #nim
14:11:04FromGitter<Varriount> *or* improve choosenim
14:13:36*pie_ quit (Quit: Leaving)
14:13:58*pie_ joined #nim
14:14:24dom96Suggestions on how to improve it are welcome
14:14:33dom96Also I'm pretty sure nimsuggest works
14:19:55*BennyElg quit (Remote host closed the connection)
14:20:09*BennyElg joined #nim
14:20:47*BennyElg quit (Remote host closed the connection)
14:21:14*BennyElg joined #nim
14:25:13*BennyElg quit (Ping timeout: 240 seconds)
14:28:47FromGitter<andreaferretti> @dom96 I confirm it: nimsuggest does not work with choosenim
14:28:52FromGitter<andreaferretti> I just tried to check this
14:29:22FromGitter<andreaferretti> I can easily switch from manually installed nim to choosenim by adding a variable to the $PATH
14:29:40FromGitter<andreaferretti> and I tried to edit the same file in vscode and atom
14:29:59FromGitter<andreaferretti> when using manually installed nim, nimsuggest worked, but not with choosenim
14:30:08*matkuki quit (Quit: ChatZilla 0.9.93 [Firefox 52.1.1/20170504112025])
14:30:18dom96ahh, it's using the same code for finding the stdlib https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim#L593
14:30:46FromGitter<andreaferretti> a simple alternative would be for choosenim to just change the $PATH
14:31:17FromGitter<andreaferretti> uhm , on a second thought this would not work easily outside of a shell
14:31:37FromGitter<andreaferretti> nvm works this way
14:31:51FromGitter<andreaferretti> you just `nvm use someversion` and it alters ENV variables
14:31:56FromGitter<andreaferretti> and then you start working
14:32:22dom96So I have to type that in at the start of every session?
14:33:05FromGitter<andreaferretti> yes
14:33:19FromGitter<andreaferretti> or put that in .bashrc or whatever
14:33:25dom96I don't want to have to do that.
14:33:42FromGitter<andreaferretti> yeah, this would be a problem especially for nimsuggest
14:34:07*Trioxin2 joined #nim
14:34:32FromGitter<andreaferretti> if `findExe` follows symlinks
14:34:43FromGitter<andreaferretti> another solution would be to symlink instead of copy
14:35:06FromGitter<andreaferretti> I am not sure whether windows filesystem eventually got symlinks
14:35:19dom96Symlinks is an option, but indeed Windows doesn't support them
14:35:20FromGitter<andreaferretti> but on Linux and OSX that would work
14:35:50FromGitter<andreaferretti> in fact, nim-vm used symlinks
14:36:12demi-i would strongly oppose a tool changing my PATH on me
14:37:39*Trioxin quit (Ping timeout: 272 seconds)
14:38:32AraqfindExe does follow symlinks.
14:39:19dom96I don't see the problem in fixing Nimsuggest and nawabs.
14:40:08AraqI don't see what's there to fix. choosenim introduced its own way of installing everything.
14:40:16Araqso fix it.
14:40:52dom96I showed what needs to be fixed and how.
14:43:16dom96Symlinks are not cross platform so I cannot use them.
14:43:59*chemist69 quit (Ping timeout: 272 seconds)
14:44:47Araqso what's the fix? use yet another env var? that choosenim cannot set anyway because it cannot set the path either?
14:45:45dom96check if the prefix dir is correct, if not fallback to Nim's default prefix dir.
14:46:02Araqwhat's the default prefix dir?
14:46:18dom96https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L191
14:46:37*PMunch joined #nim
14:48:25Araqok then.
14:51:57dom96okay, great
14:53:08dom96bbl
14:56:24Araqandreaferretti, please try again
14:58:41*rokups quit (Quit: Connection closed for inactivity)
14:59:06*jsgrant_om quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg(at)jsgrant.io & I'll try to get back to you within 24 hours.)
15:10:26*chemist69 joined #nim
15:13:19FromGitter<andreaferretti> @Araq I just tried: nimsuggest works fine but nawabs still shows the same issue
15:13:39Araqwell nawabs needs to be in nim/bin or something
15:14:25Araqdunno why choosenim cannot keep the ./bin/{nim, nimsuggest} ./lib layout intact
15:14:50FromGitter<andreaferretti> ah ok
15:15:14FromGitter<andreaferretti> well, if it is just for the lib I think it would be possible to copy that as well
15:15:24*rauss quit (Ping timeout: 240 seconds)
15:15:46FromGitter<andreaferretti> (if it was for me, I'd just go for symlinks, but I understand some people are interested in keeping windows support :-P)
15:16:21AraqI dunno if only 'lib' is affected, people usually demand 'koch web' to work
15:16:25*rauss joined #nim
15:17:02AraqNim's way of doing things is beautiful, you can have as many versions of Nim as you want, everything uses relative paths
15:17:46FromGitter<andreaferretti> well, the only issue is a convenient way to actually have as many versions of Nim as you want
15:18:42Araqit's convenient, you change the PATH.
15:19:08FromGitter<andreaferretti> yeah, this is what I am doing so far
15:19:38FromGitter<andreaferretti> still, a little bit of automation would help
15:19:41FromGitter<andreaferretti> nowadays with `koch tools` it is just a small bash script with symlinks away...
15:19:59FromGitter<andreaferretti> it used to be more inconvenient before `koch tools`
15:20:06*rauss quit (Client Quit)
15:20:24*rauss joined #nim
15:21:47Araqon Windows finish.nim can modify the path for you ;-)
15:22:32Araqbecause it has an API for that. On UNIX you try to write a program that modifies .bashrc, lol
15:28:12PMunchOr put one symlink file in your path and then change that..
15:29:43PMunchOr you could do it the busybox way, it bundles a lot of programs into one executable and then reads the 0th parameter to decide which one to run
15:31:24dom96choosenim doesn't install nawabs
15:31:39PMunchSo you create one symlink for each of your nim versions in a regular install directory (like /usr/bin, or /opt) which all link to one executable. Then this executable reads the 0th argument it is called with and runs that copy of Nim. To set a default it would have a tiny config file so that whenever it is called with just nim as it's 0th argument it reads that config and runs the correct version.
15:31:43Araqdom96: it changed the way Nim is installed
15:32:30dom96it changed the way Nim is executed
15:32:34dom96It's still installed the same way
15:38:04*pie_ quit (Quit: Leaving)
15:40:00dom96But once again, I am open to suggestions on how to do it differently.
15:40:40Araqdom96: I already fixed it.
15:40:49dom96nawabs still fails though
15:41:59dom96but that's presumably because it's not inside bin/nim.exe
15:42:07dom96s/inside/beside/
15:42:11Araqyeah, can live with that
15:42:23TiberiumAraq, thanks for the fix with choosenim! this issue https://github.com/nim-lang/nimsuggest/issues/61 seems to be fixed
15:42:42Tiberiumah, no
15:42:48Tiberiumah, yes, it is fixed :)
15:42:54Tiberiummaybe by another commit, but still
15:43:09dom96okay, great
15:48:58*Arrrr joined #nim
15:53:56*couven92 quit (Quit: Client disconnecting)
15:54:05*Jesin quit (Quit: Leaving)
15:58:56*PMunch quit (Quit: leaving)
16:02:11*jsgrant_om joined #nim
16:05:53*Serenit0r joined #nim
16:08:34*Serenitor quit (Ping timeout: 255 seconds)
16:13:04FromGitter<andreaferretti> @Araq I tried writing a few lines of bash for my use case using symlinks
16:13:14FromGitter<andreaferretti> turns out, findExe follows symlinks
16:13:20FromGitter<andreaferretti> but does not resolve them
16:13:47FromGitter<andreaferretti> by which I mean - if it does find a nim binary following symlinks
16:14:03FromGitter<andreaferretti> it returns the unresolved path
16:14:17FromGitter<andreaferretti> so, going back and looking for lib does not work
16:15:12FromGitter<andreaferretti> anyway, here is my shell script in all its glory https://gist.github.com/andreaferretti/d40af6a276fb3275d97d0f9585d8197e :-P
16:15:52FromGitter<andreaferretti> it should allow to quickly swtich between versions, list versions and update devel
16:16:07FromGitter<andreaferretti> but, alas, it has the same problem of choosenim
16:18:15FromGitter<ephja> This generates an ICE depending on the order in which these definitions appear ⏎ ⏎ ```type ⏎ T[N] = proc(p: U[int]) ⏎ U[N] = object``` ⏎ ⏎ has this been reported? I recall seeing a bug report related to type ordering [https://gitter.im/nim-lang/Nim?at=59148eca631b8e4e61c6904e]
16:24:44*chrisheller quit (Remote host closed the connection)
16:27:32*arnetheduck quit (Ping timeout: 240 seconds)
16:27:40FromGitter<ephja> https://gist.github.com/ephja/2826c34408a092dd413a830b4e87ce4b
16:31:21*couven92 joined #nim
16:37:04*brson joined #nim
16:48:37*chemist69 quit (Ping timeout: 255 seconds)
16:49:00*chemist69 joined #nim
17:16:15*libman joined #nim
17:16:50Araqephja, please report it anyway
17:24:32FromGitter<maiermic> I'm still trying to figure out what causes this (http://stackoverflow.com/questions/43855621/conflicting-types-when-compiling-nim-and-sdl2-image-with-emscripten) issue
17:25:17FromGitter<maiermic> I guess it is a bug of the sdl module
17:27:44*yglukhov quit (Remote host closed the connection)
17:31:34libmanHow long is my forum banishment? I am contractually obligated to bump my web frameworks thread about the new round at https://www.techempower.com/benchmarks/ ;-)
17:32:59libmanThose who can, code. Those who can't, rant about coding - to keep the dream alive...
17:41:39FromGitter<Varriount> dom96 ^
17:50:47libmanNo need to nag the gods directly. But an occasional discussion about that topic could inspire some ideas within the community: h2o<->nim bindings, for example...
17:57:31*nsf quit (Quit: WeeChat 1.7.1)
18:01:18*Jesin joined #nim
18:03:33dom96Maybe a couple more days.
18:03:59FromGitter<Varriount> dom96: Aww, can't you be merciful?
18:05:44FromGitter<ephja> Araq: Yeah, I realized that they fail in different ways
18:06:29*SerenityStyle joined #nim
18:09:21*yglukhov joined #nim
18:09:34*Serenit0r quit (Ping timeout: 258 seconds)
18:10:52FromGitter<ephja> type ASTs can't yet be inspected reliably yet, right?
18:11:06libmanNo mercy. That would only encourage me.
18:12:46FromGitter<BontaVlad> :D
18:14:15*yglukhov quit (Ping timeout: 272 seconds)
18:26:14*yglukhov joined #nim
18:28:41*jsgrant_om quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg(at)jsgrant.io & I'll try to get back to you within 24 hours.)
18:29:25*SerenityStyle quit (Ping timeout: 245 seconds)
18:30:42*jsgrant_om joined #nim
18:34:20*sz0 joined #nim
18:36:30*adeohluwa joined #nim
18:37:30*Ven joined #nim
18:37:54*Ven is now known as Guest80030
18:43:25couven92A C-function that takes a structure pointer as an argument should be a ptr type in the Nim proc, right? Because Nim wouldn't know how to trace the ref through the importc call?
18:46:59*Jesin quit (Quit: Leaving)
18:49:03*Jesin joined #nim
18:49:04Araqcouven92: right
18:51:53*chemist69 quit (Ping timeout: 240 seconds)
18:53:48*vlad1777d quit (Quit: Leaving)
18:54:59*chemist69 joined #nim
18:58:15zachcartercan you use importcpp with a dynlib pragma?
18:59:07zachcarternot sure if that makes sense or not
18:59:52Araqno, you can't
19:00:10couven92Araq, because of C++ name mangling?
19:00:43couven92and because all DLL exports in C++ should use extern "C" to prevent that?
19:00:59Araqno, because it never was tested.
19:01:03couven92Ah
19:01:15zachcarterI’m trying to do what’s being done here in D
19:01:17zachcarterhttps://github.com/olehlong/bgfx-extras-d/blob/master/source/bgfx_extras/nanovg.d#L664-L666
19:01:42zachcarterthat symbol’s defined in a shared library I built
19:02:02zachcarterin a cpp file
19:02:18zachcarteris there any way I can bind to it?
19:02:33*SerenityStyle joined #nim
19:02:50couven92zachcarter, if it's properly externalized, shouldn't it be accessible by importc?
19:03:06zachcarterI figured it would be but when I try to use import c I get an error :
19:04:50couven92zachcarter, have you marked the symbol as DLL exportable in your native library? i.e. does the compiler actually put the symbol in the export table? E.g. for C++ in Visual Studio this would be accomplished by __declspec(dllexport)
19:04:54zachcarterhrm interesting I mus thave done something because I’m getting very different errors now
19:05:17zachcarterI’ll have to check on that, I’m hoping so
19:05:54zachcarterhttps://github.com/bkaradzic/bgfx/blob/master/examples/common/nanovg/nanovg_bgfx.cpp#L1058
19:05:57zachcarterit doesn’t look like it
19:06:33couven92in the h file?
19:07:47zachcarterhttps://github.com/bkaradzic/bgfx/blob/master/examples/common/nanovg/nanovg_bgfx.h
19:07:50zachcarterdoesn’t look like it either
19:08:36couven92zachcarter, do you have a .def file or sth like it?
19:09:15zachcarternope :/ not that I’m aware of
19:09:31couven92you're using g++?
19:09:54zachcarterI’m on osx so clang
19:12:31couven92ah, hmm... I actually just know how to do this in VCC (`__declspec(dllexport)`) and in g++ I think it's (`__attribute__((dllexport))`, so check how clang exports symbols
19:14:07couven92otherwise, you could statically compile your library and use --passL:yourlib.a to nim, and use the appropiate header and importcpp pragmas
19:16:00couven92Araq, how do pass a dynamically sized array pointer to an importc? Ideally I'd use sth. like `var x = newSeq[int](someNumber)` and then use `nativeFunc(addr(x), x.len)`...
19:16:50zachcarterthanks couven92
19:20:16*Guest80030 quit (Ping timeout: 255 seconds)
19:22:23*Ven joined #nim
19:22:47*Ven is now known as Guest95275
19:26:55*Guest95275 quit (Ping timeout: 245 seconds)
19:27:14*Arrrr quit (Quit: Leaving.)
19:29:14*Ven_ joined #nim
19:31:12*chrisheller joined #nim
19:32:07*Tiberium quit (Quit: Leaving)
19:33:20FromGitter<stisa> couven92 I think `seq`s are contiguos, so a pointer to the first element (`addr(x[0])`) should work?
19:33:54*Ven_ quit (Ping timeout: 240 seconds)
19:35:00Araqcouven92: yeah what stisa says
19:35:35couven92@stisa, hmm... still looks ugly, but I guess I could do: `proc asLPArray[T](s: seq[T]) = addr(s[0])` to make it prettier, right?
19:35:44*Ven_ joined #nim
19:38:01*Ven_ quit (Client Quit)
19:39:56Araq1. you need to use unsafeAddr then
19:40:08Araq2. don't make unsafe operations beautiful.
19:40:31couven92Araq, okay... will do :P
19:40:33Araqcast and addr are deliberately ugly.
19:41:55couven92I understand
19:45:58*BennyElg joined #nim
19:48:26*rb66 joined #nim
19:50:30*Serenitor joined #nim
19:51:53*SerenityStyle quit (Ping timeout: 240 seconds)
19:56:33couven92Araq, I have some define constants in my C header... But since they all are the possible values for an integer function argument, I am tempted to do an `MyEnum {.size: sizeof(int32).} = enum`. But I got 'holes' in the range of possible values, so I should probably declare it as a `distinct int32` instead?
20:01:03*Ven_ joined #nim
20:01:36Araqyes
20:02:50*Ven_ quit (Client Quit)
20:28:47*zachcarter quit (Quit: zachcarter)
20:42:50*adeohluwa quit (Quit: Connection closed for inactivity)
20:45:19*gokr quit (Ping timeout: 255 seconds)
20:48:15*nsf joined #nim
20:50:45*Trustable quit (Remote host closed the connection)
20:53:38*Vladar quit (Ping timeout: 268 seconds)
20:57:53*chemist69 quit (Ping timeout: 240 seconds)
20:58:11*rauss quit (Quit: WeeChat 1.7.1)
21:00:50*chemist69 joined #nim
21:03:38*Ven joined #nim
21:04:01*Ven is now known as Guest14984
21:15:18bozaloshtshso jester seems to register its own handler for logger, how do I disable this? I want to use my own
21:17:23FromGitter<Varriount> @dom96 ^
21:18:14bozaloshtshhttps://github.com/dom96/jester/blob/master/jester.nim#L322
21:18:28bozaloshtshI was starting jester before registering my handler, that was the issue
21:18:47dom96:)
21:18:55dom96Glad you managed to find an answer on your own.
21:26:51bozaloshtshare nim imports hoisted to the top?
21:28:26bozaloshtshI've got jester routes in their own file and I'm importing that module after doing some other things
21:28:31bozaloshtshbut jester starts up before anyways
21:28:41bozaloshtsh@dom96
21:29:06dom96routes in a separate file are not supported by jester right now (sorry)
21:29:23bozaloshtshaw
21:29:39bozaloshtshI want to run an auxiliary http server, how would I go about doing that then?
21:34:41dom96If you still want to use Jester you can probably do something like this: https://github.com/dom96/jester/blob/master/tests/example2.nim
21:37:15bozaloshtshhmm
21:37:35bozaloshtshwhy not make routes return that match it creates so jester.serve can be called any time?
21:39:17dom96because at the time I didn't consider this possibility :)
21:39:39bozaloshtshah, that's fair
21:39:57bozaloshtshwell this works too, thanks
21:42:16*BennyElg quit (Read error: Connection reset by peer)
21:42:29*BennyElg joined #nim
21:44:33*Jesin quit (Quit: Leaving)
21:49:30*jsgrant_om quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg(at)jsgrant.io & I'll try to get back to you within 24 hours.)
21:51:14*jsgrant_om joined #nim
21:51:52*Guest14984 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:00:35*pie_ joined #nim
22:14:11*zachcarter joined #nim
22:15:16*kunev quit (Ping timeout: 260 seconds)
22:18:09*kunev joined #nim
22:21:38*def-pri-pub joined #nim
22:32:42*kunev quit (Ping timeout: 240 seconds)
22:34:12*brson quit (Ping timeout: 240 seconds)
22:51:49*brson joined #nim
23:05:07*chemist69 quit (Ping timeout: 258 seconds)
23:06:48*nsf quit (Quit: WeeChat 1.7.1)
23:08:15*chemist69 joined #nim
23:09:26*couven92 quit (Quit: Client Disconnecting)
23:29:00*Matthias247 quit (Read error: Connection reset by peer)