<< 23-10-2019 >>

00:01:21disruptekbump 1.7.0 sniffs your tags to see if you use `v` and adds it for you if necessary.
00:02:09disruptekif it isn't sure, it gives you a chance to interrupt before assuming a sane, no-vee, usage.
00:06:22FromGitter<Willyboar> shashlick thanks i will check it because it is a custom proc
00:15:33shashlickhow'd you get from 1.3.4 to 1.7.0
00:27:38FromDiscord<Rika> That's some intense minor version bumping
00:29:18*ng0 quit (Quit: Alexa, when is the end of world?)
00:30:28shashlickamazing - i compiled an old nim tool I wrote 2 years ago with spawn & async with latest nim and it just works
00:34:09*luis_ quit (Quit: luis_)
00:34:31*luis_ joined #nim
00:48:25disrupteki had to write another tool just to up the bump speed of bump.
00:49:05disruptekthe way this works is, when you add functionality, you bump the minor.
00:49:50disruptek1.6.0 lets you commit at the same time you bump, in case it's just a minor change and you don't need multiple commits.
00:50:28disruptek1.5.0 moved some params around. it shoulda been 2.0, honestly.
00:50:52disruptek1.4.0 adds the --v that lets you force a `v` prefix on your tags, if you're a lunatic like shashlick.
00:51:51disrupteknow let's talk about STEVE GULLY. i only got two contributions to his re-election campaign. what's with you people?
00:52:03disruptekdon't you want to see NIM IN CONGRESS?
00:52:15*krux02_ quit (Remote host closed the connection)
00:54:00*seni quit (Quit: Leaving)
00:57:11shashlicki'd have added all that and made a 1.4.0
00:58:45*NimBot joined #nim
00:59:16disruptekdon't lie, you have many people using nimterop and you won't even cut a 1.0.0.
01:06:24*hpyc9 quit (Quit: ZNC 1.7.3 - https://znc.in)
01:06:25*blackbeard420 quit (Quit: ZNC 1.7.3 - https://znc.in)
01:28:00*blackbeard420 joined #nim
01:28:36*hpyc9 joined #nim
01:59:13*theelous3_ joined #nim
02:00:31*theelous3 quit (Ping timeout: 250 seconds)
02:24:03shashlick😄
02:26:19disruptekdude.
02:26:33disruptekthere's nothing juvenile about nimterop. 😉
02:34:14*luis_ quit (Quit: luis_)
03:07:51*dddddd quit (Remote host closed the connection)
03:13:59FromDiscord<Chiqqum_Ngbata> npm has that version bump feature btw https://docs.npmjs.com/cli/version.html
03:14:24FromDiscord<Chiqqum_Ngbata> Wonder if there's any other conveniences they've found https://docs.npmjs.com/cli-documentation/cli
03:14:58disrupteklooks like nah.
03:16:00disruptekdoctor is something that most tools should have.
03:19:23*chemist69 quit (Ping timeout: 276 seconds)
03:20:48*chemist69 joined #nim
03:28:59shashlick@disruptek what's a good reason to release small individual features quickly? I know it is a nimble update away unlike larger pieces of software but still don't get it.
03:29:28disruptekthe same reason you separate features out into different commits.
03:30:01leorizelol I managed to break the forum's RST renderer
03:30:27shashlickYa but that's no reason to tag it as a release
03:30:45disruptekwhy not?
03:30:53shashlickUnless you don't plan any other updates
03:31:07shashlickI understand patches to fix stuff
03:31:42shashlickBut why release 10 features when they can be clustered into one release
03:31:56disruptekbecause of a little thing called "change control".
03:32:28disrupteki wanna be able to roll to the point at which a feature doesn't exist, exists, and is merely the /last/ feature added.
03:32:35disruptekthat lets me isolate problems.
03:32:51disruptekwithout that, you're just guessing.
03:32:59disruptekguessing costs money.
03:33:20disruptektagging is free, now that bump exists. 🤣
03:33:36shashlickThat's what commits give me as the developer
03:33:42shashlickBut why would a user care
03:34:09disruptekbecause users don't `git bisect`. they wanna say, "it worked fine before 1.6.0"
03:34:46disrupteki expect that users only use releases. it's not always true, but it gives us common truth to talk about.
03:35:20shashlickBut if you release that often, all you'll get is it worked in 1.6.0 but doesn't in 1.20.0
03:35:28shashlickThey aren't going to try every release
03:35:40disruptekthat's fine.
03:35:40shashlickWhich is the same as commits
03:35:53disruptekwell, it's not. clearly.
03:36:25disruptekfor one thing, i can more easily mate my software to yours if you give me lotsa releases to test against.
03:38:07disruptekif you need another reason, it isolates testing to points at which the software is not terribly broken. ie. it doesn't have partially-implemented features.
03:38:39shashlickWell in nimterop case, features take time to get right
03:38:40disruptekit gives me an easier way to identify commits at which i may want to initiate a new branch.
03:38:55shashlickSo I have to work in a branch
03:39:02shashlickCause it takes time
03:39:15disruptekand i can more easily compare to points in time or feature additions and removals without having to look up git hashes.
03:40:01disruptektell me how you want it to work. it's fine to tell me it's useless to you, too.
03:40:59shashlickWell the way I work, I only push to head when it is fully tested and works
03:41:19shashlickI isolate instability from users
03:41:39disruptekwhat about bug fixes?
03:41:50shashlickSo for me the releases reflect my level of confidence
03:42:34disrupteki mean, we don't disagree here, right?
03:42:38shashlickBug fixes as well depends how big it ends up
03:42:51shashlickCause I have a large test matrix and it takes time
03:43:01disrupteki'm willing to play pretty fast and loose with bump. there's almost no one using it, as far as i know.
03:43:08shashlickWin lin osx x 0.19.6 - devel
03:43:22disruptekyou have >100 people starring nimterop and i know it's used pretty heavily.
03:43:27shashlickI understand but I'm trying to see if there's something I can learn here
03:44:14disruptekif it were me, i would branch nimterop for almost anything, whatfer test matrix reasons.
03:45:26disrupteki'd cut a new patch release when the matrix says the bug is fixed.
03:45:53disruptekand then i'd pull that into my longer-term new development branches where i build stuff that takes time.
03:48:36disrupteknim is pretty lazy about squashing merges, but that's one way to reduce gratuitous commits if it bugs you. i personally find it more useful to have the extra detail.
03:49:28shashlickI think that's pretty much what I'm doing
03:49:38shashlickIt took 3 months to get getHeader done
03:49:50disruptekback when i used to work for other people, i'd have paid $2k/year to use nimterop without batting an eye. i think it's nuts to call it 0.3.0. there's way too much product there.
03:52:14shashlickThanks I appreciate that
03:52:51shashlickI do think I need to make smaller changes though
03:52:58disrupteki agree.
03:53:18disrupteki think it will make feedback much more meaningful.
03:54:12shashlickLarger diffs are intimidating, even my own :P
03:55:07disruptekof course. i don't remember the order of stuff, either. i have so very many components to my startup software. it's kinda nuts.
03:55:30disrupteklooking at a tags page makes that much more tolerable.
03:56:01disruptekit will save golden a collosal amount of time in its bisection, too.
04:03:00shashlickSo do you squash often?
04:03:48disruptekthe only time i squash is if i write 1k loc and then throw it out or go a very different way and i simply don't want to confuse myself later. but it's pretty rare.
04:04:30disrupteki don't feel the hard part of coding is putting text on the screen, and by the same token, i don't have any problem deleting stuff.
04:06:35disrupteklooking at bump, i've added 779 lines and remove 249. it's 368 lines long. for what really should be an awk script. 🤪
04:10:55*rockcavera quit (Remote host closed the connection)
04:35:31*leorize quit (Remote host closed the connection)
04:36:07*leorize joined #nim
04:49:56*nsf joined #nim
05:03:46*narimiran joined #nim
05:28:45*mipri joined #nim
05:54:31*clyybber joined #nim
05:57:09FromGitter<mratsim> @Araq agree on stamp-it, looks very interesting, I should have more time to play with Picasso now. Once the scheduler is done, some lock-free data structure would be nice
06:05:29FromGitter<mratsim> Especially the guard/concurrent ptr interface they propose to abstract memory réclamation scheme
06:13:23*mipri left #nim (#nim)
06:14:59*solitudesf joined #nim
06:20:31*PMunch joined #nim
06:26:58*solitudesf quit (Remote host closed the connection)
06:27:36*solitudesf joined #nim
06:28:58FromDiscord<arnetheduck> shashlick, did you ever figure out a way to create wrappers that don't depend on nimterop (ie inlining all necesserary code in the wrapper itself)?
06:30:56leorizeyou can generate the wrapper from nimterop
06:32:06leorizethe idea of nimterop is that you can seamlessly use a C header
06:39:16FromDiscord<arnetheduck> leorize, the feature I'm after is to create a standalone wrapper that works without requiring the user of the wrapper to have nimterop and its dependencies installed - this is generally a safer option as it protects the wrapper from being broken by upgrades to nimterop - it also simplifies the dependency graph and the build (see https://github.com/arnetheduck/nim-sqlite3-abi/blob/master/update.sh)
06:49:31leorizebundle your own copy of nimterop/types and you're done
06:50:20leorizeor you can use nimgen, which works pretty well also
06:55:01*theelous3_ quit (Ping timeout: 268 seconds)
06:55:40clyybberThis is the one feature that would get me to use nimterop.
06:56:11clyybberSo far c2nim + scriptfoo is enough for me.
06:56:22clyybberBut with wrapping alsa it gets a bit hardcore
06:56:25clyybberbbl
06:56:26*clyybber quit (Quit: WeeChat 2.6)
07:00:00*gmpreussner_ quit (Quit: kthxbye)
07:05:02*gmpreussner joined #nim
07:08:18*krux02 joined #nim
07:09:26FromDiscord<Chiqqum_Ngbata> Same
07:12:48FromDiscord<arnetheduck> leorize, I know I can bundle nimterop, but that's more complicated than having the feature in nimterop itself - the wrapper becomes more difficult to use and build. I'm already using `c2nim` and some manual hacking which is fine, but I generally would prefer nimterop if it was dep-free. since creating the wrapper happens once while it's used many times over, it seems better to optimize wrappers for ease of use (for this same reason, it'
07:20:16leorizethe biggest problem is that nimterop-generated wrapper is machine-dependant
07:20:46leorizesince it runs the preprocessor of that machine on the header
07:21:43leorizeso if a header is used for both *nix and windows, a wrapper generated by nimterop will only work on the os/architecture it was generated from
07:23:02leorizewhenever #ifdefs are involved, c2nim is always the better option
07:24:16leorize(for generic wrapper)
07:26:13*SyrupThinker joined #nim
07:26:37*floppydh joined #nim
07:27:39FromDiscord<arnetheduck> that
07:27:43FromDiscord<arnetheduck> that's a good point
07:28:18FromDiscord<arnetheduck> the preprocessor stuff is optional afair - but the comment stands regardless
07:29:26FromDiscord<arnetheduck> I guess that's a good argument for running nimterop at compile time (or make nimterop translate the machine-dependent stuff more accurately)
07:33:03leorizeiirc, nimterop was built on the idea of seamless C interop like in Zig (ie. you can just cImport()) and you get all the functions
07:33:13leorizewhich is probably why it was made this way
07:33:41leorizethe model doesn't map really well to Nim though :P
07:36:23*couven92 joined #nim
07:49:11AraqI've complained about this model before too fwiw
07:49:26Araqit's incredibly fragile by construction
07:49:59Araqplus I don't want cImport "bullshit.h", I know enough about C not to want that
07:50:30Araqif I want it, I know where to find .emit: "#include ..."
08:00:08FromDiscord<kodkuce> that article form 2017 read faster 😛
08:02:54*gmpreussner quit (Ping timeout: 265 seconds)
08:03:27*gmpreussner joined #nim
08:12:12FromDiscord<arnetheduck> btw, krux02 removed several float magics which is a bit unfortunate because they were hooked to llvm/CPU intrinsics - now codegen is worse for those cases (ie float to int converstion and a few others) - Araq, is there an easy way to match a function signature in the compiler ast? ie I want to match `X(a, b: SomeType)` by function+module name and arguent types so I can pick out what used to be magic.. going just by name is fragile
08:14:45Araqthere is no good way. for min/max checking something like x.typ.skipTypes(abstractInst).kind in {tyInt..tyInt64} works but you know this
08:15:18Araqwe could really have some pattern matching helpers in the compiler
08:16:12krux02@arnetheduck: you mean the procs `toFloat` and `toInt`?
08:16:39Araqhowever, toFloat/toInt never were widely used, better detect it for nkConv or whatever it's called internally
08:16:57krux02I think those magits don't really help you to begin with, since most type conversations are written with conversation call `float(x)` ant `int(y)`.
08:17:16krux02they are nkConv nodes in the ast if that helps
08:28:01FromDiscord<arnetheduck> yeah, there was a bunch of them, `mToFloat`, `mMinF64`, `mAbsF64` etc - a lot of these exist as `c` math functions in `math.h` with well-established meanings and `llvm` has intrinsics for them
08:30:01FromDiscord<arnetheduck> for nkconv I'm already using these intrinsics - but I saw for example that `min`/`max` was rewritten as pure nim which will be slower unless by chance the compiler pattern-matches the generated code
08:31:03FromDiscord<arnetheduck> Araq, yeah, I'm using that kind of matching but it quickly gets hairy
08:32:31FromGitter<mratsim> min and max are especially an issue
08:33:26FromGitter<mratsim> 7x perf gap by generating naive code VS intrinsics: https://github.com/nim-lang/Nim/issues/9514
08:33:29FromDiscord<arnetheduck> on that topic, the new usage of `int128` is pretty unwieldy - in general there exist ways to do the correct arithmetic, overflow checking etc without that kludge - and no less error prone (as the `mod` bug showed, you still need to think about what you do)
08:34:50Araqok, but in the worst case it allows us to add native int128 support, that can't be a bad thing
08:35:15FromDiscord<arnetheduck> on the topic of inlining, we've seen that due to how nim generates very verbose code coupled with gcc's heurestic for inlining which apparently is based on number of `;`, inlining often does not happen in practise
08:35:45FromDiscord<arnetheduck> well, will you add an `int256` to implement it?
08:36:29FromDiscord<arnetheduck> fwiw, we have all that stuff in `stint` - ideally for nlvm would be if all ints were generic on the bit size - I believe you have that planned somewhere?
08:36:54FromDiscord<arnetheduck> that would require a full bignim lib in the compiler however
08:37:41FromGitter<mratsim> Are you asking me or Araq?
08:37:46Araqyeah, it's planned, however
08:38:51Araqit's as you say, maybe we should use a bigint implementation
08:39:19Araqand then we need to be careful that the vm emulates the cpu
08:42:52FromDiscord<arnetheduck> is Nim (regularly) tested on any bigendian platform btw? saw that `int128` will be laid out as mixed-endian in that case which is fun
08:45:43Araqno, it isn't. work on that started via testing on the BSDs, I think
08:49:00*mipri joined #nim
08:54:13*Vladar joined #nim
08:57:53miprihow serious is the Z3 stuff in the roadmap? do you have a syntax in mind for associating static constraints with variables?
08:58:14krux02arnetheduck: well, I removed those magics to simplify the code and CI didn't complain about that.
08:59:05*ng0 joined #nim
08:59:15*alexander92 joined #nim
09:00:05mipria good hello-world example would be for C argc/argv handling, where a function takes an int that's the length of the other parameter, and you can only look at argv[i] when that's definitely OK (like in the branch of an if that tests i against argc)
09:00:49Araqmipri, I'm serious about it, but have no clues about the required syntax
09:01:10AraqI see it as un-important, it needs to be "skippable" Nim code
09:01:32Araqthe Nim compiler ignores it, the NimProof tool looks at it
09:02:05FromGitter<alehander42> i am interested
09:02:14FromGitter<alehander42> in some examples how
09:02:17FromGitter<alehander42> z3 would be used
09:02:26FromGitter<alehander42> e.g. cool things that would be provable
09:02:34miprimakes sense. That gives you the extra work only when you want it.
09:02:57miprior when the users of a library want it.
09:03:52Araqand indeed, I will start with proving array indexes correct
09:04:09Araqit's a nice real world example that I happen to understand well
09:04:24mipriI think that's the direction ATS has moved as well. Even though you can technically compile ATS without the checks, Hongwei wants something more approachable to be the default. (and I mention ATS because its syntax is also very scary over all :) tho the basic refinement-type stuff isn't too bad)
09:05:05mipricool, I'll look forward to that
09:05:06FromGitter<alehander42> and how would be called: with a --z3 switch ?
09:05:26FromGitter<alehander42> is there a language that uses it like that
09:05:30miprior 'nim prof' analogously to 'nim ch eck'
09:06:29mipriATS can use Z3, but uses a less powerful constraint solver by default, and it does the argc/argv thing I described above. deech comes around here some times, and has a video about it: https://www.youtube.com/watch?v=zt0OQb1DBko
09:06:35Araqmost likely it will be a separate executable because of the dependency
09:07:44Araqmipri, we have our own thing too, see https://github.com/nim-lang/Nim/pull/10965
09:08:32Araqbut it's limited and Z3 is a trusted piece of technology
09:08:53Araqsometimes NIH is wrong even for Nim.
09:15:28FromDiscord<mratsim> LLVM uses ISL and polyhedral representation for array bound checking
09:16:36Araqwhen does it do that? is it enabled by default?
09:27:36FromDiscord<mratsim> when you use LLVM Polly
09:28:57FromDiscord<mratsim> they use ISL (wrapper here: https://github.com/mratsim/nim-isl) to analyze read after write, write after read, write after write, read after read and bounds validity
09:29:42FromDiscord<mratsim> it needs affine constraint though, it would work with for loops but I don't think it would work for while loop for example
09:30:17Araqafaik it also doesn't support separation logic and Z3 has some support for it
09:30:20FromDiscord<mratsim> or quasi affine (modulo constraint / skipping every 2 iteration) is fine
09:30:53FromDiscord<mratsim> if you want to play with it, there is a playground here: http://playground.pollylabs.org/
09:31:05FromDiscord<mratsim> switch the examples to dependence analysis
09:31:38FromDiscord<mratsim> ah no sorry memory access
09:33:32FromDiscord<mratsim> I tried to port it to Nim but it's too messy, too much memory management in-between functions
09:35:31Araqsorry but I'm busy with other things and Z3 is a wise choice, we need separation logic for free/dispose
09:35:44FromDiscord<mratsim> no worries
09:35:50FromDiscord<mratsim> I also gave up on that because no time
09:37:08alexander92however
09:37:22alexander92do we use annotations etc, e.g. how can i pass the constraint info to my functions
09:38:22Araq{.precondition, postcondition.} pragmas would be in the proc header
09:38:35Araqnot inside the proc body
09:38:41Araqif that's what you mean
09:42:37FromGitter<alehander42> yeah
09:42:40FromGitter<alehander42> but what i mean is e.g.
09:43:14FromGitter<alehander42> it would infer local expressions constraints
09:43:15FromGitter<alehander42> as well, right
09:43:48FromGitter<alehander42> but i guess i wouldn't be able to somehow use generic conditions or overload based on conditions
09:44:55Araqno overloading on conditions in my Nim
09:45:39Araqit's a bad idea IMO. if you want to specialize, a 'when' inside your proc is cleaner
09:45:43FromGitter<alehander42> well, one can always add it as a "macro"
09:45:45FromGitter<alehander42> maybe
09:45:56FromGitter<alehander42> in some limited sense
09:46:03FromGitter<alehander42> yeah, not very important
09:46:07*lritter joined #nim
09:46:11FromGitter<alehander42> just trying to imagine how it fits with the other stuff
09:46:20FromGitter<alehander42> and more like, can types "carry" conditions
09:46:42FromGitter<alehander42> e.g. i encode in my type that its name should be >2 etc
09:47:24FromGitter<alehander42> one way it can work is by just annotating all functions that take that type with the same condition i guess
09:48:55miprithat's how other languages do it, but I've wondered why type-based defaults weren't used. Probably there's a conflict of purpsoe there: you want the defaults for tersity, but you want the checks in the first place for correctness.
09:49:14*dddddd joined #nim
09:49:52Araqyup, conflicting goals here.
09:50:26FromDiscord<mratsim> I think I missed the pre/post condition boat. Is that a compile-time thing (similar to concept?) or a runtime thing (similar to design by contract / Eiffel)?
09:51:10Araqcompile-time thing. it's about proving things correct
09:51:43Araqit's not about more sugar for 'assert'. Eiffel is pretty foolish in this regard IMHO.
09:52:36FromDiscord<mratsim> seems like Ada spark would love to have this
09:53:21AraqI think they are working on this
09:54:28AraqI stole Ada Spark's business plan, put my name on it and sold it as "Nim's roadmap" :P
09:54:35Araq(just kidding)
09:54:49miprimy impression with SPARK is that it has runtime checks but tries to prove that it doesn't need them a lot of the time, as an optimization. But that's a very different experience. Instead of an error, you get a runtime check and silently slower code that then might surprise you with a runtime failure.
09:56:06Araqthat's Ada, not Spark, Spark proves stuff correct
09:56:29mipriah, OK. I've only used pre/post conditions in Ada.
09:59:00FromDiscord<mratsim> I really think you should steal that slide: https://image.slidesharecdn.com/osis18iotadaandspark-defenseindepthforsafemicro-controllerprogramming-180529131452/95/osis18iot-ada-and-spark-defense-in-depth-for-safe-microcontroller-programming-by-fabien-chouteau-yannick-moy-adacore-6-638.jpg?cb=1527599798
10:01:05FromDiscord<mratsim> i.e. this: https://forum.nim-lang.org/t/4704#29405
10:02:36Araqwe are all good at loving the non-existing
10:04:02AraqI talked about "big idea, new tool for Nim", you beat me with "bigger idea, let's have The Nim Pyramid"
10:15:34*ng0 quit (Quit: Alexa, when is the end of world?)
10:16:33*enthus1ast joined #nim
10:16:37*dv^_^ quit (Ping timeout: 240 seconds)
10:17:44enthus1astis it supported to load generic functions from dll? like this: proc foo*[T](known: Known, boundObj: T) {.cdecl, exportc, dynlib.} =
10:18:17*FromGitter quit (Remote host closed the connection)
10:18:36*FromGitter joined #nim
10:18:38*dv^_^ joined #nim
10:18:38Araqcertainly not
10:19:55enthus1astmhh what i thought, the T is not known when compiled
10:56:21FromDiscord<mratsim> History has proven that pyriamid schemes can capture and captivate the public and TV audiences
10:57:21Araqpyramids have usually been used to bury someone
10:58:03*alexander92 quit (Ping timeout: 240 seconds)
11:00:22Zevvtalking about overengineering - a hole in the ground would do just as fine
11:00:39Araqlol
11:01:55*alexander92 joined #nim
11:02:14ZevvHmm, I guess nim stdlib would not appreciate a PR for forth-like rot[seq[T]]() and swap[seq[T]]() ?
11:05:48Araqah that's was what I wanted to do today
11:08:17Araqwrite my stdlib RFC
11:08:32Araqswap and rot for seqs? add to sequtils?
11:08:33ZevvI *just* wanted to ask "what"
11:08:38Zevvyeah and dup and over and drop :)
11:08:49Zevvnah, I'll make a forth nimble, nevermind
11:09:00ZevvI guess it will not fit your stdlib RFC
11:09:12Araqit's an open question :-)
11:09:23Araqbut please name more_sequtils, not forth
11:09:46Araqor something that people can understand, I wasn't aware "forth" is about operations on Nim's seqs :P
11:10:56Zevvsure :)
11:15:58*LargeEpsilon joined #nim
11:24:30shashlick@arnetheduck - I am tracking https://github.com/nimterop/nimterop/issues/12 5 and have some ideas for it but it hasn't been a priority
11:24:56shashlickSorry https://github.com/nimterop/nimterop/issues/125
11:26:02shashlick@leorize is right about the preprocessor, I delegate to tools where I can - tree-sitter for parsing as well
11:26:41shashlickI've debated with @Araq before about it but I'm still not convinced that this approach has any detriment
11:28:13shashlickI see no value in retaining and checking in wrapped content since nimterop can pin to upstream versions
11:29:28shashlickI understand if there is a concern of breaking changes in nimterop, but I have a huge test matrix for it
11:31:19shashlickI do see value in options though so you can still use toast standalone, turn off the preprocessor, use c2nim within nimterop and I'll get around to #125 as well
11:35:15shashlickIf there are particular important wrappers that folks want tested with nimterop updates, I'll be happy to include them
11:36:22shashlickRight now I have nimarchive and nimgit2 which I test before releases, apart from a few within nimterop test itself
11:36:43*nc-x joined #nim
11:37:51*nc-x left #nim (#nim)
11:43:26Araqshashlick, I know we disagree on it.
11:44:10Araqit's still a bit sad that nobody took clang's parser and replaced c2nim's parser with it
11:50:59narimiran** Nim 1.0.2 is out **
11:53:54shashlickdpp uses clang but I think clang is too large to expect users to install when they have gcc already
11:54:30shashlickIf Nim moved to clang full time and it was always present it would be different
11:54:42shashlickBut again that's not the c2nim approach admittedly
12:06:06*Kaivo quit (Ping timeout: 252 seconds)
12:10:20*rockcavera joined #nim
12:10:56PMunchnarimiran, when will the changelog article be up?
12:11:25narimiranwhen i write the changelog. soon (TM)
12:11:33PMunchHaha, okay
12:11:50narimiranbut it (probably) won't be a separate article, but you'll have a link to changelog
12:15:11leorizeyou can't call it a release without a proper changelog :p
12:15:37narimiranleorize: i can. i just did :P
12:18:00*Kaivo joined #nim
12:18:06FromDiscord<mratsim> it's not a releasebut a putsch then
12:18:35leorizeZevv: how did you test the json parser?
12:18:56Zevvwho what where
12:19:09leorizefor performance testing against npeg?
12:19:22Zevvparsejson, next() until you hit the end
12:21:03Zevvhttps://github.com/zevv/npeg/blob/master/tests/performance.nim#L95
12:23:15leorizeI noticed that you imported packedjson and never tested it :p
12:23:24*Hideki_ joined #nim
12:23:37Zevvnah I had a local version once that stripped the actual object creation - but in the end that's just parsejson
12:24:39leorizeyou mean packedjson doesn't cause much overhead from building the tree?
12:25:12Zevvpackedjson does not build a tree like the normal json iirc
12:25:20Zevvit fakes until you go look inside, something like that
12:25:26ZevvI think
12:25:59*NimBot joined #nim
12:27:50leorizeis memfiles broken on linux?
12:27:54Zevvno?
12:28:11leorizeusing a memfile stream with parsejson got me syntax error
12:28:19leorizebut none when I switch to the normal stream
12:28:46Zevvmaybe memfile *streams* are broken, but I use memfiles regularly without issues
12:31:05dom96narimiran why wouldn't you write an article? :/
12:32:24Araqit was a joke gone bad
12:32:36AraqI told him "yeah, this github diff is good enough"
12:32:59shashlick@Zevv is npeg faster than regex? And faster than stdlib peg?
12:32:59Araqand he didn't notice I was kidding
12:34:06Zevvshashlick: good questions. I need more test cases.
12:34:54Zevvshashlick: I only compared to parsejson and lqdev's top down Rod parser
12:38:28narimiranhere y'all go, hand-picked, organic v1.0.2 changelog: https://github.com/nim-lang/Nim/blob/devel/changelogs/changelog_1_0_2.md
12:40:13shashlickAwesome work!
12:40:19*javasox joined #nim
12:43:48narimiranand yours too, shashlick!
12:44:14narimiran(btw, my travis problem seems to be magically solved today)
12:45:12FromDiscord<Rika> is it impossible to reference a higher directory when importing?
12:45:34FromDiscord<mratsim> ../
12:48:24*theelous3 joined #nim
12:48:35FromDiscord<Rika> let me try it again
12:49:08narimiranwow, one full hour since the release and nobody reported any embarrassing bug/omission? is this the real life, is this just fantasy?
12:49:49PMunchnarimiran, maybe no-one was able to update, everyones computer is on fire!
12:49:53ZevvEverbody is still busy reading the changelog
12:50:07narimiranPMunch: still win in my book
12:50:14FromDiscord<Rika> @mratsim doesnt work
12:50:44narimiranZevv: ...and nobody pointed out that one missing `]` in the changelog either
12:50:49*stefantalpalaru joined #nim
12:51:39FromDiscord<Rika> literally unreadable
12:52:37lqdev[m]@Rika are you sure the path is correct? I use ../ all the time and it works
12:52:46lqdev[m]what error are you getting?
12:53:12FromDiscord<Rika> hmm wait
12:53:43FromDiscord<Rika> okay so i cant use the [m1, m2] syntax with it
12:54:24FromDiscord<mratsim> ah yes, the mysteries of bracket
12:54:33FromDiscord<mratsim> but if you use ../../ I think it works
12:54:47FromDiscord<mratsim> (i.e. double parent)
12:55:10FromDiscord<mratsim> there are some weirds bugs around import ./ ../ and bracket syntax
12:56:52Araqnot really, it's just the same Nim syntax as everywhere else
12:56:57FromDiscord<Rika> wtf double parent does work
12:57:03Araqthere is no special casing for it
12:57:13FromDiscord<Rika> why does ../[] not work though?
12:57:33Araqbecause you need ../.. ?
12:57:50Araqyou still need to do the counting yourself
13:03:00shashlickOk what's next
13:05:44*skelett quit (Quit: WeeChat 2.5)
13:06:04Araqadd 'bump' to Nimble
13:06:10*skelett joined #nim
13:06:11*skelett quit (Client Quit)
13:06:46*skelett joined #nim
13:07:35*javasox quit (Ping timeout: 260 seconds)
13:08:22Araqand make 'nimble search' use the github search too
13:08:36FromDiscord<ZeeQyu> Ooh, that'd be nice
13:09:07FromDiscord<Rika> hey nice bump on nimble
13:12:24FromDiscord<arnetheduck> re large precision integers, we just merged a massive test suite for both compile and runtime, coutesy of @jangko: https://github.com/status-im/nim-stint/pull/91 - might beof interest
13:12:42FromDiscord<Shield> why's "garbage-collected" was removed from the main website but not github? and why remove it at all if the gc is still winning the async war?
13:18:01disruptekit misleads potential customers.
13:20:22AraqShield: we need to remove it from github too :P
13:21:06*skelett quit (Quit: WeeChat 2.5)
13:21:26*skelett joined #nim
13:21:52shashlick@disruptek you good merging bump into nimble?
13:22:44*Kaivo quit (Quit: WeeChat 2.6)
13:22:56*Kaivo joined #nim
13:23:34disruptekif i can just import it, sure. i don't fancy maintaining two instances of a 400-line sed.
13:24:28shashlickI'm good with that but you will have to impress @dom96 if not already
13:24:55disruptekimpressing dom96 has never been my strong suit.
13:25:17*theelous3 quit (Ping timeout: 240 seconds)
13:27:41shashlickI think it is easier to impress Araq
13:31:28shashlickThinking of working on choosenim but that is also the same boat
13:33:03disruptekapparently, he likes NIH tools so trivial that their very existence is questionable.
13:34:50Araq"he"? me?
13:35:21disruptekoh shoot, the dragon wakes.
13:35:41*Hideki_ quit (Remote host closed the connection)
13:35:48Araqwell I'm away, please offend me when I'm online
13:35:52disruptekshashlick: choosenim was always too magical for me. if that could be improved, maybe we'd get less bug reports.
13:35:57Araqso that I can defend myself
13:36:02Araqbye
13:36:05disrupteklol
13:36:20disruptekhe didn't give us much of a time window in which to offend him.
13:36:28*Hideki_ joined #nim
13:36:28FromGitter<alehander42> smart
13:40:18*Hideki_ quit (Remote host closed the connection)
13:40:32*Hideki_ joined #nim
13:47:40shashlickI like that Araq's indignation is based on actual research and practical experience
13:48:34shashlicknot armchair theories
13:53:19*Hideki_ quit (Remote host closed the connection)
13:54:05*Hideki_ joined #nim
13:58:38*Hideki_ quit (Ping timeout: 265 seconds)
14:13:49stefantalpalaruIf we're keeping it real, reference counting is a form of garbage collection.
14:15:32*theelous3 joined #nim
14:19:03FromDiscord<Rika> isnt there also an argument that borrow checking is a form of garbage collection too or smth
14:20:59FromDiscord<mratsim> memory management yes, but garbage collection usually implies runtime cost
14:25:12stefantalpalaruCan you do compile-time garbage collection in the form of borrow checking without runtime garbage collection in the form of reference counting? Rust cannot.
14:25:23*PMunch quit (Remote host closed the connection)
14:27:04FromDiscord<Rika> rust cant?
14:28:19stefantalpalaru"In order to enable multiple ownership, Rust has a type called Rc<T>. Its name is an abbreviation for reference counting." - https://doc.rust-lang.org/1.22.0/book/second-edition/ch15-04-rc.html
14:29:00dom96Araq has grown soft over the years :P
14:29:03dom96Everything I ask for in reviews is stuff I've learned from him ;)
14:29:31shashlickWhile you are here
14:29:37disruptekmaybe he has learned something in that time.
14:29:47shashlickI'm planning on replacing untar with nimarchive in choosenim
14:29:57stefantalpalaru"A thread-safe reference-counting pointer. 'Arc' stands for 'Atomically Reference Counted'." - https://doc.rust-lang.org/std/sync/struct.Arc.html
14:30:00*fanta1 joined #nim
14:30:02shashlickAre you onboard with that
14:30:28dom96that depends, will we need to ship more DLLs with choosenim?
14:30:46shashlickWill enable zip, gz, xz and 7z extraction natively cross platform
14:31:03shashlickCan be statically linked
14:32:00shashlickIt is a wrapper for libarchive and includes zlib, lzma and bzlib
14:32:14FromDiscord<Rika> stefantalpalaru, i dont understand this portion of your statement, "compile-time garbage collection in the form of borrow checking", doesnt Rust do that already?
14:32:25FromDiscord<Rika> anyway, this is getting OT
14:32:48FromDiscord<mratsim> talking about borrow checking or garbage collection is not OT
14:33:27*Hideki_ joined #nim
14:33:28dom96shashlick: how easily can it be statically linked?
14:33:51stefantalpalaruRead the whole phrase, Rika. I'm saying not even Rust can avoid the runtime overhead of garbage collection.
14:34:06dom96tbh I guess it doesn't really matter, we ship the SSL DLLs anyway
14:34:17dom96another few can't hurt, can they?
14:34:19shashlickhttps://github.com/genotrance/nimarchive/blob/master/tests/tnimarchive_extract.nim
14:34:28shashlickYou just import nimarchive and use extract
14:34:33shashlickEverything else is abstracted
14:34:39shashlickUses nimterop
14:35:02dom96That tells me nothing about how easy it is to statically link
14:35:13FromDiscord<Rika> @mratsim i meant OT because we're discussing rust
14:35:14disruptekthe user doesn't care how hard it was to link.
14:35:43shashlickThere's nothing else to do
14:35:49shashlickIn choosenim
14:36:05shashlickSee the CI if needed
14:36:08FromDiscord<Rika> anyway i understand the statement now
14:37:09dom96shashlick: Okay, if the CI can handle it then I'll likely be happy. I'm still curious what statically linking this looks like on Windows though, i.e. what commands do you need to pass to Nim to do it?
14:37:59dom96disruptek: every additional dependency increases the possibility of problems.
14:38:34shashlickEverything is built into nimterop
14:38:44disruptekyou know what's a problem? not being able to open an archive.
14:38:53shashlickhttps://github.com/genotrance/nimarchive/blob/master/nimarchive/archive.nim
14:39:25shashlickNimterop will download, build and link the lib
14:40:21shashlickThe nimarchive ci is testing cross platform including windows
14:40:27shashlickSee the nimble file
14:41:04dom96Libraries downloading other libraries, what could go wrong? :)
14:41:28disrupteknext you'll want code to create other code.
14:41:34disruptekSHASHLICK
14:41:40disruptekyou madlad.
14:41:42disruptekget in lane.
14:43:03shashlickI don't setup crazy CI matrices for fun, let's just say
14:43:23disruptekliar.
14:51:14*alexander92 quit (Ping timeout: 240 seconds)
14:51:38*Hideki_ quit (Ping timeout: 240 seconds)
14:55:10dom96shashlick btw what's so magical about choosenim?
14:56:04shashlick?
14:57:24dom96oh, sorry, @disruptek
14:57:42disrupteki dunno, that's kinda the nature of magic.
14:57:53dom96lol okay
14:58:01disruptekwhat i know is that i couldn't figure out why it wouldn't work for me.
14:58:25disruptekalso, i can't figure out why it doesn't work for other people who show up here and can't seem to achieve a reproducable compiler with it.
14:58:43disruptekbut again, to me, it's magic. i'm not smart enough.
14:59:04dom96any errors?
14:59:14disruptekthose would be helpful, yes.
15:00:16dom96Hrm, okay. So no errors, no evidence of what actually wasn't working, just statements that it's "too magical".
15:00:22dom96Starting to wonder if you're just spreading FUD :P
15:00:46shashlickThere are some known issues
15:00:53disruptekmy opinion is worthless here for myriad reasons; chief among them is the fact that i don't use choosenim.
15:01:03shashlickBut I think it works very well for me
15:02:39disruptekwhen i tried to use it, it was very inconsiderate of my environment and not transparent about what it was doing or why.
15:03:05*ng0 joined #nim
15:03:17disruptekrepairing things was a manual process and i had no introspection into the inherent assumptions, so i had to guess as to what to do.
15:03:37disruptekmaybe it just needs a `doctor` mode, or maybe i need to hire another child just to manage my choosenim install.
15:04:22*fanta1 quit (Quit: fanta1)
15:05:10*alexander92 joined #nim
15:06:05disruptektbh, because i don't use it, my only surface with the software is the people that come here with bizarre misbehavior which is fixed by "blow away choosenim and reinstall" or "abandon choosenim and build nim from source". so, there's that.
15:08:25disrupteki actually think `nim doc` is a bigger problem, but i think i should wait until araq is online in case there's an opportunity there to offend him.
15:13:28alexander92thats a good thing, if restart works fine
15:14:10disruptekyes, we've managed to port docker-like-sysadmin to software.
15:14:11*Trustable joined #nim
15:14:33disrupteknext nimble submodule: ctrl-alt-del
15:15:02FromDiscord<kodkuce> winXP
15:22:09FromDiscord<kodkuce> how can i see C generated code when i compile helloworld.nim
15:22:41shashlicklook in nimcache
15:22:41stefantalpalaru--verbosity:2
15:23:09*theelous3 quit (Ping timeout: 268 seconds)
15:23:32stefantalpalaruor --listCmd
15:25:22FromDiscord<kodkuce> verbosuty and list cmd dident show anything, where is nimchache
15:26:03FromDiscord<kodkuce> fopund it
15:29:46FromDiscord<kodkuce> a lot of files for just 1 line hello world i was even using -gc:none hoping it will remove gc part
15:32:05*brainproxy joined #nim
15:33:38*alexander92 quit (Ping timeout: 268 seconds)
15:38:03*tklohna_ quit (Ping timeout: 240 seconds)
15:42:43*clyybber joined #nim
15:53:42disruptekZevv: why not see how much of the nre api you can replicate in your npeg code blocks? it could be that the bits that don't fit perfectly are outweighed by the consistency of interface.
16:00:09*narimiran quit (Ping timeout: 268 seconds)
16:08:11*fanta1 joined #nim
16:08:20*LargeEpsilon quit (Ping timeout: 276 seconds)
16:20:27FromDiscord<Clyybber> @arnetheduck Btw, how do you handle object constructors in nlvm?
16:21:06dom96narimiran[m]: Araq: so was it a joke or are we really not getting a release article?
16:21:53FromDiscord<Clyybber> Because I'm about to introduce a transformation like `Obj(v: 1)` -> `var tmp = Obj(); tmp.v = 1; tmp`
16:25:17FromGitter<Willyboar> I have a silly newbie question ⏎ Why this takes all prints all the files ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5db07eed14d55a37856158f5]
16:26:02disruptekactually, it gives only the first.
16:26:36federico3no forum post for 1.0.2 ?
16:27:05disruptek`return` is the crash operator. it crashes the compiler at top-level and crashes your procedure anywhere else.
16:28:00federico3also, there is no version and changelog on https://nim-lang.org/install_unix.html and https://nim-lang.org/install.html
16:28:03FromGitter<Willyboar> Well is there a way to return all the files?
16:28:18disruptekaccumulate them into a sequence and return that?
16:29:22FromGitter<Willyboar> Can i have a small ex? :P
16:30:44disruptek!eval var s = seq[string]; for n in walkDir("."): if s.len > 1: return s else: s.add n; echo s
16:30:45NimBotCompile failed: /usercode/in.nim(1, 45) Error: complex statement requires indentation
16:30:51disruptekhmmph.
16:30:54disruptek!eval var s = seq[string]; for n in walkDir("."): if s.len > 1: return s else: s.add n
16:30:56NimBotCompile failed: /usercode/in.nim(1, 45) Error: complex statement requires indentation
16:31:17disruptekyou get the idea.
16:31:41disruptekmaybe nimbot should learn what \x0a means.
16:32:59dom96PRs welcome :)
16:33:24disrupteki can't teach that kid anything; he's younger than me.
16:35:47disruptek!eval var s = seq[string]; { for n in walkDir("."): { { if s.len > 1: return s else: s.add n } }; echo s
16:35:49NimBotCompile failed: /usercode/in.nim(1, 99) Error: expected: '}', but got: '[EOF]'
16:36:09disruptek!eval var s = seq[string]; { for n in walkDir("."): { if s.len > 1: return s else: s.add n } }; echo s
16:36:11NimBotCompile failed: /usercode/in.nim(1, 12) Error: 'typedesc' metatype is not valid here; typed '=' instead of ':'?
16:36:32disruptek!eval var s: seq[string]; { for n in walkDir("."): { if s.len > 1: return s else: s.add n } }; echo s
16:36:33NimBotCompile failed: /usercode/in.nim(1, 32) Error: undeclared identifier: 'walkDir'
16:36:43disruptek!eval import os; var s: seq[string]; { for n in walkDir("."): { if s.len > 1: return s else: s.add n } }; echo s
16:36:45NimBotCompile failed: /usercode/in.nim(1, 73) Error: 'return' not allowed here
16:37:05disruptek!eval import os; var s: seq[string]; { for n in walkDir("."): { if s.len > 1: echo "return " & $s else: s.add n } }; echo s
16:37:08NimBotCompile failed: /usercode/in.nim(1, 100) Error: type mismatch: got <seq[string], tuple[kind: PathComponent, path: string]>
16:37:11disrupteki'm the bob ross of nimbot.
16:37:18disruptek!eval import os; var s: seq[string]; { for c, n in walkDir("."): { if s.len > 1: echo "return " & $s else: s.add n } }; echo s
16:37:21NimBotCompile failed: /usercode/in.nim(1, 62) Error: expression 'if (
16:37:29disruptekpretty little curly braces.
16:38:12leorize!eval import os; var s: seq[string]; for c, n in walkDir("."): (if s.len > 1: echo "return " & $s else: s.add n); echo s
16:38:16NimBot@["./nimble"]↵@["./nimble", "./nim"]
16:38:34disruptekhooray!
16:39:19disruptekit takes a child.
16:39:26disruptekor, a village, as you prefer.
16:41:16*theelous3 joined #nim
16:49:02Zevvdisruptek: makes sense, but that API is also not very structured. And my problem with mimicing is that you can't just get there all the way, but people do get expectations and will complain if youre not a drop in replacement
16:49:22disrupteklet me talk to those people; i'll straighten them out.
16:51:09disruptekmaybe you should patch nre and then npeg will fit into stdlib more nicely.
16:51:40ZevvI wouldnt want it to
16:51:55Zevvits miiiiiineeeee
16:52:09Zevvand then Id have to sit on my hands before I type, all the time
16:52:50disruptekjust wear mittens at the keyboard; that's what i do.
16:54:37clyybberarnetheduck: I'll also make the result variable transform to a normal variable btw.
16:55:51ZevvI have these fingerless mittens, thats a nice tradeoff
17:03:21shashlick@dom96 - https://github.com/nim-lang/nimble/commit/c834faf60e1dbdd8ae46456e1fb2dc2db05e4e91#diff-8f5588fb3c673d679a2ed04e79cdc74eR370 broke choosenim
17:03:33shashlickinitOptions() is now private and inaccessible from choosenim
17:04:58*floppydh quit (Quit: WeeChat 2.6)
17:05:09*fanta1 quit (Quit: fanta1)
17:07:32dom96shashlick fun, easy fix in any case. Also, we need a comment in that function to make sure none of us makes it private by mistake :)
17:09:07shashlickokay will push a PR for nimble
17:09:44shashlickthough we might need choosenim to refer to nimble head else it won't pull the changes until the next version
17:10:28*tklohna_ joined #nim
17:10:44dom96Never HEAD
17:11:09dom96We can pin it to your commit
17:11:20shashlickokay
17:12:06FromDiscord<arnetheduck> clybbber, that depends - `nlvm` does constant inits more aggressively, so for those your suggested transform would be a pessimization - for dynamic init, it does that transformation already essentially
17:13:32clyybberarnetheduck: I think/hope that llvm will optimize those away in the constant init case, wdyt?
17:14:06FromDiscord<arnetheduck> well, if it's able to trace it, it's more work for the optimizer which slows down the compile
17:14:11shashlick@dom96 - did you change NimbleError any?
17:14:20shashlickchoosenim doesn't expect it in version.nim
17:14:27dom96shashlick even if I did I wouldn't remember
17:14:33FromDiscord<arnetheduck> I also don't think that it's able to lift constant constructors in all cases
17:15:01*ng0_ joined #nim
17:15:45*Trustable quit (Remote host closed the connection)
17:16:53FromDiscord<arnetheduck> re result, it's already kind of a variable, no? I've never been fond of it , neither the implementation (which is pretty messy due to how the compiler uses `TLoc` passed into the node processing function, and you never know what that tloc is/comes from) nor the feature itself, it's pretty useless with the other return types (and for the few corner cases, one can just make an explicit var)
17:17:24*ng0 quit (Ping timeout: 260 seconds)
17:18:49FromDiscord<arnetheduck> nim has better codegen for large result variables (except for the bugs where it calls genericreset 2-3 times), the ones that are transformed into a parameter - I don't do the rvo dance.. potentially that would be an interesting transform to have, but then again, perhaps not - `llvm` has special features to deal with large object returns so if that transform is done by default, it will again be a pessimization
17:19:33FromDiscord<arnetheduck> @Clyybber ^
17:20:48FromDiscord<arnetheduck> a meaningful change that we've run into lots of times is `genericReset` - if you could get rid of that, it would be a big win (it should probably be replaced by explicit, type-specific functions that can be inlined)
17:21:46FromDiscord<arnetheduck> at least, that's what I'm going to do for `nlvm` if I ever have time - and having the same structure in the C code would make it more maintainable
17:22:49FromDiscord<arnetheduck> re optimizations, the way `llvm` works is that you add the optimization passes that make sense for your language - if you can generate "good" code out of the box, that's obviously faster/better
17:29:10FromGitter<Willyboar> @disruptek can't make it work
17:32:45*elrood joined #nim
17:34:14clyybberarnetheduck: I had that planned.
17:35:18clyybbergeneric reset I mean
17:40:25leorizewhat exactly does genericReset do? I heard from people who optimize Nim code that it's performance hell
17:40:46leorizebut I'm not quite sure what it is and when will it be used
17:52:19jkenCan someone explain this error to me? Position* = ref object of Component
17:52:19jken x*, y*, z*: float
17:52:19jken Dimensions* = ref object of Component
17:52:20jken width*, height*, depth*: float
17:52:20jken ControlledCamera* = ref object of Component
17:52:21jken Controllable* = ref object of Component
17:52:22jken RenderBlock* = ref object of Component
17:52:24jkenoops.. sorry.
17:52:36jkenexpression 'init(app)' has no type (or is ambiguous)
17:52:46jkenclipboard is borked on my system
17:53:01YardanicoYou're trying to do something like "let a = init(app)" but init(app) doesn't return anything
17:53:04Yardanico(probably)
17:53:20disruptekmore likely it's the last line in a statement list that must return a value.
17:53:25jkenI am not assigning the return
17:53:36jkenand the proc does not specify a return type
17:53:53Yardanicocan you post the source code of the proc and the way you call it in ix.io or other paste service?
17:54:03Yardanico(it'll be probably a bit too large to fit in IRC :P)
17:54:46jkenThis is the proc
17:54:46jkenhttps://paste.debian.net/plain/1109375
17:54:59jkenI import the module it is in (platform)
17:55:07jkenand then call platform.init(app)
17:55:10jkenwhere app is an Application
17:55:43Yardanicowhy platform.init(app) though?
17:56:00leorizeto avoid collision persumably
17:56:19jkenI am trying to refactor so that platform, and some other modules I have, can be added as modular layers in my Application
17:56:28jkenso I have other modules with the same procs/signaturs
17:56:45leorizeso what's the content of the line in the error message?
17:57:10jkenIts this proc:
17:57:10jkenproc init(app: Application):
17:57:11jken platform.init(app)
17:57:26leorizeafter proc declaration it's `=`
17:57:28leorizenot `:`
17:57:36jkenah derp
17:57:40jkenmy bad
17:58:19jkenThank you.
17:59:15leorizethe first time I got that I was confused as well :p
17:59:27leorizeguess we need some context-aware error messages
18:02:03*nsf quit (Quit: WeeChat 2.6)
18:09:03FromDiscord<arnetheduck> leorize, it will reset an instance to its default state, meaning all zeroes/nils - it walks object graphs using RTTI which is really inefficient because no inlining can happen etc
18:09:17FromDiscord<arnetheduck> it's also called redundantly due to bugs, compounding the issue
18:10:02Araqit was mitigated in version 1, and will be gone in version 1.1
18:10:07AraqI think.
18:10:42Araqthe new seqs and strings don't work with it anyway, time to kill it
18:15:35*PMunch joined #nim
18:20:29*icyphox_ joined #nim
18:20:56FromDiscord<kodkuce> i want magic new runtime or something so i can say to rust people they gey and nim better
18:31:13*icyphox_ quit (Quit: icy's znc)
18:32:50lqdev[m]@kodkuce that's a pretty radical idea, lol
18:40:26*tklohna_ quit (Ping timeout: 276 seconds)
18:49:00*Hideki_ joined #nim
18:54:03*Hideki_ quit (Ping timeout: 268 seconds)
18:57:28FromGitter<xmonader> ```code paste, see link``` ⏎ ⏎ any idea how to fix that? removing .closure. also doesn't work [https://gitter.im/nim-lang/Nim?at=5db0a298a03ae1584ff79f38]
18:58:16FromGitter<xmonader> ```code paste, see link``` ⏎ ⏎ that's what i'm trying to do [https://gitter.im/nim-lang/Nim?at=5db0a2c814d55a3785626c33]
18:59:21*leorize quit (Remote host closed the connection)
18:59:49*leorize joined #nim
19:05:21*tklohna_ joined #nim
19:10:20*tklohna_ quit (Ping timeout: 276 seconds)
19:21:00*elrood quit (Quit: Leaving)
19:41:46*kkkk joined #nim
19:42:12*PMunch_ joined #nim
19:42:27*kkkk quit (Remote host closed the connection)
19:45:42*lritter quit (Ping timeout: 246 seconds)
19:46:18*narimiran joined #nim
19:47:18FromDiscord<mratsim> (fixed)
19:48:22*PMunch quit (Remote host closed the connection)
19:48:44*PMunch_ is now known as PMunch
19:51:53*ng0_ is now known as ng0
19:52:40FromDiscord<ZeeQyu> xmonader: Couldn't reproduce, I added dummy declarations to let it compile, but I'm guessing there's more going on in your code. Hope my experiments help you in some way.
19:52:40FromDiscord<ZeeQyu> Which nim version are you on, btw? I did v.0.0
19:52:47FromDiscord<ZeeQyu> v1.0.0 and it worked
19:53:05FromDiscord<ZeeQyu> https://play.nim-lang.org/#ix=1ZDf
19:58:34*nsf joined #nim
20:03:01*lmariscal quit (Quit: I'm Out!)
20:04:57*clyybber quit (Quit: WeeChat 2.6)
20:05:22*lmariscal joined #nim
20:06:29FromDiscord<krab4t> notifications in discord doesnt work without @ 🙂
20:06:47FromGitter<xmonader> Yup @mratsim gave me lots of help. I think it may differ with the complete code @ZeeQyu ⏎ https://github.com/xmonader/nim-servy/pull/1
20:08:25FromDiscord<ZeeQyu> @krab4t Oh, believe me, I know. However, I don't know how mentions in gitter work, so at that point, it's just easier to let people read chat when they feel like reading chat.
20:09:52FromGitter<xmonader> question why the unpacking here works ⏎ ⏎ ``` let parentName, dirName, ext = splitFile(thepath) ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5db0b390ef84ab37868534d6]
20:10:30FromDiscord<ZeeQyu> Thanks for showing that pull request. I might've learned something. Not sure though
20:11:39*narimiran quit (Ping timeout: 240 seconds)
20:25:15*alexander92 joined #nim
20:30:30*nsf quit (Quit: WeeChat 2.6)
20:30:53*PMunch quit (Remote host closed the connection)
20:33:51stefantalpalaruWhy was this repo archived? https://github.com/nim-lang/csources
20:35:43FromDiscord<ZeeQyu> A decision was made to freeze the csources to 20.2, as everything after 1.0.0 is intended to have a backwards compatability guarantee. So using those csources you should be able to reach any recent release using koch's iteration compilation
20:36:50FromDiscord<ZeeQyu> I'm guessing the archival was a way to formalize that decision
20:36:55stefantalpalaruOK
20:41:53Araqexactly
20:42:06FromDiscord<ZeeQyu> Trying to find where I read it. Was some weird place like the install notes of something, in a part of a list of steps to take when releasing a new compiler version
20:42:19FromDiscord<ZeeQyu> But I guess confirmation from Araq is an easier source
20:44:54stefantalpalaruI was worried you're dropping the csources Git repo. That's what usually happens with abandoned GitHub repos - they get archived as a sign that people shouldn't bother reporting bugs.
20:45:37disruptekwell, they shouldn't.
20:46:21FromDiscord<ZeeQyu> Perhaps a readme update to the csources repo is in order then, with the same content as my answer above. If that's possible after it's been archived, don't know how permanent that action is.
20:46:45Araqyou can un-archive it
20:47:11*brainproxy quit (Ping timeout: 276 seconds)
20:47:16FromDiscord<ZeeQyu> Nice
20:48:42Araqit was brought up that it might eventually become too hard to have a Nim compiler that can build from csources 0.20.2
20:49:21Araqif that happens (and we hope it's 5 years away) we will introduce nim-lang/csources2
20:50:08FromDiscord<ZeeQyu> Why prefer that over just updating csources?
20:51:12Araqbecause this way all the scripts that use 'git clone csources' continue to work
20:51:20FromDiscord<ZeeQyu> Fair
20:53:35FromDiscord<ZeeQyu> But if those scripts want to use nim 1.40.0, then they all have to be updated. What would change in the compiler that would make those original scripts not work?
20:56:56rayman22201ideally all the scripts would be pinned to a git hash, but I think it's too late to change all those scripts now. Too many copies out in the wild.
20:58:04*brainproxy joined #nim
20:58:20stefantalpalaruThat's what I do, I target a specific commit: https://github.com/status-im/nimbus-build-system/blob/master/scripts/build_nim.sh
20:58:56rayman22201yeah. That's the smart thing to do.
21:00:15AraqZeeQyu: new Nim versions can usually not compile old system.nim files, Nim gets more and more picky
21:02:56*brainproxy quit (Ping timeout: 268 seconds)
21:03:17shashlickall nim releases come with csources included
21:05:31stefantalpalaruOnly the tarballs, IIRC.
21:05:44Araqshashlick: yeah but our own CIs don't use that either
21:06:23Araqunfortunately. plus our "build from source" instructions always told to do it via "git clone csources"
21:07:01Araqso instead of fixing every script and our docs, we made it work as documented. *shrug*
21:09:30shashlickmakes sense
21:10:57FromDiscord<ZeeQyu> Araq: So if you were to try to run something you wrote a while ago with a newly compiled compiler, based on updated csources, then we can't compile a legacy compiler with that compiler. Is that what you're saying?
21:10:58FromDiscord<ZeeQyu>
21:10:58FromDiscord<ZeeQyu> But in that case, if we have old csources to compile an old compiler, then koch to a new compiler, we can't use the new compiler to go back to the old one. Which means, every time we change compiler version backwards, we need to compile from csources.
21:10:58FromDiscord<ZeeQyu> In that case, shouldn't we have a hard break to a new major version at each time we can't compile from the old csources anymore? Or is that what you mean?
21:13:27lqdev[m]shashlick: I'm getting an incomplete struct error in nimterop because a header I'm importing doesn't contain the struct's implementation, how can I fix this?
21:13:31Araqif I update csources to Nim v2 they cannot compile Nim v1 anymore. you would need to checkout a different version from csources and I've been told that nobody will be able to figure it out and hell will freeze over and we'll all die
21:13:38*solitudesf quit (Ping timeout: 265 seconds)
21:13:56FromDiscord<ZeeQyu> But isn't that still the case with a csources2?
21:14:07lqdev[m]https://termbin.com/86ot this is my wrapper
21:14:19FromDiscord<ZeeQyu> Just that they need to pick another repo instead of checking out another commit
21:14:56Araqbut that's opt-in, csources can still compile v1
21:15:00shashlick@lqdev - trying
21:15:02Araqthat's the difference.
21:15:14Araqit's not really all that hard to understand, is it?
21:15:53*alexander92 quit (Quit: WeeChat 2.4)
21:15:59FromDiscord<ZeeQyu> I'm guessing the detail I was missing was that csources2 is bound to nim 2.x. Given that, it makes way more sense
21:16:13shashlickhmm - wfm
21:18:02shashlick@Araq - you have been tagging csources so it is possible to build older versions by using corresponding csources
21:18:24Araqyes, I do know that
21:18:47Araqbut the scripts do not checkout versions, they all use "latest"
21:19:25shashlickwhich scripts - i know choosenim does this but it's a fallback if you have to build from github sources
21:19:52Araqbuild_all.sh:
21:19:54Araq[ -d csources ] || echo_run git clone --depth 1 https://github.com/nim-lang/csources.git
21:20:33shashlickwell if someone wants to build 0.18.0, it will still fail since csources master today cannot build it
21:20:47Araqyes, so it's correct since 1.0
21:20:49Araq:P
21:22:19shashlick😄
21:22:24shashlick@dom96 - easy one - https://github.com/nim-lang/nimble/pull/732
21:24:46Araqit's also all silly nonsense, by the same logic every C++ project should have gcc -std=c11 in its build instructions because when I checkout the git repo in 2040 C++2040 will be so different so that it doesn't work without this switch. Or something like that.
21:25:38FromDiscord<ZeeQyu> Oh god, I hope we've replaced c++ by 2040.
21:25:53FromDiscord<ZeeQyu> We probably won't, but that won't stop me from hoping
21:26:51Araqand you cannot add this switch to your build, because somebody checks our the version from 2019 where this switch is still missing
21:26:58Araq*out
21:27:33FromDiscord<ZeeQyu> Crap, you're right. Backwards compatibility is horrible.
21:27:53shashlickwhy not fix the build scripts instead - is it cause 1.0 has to be perfect
21:28:30Araqshashlick: I regard this solution particularly elegant, I don't have to fix the builds, nor do I have to update csources for a release
21:28:42Araqa release now takes less time than before
21:29:30stefantalpalaruOf course you need to explicitly pass the corresponding flag to the compiler if you target a specific standard version. C and C++ developers are not as crazy as you think, with their backwards compatibility requirements.
21:30:53*brainproxy joined #nim
21:31:26shashlickwell but now you are restricted to only use the features in the csourses version for the nim compiler going forward
21:31:37AraqI'm not.
21:33:23Araqin the worst case, I create csources2 and move on. And distros can still build v1
21:33:30disruptekyou guys are talkin' like your programs aren't compiled from C89.
21:33:46disruptekseems like a non-issue to me.
21:34:11FromDiscord<ZeeQyu> It's fine, we've hidden all the C89. The user doesn't have to see it.
21:34:37disrupteki haven't seen one complaint about not being able to submit a PR against csources.
22:14:29*Vladar quit (Quit: Leaving)
22:14:36FromDiscord<krab4t> so i just should use ` Option[bool] ` that makes code full of ` some(true|false) ` 👺
22:15:02disruptekis your project public yet?
22:15:25FromDiscord<krab4t> no, its 400 lines of code in one file
22:15:57FromDiscord<krab4t> how you make VS Code run nimble build over nim -c
22:16:14disrupteki dunno; i don't use vs code and i try not to use nimble.
22:16:43FromDiscord<krab4t> so what you use then
22:16:53FromDiscord<kodkuce> neovim
22:16:57FromDiscord<kodkuce> i think xD
22:17:03disruptekyeah.
22:17:28disrupteky'know, PoE was released 6 years ago on this date.
22:17:42disruptekyou'd be in good company if you wanted to get it out there.
22:18:12FromDiscord<krab4t> Joined: Mar 27, 2012
22:18:21disruptekwhat does `nimble build` do?
22:18:46FromDiscord<krab4t> build entire project with multiple files i think
22:21:07FromGitter<Willyboar> One step left for my static blog gen
22:22:04dom96Thanks shashlick
22:22:08dom96(for the Nimble PR)
22:22:10FromDiscord<krab4t> disruptek, i don't want to be in "their" company wtf, its just small tool for myself
22:22:34disruptekjust make a type with three values; Truthy, Falsey, and Neither. then return that instead of your bool Option.
22:23:23FromGitter<Willyboar> I ll make a break for some hot chocolate and "mpougatsa" and i will ask for some help
22:23:24FromGitter<Willyboar> :)
22:23:30dom96we have csources2 now?
22:23:42dom96what's next? Nimble2?
22:24:14disrupteki started a nimble rewrite in perl6.
22:24:25disruptekit's not as bad as it sounds.
22:24:33dom96disruptek, you're the hero we don't deserve
22:24:38disrupteklol
22:24:50dom96Araq, Why. Is. There. No. Nim. 1.0.2. Release. Article.
22:25:06disruptekdom96 got his period today.
22:25:10disruptekseveral of 'em, in fact.
22:27:13miprihttps://irclogs.nim-lang.org/23-10-2019.html#12:10:56 about that
22:27:27dom96Oh nice. FWIW I don't condone such language in this channel
22:27:42mipriso this: https://github.com/nim-lang/Nim/blob/devel/changelogs/changelog_1_0_2.md
22:30:56dom96mipri, yeah, I saw that. See https://irclogs.nim-lang.org/23-10-2019.html#12:31:05
22:32:34dom96Fine, since nobody is going to do it, I'll write it myself.
22:40:09*brainproxy quit (Ping timeout: 265 seconds)
22:40:26*Hideki_ joined #nim
22:48:07disruptek/home/adavidoff/git/gully/gully.nim(268, 11) Hint: quit() called [QuitCalled]
22:48:13disruptekbut whyyyyyy
22:48:50FromGitter<Willyboar> Can i have a little help please? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5db0d8d13d669b28a0c579ca]
22:49:36disruptekagain?
22:49:44disruptekbecause `return` is the crash operator.
22:49:59FromGitter<Willyboar> :) i didnt make it
22:50:04disruptekit crashes the compiler at top-level, and it crashes your procedure should it occur therein.
22:51:21*ng0 quit (Quit: Alexa, when is the end of world?)
22:53:21mipriin with return? You mean if `echo d` is replaced with `return d`? obviously once it returns, the rest of the loop doesn't happen.
22:53:31mipritry `result &= d`
22:54:32dom96narimiran[m], Araq: I hope you will forgive me for this: https://nim-lang.org/blog/2019/10/23/version-102-released.html
22:55:33FromGitter<Willyboar> @mipri it seems is working
22:55:48FromGitter<Willyboar> you are the best thank you
22:56:01FromGitter<Willyboar> @disruptek thanks you too
22:56:45disruptekoh no, you're not blaming _me_ for that code.
22:57:10*Hideki_ quit (Remote host closed the connection)
22:57:55*Hideki_ joined #nim
22:59:13*Hideki_ quit (Remote host closed the connection)
22:59:27*Hideki_ joined #nim
22:59:40rayman22201I think it looks good @dom96 👍
22:59:50dom96rayman22201, thx <3
23:00:09rayman22201someone has to do the marketing around here :-P
23:00:44*Hideki_ quit (Remote host closed the connection)
23:01:20*Hideki_ joined #nim
23:02:31disrupteknone of my nim 1.0.1 code is working since updating to 1.0.2. 🤔
23:03:16disruptek/home/adavidoff/git/gully/gully.nim(327, 28) Error: string literal must be of some string type
23:03:27disruptekresult.add Footer, "]#", "footer",
23:03:46disrupteki'm chock-a-block with string literals here, people.
23:04:53*brainproxy joined #nim
23:06:16*Hideki_ quit (Ping timeout: 268 seconds)
23:10:36*brainproxy quit (Ping timeout: 265 seconds)
23:18:04FromDiscord<Kiori Sün> Hi there, I'm looking into Nim for JS deving, I would need it to be able to import js modules(ideally), and do code splitting in some term.
23:18:04FromDiscord<Kiori Sün> Currently i use typescript+parcel. It doesn't seem Nim has the required features for my non SPA use case. Also I've read somewhere in the forums that the js code Nim outputs isn't optimizable by the JIT, but it was an old post somewhere.
23:18:04FromDiscord<Kiori Sün> Does anyone has a good experience with Nim in JS-Land?
23:19:21*krux02_ joined #nim
23:22:51*krux02 quit (Ping timeout: 240 seconds)
23:23:14stefantalpalaruWhy would any JS code not be JIT-able? I don't think that's a thing.
23:27:22miprihttps://v8.dev/blog/elements-kinds#avoid-reading-beyond-the-length-of-the-array f.e.
23:27:29FromDiscord<Kiori Sün> Depending on how it's written the vm might not be able to identify hot code paths, etc
23:28:00FromDiscord<Kiori Sün> i don't remember the specifics of the post, I'm just passing on what i read. and i don't know about the quality of the output code
23:29:07FromDiscord<Kiori Sün> one of my main concerns that i seem to find no info on is code-splitting with nim. Seems impossible. I'm not sure about the using JS modules situation.
23:34:46*Hideki_ joined #nim
23:38:59*brainproxy joined #nim
23:49:14*Hideki_ quit (Ping timeout: 240 seconds)
23:57:17rayman22201It's not impossible, but it's not "well supported" either. code splitting is a lot like dlls. (the JS world re-inventing the wheel yet again...)
23:58:40rayman22201You have to compile each module that you want to "split" separately, and then use something like this to stich it back together when needed: https://github.com/filamentgroup/loadJS