00:07:40*koranza quit (Remote host closed the connection)
00:09:34rayman22201Python dictionarys work exactly the same way. You can replicate dom's example almost exactly in python.
00:10:08rayman22201I don't think this is a real problem, it's just people on the "immutablity / fp hype train" honestly...
00:13:18*zyklon joined #nim
00:21:00FromGitter<Banashek> Hey all. Kicking the tires on nim. Is compile time regex allowed? I seem to get errors when trying and figured I'd ask here.
00:28:56shashlickuse the regex package - nimble install regex
00:37:12*theelous3 joined #nim
00:39:51FromGitter<Banashek> I'll give that a shot
00:44:21FromGitter<Banashek> FYI the RegexMatches page linked in the docs (https://nitely.github.io/nim-regex/regex.html#RegexMatch) 404s
00:44:37FromGitter<Banashek> Looking at the tests atm to try and see what the usage is supposed to look like
00:46:45rayman22201link is broken, but this should be better: https://nitely.github.io/nim-regex/#RegexMatch
00:49:37FromGitter<kaushalmodi> @Banashek here's a really basic usage: https://scripter.co/notes/nim/#regex-lib
00:53:51FromGitter<Banashek> Thanks! I've been checking the src docs for usage. Trying to get a couple of capture groups into a record. Looks like something along the lines of : ⏎ ⏎ 1) `match` passing in an out var to store the match (wonder why this is instead of just returning a match object. Could be less overhead in loops?) ⏎ 2) Iterate over the `groups` in the returned match object, using the bounds (groups is a sequence of bounds) to
00:53:51FromGitter... slice into the original string [https://gitter.im/nim-lang/Nim?at=5c36979f9289cc7aa74b8b05]
00:58:39*oculux quit (Quit: blah)
00:58:57*oculux joined #nim
01:14:09*xet7 quit (Quit: Leaving)
01:14:11*shashlick quit (Remote host closed the connection)
01:14:32*shashlick joined #nim
01:15:33*zachk quit (Quit: Leaving)
01:18:49oculuxtest message
01:24:53*wildlander quit (Quit: Konversation terminated!)
01:39:01*theelous3 quit (Ping timeout: 246 seconds)
01:40:22*leorize quit (Quit: WeeChat 2.3)
01:44:24*theelous3 joined #nim
01:49:52*sagax quit (Quit: Konversation terminated!)
01:54:07*cspar joined #nim
02:05:37*Tyresc quit (Quit: WeeChat 2.4-dev)
02:13:13FromDiscord_<palagno-danil> Sex Dating > http://discord.amazingsexdating.com
02:14:01*Ven`` quit (Ping timeout: 246 seconds)
02:14:45*leorize joined #nim
02:27:07*ng0_ joined #nim
02:29:33*ng0 quit (Ping timeout: 256 seconds)
02:31:30*dddddd quit (Remote host closed the connection)
02:45:00FromDiscord_<Obstinate> If I have a type alias like
02:45:10FromDiscord_<Obstinate> type MySeq = seq[int]
02:45:20FromDiscord_<Obstinate> How do I use a function like newSeq with this?
02:45:29FromDiscord_<Obstinate> Do I have to write newSeq[int](...)?
02:45:36FromDiscord_<Obstinate> Or is there some way to do this referencing my alias?
02:46:52*seni quit (Quit: Leaving)
02:46:53*zyklon quit (Read error: Connection reset by peer)
02:55:41FromGitter<kaushalmodi> I didn't follow
02:56:02FromGitter<kaushalmodi> `newSeq` needs the type and number of elements
02:56:11FromGitter<kaushalmodi> you can always do: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c36b44b6a394e2821834157]
02:56:32zestyryou can make a newMySeq constructor
02:57:01FromGitter<kaushalmodi> fwiw, `foo = newSeqint (3)` would also work .. `MySeq` is not needed in this case
03:00:34*banc quit (Quit: Bye)
03:03:11*zyklon joined #nim
03:08:02*abm quit (Ping timeout: 244 seconds)
03:14:02*theelous3 quit (Ping timeout: 268 seconds)
03:15:56*banc joined #nim
03:24:03FromGitter<timotheecour> dumb question: how can i get the url of a package using nimble?
03:25:05zestyrnimble search <pkgname> will list the info including the url
03:25:49FromGitter<timotheecour> but can i restrict `nimble search foo` to only the package foo?
03:26:05FromGitter<timotheecour> because search gives other packages based on other search terms
03:26:10FromGitter<kaushalmodi> @timotheecour https://raw.githubusercontent.com/nim-lang/packages/master/packages.json Ctrl+F :P
03:26:13FromGitter<kaushalmodi> /sorry
03:26:14FromGitter<timotheecour> and i’d rather not have to parse
03:26:42FromGitter<timotheecour> @kaushalmodi it’s for use in tooling (for my PR on nimble wide CI)
03:27:37FromGitter<timotheecour> i mean it’s not hard to parse `nimble search` output, but we shouldn’t have to; could we at least have `nimble search —json` ?
03:27:49FromGitter<kaushalmodi> yeah ..
03:28:07FromGitter<kaushalmodi> was going to suggest just parsing the json
03:28:44FromGitter<timotheecour> (we shd really embrace json or protobuf everywhere btw, it has human readable modes via jq etc)
04:00:49*nsf joined #nim
04:02:58leorizetimotheecour: you can just parse nimblepkg.json directly
04:03:40*zyklon quit (Read error: Connection reset by peer)
04:06:37*Snircle_ joined #nim
04:09:32*Snircle quit (Ping timeout: 268 seconds)
04:20:13*zyklon joined #nim
04:36:51FromGitter<kayabaNerve> I am stumped
04:36:58FromGitter<kayabaNerve> I'm doing a major redo of my code
04:37:06FromGitter<kayabaNerve> And a part I didn't touch at all no longer compiles
04:38:47FromGitter<kayabaNerve> Library is https://github.com/EmberCrypto/ec_events. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c36cc572e25e453d759f024]
04:39:24FromGitter<kayabaNerve> Error is ``` ⏎ MainPersonal.nim(37, 15) template/generic instantiation from here ⏎ ../../../../.nimble/pkgs/ec_events-1.0.0/ec_events.nim(27, 18) Error: type mismatch: got <proc (data: Data): bool{.gcsafe, locks: 0.}> but expected 'proc (data: Data): bool{.locks: <unknown>.}' ⏎ .raise effects differ ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c36cc7c6a394e282183d020]
04:40:38FromGitter<kayabaNerve> I tried removing the raises pragma. I did add a Lock in this file, but that's just import locks/a global verifyLock: Lock. This proc doesn't touch it at all.
04:40:56FromGitter<kayabaNerve> Right above it, which works fine, is ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c36ccd866f3433023a311dd]
04:41:09FromGitter<kayabaNerve> Any ideas?
04:44:18FromGitter<kayabaNerve> Changing the order doesn't matter. The procedures it calls are mostly the same, with neither using locks.
04:46:21FromGitter<kayabaNerve> Also, to be clear, removing raises shows the exact same error.
04:50:51FromGitter<kayabaNerve> It works if I directly pass the sign function
04:52:04FromGitter<kayabaNerve> ... is this worthy as a GitHub issue? Because I can't replicate it, as shown by the fact I have something I think is identical that isn't a problem, but it's so... nonsensical?
04:54:29leorizelooks like it have something to do with locks
04:55:09FromGitter<kayabaNerve> Let me remove the lock I added. Check to be sure
04:55:28FromGitter<kayabaNerve> My main file is huge. I split it up and just include stuff. Imports, Globals...
04:56:17FromGitter<kayabaNerve> The lock import is at the top, var is a global, but it's only touched inside a function called by MainLattice (each part has its own init function). These events are set in MainPersonal.
04:58:12FromGitter<kayabaNerve> Still doesn't work if I remove the lock
04:58:26FromGitter<kayabaNerve> So there's just no locks anywhere in my code now.
04:58:42FromGitter<kayabaNerve> Not saying the error isn't about locks; I'm saying I don't have any.
04:59:08leorizesome errors are just kinda hard to parse
04:59:15leorizetry bumping the verbosity?
05:01:58FromGitter<kayabaNerve> Added path, added path, added path
05:02:13FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c36d1d55aa04d46c5878dfa]
05:02:19FromGitter<kayabaNerve> So I can't use verbosity 3
05:02:35FromGitter<kayabaNerve> Oh. I legit just ran verbosity 3
05:02:38FromGitter<kayabaNerve> I'm an idiot
05:02:39FromGitter<kayabaNerve> One sec
05:06:31FromGitter<kayabaNerve> leorize: Not GC safe warning due to accessing globals on a thread which is due to the GUI needing to be on the first thread, but that also exists for the others. ⏎ ⏎ 5x template/generic instantiation from here ⏎ ⏎ Same error BUT with `procedure: handler` [https://gitter.im/nim-lang/Nim?at=5c36d2d75aa04d46c5879427]
05:07:36FromGitter<kayabaNerve> Procedure is of type T which is mapped to the type of whatever procedure was passed in
05:08:02*leorize quit (Remote host closed the connection)
05:39:10*leorize joined #nim
05:47:52*narimiran joined #nim
05:51:42*rockcavera quit (Remote host closed the connection)
06:28:37*krux02 joined #nim
07:42:43*sheerluck joined #nim
07:43:46*BigEpsilon joined #nim
07:58:30*krux02 quit (Remote host closed the connection)
07:59:03*LargeEpsilon joined #nim
08:12:18*Marumoto quit (Ping timeout: 252 seconds)
08:15:12*salewski joined #nim
08:16:48salewskiIf some of you know something about GTK, MSYS2 and pacman for windows, you may look at issue
08:17:34salewskiI can not really help, sorry. Bye.
08:18:40*salewski quit (Client Quit)
08:20:04*Vladar joined #nim
08:26:17*ng0_ is now known as ng0
08:28:01*PMunch joined #nim
08:34:59*absolutejam joined #nim
08:40:24*abm joined #nim
08:55:05*floppydh joined #nim
08:58:24*salewski joined #nim
08:58:53salewskimiran, concerning your new learning nim page:
08:59:07salewskiYou may also consider adding links to
09:00:16narimiransalewski: yes, i'll add that
09:00:35salewskiand to rosetta code page. From rosetta page I learned indeed a bit in early days.
09:00:36*cspar quit (Ping timeout: 268 seconds)
09:01:22salewskiAnd note, that search entry in page
09:01:27*cspar joined #nim
09:01:37salewskiis still not working in firefox.
09:02:08salewskiOther people reported the same, while github copy of that page works fine.
09:02:30Araqworks on my firefox
09:02:40AraqI typed 'if' and got relevant results
09:02:45narimiransalewski: it doesn't work for me on Vivaldi either. but when i reported it, nobody else could reproduce it
09:02:57Araq(not the best results but that's a different issue)
09:03:25salewskiJavaScript error: https://nim-lang.org/docs/lib.html, line 1: ReferenceError: search is not defined
09:03:36salewskiis reported by firefox.
09:05:21salewskiFor me nothing happens when I type into search entry.
09:05:36narimiransame here. and pressing enter does nothing too
09:06:18narimiranpro: it is not only just me. con: it is not only just me
09:06:18Araqmaybe some onInit bug where we access the object too early
09:06:40salewskiworks fine. Maybe you can find the difference. Bye.
09:08:25ZevvAraq: I hit a [GCASSERT] incRef: interiorPtr, is this likely to be a real GC issue, or can this be triggered by misbehaving code?
09:08:46PMunchnarimiran, it works for me in Vivaldi..
09:08:52PMunchAny messages in the console?
09:09:48salewskiJavaScript error: https://nim-lang.org/docs/lib.html, line 1: ReferenceError: search is not defined
09:10:00salewskiThat was message from firefox.
09:10:06PMunchIs that the same for Vivaldi?
09:10:20*absolutejam quit (Ping timeout: 250 seconds)
09:10:27PMunchI do get this: [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
09:10:39PMunchMight be that Firefox just outrights blocks the script?
09:10:58*absolutejam joined #nim
09:11:04Araqno I get the same deprecation and it works fine
09:11:06salewskiIt is not only a firefox problem, for epiphany web browser it works not too, but mo message.
09:11:59narimiranPMunch, salewski: "Uncaught ReferenceError: search is not defined" in Vivaldi
09:13:54PMunchHmm, that's strange
09:14:04PMunchIt's a top level function in dochack.js
09:14:06*zyklon quit (Read error: Connection reset by peer)
09:16:06salewskiFinal note: I have no blockers enabled in firefox and cookies enabled. And problem started with release 0.19.2 since year 2019
09:16:44*salewski quit (Quit: WeeChat 2.3)
09:16:58narimiransame here
09:18:37PMunchHmm, this is really strange
09:20:22PMunchnarimiran, could you "right-click -> Save As", and as the file format choose "Webpage, Complete" then upload that somewhere
09:20:34PMunchI'm just curious to see if the content you get is actually different
09:22:41narimiranPMunch: https://gist.githubusercontent.com/narimiran/947c51cb14ef73a14e238d4c1c48e326/raw/7b1724ce74df20653a1da14e70de43be84515b9d/gistfile1.txt
09:26:56PMunchI meant all the files
09:27:07PMunchSaving as a complete webpage should create a directory as well
09:27:27narimiranoh, i didn't see the directory
09:28:10narimiranin the directory are only two css files, you want that?
09:29:19narimiranPMunch: https://gist.github.com/narimiran/08c498df6b79317f64773c9f63ef68a2
09:29:29PMunchWait no dochack.js file?
09:30:04FromGitter<alehander42> @Araq would code with `move` etc be correctly translated for the javascript backend? (https://github.com/nim-lang/Nim/issues/9674)
09:30:12PMunchThat's what it looks like for me
09:30:20PMunchI think we just found the issue :P
09:30:28narimirani removed /, it's ok
09:30:39narimiranand no, i don't have dochack.js there
09:31:04*zyklon joined #nim
09:32:04Araqalehander42: the JS codegen is missing it but it's not hard to implement
09:32:12PMunchOh, interesting
09:32:23absolutejamnim can be compiled (transpiled?) to js?
09:32:31PMunchAfter I do Ctrl+F5 (force refresh, no cache) I get the same issue
09:32:45PMunchabsolutejam, compiled to, and yes
09:33:07PMunchC, C++, ObjectiveC(?), and JS
09:33:14absolutejamis transpiling from the same base language?
09:33:19absolutejamooh, shiney.
09:33:22narimiranabsolutejam: btw, yesterday i said you came to nim half a day too early. now we have this:
09:33:52*theelous3 joined #nim
09:34:31narimirani think this should entertain you for quite some time :)
09:34:34PMunchWell, transpiling is between the same level of abstraction, compiling is going from one level down to another. Since Nim has all it's powerfull macro stuff and compile-time execution, generics, etc. it is compiled to JS
09:34:45PMunchYou can't go back from JS to Nim and end up with the same code
09:35:16absolutejamrigh, makes sense
09:35:30absolutejamisn't TypeScript transpiled though?
09:35:33absolutejam-> js
09:35:37PMunchGET https://nim-lang.org/docs/dochack.js net::ERR_ABORTED 404
09:35:42absolutejamI guess js is valid in ts though
09:35:56narimiranPMunch: something needs to be backported to 0.19.x branch?
09:36:33PMunch"[...] transcompiles to JavaScript.", I don't think they're completely sure themselves :P
09:36:40PMunchFrom the TypeScript wiki page
09:37:16PMunchBut they call it a compiler, and it does offer an abstraction over JavaScript (types specifically, and some other stuff I think)
09:37:33PMunchnarimiran, it looks like the file is just missing..
09:38:04PMunchThat's the file it tries to grab
09:38:12PMunchAnd it gives me at least a 404
09:38:26narimiran404 here too
09:38:28absolutejamthanks for the link narimiran
09:38:30absolutejamreading now
09:38:36FromGitter<alehander42> absolutejam basically nim and typescript are both compiled to javascript, the terminology distinction is not very important
09:38:57absolutejamyeah, fair enough
09:39:04PMunchAraq, do you know where dochack.js is supposed to be?
09:39:25absolutejamso, I could write a compiled node program in nim?
09:39:37absolutejamI mean, compiled from nim -> js
09:39:51PMunchI did that for my test with Electron
09:39:53absolutejamI never learned js because it gives me bad feelings
09:39:53leorizePMunch: tools/dochack.nim
09:39:57FromGitter<alehander42> absolutejam yes, I maintain such a project
09:40:17FromGitter<alehander42> (which uses nim -> node.js for some components)
09:40:31PMunch(Not supporting electron by the way, it's horrible. Just did it for fun to see if it would work)
09:40:46FromGitter<alehander42> :D the electron war
09:41:00absolutejamcan't see it going anywhere though
09:41:12Zevvnarimiran: tutorial part ||| is missing in the list at https://nim-lang.org/learn.html
09:41:23narimiranZevv: yes, i know :)
09:41:34narimiranit will be available when 0.19.4 is released
09:41:49narimiranZevv: for now, go to https://nim-lang.github.io/Nim/tut3.html
09:42:03Zevvyeah, *I* know, but my browser doesn't when I click the link :)
09:42:03PMunchleorize, I meant the compiled js version for the website
09:42:13absolutejamif I'm mutating my object, and it returns something, do I have to discard the value?
09:42:18narimiran(well, it is not missing, it is there, but link doesn't work just yet)
09:42:57Araqfun fact: "transpilers" used to be called "preprocessors"
09:43:05ZevvWould a link to https://rosettacode.org/wiki/Category:Nim make sense?
09:43:22PMunchabsolutejam, anything that returns something you don't want has to be discarded
09:43:42narimiranZevv: it would. i already added link to it and to Nim Notes. it will be online on the next server refresh
09:43:55PMunch"With Great Power Comes Great Responsibility." -- Spider Man's Uncle
09:44:02PMunchaka Benjamin Parker..
09:44:23absolutejamUncle Ben, purveyor of fine rice
09:44:34PMunchHaha :P
09:47:14absolutejamthe 'do' syntax looks quite nice
09:47:52absolutejamI'm avoiding writing any real code at the minute because I'm trying to figure out how to structure my types
09:50:15narimiranparalysis by analysis?
09:50:55absolutejam^ i like it
09:51:22absolutejamthe opposite is diving in and redoing it every 2 minutes though
09:51:30absolutejamwhich is what I was doing when I was writing this in Python
09:51:40narimiranaaand, there's nothing in between? ;)
09:51:53absolutejamblack or white
09:52:00absolutejamno grays
09:52:31narimiranZevv: if you find any more resources that you think it should be added to the learn nim page, let me know
09:52:34oculuxtranspile <- first time i have heard it. my opinion: no one needs more piles
09:53:27absolutejamdoes this channel have to be strictly on topic/
09:53:43*cspar_ joined #nim
09:53:46oculux<- has been learning nim for 3 days and is mind blown at where programming has come to...
09:54:15absolutejamI keep getting blown away by function overloading
09:54:24absolutejambecause I've never really had that
09:54:34PMunchabsolutejam, peterme.net/nim-types-originally-a-reddit-reply.html
09:54:45PMunchThat might be helpful if you're fiddling with types
09:54:51absolutejamactually, maybe when I dabbled in Visual Basic in college
09:55:00PMunchYou can also click through to the reddit thread and see more information there
09:56:15PMunchabsolutejam, the channel doesn't have to be on-topic. But when someone is actually asking for help or wants to discuss something Nim related we typically head over to #nim-offtopic for the offtopic discussions :)
09:56:16*cspar quit (Ping timeout: 250 seconds)
09:56:45absolutejamTIL #nim-offtopic
09:58:38PMunchThere is also #nim-nologs
09:58:46PMunchBut it's not used that much I think
09:58:57Araqyou got to be over 18 for #nim-nologs
09:59:10narimiranoooh, i didn't know that
09:59:16*narimiran joins #nim-nologs :P
09:59:16absolutejamwhat happens in nologs stays in nologs?
09:59:24FromGitter<alehander42> wow i didnt know of nologs
09:59:30FromGitter<alehander42> how many more do we have :D
09:59:41PMunchIt's only those three IIRC
10:00:01PMunchHaha, nim-somelogs, a random number of messages are logged. The rest is discarded
10:00:15Araqnarimiran: I was kidding
10:00:19PMunchYou can possibly get a feel for what was discussed, but no real information
10:00:19narimirani know, me too
10:00:31PMunchAraq, did you see my comment about dochack.js?
10:00:44PMunchThe reason search is broken is because that file 404's
10:01:00PMunchCtrl+F5 to do a force refresh and you should see the same
10:01:28Araqmakes sense
10:07:00FromGitter<timotheecour> @araq any early feedback on https://github.com/nim-lang/Nim/pull/10247 ?
10:11:07narimiran@timotheecour Araq here is my initial list of the most popular Nimble packages: https://gist.github.com/narimiran/d41f84dd06e9514681bfee7d252b2842
10:11:49narimiranplease notice that this list needs to be refined, and probably lots of these packages should be discarded, but @timotheecour maybe you can take it as a starting point
10:12:42FromGitter<timotheecour> @narimiran thx; can u add the script that generated it to somewhere inside `tools/`? then i could call it as a library inside that PR
10:13:05narimiranthe "script" that generated it is speaking to you right now ;)
10:13:15FromGitter<timotheecour> right now i took 20 packages that I use a lot, but happy to merge w urs
10:13:48FromGitter<timotheecour> wait what ? was that manual?
10:14:07narimiranbtw, you shouldn't blindly merge. i didn't check if these packages have been recently updated, do they even work anymore, etc
10:14:13FromGitter<timotheecour> is that list using number of stars on GitHub? or number of downloads? or ?
10:14:31narimirannumber of stars, plus some manual cherry picking
10:15:07ZevvNot sure if something like spry is really often used?
10:15:18narimiranit was manual because when i started i thought i'll make that list much much smaller. and once i got going, i realized i already did half of the job and it is faster for me to continue manually
10:16:03narimiranZevv: as i said, this list needs to be curated, and probably lots of packages will be removed
10:16:11FromGitter<timotheecour> one interesting point is if X is very popular and depends on Z (which no-one every installs “explicitly” or even knows about (ie few github starts etc)), shouldn’t Z be treated at least as well as X
10:16:43Zevvis there a way to get "real" statistics, like number of downloads or nimble installs? I guess these numbers are only available to the owners of the individual packages on github?
10:17:00FromGitter<timotheecour> but maybe i could take the transitive closure of the N most popular packages to avoid this issue
10:19:04Araqtimotheecour: we already had some logic to do that in testament
10:19:06PMunchZevv, one way would be to go by stars and look at imports to propagate stars to libraries
10:19:16Araqhave you looked at it?
10:19:29FromGitter<alehander42> look at nimble dependencies: imports could be hard to analyze
10:19:36FromGitter<timotheecour> @araq where
10:20:45Araqcategories.nim, section 'Nimble'
10:21:25Araqbut more importantly, this list of packages is insufficient
10:21:52FromGitter<timotheecour> i actually didn’t know about that testament nimble target
10:23:15Araq1. the list of packages is platform dependent, some easy way to do 'when defined(linux)' would be nice
10:23:25*dddddd joined #nim
10:23:37Araq2. how to test a package is package specific, there can be more to it than just 'nimble test'
10:24:29Araq3. we need protection against nimble package updates, probably by picking a specific commit
10:25:47FromGitter<timotheecour> > there can be more to it than just 'nimble test’ ⏎ ⏎ i’m running both: nimble install,develop,build,test; with `build,test` being the most important ones as far as nim breakages is concerned
10:26:44FromGitter<timotheecour> 1) platform dependent: yes
10:28:55FromGitter<timotheecour> > there can be more to it than just 'nimble test’ ⏎ ⏎ see my suggestion of a standardized `nimble testCI` here: https://github.com/nim-lang/Nim/pull/10247#issuecomment-452931965 and its semantics
10:28:55*zyklon quit (Read error: Connection reset by peer)
10:29:40Araqbut then I need to update all my nimble packages. And I don't want to.
10:29:55FromGitter<timotheecour> i’ll change the list to be a set of `mypkg:myversion` instead of `mypkg`
10:30:01FromGitter<timotheecour> no u don't
10:30:24Araqwhat are the effects on the build times?
10:30:29FromGitter<timotheecour> read the description again: if `nimble testCI` is defined, we use it, else we use `nimble test`
10:31:27FromGitter<timotheecour> > what are the effects on the build times? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c371eff9289cc7aa74ebfdb]
10:31:47Araqwe don't know if it's defined and it's a complex solution for something that is much easier to solve anyway, specialize the code
10:31:52FromGitter<timotheecour> but that’s running locally (ie, total for 20 pkgs was 112 seconds)
10:33:21FromGitter<timotheecour> > we don't know if it's defined ⏎ ⏎ Yes we do: `nimble task` tells u exactly that
10:34:16AraqI don't want it.
10:34:53Araqin the past we tried to "check" all Nimble packages, got 404s, didn't even run "nimble test" and abandoned it
10:35:14Araqnow we're at "we test selected packages"
10:35:28FromGitter<timotheecour> don’t want “it” ; it = what?
10:35:42Araqthat's better but since they are selected, we might as well have specialized code for them
10:35:58Araqinstead of a "generic" testCI solution
10:36:29FromGitter<timotheecour> well, ok. so that’s what i’m doing now anyways
10:37:34Araqandreaferretti's packages are also worth testing, it's a bit complex because he sometimes uses libBlas or something
10:37:34FromGitter<timotheecour> but high level is ok in PR? modulo adding (optional) hardcoded versions, and adjusting for per-platform
10:38:11Araqstill thinking about whether this should be in testament, you now have quite some counting and reporting logic
10:38:32FromGitter<timotheecour> but can’t HE (the pkg author) be responsible for setting everything up so that nim’s CI just call his `nimble test`
10:39:55Araqeventually maybe, but we should have a convenient start
10:39:57FromGitter<timotheecour> it sounds a lot easier if each pkg exposes a simple interface that we call to test; so each pkg must make sure their test (or testCI which i had intended for that) is correct
10:40:28FromGitter<alehander42> i kinda agree, i think that e.g. andrea or the many of the other ppl would gladly take a PR that fixes that for their packages
10:40:30FromGitter<timotheecour> im’ ok so long the long term plan is to push for `uniform` way
10:41:00Araqyeah, and every software should respect SOURCE_DATE_EPOCH
10:41:23FromGitter<alehander42> " standard X is not respected, so let's just not have standards at all"
10:41:25FromGitter<timotheecour> well that’s what brew is shooting for
10:41:46Araqalehander42: yes, if it can easily be avoided
10:42:23FromGitter<alehander42> well, custom code in test tools is even worse
10:42:35FromGitter<alehander42> i mean, it's ok to have special cases for some libs
10:42:35FromGitter<timotheecour> yup yup yup
10:42:39FromGitter<alehander42> but this should be the exception
10:42:59FromGitter<timotheecour> definitely agree. temporary exception pending upstream PR's
10:43:42Araqit will always be custom code and here is why, "we broke ABC and ABC shouldn't have compiled to begin with, we'll disable it until ABC is fixed"
10:44:13Araqthere is little difference between a "custom" disable and a custom test command.
10:44:47FromGitter<alehander42> yes, the first is a boolean flag and the second one is everything expressable in e.g. bash
10:45:04absolutejamwhat are you doing with the packages, if you don't mind me asking?
10:45:07Araqit's both custom code.
10:45:10FromGitter<alehander42> it should be possible to have a custom command, but it shouldn't be the default
10:45:15FromGitter<alehander42> thing to do
10:45:41Araqit doesn't matter, when you add a package you surely tested it manually and hence know the commands already
10:45:46FromGitter<alehander42> and maintaining test commands is not the langdev team job
10:46:01FromGitter<mratsim> @timotheecour @araq you don’t need to test nimblas, I use them in Arraymancer so there is already a convenient test for them
10:46:22FromGitter<alehander42> after all, if a package X breaks down, you can always tell: "we can make sure to not break it if it exposes this command: if it doesn't , well, fix this first"
10:46:40Araqthe maintenance job is largely the same
10:46:42FromGitter<alehander42> i dont know why you want more work in your own code
10:46:49*zyklon joined #nim
10:46:53FromGitter<mratsim> my main issue with @andreaferretti packages is that there are some `*` in the autogenerated doc which crashes nim doc.
10:47:05Araqit isn't more work, that's why.
10:48:01FromGitter<alehander42> how is "i have to find the correct commands etc and the way to actually setup this X" the same work as "<known command>"
10:48:05Araqthat's your conjecture, we don't have experience with it and yet the first thing you do is to come up with more rules
10:48:11FromGitter<alehander42> and this doesnt scale
10:48:18FromGitter<alehander42> one day, if you have 500 popular packages
10:48:25FromGitter<alehander42> are you going to maintain commands for all of them
10:48:40Araqand now we're in buzzword bingo land
10:49:05FromGitter<alehander42> this "rules/no rules" is so arbitrary, rules simplify life a lot of the time
10:49:38FromGitter<timotheecour> the single 1 thing that makes this whole thing feasible is nimble has a standardized `nimble test`; so ya, we’ll default to that and allow *temporary* exceptions for important stuff
10:49:38*krux02 joined #nim
10:52:10FromGitter<timotheecour> there’s a few more thnigs to iron out (but could be in subsequent PR’s) : ⏎ ⏎ 1) how to get the versions: i suggest we test both master and latest release tag
10:52:51Araq^ see. More "custom" knowledge is required.
10:52:52FromGitter<mratsim> I think it’s fine to have a transition period once we get more popular packages
10:53:00FromGitter<mratsim> as people said: “rich people problem"
10:53:10FromGitter<timotheecour> Regressions: we need to store the results in a db so we can query for these (and answer questions like: when did pkg foo break)
10:54:11FromGitter<timotheecour> > More "custom" knowledge is required ⏎ ⏎ git can tell us latest release tag , a list doesn’t have to be maintained in nimble-wide ci tester
10:54:29Araqthat feature was in testament too, it used a DB. nobody ever used it
10:54:39Araqincluding myself who wrote it.
10:54:57FromGitter<timotheecour> well we can look into reviving it, but in subsequent PR’s, if needed
10:56:17FromGitter<timotheecour> what’s very useful at least is: what tests passed before a given PR that fail after that PR ; so that db is kinda useful (short of hardcoding in code)
10:56:49Araqwell that's what testament gives you
10:57:34FromGitter<timotheecour> well testament is centralized though, it’s not quite comparable; testament tests stuff that’s all under its control; here it’s the ‘outside world'
10:58:27FromGitter<timotheecour> so hardcoding in code what nimble packages pass/fail is uglier, but maybe ok in a first pass
10:59:58Araqtestament is a general command/input/output system, I know you are against specialized "commands" but the URL is "special" to begin with
11:01:18Araqand we might also want to test 'nim doc' on Nimble packages
11:01:44Araqbecause we can also sometimes break the docgen...
11:01:52FromGitter<timotheecour> Yup, agree
11:02:20Araqyour solution is probably a standard 'nimble docCI' target :P
11:03:12FromGitter<timotheecour> well, actually, kind of yes
11:03:51Araqa standard is something that emerges, not something you dream up
11:04:02FromGitter<timotheecour> it could be: if `nimble docCI` is defined run it, else, best effort: run `nim doc pkg.nim` ⏎ how else would one test that, short of running `nim doc main.dnim
11:04:23FromGitter<alehander42> but why testCI and docCI
11:04:28FromGitter<alehander42> instead of just test and doc
11:04:43FromGitter<timotheecour> theres no `nimble doc` ATM
11:05:03FromGitter<timotheecour> so ya it’d probably be `nimble doc`
11:05:24Araqsay we test 20 nimble packages, these have different development pacings
11:05:50Araqsometimes 'master' is what we need to use, sometimes a git tag, sometimes a git commit hash
11:06:12Araqsometimes 'nimble doc' exists but uses Sphinx which we don't have installed
11:06:23FromGitter<timotheecour> new idea: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c37272f317e2407cd0c4194]
11:07:00Araqthat is the problem we need to solve. Maybe, yes, we don't want to test for 300 packages in the same style
11:07:32Araqthat's a different problem we can tackle with more experience with the 20 packages that we did test
11:07:46*troido quit (Ping timeout: 250 seconds)
11:10:02FromGitter<timotheecour> actually we can do: ⏎ ⏎ ```nim doc —project <inferred_main_pkg>.nim``` ⏎ ⏎ unless package author defined a `nimble doc` task, in which case we run that instead [https://gitter.im/nim-lang/Nim?at=5c37280a83c7e37765483bc7]
11:11:01FromGitter<mratsim> I defined nimble docgen
11:14:12Araqok so instead of 20 lines of evil "custom" commands we're having a "generic" solution involving inferring/guessing and a new Nimble standard -d:ci flag
11:14:36narimiranKISS, please
11:15:30FromGitter<timotheecour> the 20 can scale to 1000 though, when running locally for eg
11:16:25Araqwe don't know if we want to scale to 1000 though, maybe the CIs timeout, maybe Nim development becomes more professional
11:17:14FromGitter<timotheecour> Anyway, the best is to try it out, i’m gonna incorporate some of the stuff discussed above in that PR
11:17:23Araqnot to mention that extracting "most common substrings" out of a list is not something that's particularly hard to do
11:17:53*stefanos82 joined #nim
11:17:54FromGitter<timotheecour> Huh?
11:19:07Araqtest "package:v1; nimble test; nimble doc" # 100x, evil, refactoring into:
11:19:14AraqstandardTest "package"
11:19:35Araqonce we have 100x of them
11:20:01Araqnothing scales better than simple solutions.
11:20:15FromGitter<timotheecour> well we’re in violent agreement
11:20:39Araqyay :-)
11:21:02FromGitter<timotheecour> anyway, will update PR, there was a few good ideas mentioned above
11:21:41AraqYAGNI and KISS always win
11:22:32FromGitter<timotheecour> again, i agree
11:22:43FromGitter<alehander42> nothing scales worse than manual solutions
11:22:59*theelous3 quit (Ping timeout: 258 seconds)
11:27:19FromGitter<mratsim> write a macro :P
11:28:26absolutejamhm, I can't get nim to build my test file on Windows
11:30:44Araq"Humm, I need to figure out which packages to test regularly, I need to run their tests manually first and look at what state they are in. But hey, at least I don't need to write down the test command I used because I will make the package authors standardize on it."
11:31:19absolutejamI just need those DLLs, mingw and that's it right?
11:32:38*theelous3 joined #nim
11:32:57FromGitter<alehander42> Araq, all right, my point was about "nothing scales better than simple solutions."
11:33:14FromGitter<alehander42> it's just incorrect logically
11:33:26FromGitter<alehander42> sometimes what is simpler for <N is not simpler for >=N
11:33:30FromGitter<timotheecour> well, after PR running their tests is as simple as: ⏎ `nim c -r koch.nim runcipackages`
11:34:31Araqwe are dealing with <N now, the >=N solution might never be required or completely different, as in: we *blacklist* the broken Nimble packages instead
11:34:37narimiranabsolutejam: how did you install nim?
11:34:59narimirani'm not on windows, but installation should be "plug and play", from what i remember
11:35:03*troido joined #nim
11:35:27narimiranabsolutejam: https://nim-lang.org/install_windows.html
11:35:36*ng0 quit (Quit: Alexa, when is the end of world?)
11:35:45narimiran"Simply extract the files into the desired installation directory, and run finish.exe."
11:36:04absolutejamI actually dont remember, haha. THink I may have used chocolatey
11:36:10absolutejamdid it in a haze the other day
11:36:17absolutejamI'll download the zip
11:36:48absolutejamyeah, with chocolatey
11:37:18FromGitter<alehander42> Araq, yes, we all agreed for <N there would be custom commands, but also nothing wrong with eventually fixing those packages
11:37:25FromGitter<alehander42> anyway, this is it
11:40:49Araqthinking about this more, 'nimble install' can end with 'run pacman install foobar'
11:44:55FromGitter<timotheecour> i don’t think so, it’s handled by nimble; unless u mean `nimble build`
11:45:18FromGitter<timotheecour> (whcih can be arbitrarily customized by pkg author)
11:52:45*xet7 joined #nim
11:54:25absolutejamthere's an awsome looking nim package
11:54:28absolutejambut with no docs :[
11:54:36absolutejambaptism by fire time?
11:58:18PMunchWhich package?
11:58:20FromGitter<kaushalmodi> @timotheecour, Araq: why not have the package .nimble define the CI commands?
11:58:57PMunchabsolutejam, which package?
11:59:14FromGitter<kaushalmodi> If a package needs to be kind of officially tracked by Nim (which is a good thing), the package author would put the CI fields in their .nimble
12:00:33FromGitter<kaushalmodi> It already contains the minimum required Nim version in most cases. If not specified, default to the latest stable. And run the CI commands only on those versions.
12:00:54FromGitter<timotheecour> that’s pretty much what I’ve been suggesting; but to make it more practical, it’d be: first check if there’s a CI task; if not, do a best effort by running custom code
12:01:08FromGitter<kaushalmodi> Ok
12:01:09FromGitter<timotheecour> that way, it works from day one
12:01:30FromGitter<timotheecour> and we promote that best practice
12:01:34FromGitter<timotheecour> over time
12:01:36FromGitter<kaushalmodi> We can skip the "best effort" part
12:01:40FromGitter<timotheecour> No no
12:02:03absolutejambrb, grabbing a sandwich
12:02:06FromGitter<kaushalmodi> If the author wants their package to not break by Nim changes, they would specify the CI commands
12:02:08FromGitter<timotheecour> best effort just runs: nim doc, nimble test, and other commands in a smart way
12:02:24FromGitter<timotheecour> so we can at least see what’s the state of nimble today, at scale.
12:02:31*theelous3 quit (Ping timeout: 268 seconds)
12:02:54FromGitter<kaushalmodi> Understood. 👍
12:02:55FromGitter<timotheecour> btw i’m writing the tool so it can also be used locally with customization, so u’ll be able to run it on all nimble packages
12:42:59absolutejamyay, compiling on Windows
12:43:11FromGitter<mratsim> rest in peace :P
12:43:31absolutejamit's my colleagues PC too
12:43:40absolutejamhe's going to come back to Python3, golang and nim installed
12:51:01Araqa late Christmas present
12:52:27FromGitter<alehander42> @timotheecour @kaushalmodi there shouldn't be separated "CI" and "normal test" commands, this is not something any normal lib author would like indeed
12:54:28*nsf quit (Quit: WeeChat 2.3)
12:56:44absolutejamdoes nim have an init method?
12:56:57absolutejamfor types
12:57:00PMunchWhat do you mean init method?
12:57:09absolutejamYeah, that's Python-specific isn't it
12:57:10FromGitter<alehander42> constructor
12:57:11absolutejaman initialiser
12:57:24PMunchAh right, for your type
12:57:35absolutejamyeah, sorry. just blurting words out without making sentences
12:57:43FromGitter<zacharycarter> you write it
12:58:04FromGitter<alehander42> usually you try to name it `init<Type>(..)`
12:58:04FromGitter<zacharycarter> objects in Nim are like structs in C
12:58:05absolutejamit's not implicit though? Like Python's __init__ is called post contructor
12:58:07FromGitter<zacharycarter> they don't have any constructor
12:58:09FromGitter<alehander42> or `new<Type(..)`
12:58:19FromGitter<alehander42> absolutejam, no it's explicit
12:58:28FromGitter<zacharycarter> `type Foo = object; proc newFoo(): Foo = result;
12:58:28absolutejamso I'd do a = Foo(); a.init
12:58:31FromGitter<alehander42> a lot of the time, it's simple to just directly initialize it
12:58:31FromGitter<zacharycarter> you get the idea
12:58:38FromGitter<alehander42> no
12:58:47FromGitter<alehander42> you would either do a = Foo(f: .., e: ..)
12:58:51FromGitter<alehander42> or a = initFoo(arg, arg)
12:58:56FromGitter<alehander42> (or newFoo)
12:59:13FromGitter<zacharycarter> var a: Foo; a = newFoo()
12:59:27FromGitter<zacharycarter> you're certainly free though to do this however you want
12:59:28absolutejamwhat is 'newFoo'?
12:59:30FromGitter<zacharycarter> you can write your own init routine
12:59:34FromGitter<zacharycarter> a proc you would define
12:59:35absolutejamIs that a proc I have to create?
12:59:38absolutejamah okay
12:59:42PMunchWe should really get the new/init as typedesc generics..
12:59:53FromGitter<alehander42> yeah
13:00:04absolutejamI've created a type using Foo(a: "something") etc.
13:00:25absolutejambut if I want to ensure any more logic is run, I have to create the proc and call it right?
13:00:26FromGitter<alehander42> this is also absolutely ok
13:00:31absolutejamthere's no magic
13:00:36FromGitter<alehander42> yes, exactly
13:00:38*zyklon quit (Read error: Connection reset by peer)
13:00:59FromGitter<alehander42> you just call it with the initializer args
13:01:40absolutejamwhat's the idiomatic way? newFoo()?
13:02:06FromGitter<zacharycarter> yes
13:02:10absolutejamI just want to ensure the Type is created and all validation methods etc are run as well
13:02:28absolutejamSo, if my type is User, newUser, etc.
13:02:31FromGitter<zacharycarter> create a `newFoo(...)` pass whatever args to that proc you want
13:02:33FromGitter<zacharycarter> right
13:02:34FromGitter<GULPF> newFoo for ref types and initFoo for object types
13:02:38absolutejamJust thinking what's idiomatit
13:02:42FromGitter<GULPF> is what the stdlib uses
13:02:49absolutejamI still don't understand the difference.
13:02:55absolutejamref/object types
13:03:04FromGitter<zacharycarter> I wasn't aware of that distinction - but ogod to know
13:03:05absolutejamIs one a pointer to an existing object?
13:03:08FromGitter<zacharycarter> yes
13:03:20FromGitter<mratsim> ref is a pointer/reference to an object
13:03:22FromGitter<zacharycarter> ref objects are GC traced pointers to local heap alloations
13:03:33FromGitter<mratsim> too low level @zacharycarter
13:03:36FromGitter<zacharycarter> sorry
13:03:38FromGitter<mratsim> :P
13:03:41absolutejamgimme a few weeks, haha
13:03:49FromGitter<mratsim> what’s your background?
13:03:51FromGitter<zacharycarter> key is ref is a safe ptr
13:03:53FromGitter<GULPF> ref has alias semantics, that's the important difference. Two ref objects can point to the same memory
13:03:57PMunchabsolutejam, did you read my article/reddit post?
13:04:00absolutejamWindows sysadmin
13:04:03absolutejamI started, PMunch :P
13:04:07PMunchI go into great detail on ref/pointer/object
13:04:09absolutejamIt's still in my open tabs, ready to be read
13:04:22FromGitter<alehander42> narimiran, what's the RFC workflow now: i see one has to add a new md document, but how is it discussed after that
13:04:32narimiran"We should really get the new/init as typedesc generics.." yes yes yes!!
13:04:44FromGitter<mratsim> basically a variable can hold either a value, or a reference to a value (also called pointer).
13:04:51FromGitter<mratsim> an object is a value
13:05:05FromGitter<mratsim> a ref object is a reference (address) of a value
13:05:29absolutejamYeah, I feel like I get it but I'm not 100%. I think it's just because I've never actually worked with them
13:05:33FromGitter<mratsim> this is similar to cash vs cheque
13:05:36narimiran@alehander42 you send PR and then we discuss it below it in the comments. if there are changes to be made, you push the changes and we can easily see what has been changed
13:05:48FromGitter<mratsim> cash is value, and cheque is a reference to a value :P
13:06:04narimiranbefore it was "i changed something in the original post, try to spot the differences while you re-read everything"
13:06:07absolutejamNot the cheques I write
13:06:11FromGitter<mratsim> and where to get it :P
13:06:19PMunchWell, cash is also just a reference to the gold standard. Or in this day and age just a reference to floaty promises :P
13:06:29FromGitter<mratsim> if you write blank cheque you would not be a good dev ;)
13:06:57FromGitter<alehander42> @narimiran ok
13:06:59FromGitter<alehander42> thanks
13:07:02PMunchIf you haven't worked with memory and stack/heap stuff I can understand why ref/object might be confusing
13:07:16FromGitter<mratsim> anyway, you can search for value vs reference semantics and you will find plenty of articles on the global concepts
13:07:27narimiran@alehander42 if you write it, you'll be the first, so our test bunny :)
13:09:08FromGitter<mratsim> at a low-level, an object is a value and a ref object is an address to the actual object
13:09:12absolutejambyref and byvalue I get
13:10:29absolutejamAnd this is an abstraction vs. using pointers in Go, right?
13:10:32absolutejamor a lower level language
13:10:39PMunchI recommend clicking through to the reddit thread as well and read the Q/A after my post
13:10:58absolutejamlike, that is what is actually happening, but Nim generally uses 'val' and such in proc definitions instead of referring to pointers?
13:11:06absolutejamI'll finish the post you linked
13:11:07PMunchAs I say in the article, a reference is a special kind of pointer
13:11:20PMunchBasically just means it's GC'ed
13:12:52FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c3744d483c7e377654905cc]
13:13:21FromGitter<mratsim> @absolutejam —> you see that b has an address “ref 0x10e9b8048 --> 10"
13:14:03FromGitter<mratsim> 0x10e9b8048 (on my machine) means that the actual value is stored at 0x10e9b8048, and at 0x10e9b8048 memory location there is a “10” stored
13:15:15FromGitter<zacharycarter> we're getting into the weeds now :)
13:15:30absolutejamand if you alter the value stored at that memory location, and ref objects are 'updated' because they point to the same value
13:15:35FromGitter<zacharycarter> love it!
13:15:43absolutejamwell, they're not updated, they _are_ the same value
13:16:03PMunchYeah, they all "refer" to the same value
13:16:30PMunchSo if you update the thing one refer to, you update what they all refer to
13:18:14*zyklon joined #nim
13:19:00PMunchImagine having 10 drawers, named 0-9. 0-9 is now a reference to a position in the stack of drawers. If I take a piece of paper and write "Hello" on it and place it in drawer 2. Then tell you to read the note in drawer 2 that's like passing you a reference to that note. If you then take another paper and put it in the drawer everyone that I tell to read the note in drawer 2 will now read your note and not mine.
13:20:02PMunchConversely if I give you a note that says "Hello" you will read "Hello", if you change the note that doesn't matter to me because it's your copy. I can still give notes to other people that says "Hello" even if you change your note to say something else.
13:20:30PMunchThe cost of this is of course that I need to make a new copy of my "Hello" note to everyone I want to send my greeting.
13:25:35*Ven`` joined #nim
13:26:42*kapil____ joined #nim
13:28:40FromGitter<mratsim> excellent example
13:29:00PMunchHaha, my years of working as a TA paying off :P
13:29:08FromGitter<mratsim> actually we should have something like that as many people are not coming from C/C++
13:29:17FromGitter<mratsim> in the new “learn” section
13:29:25FromGitter<alehander42> @narimiran if i think of something, I'll do it (i'll try to not test it with a radical/impossible idea :D)
13:29:46narimiranyeah, good idea :)
13:32:58absolutejamyeah, I feel like it'd be a given if I came from a programming background
13:33:04absolutejamor even played with languages like Go more
13:33:43absolutejambut I'm coming from Python and I think the best you get is mutable/immutable objects
13:40:59FromGitter<mratsim> In Python everything is a reference
13:50:52absolutejamTrying to understand (both nim and) nim-prompt - How do I initialise ` StatusBarItem* = tuple[label: string, content: string]`
13:51:02absolutejaman instance of*
13:52:12absolutejamnevermind, I think I found it
14:00:30*rockcavera joined #nim
14:02:22*vlad1777d__ joined #nim
14:02:30*nsf joined #nim
14:02:44*zyklon quit (Read error: Connection reset by peer)
14:06:37*cspar joined #nim
14:06:51*cspar_ quit (Ping timeout: 246 seconds)
14:07:02PMunch(label: "Hello", content: "World")
14:20:04FromGitter<kaushalmodi> absolutejam: I have a bunch of tuple initializing examples here that might help: https://scripter.co/notes/nim/#defining-tuples
14:20:09*zyklon joined #nim
14:22:08*Ven`` quit (Ping timeout: 245 seconds)
14:28:03FromGitter<Clyybber> hmm, anyone experiencing problems with github rn?
14:28:20FromGitter<Clyybber> timesout for me
14:28:27FromGitter<zacharycarter> I don't think so?
14:28:32FromGitter<zacharycarter> actually - nevermind
14:28:38FromGitter<zacharycarter> the build I just ran doesn't depend on github
14:28:48FromGitter<zacharycarter> I'll try a github build in 2 moments
14:29:53FromGitter<zacharycarter> might be more than a moment :/ this redis elasticache cluster is taking a while to provision
14:30:24FromGitter<Clyybber> does the web interface work for you?
14:30:52FromGitter<zacharycarter> yes - I just logged in and poked around some repos
14:31:00*vlad1777d__ quit (Ping timeout: 250 seconds)
14:31:02FromGitter<Clyybber> huh, weird
14:31:10FromGitter<Clyybber> im getting timeouts
14:31:19FromGitter<Clyybber> same with reddit
14:31:28FromGitter<Clyybber> nvrmind reddit just loaded up
14:31:39FromGitter<Clyybber> but github doesn't :/
14:32:33FromGitter<zacharycarter> weird - maybe proxy or firewall or connectivity issues?
14:32:37FromGitter<Clyybber> restarted firefox, works now
14:32:57FromGitter<Clyybber> but my aurhelper couldnt connect either
14:40:03FromGitter<zacharycarter> hmm
14:43:19FromDiscord_<Obstinate> If I have
14:43:19FromDiscord_<Obstinate> var myMap = initTable[int, ref seq[int]]()
14:43:20FromDiscord_<Obstinate> , and I know the seq size needs to be 60, What's the best way to initialize new keys? What I'm doing now:
14:43:22FromDiscord_<Obstinate> if not myMap.hasKey k:
14:43:23FromDiscord_<Obstinate> var s: ref seq[int]
14:43:23FromDiscord_<Obstinate> s.new
14:43:25FromDiscord_<Obstinate> s.newSeq(60)
14:43:26FromDiscord_<Obstinate> myMap.add(id, s)
14:43:29FromDiscord_<Obstinate> I feel like this is super verbose though. In Python, I'd probably just write:
14:43:32FromDiscord_<Obstinate> if k not in myMap:
14:43:34FromDiscord_<Obstinate> myMap[k] = [0]*60
14:43:35FromDiscord_<Obstinate> Is there a better way to do it in nim than what I'm doing?
14:45:32ZevvmyMap = repeat(0, 60)
14:45:41Zevvand, please use a pastbin for snippets
14:47:58FromDiscord_<Obstinate> type mismatch: got (Table[system.int, ref seq[int]], int, seq[int])
14:48:30FromDiscord_<Obstinate> I think it's wanting a ref seq[int] for the final argument
14:50:15FromGitter<mratsim> there is no `*` operator at the moment, but it’s discussed from time to time and we have a rfc iirc
14:50:21Zevvnew myMap[k]
14:50:21ZevvmyMap[k][] = repeat(0, 60)
14:50:23Zevvmight work
14:50:50Zevvthe [] dereferences the ref
14:51:07FromDiscord_<Obstinate> OK. Thanks.
14:51:44*Ven`` joined #nim
14:51:49FromDiscord_<Obstinate> Is there a set of functions like max, min, etc.?
14:52:02FromDiscord_<Obstinate> over collections I mean
14:52:11FromDiscord_<Obstinate> so like max(@[1, 2, 3]) => 3
14:52:12FromDiscord_<Obstinate> ?
14:52:13Araqdon't use 'ref seq'
14:53:16absolutejamAnyone know about the nim-prompt package?
14:54:28ZevvAraq: I was wondering, is there a reason why the async macro does not transform the proc return value to a Future? I added two lines to asyncSingleProc to put prc.params[0] into a Future bracketexpr if it is an ident, and this seems to work just right for me.
14:54:56AraqZevv: we thought it adds clarity
14:55:24Araqand about your interiorPtr problem, this can be caused by your code
14:55:53absolutejamholy shit, there's a Discord too
14:56:00Araq!eval echo max(@[1, 2, 3])
14:56:00NimBotCompile failed: <no output>
14:56:10Araq!eval echo max([1, 2, 3])
14:56:10NimBotCompile failed: <no output>
14:56:14ZevvIt does add clarity, but the {.async.} is a dead giveway about what's happening here.
14:56:16Araq!eval echo max(1, 2, 3)
14:56:16NimBotCompile failed: <no output>
14:56:29Araq!eval echo "test"
14:56:30NimBotCompile failed: <no output>
14:56:40Araq!eval "test"
14:56:40NimBotCompile failed: <no output>
14:56:43ZevvWould something like this be acceptable? http://paste.debian.net/1059559/
14:56:47AraqNimbot is broken
14:57:47AraqZevv: seems arbitrary, why should e.g. system.int not be wrapped in the Future[]?
14:58:19Zevv"something" like this :)
14:58:33ZevvMore like "if it is not a future, then wrap it anyway"
14:59:10absolutejamObstinate: There's the inim package for a repl
15:00:16FromGitter<zacharycarter> it's not a true repl - just letting you know
15:00:19FromGitter<zacharycarter> not that it isn't a neat project
15:00:19FromGitter<mratsim> @Araq there are some ref seq in the stdlib
15:00:28*Ven`` quit (Ping timeout: 250 seconds)
15:00:45FromGitter<zacharycarter> apparently the HCR stuff is usable now - so someone could start experimenting it with it to create a repl
15:00:46absolutejamwell yeah, but it allows you to echo(max(@[2, 10, 5]))
15:00:50absolutejambecause I wanted to know too haha
15:01:04FromGitter<zacharycarter> I'm going to play around with it this weekend - see if I can tie it into my game engine I'm working on
15:01:08FromGitter<zacharycarter> hot code reloading, for the C target
15:01:11FromGitter<zacharycarter> the JS target already has such a feature
15:01:18Araqmratsim: maybe but it's typically a beginner's mistake
15:01:27FromGitter<zacharycarter> iNim re-compiles the code on every change
15:01:36FromGitter<mratsim> I asked you about why you didn’t use {.shallow.} in Iember whch collection
15:02:10FromGitter<zacharycarter> absolutejam: see - https://github.com/nim-lang/Nim/issues/8927
15:03:14FromGitter<mratsim> I don’t remember which collection*
15:03:27ZevvAraq: does it make sense to make a RFC issue for this, or shouldn't I even bother? Also I do not really agree on the clarity. The proc says it returns a Future[T], but result is actually T. That bit me when I first looked into async.
15:03:52*zyklon quit (Read error: Connection reset by peer)
15:04:09Araqmratsim: packedjson
15:04:18FromGitter<mratsim> oh right
15:04:59FromGitter<mratsim> I guess Araq from November 2018 was a beginner then ;)
15:05:16FromGitter<zacharycarter> the last comment in that issue thread is interesting
15:05:19FromGitter<zacharycarter> about LLVM
15:05:42AraqZevv: RFC is ok with me, note that we have an RFC repo now
15:06:32FromGitter<kaushalmodi> absolutejam: From https://github.com/search?utf8=%E2%9C%93&q=prompt+extension%3Animble&type=Code I see only one package using the "prompt" nimble package
15:06:41Araqmratsim: don't mock me, when I use 'ref seq' it's because I have multiple owners and when others use 'ref seq' it's because they are beginners
15:06:41FromGitter<kaushalmodi> So looks like it's fairly new.
15:07:21FromGitter<kaushalmodi> absolutejam: you can find its use in https://github.com/status-im/nim-chronicles-tail/blob/master/ctail.nim. Search for `Prompt.init`
15:07:45FromGitter<mratsim> That was said in jest.
15:08:11Araqquod licet iovi non licet bovi.
15:09:33narimiranZevv: for writing a RFC: https://github.com/nim-lang/RFCs
15:14:42FromDiscord_<Obstinate> If I have a function that's going to do an operation on a hashtable created in a parent function, do I need to do anything in the signature to make sure that the table isn't copied? For example, if I write proc f(h: Table[int, int]), is that going to copy the table?
15:17:05FromDiscord_<Obstinate> interesting . . . does this apply to all non-primitive types? I kind of expected that I would have to write "ptr Table[int,int]" to make this work. I assume primitive types are copied when used as proc arguments? Or maybe that's not defined since you can't assign to proc arguments unless they have var in front of them?
15:18:09leorizeit's undefined in the spec
15:18:34leorizecurrently the compiler copies if the type is smaller or equal to a pointer iirc
15:19:29*zyklon joined #nim
15:19:43FromDiscord_<Obstinate> I see. But from the perspective of the mental model of thinking about proc arguments, the argument is the same entity as the one that was passed, not a copy of it. That's helpful. I assume that taking the address of such an argument would be inadvisable at best?
15:19:46FromGitter<mratsim> smaller than 3x pointer size
15:20:24FromGitter<mratsim> think in terms of mutability, if you need to mutate, pass a var Table, if you don’t need to, pass a Table
15:20:40FromGitter<mratsim> if you need ref semantics, your type should be a ref object
15:21:19FromDiscord_<Obstinate> Where by "need ref semantics," you mean, "need to persist a reference to the passed object"?
15:21:33FromDiscord_<Obstinate> I'm coming from C++ where you need reference semantics if you don't want to take a copy
15:21:48FromDiscord_<Obstinate> But that doesn't seem to apply in nim
15:22:18FromGitter<alehander42> Zevv, do you want to change `proc e(a: int): int` to `proc e(a: int): Future[int]` ?
15:22:21FromGitter<alehander42> please, don't do that
15:22:29FromGitter<mratsim> The cases where you probably need ref semantics are: ⏎ ⏎ 1) your object holds a handler to a non-copiable resource like memory, network connection, database connection ⏎ 2) you need polymorphism [https://gitter.im/nim-lang/Nim?at=5c376335dfe13328202ba9be]
15:23:11absolutejamthanks kaushalmodi
15:23:24absolutejamI'm getting it to work somewhat, but there are features like auto complete that I'm tryin to get working
15:23:40absolutejamI'll happily PR some documentation and examples if I can get it to work
15:23:41FromGitter<mratsim> Nim will optimize parameter passing for value types if they are big and you don’t need to mutate them
15:24:02FromGitter<mratsim> i.e. copy if smaller than 3x pointer size, and passing by const reference otherwise
15:24:09FromGitter<kaushalmodi> absolutejam: 👍
15:26:06FromDiscord_<Obstinate> Does it do the same thing for e.g. let?
15:26:37FromDiscord_<Obstinate> For example if I do let x = table[foo]
15:26:50FromDiscord_<Obstinate> is x a copy of the value at table[foo]?
15:27:09FromDiscord_<Obstinate> Or is it a reference to that value?
15:30:04absolutejamohhhh damn this is pretty now that it's working
15:31:03absolutejamif I import a module that has an import within it, will the imported module do that work for me?
15:31:11absolutejamat least for its namespace
15:31:17absolutejamI need to read up on how the imports work I guess
15:31:40absolutejamSo, module a imports module b for internal use. Is importing module a enough?
15:31:59FromGitter<mratsim> @obstinate, let copies at the moment, until we have destructors+ move semantics implemented
15:32:02FromGitter<kaushalmodi> absolutejam: what do you mean by "enough"?
15:32:15FromGitter<alehander42> absoluejam: yes ⏎ ⏎ but if you want to access directly a name defined in b, you need to import it again
15:32:21FromGitter<alehander42> otherwise you just import a
15:32:28FromGitter<mratsim> though there are some (buggy) optimisations to avoid copy in certain case for seq and strings.
15:32:56FromGitter<mratsim> obviously if “table” is a reference type it copies the reference
15:33:58FromDiscord_<Obstinate> I see. I guess I could use ptr to take the address of the value to avoid the copy . . . but that doesn't work if the table I'm working with is passed as a parameter
15:34:05FromGitter<kaushalmodi> absolutejam: I am not understanding the problem completely
15:34:26FromGitter<kaushalmodi> let's say you are in a.nim where you import b, and in b.nim, you import c
15:34:31FromDiscord_<Obstinate> (What I'm trying to do is iterate over a seq in a map without looking it up a bunch of times)
15:34:33FromGitter<mratsim> @Obstinate, if you’re using a stdlib Table you won’t have a copy.
15:34:36FromGitter<kaushalmodi> then you cannot access stuff from c in a.nim
15:34:40*mbomba joined #nim
15:34:46FromGitter<mratsim> and you can use a TableRef if you want to be sure
15:35:06FromGitter<kaushalmodi> absolutejam: you need to either import c in a.nim as well, or *export* c in b.nim
15:35:09FromDiscord_<Obstinate> @mratsim Nice! Is this a special optimization for the stdlib table?
15:35:20absolutejambasically, if I import module a
15:35:25absolutejamwhich imports module b within itself
15:35:32absolutejamthat is done automatically right?
15:35:42absolutejamI assume it would be, but I just had a bad example
15:35:48absolutejamlet me check
15:35:54*sheerluck quit (Quit: Leaving)
15:36:00FromGitter<kaushalmodi> absolutejam: https://nim-lang.github.io/Nim/manual.html#modules-export-statement
15:36:04absolutejamI imported a module that required me to then import another module for it to work
15:36:17FromGitter<kaushalmodi> hehe, the manual uses the same a b c example; very likely I got it from there :)
15:36:20absolutejambut I wonder if the imported module just missed the import
15:36:24FromGitter<mratsim> no, it’s just that in general, parameter passing doesn’t copy in Nim
15:36:46FromGitter<mratsim> only primitive, cheap types are copied
15:37:20FromDiscord_<Obstinate> Right, but the let will copy, right? Is there a way to introduce an alias for the sequence in the map, so that I can iterate over it without repeated lookups?
15:37:21FromGitter<mratsim> you can always inspect the C/C++ code generated, it in your ~/.cache/nim folder
15:37:29FromGitter<kaushalmodi> absolutejam: you can look at one of my projects: https://github.com/kaushalmodi/ntodo/blob/master/src/ntodopkg/core.nim
15:37:30*absolutejam_phon joined #nim
15:37:52FromGitter<kaushalmodi> notice this in that core.nim: ⏎ ⏎ ```import ./globals ⏎ export globals``` [https://gitter.im/nim-lang/Nim?at=5c3766d054d8bb07cccb4783]
15:38:11FromGitter<kaushalmodi> I do that so that wherever I `import core`, I also get stuff from `global` for free
15:38:29FromGitter<mratsim> @obstinate, 2 ways: use a pointer: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/data_structure.nim#L196-L201 ⏎ ⏎ Or a shallow copy: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/data_structure.nim#L104-L107
15:38:50*absolutejam_phon quit (Read error: Connection reset by peer)
15:40:27*floppydh quit (Quit: WeeChat 2.3)
15:40:47FromGitter<mratsim> what I would do is `let seqAdr = table[myIndex].addr` and `for i in seqAdr[]: foo()`
15:41:32FromGitter<mratsim> but this would not look uple time either: ⏎ ⏎ `for i in table[myIndex]: foo()`
15:41:59FromGitter<mratsim> and if you want to mutate in place, use mget: https://nim-lang.org/docs/tables.html#mget%2CTable%5BA%2CB%5D%2CA
15:42:11ZevvYay, RFC 0001 :)
15:42:47FromDiscord_<Obstinate> I see. Hrm.
15:43:05FromDiscord_<Obstinate> So the addr approach works if it's a map I can take an address of
15:43:08FromGitter<kaushalmodi> Zevv: ?
15:43:15FromGitter<mratsim> yes
15:43:17FromGitter<kaushalmodi> there are already 80 RFCs there
15:43:17FromDiscord_<Obstinate> But I can't take the address of a table passed as a parameter
15:43:23FromGitter<mratsim> unsafeAddr
15:43:37ZevvYeah but mine seems to be the first one in the new RFC repo
15:43:53ZevvSo I took the liberty to prefix the name with "0001" :)
15:43:55FromDiscord_<Obstinate> Sure, I meant safely. Although the operation I'm doing is actually safe
15:44:01FromGitter<kaushalmodi> Zevv: ah, I see :)
15:44:52FromGitter<mratsim> @Obstinate, if you have some pseudocode I can show you the Nim way and efficient way as well.
15:45:10FromGitter<mratsim> There is probably no need to work at the address level but I would have to see the code first
15:45:25FromDiscord_<Obstinate> I'll put the whole thing I'm doing in a gist.
15:46:09FromDiscord_<Obstinate> https://gist.github.com/jaguilar/b62fd28830a67ff2ae9176e36665ceb8
15:46:41FromDiscord_<Obstinate> efficiency is not *actually* important here. I'm just trying to understand what Nim is actually doing
15:47:01FromGitter<mratsim> GuardSchedule is a seq of int?
15:47:11ZevvAh, picking up on your AoC, right :)
15:47:25*s3govesus joined #nim
15:47:38*absolutejam_phon joined #nim
15:48:04narimiranZevv: congrats on being our first :D
15:48:07FromGitter<mratsim> Nim won't copy the "guards: Table"
15:48:23Zevvthanks. I hope it makes any sense, though.
15:48:43FromDiscord_<Obstinate> Yeah I'm on paternity leave and I've been wanting to check nim out
15:48:44FromGitter<alehander42> Zevv: congrats for the RFC
15:48:59FromGitter<mratsim> let bestGuardSchedule = guards[bestGuard] <— this copies the seq though.
15:49:01FromGitter<alehander42> :D 0001 is nice, you leave digits for quite a few more
15:49:06*absolutejam_phon quit (Read error: Connection reset by peer)
15:49:10FromDiscord_<Obstinate> Yeah, that's the particular thing I want to understand how to do better
15:49:32FromDiscord_<Obstinate> In most other languages I know how to make that not be a copy, but I don't know how in nim
15:49:50FromGitter<alehander42> Zevv: there was a similar idea in the tracker 1 or 2 years ago, but i couldn't find a link
15:50:17FromGitter<mratsim> in Nim basically: parameter passing only copies cheap primitive types
15:50:50FromGitter<kaushalmodi> Zevv: Are you used to creating git patch files and submitting via email?
15:51:05FromGitter<mratsim> `let` always copy the shallow level (if ref type it copies the reference, if pointer it copies the pointer)
15:51:20FromGitter<mratsim> only exception is for strings and seq builtin types where copy is deep.
15:51:31FromGitter<mratsim> (i.e. they have value semantics)
15:51:35ZevvObstinate: I must admit this is one of my issues with Nim still. In other languages I often like to make 'convenience' references to avoid a lot of code repetition if I'm doing stuff in a deep type, like "guards[0].state.sleep.time = 1; guards[0].state.awake.time = 3". You can't just say "let s = guards[0].state" and then mutate things in "s". And I'm still not sure if there is a good idiom for this in Nim.
15:52:01FromGitter<mratsim> template s = guards[0].state
15:52:08Zevvyou say
15:52:33FromDiscord_<Obstinate> mratsim: really?
15:52:35FromGitter<alehander42> haha, crafty
15:52:36*Zevv is off to refactor tons of code
15:52:50FromGitter<mratsim> yeah really :P template is code substitution
15:52:58FromGitter<kaushalmodi> Zevv: ok, thought so, because https://git-scm.com/docs/git-format-patch (search for `0001-`)
15:53:01Araqboth template and 'addr' is ok for this
15:53:02FromGitter<mratsim> maybe you need template s: untyped = foo, but yeah
15:53:30FromDiscord_<Obstinate> OK. Interesting. But if it's just code substitution, doesn't that induce the lookup on each access?
15:53:37AraqI usually use helper procs though that take a 'var T' parameter
15:53:43FromGitter<mratsim> compile-time code substitution
15:53:44FromDiscord_<Obstinate> Meaning I 'm doing 60 hashtable lookups?
15:53:56Araqyeah you do
15:53:59FromGitter<mratsim> tdress in hat case
15:54:04FromGitter<mratsim> take the address*
15:54:08FromGitter<mratsim> my keyboard ...
15:54:09FromDiscord_<Obstinate> And address doesn't work unless I pass a var parameter
15:54:11FromDiscord_<Obstinate> Right?
15:54:16FromGitter<mratsim> unsafeAddr
15:54:21Zevvkaushalmodi: sorry?
15:54:25AraqunsafeAddr always works
15:54:27FromDiscord_<Obstinate> Right, I'm trying to restrict myself to the safe part of the language
15:54:47FromDiscord_<Obstinate> (I assume that's a best practice since otherwise it wouldn't be called unsafe)
15:54:49FromDiscord_<Obstinate> ?
15:54:54Araqan 'alias' instruction would be nice to have
15:54:57FromGitter<kaushalmodi> Zevv: Nevermind, I just thought that you might be familiar with the git format patch flow as you have your RFC prefixed with 0001-, that's all
15:54:59FromGitter<kaushalmodi> :)
15:55:11FromGitter<mratsim> addr is not allowed for non-var to prevent people escaping or mutating an immutable let variable
15:55:19Araqbut hey, some things need to be left for Nim v2
15:55:30FromDiscord_<Obstinate> Araq: true true
15:55:36FromGitter<kaushalmodi> Zevv: emailing git formatted patch files is grandfather of GitHub PR's and all
15:56:04AraqZevv: a helper proc that takes a 'var T' is safe and can be hidden in a template/macro
15:56:14FromGitter<mratsim> I’d love an alias, but that’s what template are for, it’s just that template is a bit long to type.
15:56:21ZevvAh yes of course. There should be some of my code in the linux kernel somewhere, but that was only a single patch, so no prefixes there
15:56:26FromGitter<kaushalmodi> Zevv: taking your PR as example, a patch file looks like this: https://patch-diff.githubusercontent.com/raw/nim-lang/RFCs/pull/83.patch :)
15:56:32ZevvAraq: true, thanks for that
15:56:37Araqbut if you hide it you might as well use an unsafeAddr
15:56:40FromGitter<mratsim> Can we have `tpl` as a keyword :P
15:56:48*absolutejam_phon joined #nim
15:57:31*absolutejam_phon quit (Read error: Connection reset by peer)
15:58:37Araqmratim: Zahary wants to allow var x: var T = expression instead but IMO that's ugly ;-)
15:58:52FromGitter<mratsim> ugh yeah
15:59:11FromGitter<zah> ugly, but useful :P
15:59:27FromGitter<mratsim> welcome to Rust ? ;)
15:59:37Araqalias x = expression ? full builtin, new keyword even
15:59:46FromGitter<kaushalmodi> narimiran: Why are some pages on the Nim website written almost in HTML?
15:59:59FromGitter<mratsim> maybe nim rst2html?
16:00:12narimirani have no idea why, i just inherited it the way it is :)
16:00:25FromGitter<kaushalmodi> no, they are a blend of some Jekyll templating and HTML and *gasp* content
16:00:33FromGitter<mratsim> composition > inheritance @narimiran ;)
16:00:46FromGitter<zah> Araq, sometimes, I'm going to use it like this: ⏎ ⏎ ```var x: forwardType(foo()) = foo() ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5c376c2def78da1bcedcd014]
16:00:58narimiranbtw, for you who weren't here this morning — we have a new page with learning resources: https://nim-lang.org/learn.html
16:01:10FromGitter<Clyybber> what would var x: var T mean?
16:01:15narimiranif you think that something needs to be added, let me know
16:01:33narimiran(nim notes, and rosetta code were already mentioned, and will be included)
16:02:02AraqClyybber: it takes the 'var T' parameter type and applies consistently to a 'var'iable
16:02:05FromGitter<kaushalmodi> narimiran: yay! thanks. I thought the notes didn't meet the bar
16:02:15FromGitter<zah> code like the above would be harder to write if there is a new required keyword. there might be a new alternative syntax though
16:02:34FromGitter<mratsim> btw regarding aliases, for types: do we want to allow “let”, currently we have type and const - https://github.com/nim-lang/Nim/issues/10004
16:02:49FromGitter<mratsim> ^ easy issue to close if it’s not allowed
16:02:51narimiran@kaushalmodi no, it is that there are lots of things *somewhere*, and i just forgot all the places i need to look for
16:05:03FromGitter<kaushalmodi> narimiran: Do you know if Jekyll allows data files?
16:05:04*zyklon quit (Read error: Connection reset by peer)
16:05:12narimiranno idea, sorry
16:05:26*cspar_ joined #nim
16:05:34FromGitter<kaushalmodi> ok
16:05:35FromGitter<Clyybber> @Araq > applies consistently to a 'var'iable ⏎ Does that mean I could define types that could only be used for 'var'iables?
16:05:46*mbomba left #nim ("WeeChat 1.4")
16:06:05Araqit's just more of T& if you know C++
16:06:57*cspar quit (Ping timeout: 252 seconds)
16:07:00FromGitter<kaushalmodi> Just in case anyone knows Jekyll well, the learn page's content should probably be moved to a separate "data" file like this: https://github.com/kaushalmodi/ox-hugo/blob/master/doc/data/users.toml (could be TOML/JSON/CSV/..) and have the template file just loop through it
16:07:16FromGitter<kaushalmodi> I use that data file to generate https://ox-hugo.scripter.co/doc/examples/ using Hugo
16:08:25Araqwe don't use Jekyll well, we replaced the .tmpl Nim based website with Jekyll because of reasons
16:08:26FromGitter<mratsim> A static web site generator in Nim similar to Hugo, Gatsby, Jekyll would be nice
16:08:48Araqwe had it, it got butchered.
16:09:06FromGitter<Clyybber> @Araq Any examples of what use cases would it enable? ⏎ I can't really follow tbh :D
16:10:04FromGitter<kaushalmodi> @mratsim I have heard of https://github.com/h3rald/hastysite
16:10:41FromGitter<kaushalmodi> But seriously I just Hugo as one of the best static site gens. It has a single statically built binary that Just Works (TM).
16:11:00FromGitter<kaushalmodi> I now see it as a common CLI utility along the likes of diff, cp, etc
16:11:31FromGitter<kaushalmodi> s/I just/I see
16:12:14AraqClyybber: basically a variant of Delphi's 'with' statement
16:12:32AraqJavascript also has it iirc
16:13:23*absolutejam_phon joined #nim
16:13:38*absolutejam_phon quit (Read error: Connection reset by peer)
16:14:03FromGitter<mratsim> Excel too :P
16:14:23Araqright, VB also has it
16:14:26*absolutejam_phon joined #nim
16:14:54*absolutejam_phon quit (Read error: Connection reset by peer)
16:15:02FromGitter<mratsim> @kaushalmodi seems like I heard about it because I have it starred, but I completely forgot about it :D
16:15:45FromGitter<mratsim> https://github.com/segmentio/metalsmith is also very short for a static webpage comiler
16:15:46Araqhmm so Pascal had a typesafe borrowing mechanism in 1980. I'm not surprised
16:16:29Araqyou don't need any new tool at all, use the Nim .tmpl template file mechanism
16:16:32*PMunch quit (Remote host closed the connection)
16:16:45FromGitter<Clyybber> Isn't Delhi's with statement more like `using` in Nim, a syntactic sugar? I have a feeling I'm thinking of the wrong thing.
16:17:10*absolutejam quit (Ping timeout: 250 seconds)
16:19:01AraqModula 2 also had it, https://www.modula2.org/reference/withstatements.php
16:19:09*cspar_ quit (Ping timeout: 246 seconds)
16:20:43AraqClyybber: in a way it's "evaluate once" sugar
16:21:18*zyklon joined #nim
16:21:48*vegax87 quit (Ping timeout: 252 seconds)
16:23:14FromGitter<Clyybber> How is `var x: var T = expression` similar to that though?
16:23:52Araqwith expression: field = 4
16:24:03Araqvar x: var T = expression; x.field = 4
16:25:00FromGitter<Clyybber> Ah, ok got it. I feel so dumb now...
16:25:24FromGitter<Clyybber> But I agree that an alias keyword is a bit more beautiful
16:25:34Araqwhat is not named cannot escape its stack frame.
16:25:44Araqthese constructs are only similar.
16:26:05Araqthe Pascal variant sucks in readability but you don't need a borrow checker
16:30:03*cspar joined #nim
16:41:06Araq(of course, it also helps that Pascal lacks growable arrays)
16:43:48*narimiran quit (Ping timeout: 245 seconds)
16:44:53*absolutejam_phon joined #nim
16:45:20*absolutejam_phon quit (Read error: Connection reset by peer)
16:56:43*cspar quit (Ping timeout: 246 seconds)
16:56:50*cspar joined #nim
16:57:12*vegax87 joined #nim
17:02:28*nsf quit (Quit: WeeChat 2.3)
17:05:38FromGitter<Clyybber> @Araq Is there a difference between `var x: var T = ...` and `var x: T = ...` ?
17:07:06*ng0 joined #nim
17:08:50*rockcavera quit (Remote host closed the connection)
17:11:39*Trustable joined #nim
17:12:39Araqvar x: T = f() produces a copy/move, it's not a view into the data
17:13:26*darithorn joined #nim
17:14:55*absolutejam_phon joined #nim
17:15:16*shpx joined #nim
17:16:05FromGitter<Clyybber> Neat
17:17:50*absolutejam_phon quit (Read error: Connection reset by peer)
17:25:24*kapil____ quit (Quit: Connection closed for inactivity)
17:26:20*absolutejam_phon joined #nim
17:26:38*lritter joined #nim
17:26:38*absolutejam_phon quit (Read error: Connection reset by peer)
17:39:15*Tyresc joined #nim
17:40:12FromGitter<Clyybber> @Araq Regarding https://github.com/nim-lang/Nim/pull/9150 , what new ambiguities could it lead to?
17:40:35FromGitter<Clyybber> The PR enables really cool features, don't you agree?
17:42:53FromGitter<skellock> hello! was wondering if anyone else is experiencing a `nimble update` ssl error on `devel` on osx 10.14.2 ( libressl 2.6.5). `stable` works great, just not `devel`. i can dig in, but wanted to yell down the rabbit hole first before jumping.
17:44:45FromGitter<kaushalmodi> @skellock wild guess .. may be related to https://github.com/nim-lang/Nim/commit/3ed833198b95e74de29d2b0905247ead52478aa3 and https://github.com/nim-lang/Nim/commit/21078798ead6f6ba107102913cd26970ef957e9d ?
17:45:07FromGitter<kaushalmodi> .. or may be not
17:45:14FromGitter<kaushalmodi> you are dealing with `nimble update` right?
17:45:31FromGitter<skellock> correct, and thx for those links!
17:50:19FromGitter<Clyybber> @narimiran https://github.com/nim-lang/Nim/issues/5645 seems to be fixed
17:58:46*absolutejam_phon joined #nim
17:59:06*absolutejam_phon quit (Read error: Connection reset by peer)
17:59:43*Marumoto joined #nim
18:01:01*absolutejam_phon joined #nim
18:01:04*absolutejam_phon quit (Read error: Connection reset by peer)
18:03:48*absolutejam_phon joined #nim
18:03:57*absolutejam_phon quit (Read error: Connection reset by peer)
18:04:20AraqClyybber: it would require an RFC and a spec update first
18:04:52Araq"enables cool features" doesn't cut it anymore
18:07:20*zyklon quit (Read error: Connection reset by peer)
18:08:02FromGitter<Clyybber> Sadly Lemonboy seems to have disappeared, so he can't write an RFC.
18:08:41Araqyeah he is missed
18:11:44FromGitter<skellock> @kaushalmodi definitely a linking issue on my env ... i had libressl installed (due to playing with the pony lang) and was some how a problem. i removed libressl and `choosenim update devel` and everything works. thx again.
18:17:35FromGitter<Clyybber> Hmm, the move to an RFC repo seems to have backfired, since the purpose of RFC is to receive comments/discussion, but the RFC repo is really unknown to most people it seems.
18:19:58Araqwe need to announce it again
18:20:13Araqand link to it from everywhere else
18:21:44FromGitter<kaushalmodi> Won't it be tedious to update the RFC md file?
18:21:59FromGitter<kaushalmodi> so the comments on that RFC .md file will live in the Issues?
18:22:09FromGitter<alehander42> github has web ui for that
18:22:15FromGitter<alehander42> not harder than an issue
18:22:40FromGitter<kaushalmodi> you mean just comment inline on specific line numbers on the md file?
18:23:00FromGitter<alehander42> you can edit files directly on github
18:23:11FromGitter<alehander42> (about update)
18:23:15FromGitter<kaushalmodi> but you need commit rights
18:23:28FromGitter<kaushalmodi> else each comment will be a new PR
18:23:38FromGitter<alehander42> but you update the file in your PR technically
18:24:23FromGitter<kaushalmodi> ok, can you edit your own PR from GitHub webui (never tried that)
18:24:34*zyklon joined #nim
18:24:36FromGitter<alehander42> i guess so :D
18:24:39FromGitter<alehander42> not too sure
18:24:54FromGitter<kaushalmodi> still.. this physical md file idea looks convoluted
18:25:06FromGitter<kaushalmodi> you cannot quickly edit/review your changes as you do in issues
18:25:27FromGitter<kaushalmodi> Not that I have filed any RFCs till date, but this flow seems too convoluted
18:25:30FromGitter<Clyybber> I agree, especially since github has a feature now, where you can view the edit history of an issue
18:25:46FromGitter<kaushalmodi> like the version of Sharepoint/Confluence from corporate entering this project :P
18:25:54FromGitter<alehander42> so, you think that having the rfc-s directly as issues would be better?
18:25:59FromGitter<kaushalmodi> yep
18:26:06FromGitter<Clyybber> @kaushalmodi Look at ponyc for an example how the sytem can fail
18:26:09FromGitter<alehander42> and eventually saving them as documents when they are accepted
18:26:33Araqpreviously this "I updated the RFC, please have a look" was a minor problem
18:26:34FromGitter<kaushalmodi> @Clyybber which system are you referring to?
18:26:48ZevvWell, as the proud author of RFC #0001, I can say I like the process. Authoring a small document instead of just jotting something down in a form forces you to sit on your hands and hink before you type.
18:26:52Araqwhich hints that these things should be version conrtolled
18:27:01*xet7 quit (Quit: Leaving)
18:27:08FromGitter<Clyybber> @kaushalmodi https://github.com/ponylang/rfcs
18:27:12Araq^ what Zevv said was also our intention
18:27:15ZevvAnd with updates to the document the history is preserved
18:27:31FromGitter<Clyybber> @Zevv Yeah thats a real advantage
18:27:41Araqnote that RFC != feature request
18:27:57Araqsome feature requests are simple and don't require a full RFC
18:28:36FromGitter<Clyybber> Hmm, what makes https://github.com/nim-lang/Nim/pull/9150 require an RFC?
18:28:51*xet7 joined #nim
18:28:58FromGitter<kaushalmodi> @Clyybber why do the discussions happen on the ponylang RFCs?
18:29:05FromGitter<kaushalmodi> s/why/where
18:29:11FromGitter<alehander42> Araq, thanks for the membership (kind hard to see in github: i am not sure it sends notifications at all)
18:29:34FromGitter<alehander42> otherwise RFC-s should take a bit of work indeed
18:29:38Araqthere is a spec dealing with overloading, subtyping etc. pull/9150 doesn't address anything of that
18:30:15Araqand yes, the implementation has bugs and the spec is often much too terse
18:30:49Araqbut that cannot justify to just add more undocumented typing rules
18:30:54FromGitter<alehander42> i imagine them to describe bigger / impactful changes which will require a nontrivial amount of compiler work, so they need to "pay" a min price in being well described/clear/detailed
18:30:55FromGitter<Clyybber> Ok, makes sense
18:32:07FromGitter<Clyybber> @kaushalmodi They comment on the PR's which are the RFC's. They use the issues of that repo to request RFC's, which is very weirdly convoluted IMO.
18:32:14Araqbesides, I can argue that this form of overloading is against the purpose of overloading.
18:32:40FromGitter<Clyybber> bb
18:32:47FromGitter<kaushalmodi> @Clyybber So a PR getting merged means the RFC got accepted?
18:32:52FromGitter<Clyybber> Yeah
18:33:08FromGitter<kaushalmodi> OK, that makes sense
18:33:11FromGitter<kaushalmodi> thanks
18:33:16FromGitter<Clyybber> But that doesn't mean it gets implemented.
18:33:56FromGitter<Clyybber> The coordination between RFC and Implementation does not go hand in hand there.
18:34:11FromGitter<Clyybber> I feel like thats the biggest problem with such a RFC system
18:36:26*xet7 quit (Quit: Leaving)
18:36:47*absolutejam joined #nim
18:50:08*wildlander joined #nim
18:51:44*krux02 quit (Remote host closed the connection)
18:52:28absolutejamhttps://github.com/nim-lang/RFCs/issues/48 looks nice from what I was asking earlier
18:52:46absolutejamopened the tab earlier but didn't get chance to read
18:53:55absolutejamis there a way to list an object's properties?
18:54:01absolutejamlike dir() in Python
18:58:08Zevvor fieldPairs()
18:58:29absolutejamooh ty, I'll test in a min
18:58:46Zevvnevermind the imports in that snippet, I just happened to have that file open
19:00:59*nsf joined #nim
19:01:11*narimiran joined #nim
19:04:50*rockcavera joined #nim
19:17:02narimiran"What should be in the Python standard library?" https://lwn.net/SubscriberLink/776239/9abcd828e0178429/
19:17:02*zyklon quit (Read error: Connection reset by peer)
19:21:46*absolutejam quit (Ping timeout: 250 seconds)
19:23:40*absolutejam_phon joined #nim
19:23:59Zevvgood question
19:24:03*absolutejam_phon quit (Read error: Connection reset by peer)
19:25:03Zevv" No firm conclusions were drawn in the discussion, but part of the underlying problem seems to be a lack of clarity on what the purpose of the standard library is."
19:27:30*absolutejam_phon joined #nim
19:27:51*absolutejam_phon quit (Read error: Connection reset by peer)
19:28:02*xet7 joined #nim
19:31:36*absolutejam joined #nim
19:33:47*zyklon joined #nim
19:38:21absolutejamis `foo=`(bar: MyType) really the best syntax for a 'setter' :[
19:39:08ZevvI don't know, what would you like instead?
19:39:11narimiranabsolutejam: a better way is to not use getters and setters ;) and even better than that: don't use OOP ;)
19:40:39absolutejamI just think the backticks make it a little cumbersome *shrug*
19:41:16absolutejamI know they have to be there for it to be valid
19:42:54*nsf quit (Quit: WeeChat 2.3)
19:43:48*cspar quit (Ping timeout: 245 seconds)
19:49:26absolutejamcan I compile static assets into my binary?
19:50:32FromDiscord_<exelotl> absolutejam: hah I spent a lot of time trying to figure this out :')
19:53:17Zevvabsolutejam: You mean like assets from disk?
19:53:28absolutejamyeah, json files
19:53:45Zevvno problem
19:53:55Zevvyou can just readFile into a const
19:54:02zestyryou can also use this https://github.com/xmonader/nimassets
19:54:31FromDiscord_<exelotl> there's also staticRead: https://nim-lang.org/docs/system.html#staticRead%2Cstring
19:55:18Zevvhow is staticread different from readfile?
19:55:25*cspar joined #nim
19:56:33zestyris it just me, or did the search feature on the nim docs stop working? tried with two different browsers
19:57:02FromDiscord_<exelotl> Zevv: one difference is that it doesn't depend on the OS, which happens to be useful in my case
19:57:20FromDiscord_<exelotl> as in you can staticRead with --os:standalone
20:08:45*BigEpsilon quit (Quit: WeeChat 2.3)
20:12:15*LargeEpsilon quit (Ping timeout: 252 seconds)
20:16:12*Baba2 joined #nim
20:16:34*Marumoto quit (Remote host closed the connection)
20:28:26*baba3 joined #nim
20:29:01*Baba2 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
20:31:16*Ven`` joined #nim
20:36:20FromDiscord_<moerm> hello
20:42:19*Marumoto joined #nim
20:42:52FromDiscord_<exelotl> yo
20:51:32FromGitter<dom96> Zevv: you can't readFile into a constant. You need to use staticRead
20:52:23*zyklon quit (Read error: Connection reset by peer)
20:57:14Zevvehm. I can
20:57:25Zevvworks just fine?
21:00:27*Ven`` quit (Ping timeout: 240 seconds)
21:00:29*tiorock joined #nim
21:00:29*rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
21:00:29*tiorock is now known as rockcavera
21:00:34*baba3 quit (Ping timeout: 250 seconds)
21:01:57rayman22201I see the conspiracy now! @narimiran makes a cool new learn page on the website, and secretly removes dochack.js because he dislikes my doc search code so much :-P
21:02:27dom96Zevv: Really? Can you show me the code?
21:04:16rayman22201The problem with dochack.js is that the path is wrong. It's set to "https://nim-lang.org/docs/dochack.js" and it should be "https://nim-lang.org/dochack.js"
21:04:38rayman22201This feels like deja vu... somehow
21:05:14dom96Araq: Why does readFile now work with const?
21:05:22rayman22201I think @kaushalmodi fixed it last time. I'm not sure
21:06:04Zevvfcb5cdcc May 24 2016: "Add ``readFile`` implementation for nimvm"
21:07:44narimiranrayman22201: shit, you got me :P
21:08:14narimiranbtw, thanks! (i'll take 'cool' as the compliment :))
21:08:28dom96Okay, so having it at compile-time does make sense
21:08:43rayman22201definitely is a compliment @narimiran!
21:09:01dom96Nice to see new people around here, welcome everyone :)
21:09:10*zyklon joined #nim
21:09:18narimirandom96: it worked even year ago
21:09:31narimirani remember using it like that for AoC 2017
21:09:46dom96narimiran: yes, zevv posted the commit above
21:09:54FromGitter<kaushalmodi> rayman22201: Yes, I had moved dochack.js at the site root
21:10:02FromGitter<kaushalmodi> it's still at https://nim-lang.github.io/Nim/dochack.js in devel docs
21:10:24narimiran@kaushalmodi that broke our searches
21:10:33oculux@dom96; thank you for the warm welcome :)
21:10:42FromGitter<kaushalmodi> narimiran: ?
21:10:47FromGitter<kaushalmodi> the search is working too
21:10:51narimiranit is not
21:10:53rayman22201not on the main site
21:10:55narimiranclear your cache
21:11:15narimiranit is working for dev docs, but not for 0.19.2 docs
21:11:46FromGitter<kaushalmodi> the location of that .js is correct
21:11:51Zevvhttps://nim-lang.org/docs/manual.html is not working indeed
21:12:01FromGitter<kaushalmodi> whatever is generating the .js link reference needs to be fixed
21:12:09FromGitter<kaushalmodi> *digging up that issue ATM*
21:12:17*absolutejam quit (Quit: WeeChat 1.9.1)
21:12:18rayman22201The location is fine, but the nim-lang.org version of the site generated an incorrect link path.
21:12:29narimiranmaybe it is fixed in devel but it needs to be backported to 0.19 branch?
21:12:34Zevvspeaking of the search - I feel that since the fuzzy algorithm the search results are very noise. Is that just me?
21:13:23rayman22201I know. I had started work with @timotheecour a few months ago to make it better. But the scope got big and I didn't have enough free time to finish it over the holidays.
21:13:24FromGitter<kaushalmodi> rayman22201: yes
21:13:32FromGitter<kaushalmodi> the referenced issue: https://github.com/nim-lang/Nim/issues/9104#issuecomment-425508998
21:14:00FromGitter<kaushalmodi> Earlier the dochack reference link was `<script type="text/javascript" src="../dochack.js"></script>`
21:14:17FromGitter<kaushalmodi> but https://nim-lang.github.io/Nim/ is the root of devel docs
21:14:25FromGitter<kaushalmodi> so no `../` reference is possible from there
21:14:59Zevvrayman22201: thats how these things go. I think it would be great if there was a clear disticnction between literal matches and fuzzy matches. If I type "sett" I now get stuff with set[T] in the argument list...
21:15:38narimiranZevv: typing sett and getting set[T] is great! i had some veeery weird results
21:15:51rayman22201@kuashalmodi, so maybe your fix just needs to be backported?
21:16:12FromGitter<kaushalmodi> @narimiran the thing to debug and fix is that if https://nim-lang.github.io/Nim/dochack.js exists, why doesn't https://nim-lang.org/docs/dochack.js ?
21:16:39FromGitter<kaushalmodi> some script should be copying the dochack.js to https://nim-lang.org/docs/ when deploying
21:16:42rayman22201dochack.js exists, but it got put in the root directory
21:17:03narimiran@kaushalmodi (oh, rayman22201 was quicker)
21:17:05FromGitter<kaushalmodi> hmm understood
21:17:57FromGitter<kaushalmodi> so on devel docs, the landing page index.html and dochack.js are in the same dir
21:18:17narimiran@kaushalmodi, since you made your changes, can you make a PR to *version-0-19* branch which will fix this?
21:18:26rayman22201@zevv the results were designed to be a bit more noisy on purpose, since it was designed to help newbies who didn't know exactly what they wanted. But, doing that brought up more fundamental issues with how the search is currently implemented, thus the weird unexpected results.
21:19:29narimiranrayman22201: make it less noisy please :) now it is bad for newbies and not-so-newbies :P
21:19:37ZevvNo problem. I mostly Ctrl-F myself through the index these days.
21:19:40FromGitter<kaushalmodi> narimiran: the issue is with the nim-lang.org deployment
21:20:01rayman22201Here is the issue where the fix was being discussed: https://github.com/nim-lang/Nim/issues/9462
21:20:02FromGitter<kaushalmodi> some script is moving all the doc HTML files to the `docs/` subdir, except the dochack.js
21:21:00FromGitter<kaushalmodi> narimiran: can you point me to the website deployment script?
21:22:51*zyklon quit (Read error: Connection reset by peer)
21:23:14narimiran@kaushalmodi i'm *guessing* tools/kochdocs :/
21:23:33FromGitter<kaushalmodi> narimiran: If you do `koch docs` locally and open any html file from `doc/html/`, the search will work
21:24:11Zevvoh that's good to know, handy for working offline
21:24:38narimiranso basically we just need to move dochack.js on the server to a correct subdir?
21:25:09FromGitter<kaushalmodi> narimiran: yes
21:25:19FromGitter<kaushalmodi> I don't think that script is in the Nim repo
21:25:32FromGitter<kaushalmodi> Araq would know which script is doing the actual site deployment
21:25:44narimiranmaybe dom96 can do that manually so this is promptly resolved?
21:25:53FromGitter<kaushalmodi> because the dochack.js is in the same dir as other html pages (1) locally (2) devel docs
21:26:05FromGitter<kaushalmodi> but something different is happening for nim-lang.org, which I don't know
21:26:31narimirandom96: if you didn't read the above discussion, dochack.js needs to be moved from https://nim-lang.org/dochack.js to https://nim-lang.org/docs/dochack.js
21:26:45rayman22201It definitely appears that something different is happing on nim-lang.org. I just built locally and it works fine.
21:27:35FromGitter<kaushalmodi> rayman22201: of course!
21:27:46FromGitter<kaushalmodi> one of the reasons for my PR was the search wasn't working locally :P
21:28:04FromGitter<kaushalmodi> because it looked for dochack.js in `../` where there was nothing
21:28:04dom96I'm willing to be that's an old dochack.js file
21:28:28dom96Someone needs to make a PR to ensure dochack.js gets put in the right place when docs are generated
21:28:51FromGitter<kaushalmodi> dom96: it *is* in the right place
21:28:53FromGitter<kaushalmodi> see https://nim-lang.github.io/Nim/dochack.js
21:28:55rayman22201lol. fair enough @kuashalmodi. I just wanted to sanity check.
21:29:01narimirandom96: it seems that's already the case, but just on server it isn't
21:29:07FromGitter<kaushalmodi> but that .js disappears on nim-lang.org
21:29:30FromGitter<kaushalmodi> for now, @dom96 can you copy https://nim-lang.github.io/Nim/dochack.js to https://nim-lang.org/docs/dochack.js ?
21:29:38narimiran@kaushalmodi hmmm, maybe https://github.com/nim-lang/Nim/pull/9110 needs to be backported?
21:30:04dom96I'm so confused
21:30:08dom96How is it in the right place?
21:30:19narimiran@kaushalmodi can you try to build docs from 0.19 branch and see if it is correct or not?
21:30:36FromGitter<kaushalmodi> dom96: that PR is backported, looking at `view-source:https://nim-lang.org/docs/tut1.html`
21:30:51FromGitter<kaushalmodi> the dochack.js reference has the `../` removed
21:31:24FromGitter<kaushalmodi> wrong mention above, meant to ping narimiran
21:32:05narimiranyeah, true
21:32:30dom96okay, I think I get the problem
21:32:57rayman22201the script link just has no path at all, which defaults to the current directory.
21:33:01dom96should be fixed
21:33:28narimiranwooohooo, fixed!!
21:33:40rayman22201the question is, how can we make sure the deploy script puts dochack.js in the right spot automatically from now on, so we don'thave deja vu again?
21:33:40FromGitter<kaushalmodi> I didn't get it
21:33:46FromGitter<kaushalmodi> then how does devel docs work?
21:34:46FromGitter<kaushalmodi> looking at https://github.com/nim-lang/Nim/blob/version-0-19/tools/kochdocs.nim#L334-L352, the dochack.js file copying change is also backported
21:35:07narimirandom96: so you have an idea why it was in the wrong place?
21:35:13rayman22201still not working for me, but it might take a minute to propogate through the interwebs
21:35:36dom96narimiran: guessing the location changed via some commit but where the file is generated didn't get changed?
21:36:32FromGitter<kaushalmodi> https://nim-lang.org/docs/dochack.js exists now, thanks
21:36:45FromGitter<kaushalmodi> *but still not sure why that file didn't get copied earlier*
21:36:52FromGitter<kaushalmodi> so this issue is bound to repeat :)
21:37:26FromGitter<kaushalmodi> @dom96 So the stable docs are at https://nim-lang.org/docs/
21:37:47FromGitter<kaushalmodi> so some script is copying the docs to that `docs/` subdir; `kochdocs.nim` is not doing that
21:37:50FromGitter<kaushalmodi> so who is?
21:37:54*Trustable quit (Remote host closed the connection)
21:38:06dom96yes, so that's why I said somebody needs to fix this using a PR :P
21:38:07FromGitter<kaushalmodi> that script is probably copying just `*.html` files and leaving out the `*.js`?
21:38:17FromGitter<kaushalmodi> dom96: where is that script?
21:38:57dom96it's koch IIRC
21:39:04dom96see what `koch docs` does
21:39:06FromGitter<kaushalmodi> `buildDocs` proc in `tools/kochdocs.nim` is doing the right thing because the devel docs and local docs work fine
21:40:26narimirani'm off to bed. hopefully you guys will figure out the details. bye
21:41:00*zyklon joined #nim
21:41:21FromGitter<kaushalmodi> @dom96 koch docs is saving the html and js files to `doc/html`. See https://github.com/nim-lang/Nim/blob/ab425d793af1a5c0b221bfbeab382b4781479c63/tools/kochdocs.nim#L10
21:41:54FromGitter<kaushalmodi> some other script that I cannot find is then moving stuff to the "docs" subdir on nim-lang.org
21:43:15FromGitter<kaushalmodi> @dom96, Araq: In short how is nim-lang.org/docs updated? which script do you use?
21:43:24FromGitter<kaushalmodi> once we look at that script, this issue will be solved
21:45:10dom96I don't think there is any script
21:45:14dom96it's just uploaded manually
21:45:35*narimiran quit (Ping timeout: 244 seconds)
21:46:47FromGitter<kaushalmodi> then may be only html files were uploaded and the .js was left out
21:53:08*absolutejam joined #nim
21:53:17absolutejamcan I use a variable as the value of an enum
21:53:24absolutejam+ ?
21:53:24*zyklon quit (Read error: Connection reset by peer)
21:53:27absolutejamforgot the almight mark
21:54:05absolutejamif I wanted an instance of a type as the value of an enum, do I have to define it in the enum - enumVal: MyType(...)
21:59:27absolutejammore importantly, can I have an instance of a type as the value of an enum?
21:59:41absolutejammaybe I'm overcomplicating this, haha
22:07:03FromGitter<zetashift> @absolutejam could you explain what you're using the enum for? This also might help: https://nim-by-example.github.io/types/enums/
22:07:07dom96what are you trying to do?
22:09:47absolutejamI have a custom type and I want to limit one of the property's types one of 8 types
22:09:55absolutejamuh, my brain isn't working right now
22:10:17absolutejamJust reading about generics
22:11:14*zyklon joined #nim
22:11:44FromGitter<dandevelo> I am running Nim with: nim c --embedsrc --compileonly --nimcache:src main.nim. I use embedsrc to embed the source in the generated C file but the source is not written in the generated C file. What could be the cause?
22:12:02absolutejamif I have type MealTime and I want to limit the types of property Food to one of 5 types, how would I go about that?
22:12:04absolutejampretty much
22:12:39absolutejamthat was an awful example
22:15:57dom96Food = enum; Pizza, Salad, Chicken?
22:16:08absolutejamI think I'm overcomplicating it big time
22:16:16absolutejamI'm past it tonight, be back tomorrow
22:16:32*absolutejam quit (Quit: WeeChat 1.9.1)
22:19:03FromGitter<dandevelo> Guess I will just file an issue for the bug regarding embedsrc
22:25:19*Vladar quit (Remote host closed the connection)
22:28:29FromGitter<dandevelo> Here it is https://github.com/nim-lang/Nim/issues/10263 Anyone else experiencing this?
22:30:36dom96Guessing not that many of us use this flag
22:30:47rayman22201I don't normally use embedsrc, but that sure looks like a bug to me lol. Yeah, probably not a well tested feature.
22:33:04FromGitter<dandevelo> I find it useful when debugging
23:09:54*shpx quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:12:35FromDiscord_<exelotl> I have a question...
23:12:51FromDiscord_<exelotl> why are slurp and gorge aliases for staticRead and staticExec?
23:13:14AraqI was drunk when I wrote them
23:13:42FromDiscord_<exelotl> amazing
23:14:24Araqthe real reason is that I wanted to copy one single thing from the PL I disliked the most back then
23:14:28*skelett quit (Read error: Connection reset by peer)
23:18:43*skelett joined #nim
23:21:13*shpx joined #nim
23:29:47*stefanos82 quit (Remote host closed the connection)
23:33:41FromDiscord_<moerm> Haha
23:34:00FromDiscord_<moerm> I always call Perl a trouble ticket generator *g
23:54:27*leorize quit (Ping timeout: 252 seconds)
23:55:53*ng0 quit (Ping timeout: 256 seconds)
23:55:54*zyklon quit (Read error: Connection reset by peer)
23:59:05*ng0 joined #nim