00:16:46*gangstacat joined #nim
01:05:02*beatmox quit (Ping timeout: 268 seconds)
01:05:39*beatmox joined #nim
01:18:36FromGitter<arnetheduck> switch to https://github.com/arnetheduck/nim-result and you wont need any of that crap :)
01:32:08*rnrwashere joined #nim
01:32:11*rnrwashere quit (Remote host closed the connection)
01:33:14*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:08:12*banc quit (Quit: Bye)
02:14:06*[rg] joined #nim
02:17:32*dddddd quit (Remote host closed the connection)
02:29:01*banc joined #nim
02:32:28*cyraxjoe joined #nim
02:48:20*rockcavera joined #nim
03:26:03*rnrwashere joined #nim
03:32:16*rnrwashere quit (Remote host closed the connection)
03:51:53*rnrwashere joined #nim
03:56:59*leorize joined #nim
04:03:02*rnrwashere quit (Remote host closed the connection)
04:11:48*rnrwashere joined #nim
04:36:51*nsf joined #nim
05:04:00*rnrwashere quit (Remote host closed the connection)
05:20:20*narimiran joined #nim
05:24:35*leorize quit (Quit: WeeChat 2.3)
05:47:06*solitudesf- joined #nim
05:52:33*leorize joined #nim
06:02:04*[rg] quit (Quit: Leaving)
06:03:41FromGitter<kayabaNerve> Exceptions are zero cost, and that doesn't tell me by the proc def the absolute list of what the function can raise.
06:04:42Araqhint: it doesn't fucking matter.
06:04:59Araqyes it can raise any kind of exception. you handle it. the end.
06:05:11FromGitter<mratsim> what? exceptions are zero cost?
06:06:31Araqthey are "negative cost" compared to excessive ifs
06:06:51Araqthey have non-zero cost compared to 'on error abort'
06:07:05Araq(assuming 'nim cpp')
06:07:17Araqmany many people do not understand this...
06:08:38*krux02 joined #nim
06:12:53FromGitter<alehander42> well if you can't differentiate between exceptions in your effect system, there is not much point in using anything which is not Exception
06:13:04FromGitter<alehander42> (maybe i am reading the discussion wrong)
06:13:21FromGitter<alehander42> otherwise i agree, exceptions are becoming underrated these days
06:16:25FromGitter<kayabaNerve> @mratsim Nim exceptions, when using the C++ backend, are C++ exceptions, and C++ exceptions are zero cost.
06:16:37FromGitter<kayabaNerve> Sorry, I always use C++. I forgot C is default.
06:16:48FromGitter<mratsim> I'm curious how C++ exceptions are implemented in assembly
06:19:04FromGitter<kayabaNerve> Exceptions are very useful, and forcing myself to handle them has me write cleaner code which is less likely to be disrupted. I force myself because I suck at error handling when it's not forced.
06:19:29FromGitter<kayabaNerve> The raises pragma cleanly identifies what errors I need to handle. Nim-Result doesn't have that feature.
06:20:27FromGitter<kayabaNerve> I've never had a case where I can't differentiate exceptions. Just a case where I'm forced to include Exception, and since Exceptions are hierarchical...
06:26:06FromGitter<kayabaNerve> As a quick question, what are the odds of `await asyncProc()` throwing Exception, assuming the proc itself doesn't throw anything pre-async macro?
06:26:30FromGitter<kayabaNerve> I'm guessing it's only even possible if someone steps into the async inner workings but wanted to check
06:43:22*PMunch joined #nim
06:48:31FromGitter<gogolxdong> How to parse `"["a","b"]"` to array or seq?
06:49:37*solitudesf- quit (Ping timeout: 245 seconds)
06:49:40FromGitter<gogolxdong> assuming it's a varchar stored in mysql as ["a","b"]
06:50:54leorizeI'd say it's not trivial
06:51:18leorizeshouldn't you use a table for that?
06:51:25Zevvdo you care about properly handling quotes in your string?
06:53:07Zevvif no, http://paste.debian.net/plain/1079244
06:53:10Zevvif yes, let me know :)
06:55:31FromGitter<gogolxdong> asked this before, like parseStmt or something to parse the symbol to array or seq directly.
06:56:09*leorize quit (Ping timeout: 256 seconds)
06:56:22ZevvI assume you want to do this at run time, not at compile time, right?
06:56:51FromGitter<gogolxdong> sure
06:57:37*leorize joined #nim
06:59:18ZevvI guess there's no Nim there to interpret Nim code for you, so you'd have to parse it yourself
06:59:47Zevvsee the above paste for one possible solution
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:36Zevvhttp://p.zevv.nl/?92ff also handles \\ and \"
07:04:51*gmpreussner joined #nim
07:06:42ZevvCould you not parse as json?
07:06:46Zevvwould be more robust
07:07:17Zevvhttp://p.zevv.nl/?0559: much simpler
07:15:35FromGitter<gogolxdong> json is a good approach.
07:18:54FromGitter<alehander42> hmm i love how easy is to work with nim parser runtime
07:19:08FromGitter<alehander42> it's basically almost the same as macros, but you use PNode instead Node
07:21:22Araqalehander42: my point is mostly that exceptions are not understood by many and most arguments against them are terrible.
07:21:31narimiran@alehander42 https://github.com/nim-lang/Nim/pull/11094 is ready for some testing if you want....
07:21:57FromGitter<mratsim> rawGetKnownHCImpl :?
07:22:00FromGitter<alehander42> parsing nim on runtime might be an overkill tho, have to benchmark
07:22:39leorizeafaik the only way to have multi-line statement in Nim is to use a trailing binary operator right?
07:22:45FromGitter<alehander42> ah Araq yeah kinda, still i'd argue it's subjective, one can always prefer a more explicit style of error handling, nothing wrong with that
07:23:03leorizeI'm gonna look into implementing NEP1 and some context awareness for nim.nvim's indent script
07:23:08FromGitter<mratsim> any operator works @leorize
07:23:19Araqas does ';', leorize
07:23:21*jjido joined #nim
07:23:26FromGitter<alehander42> narimiran, thanks, i'll try to rebase languist on this branch on my next succesful build
07:23:52narimiran@mratsim "rawGetKnownHCImpl" was there before, 98% of the diff is just moving some code around
07:24:48Araqalehander42: there is plenty of "wrong" with that, it's so bad that nobody seriously does it and languages weasel out.
07:25:44Araqany time Go's + does an integer wrap around "for you" it's because of language design hubris.
07:25:48*xet7 joined #nim
07:26:35Araqif Option[T] would be the answer why does Rust's '+' not produce one?
07:26:38FromGitter<alehander42> well i mean more like Result-based stuff (most fun langs, rust etc)
07:26:47FromGitter<alehander42> well what does rust do for overflows
07:27:05Araqit dies in debug mode, it wraps around in release mode
07:28:00FromGitter<alehander42> is there an option to disable wrapping around in release?
07:28:17Araqprobably but here is the problem:
07:28:46FromGitter<alehander42> well, "test in debug mode, do one of those other things in release" rings a bell to me ..
07:28:47FromGitter<alehander42> :D
07:28:51Araqif your code does do(); stuff(); undo() because either the language "has no exceptions" or 'stuff cannot raise'
07:29:07Araqthen stuff can still die and your code is still wrong
07:29:29Araqnot to mention that later on 'stuff' could start to raise/die
07:29:31FromGitter<mratsim> integer wraps around because of x86 :p
07:29:38FromGitter<alehander42> how can stuff `die` ?
07:29:40jjidoAre you talking about exceptions for arithmetic operations?
07:29:50FromGitter<alehander42> if it's statically proved that it should not
07:30:12Araqreally? you prove every integer operation to never overflow?
07:30:24Araqnot even Ada can do that.
07:30:38FromGitter<alehander42> overflowing is not dying
07:30:54FromGitter<alehander42> and this approach sounds exactly like the nim owned ref approach
07:30:57Araqit is in Rust
07:31:02jjidoI am working on a language where the solution is to error out if there is an error handler, or just return (wrong) result otherwise
07:31:05Zevvunless it's in your morphine pump
07:31:34Araqwhen you don't die on overflow it's even worse...
07:31:49Araqwhen you don't die/raise on overflow it's even worse...
07:32:00FromGitter<alehander42> that's why you test
07:32:17FromGitter<alehander42> i can say the same about memory segfaults/corruption and owned refs
07:32:36Araqyes you can do that but
07:32:48Araq(a) I never claimed it's THE solution for everything
07:33:02FromGitter<alehander42> and integer overflow doesn't just happen all the time, you can't say "X error handling" doesnt make sense because it doesnt work perfectly for one edge case
07:33:12Araq(b) owned refs are easier to test extensively. Integer arithmetic is harder.
07:33:46FromGitter<alehander42> you can fuzz the shit out of it i guess
07:34:12FromGitter<alehander42> or even quickcheck-test your important functions/entrypoints
07:34:17Araqok, so you fuzz it and
07:34:33Araqtada. the result is that "yeah, really it can overflow, surprise"
07:34:39Araqwhat do you do?
07:34:54FromGitter<mratsim> Sacrifice a lamb to the Nim gods
07:34:59FromGitter<alehander42> no
07:35:02FromGitter<alehander42> you debug
07:35:20FromGitter<alehander42> i mean, what do you do when you find out you have a memory corruption problem
07:35:37FromGitter<alehander42> you reproduce and you decide on a fix
07:36:10Araqthere is no fix. You die with an error message.
07:36:18Araqlike you do for out-of-memory.
07:36:29Araqand then your undo() is not called.
07:36:41jjidoChange the variable type?
07:37:29leorizeAraq: does the "error when rc count > 0" of newruntime works?
07:37:58Araqleorize, it's implemented and sometimes triggers. I'm testing it for more complex examples
07:39:13FromGitter<alehander42> well maybe the overflow is unintended
07:39:26FromGitter<alehander42> but yeah, that's the point: you can decide what to do in this situation
07:39:40FromGitter<alehander42> ok added miran as remote
07:39:49FromGitter<alehander42> that would be easier for me to test other branches
07:39:58FromGitter<alehander42> not really sure if that's how people test pr-slocally
07:40:20Araqalehander42: well without exceptions you "can't decide what to do" as the language decided for you, the program dies
07:40:38PMunchHmm, why doesn't this work? http://ix.io/1H9J/Nim seems like overloading the macro confuses things..
07:41:11FromGitter<alehander42> but isn't the point that with exceptions you can't find out when it can overflow statically
07:41:12FromGitter<alehander42> anyway
07:41:16FromGitter<alehander42> so you still need to test it
07:41:29FromGitter<alehander42> and in other langs if you decide you want to do something else
07:41:42FromGitter<alehander42> you can e.g. use different operators/functions
07:41:46FromGitter<alehander42> custom*
07:41:54FromGitter<alehander42> other error handling systems*
07:41:56Araqno the point is you *must* wrap your 'undo' in a 'finally' or maybe an 'atexit' handler
07:42:08Araqand you cannot blame exceptions for this need.
07:42:45FromGitter<alehander42> ah
07:42:49Araqthe point is that not having exceptions does not make the problems disappear, they are only even more cumbersome to solve
07:43:41FromGitter<alehander42> well, i have to think about the overflowing problem
07:45:17Araqoverflow is much more like out-of-memory, you have too few bits available
07:45:38Araqit's not a "bug" like a dangling pointer
07:45:45Araqor an array index out of bounds
07:49:50leorizeAraq: `discard new RootObj` SIGSEGV on newruntime
07:49:59leorizeon the latest commit rn
07:52:08FromGitter<alehander42> sometimes it's a bug: sometimes it just shows you don't process your data correctly and unusually big / small numbers appear somewhere
07:52:20FromGitter<alehander42> narimiran, it seems to work for me , your branch
07:52:33narimirannice to hear, thanks for testing it!
07:52:33FromGitter<alehander42> the weird thing is my older nim seems to also not need initTable in some cases
07:52:38leorizeAraq: the following didn't crash on newruntime, is that a bug? http://ix.io/1H9M/nim
07:52:42FromGitter<alehander42> not very sure if i am not doing something wrong
07:54:17FromGitter<alehander42> anyway i stop using initTable for now, awesome, just need to do the same with JsAssoc if it seems possible
07:55:26Araqleorize, not sure yet
07:56:07leorizeif I add `discard r`, it will crash, but `echo r[]` wouldn't
07:57:13Araqwell the 'discard new RootObj' surely is a bug
07:57:22Araqwhy would it fail?
07:57:53leorizesystem.nim(1637) new
07:58:00Araqalso the ref testing doesn't produce a SIGSEGV but a decent error message
07:58:29leorizeI'm on Linux if that makes any difference
07:58:54livcdPMunch: did you already make your web+file whatever that was?
08:05:01*floppydh joined #nim
08:07:47PMunchlivcd, web+file?
08:08:47livcdPMunch: you did some frontend with file processing for some payments file did not you?
08:10:08PMunchOh right, yes that's done
08:10:32PMunchBut I just went with using Jester and made the site with Javascript, didn't create the little framework I was talking about
08:17:24PMunchHmm, reordering the two macros seems to work..
08:17:27PMunchIs that a bug?
08:17:38Araqprobably :-)
08:18:02*slugm joined #nim
08:18:48PMunchHmm, so depending on the order it will match one or the other. While the other creates an error
08:33:33*floppydh quit (Quit: WeeChat 2.4)
08:33:43*floppydh joined #nim
08:34:13*floppydh quit (Client Quit)
08:34:40*floppydh joined #nim
08:35:52*floppydh quit (Client Quit)
08:36:06*floppydh joined #nim
08:36:22*floppydh quit (Client Quit)
08:36:34*floppydh joined #nim
08:36:44*Vladar joined #nim
08:44:50*Minimisthupper joined #nim
08:48:33*slugm quit (Remote host closed the connection)
08:56:07*Minimisthupper97 joined #nim
08:57:05*Minimisthupper97 quit (Remote host closed the connection)
09:03:49*iLiquid joined #nim
09:07:57*dddddd joined #nim
09:16:37*i7sDream joined #nim
09:26:17couven92@shashlick, you looked for me yesterday?
09:26:18*jasper__ quit (Remote host closed the connection)
09:32:13PMunchYes, I told him that you might've tried to compile nimble for Android
09:32:32PMunchI remember you compiling Nim for Android, so I figured you might've tried that as well
09:32:47*tdc joined #nim
09:35:05PMunchHmm, is there a way to detect if Nim is creating documentation? I want to hide some symbols when that happens
09:35:43leorize`when defined(nimdoc)`
09:36:16*iLiquid_ joined #nim
09:36:17*iLiquid quit (Read error: Connection reset by peer)
09:36:30*iLiquid_ is now known as iLiquid
09:41:47couven92PMunch, huh... yeah, I remember there being some issues with nimble on android, which is basically why I troduced the android architecture to nim...
09:42:04couven92But I do also remember that I got it working in the end... Hmmm
09:50:00*pwntus joined #nim
09:50:00*pwntus quit (Changing host)
09:50:00*pwntus joined #nim
09:56:15leorizenew indent feature https://asciinema.org/a/Xe46stggKpPmAPP7yYSrmlxGh for nim.nvim :)
09:57:26leorizeanyone wants a test drive?
09:57:47narimiranof course :)
09:59:03FromGitter<alehander42> oh that's good for aligning field types etc
09:59:34FromGitter<alehander42> i'd love if there was a lint check for it
10:01:04leorizethere are plenty of linter plugins for nvim already, so I didn't add that feature
10:02:43leorizenarimiran: pushed to master :)
10:03:20leorizeI wish vimscript was typed :p I stumble into more type-related bugs while making this than logic bugs
10:04:46leorizea lot of fuzzing and tests would be needed :P
10:04:59leorizeI've only tested this on short sources
10:07:47*i7sDream quit (Ping timeout: 246 seconds)
10:12:13leorizeagh this broke autoindent :/
10:22:39*jjido quit (Quit: Connection closed for inactivity)
10:23:59PMunchleorize, thanks :)
10:24:31*leorize quit (Quit: WeeChat 2.3)
10:27:54*avanderneut quit (Remote host closed the connection)
10:29:10*lritter joined #nim
10:36:17*avanderneut joined #nim
10:44:06*seni joined #nim
10:52:14*Minimisthupper quit (Remote host closed the connection)
10:53:55PMunchHmm, is there a way to output just an rst version of the documentation?
10:54:01PMunchFor a specific module
10:54:31*stefanos82 joined #nim
11:04:51*Snircle joined #nim
11:22:16PMunchMode a new little module
11:23:14*tdc quit (Remote host closed the connection)
11:23:36*tdc joined #nim
11:31:27*Cthalupa quit (Ping timeout: 258 seconds)
11:31:54*Cthalupa joined #nim
11:32:07FromGitter<alehander42> btw why doesnt table define `contains` <=> hasKey
11:32:11FromGitter<alehander42> so in can work
11:32:27FromGitter<alehander42> currently it's strange because `in` doesnt lead to type error
11:32:36FromGitter<alehander42> but it just doesnt do the same which leads to logical errors which is bad
11:32:47FromGitter<alehander42> so i think it should either be a type error, or be supported
11:34:35FromGitter<alehander42> hm it seems it does the same
11:34:42FromGitter<alehander42> then i shuld stop using hasKey all the time nvm
11:34:52*tdc quit (Remote host closed the connection)
11:35:17*tdc joined #nim
11:36:48FromGitter<alehander42> hmm maybe i found a remaining todo @narimiran
11:38:13*sz0 joined #nim
11:39:05FromGitter<alehander42> https://paste.ofcode.org/BgTeDBcMPSRtrrGSjACE55
11:39:20FromGitter<alehander42> hasKey returns false instead of true for the first one
11:47:01narimiranouch. can you paste that in a comment under PR?
11:49:22FromGitter<alehander42> done
12:07:14livcdwhat the heck
12:07:28livcdI just watched a video about Haxe where they say there is a Nim target in development
12:15:23FromGitter<alehander42> nim is a pretty flexible target language, not surprising
12:15:30FromGitter<alehander42> do you have a link?
12:17:24*neceve joined #nim
12:20:17FromGitter<arnetheduck> @mratsim https://monoinfinito.wordpress.com/series/exception-handling-in-c/ - how exceptions are implemented.. it's pretty good
12:23:49FromGitter<arnetheduck> Araq, rust has https://doc.rust-lang.org/std/primitive.i32.html#method.checked_add if you want the `Option` variant of add
12:24:19FromGitter<arnetheduck> (and wrapped_add, and saturated_add etc)
12:27:40*nc-x joined #nim
12:27:55nc-x@alehander42 https://github.com/RapidFingers/Craxe
12:28:28nc-xIt is not official haxe backend
12:28:42nc-xbut uses haxe macros instead
12:29:22nc-xI don't think anybody is working on a "proper" nim target for haxe
12:29:57*nc-x quit (Client Quit)
12:30:15livcdi do not know if he meant craxe
12:30:17livcdjust a sec
12:30:36livcdhe just mentions it like by the way
12:31:12FromGitter<alehander42> "RapidFingers/ (location Mother Russia)"
12:31:16FromGitter<alehander42> oh mother russia..
12:32:32FromGitter<arnetheduck> > the weird thing is my older nim seems to also not need initTable in some cases ⏎ ⏎ for a while the behavior was that you could add things into the table but not get (it would not find them) if you didn't call initTable..
12:32:52FromGitter<arnetheduck> I think 0.19 might be like this
12:34:42FromGitter<alehander42> @arnetheduck yeah, that's the bug i experienced as well
12:35:59FromGitter<arnetheduck> and zero-cost exceptions (in c++) have a cost, generally - code bloat, missed optimizations etc. they just don't have a direct cycles-cost on try entry, like setjmp (no need to save jump point for alternative control flow etc)
12:40:12FromGitter<arnetheduck> but regardless of their cost, what an async transformation does is basically catch the exception, stash it away in a variable then retrow in the "handler". that's certainly not zero-cost - the future object is larger, becomes ref / can't be non-ref etc etc..
12:41:21FromGitter<arnetheduck> and that's a cost everyone has to pay, even those that don't need the exceptions
12:48:42narimiran"the behavior was that you could add things into the table but not get (it would not find them)" -- something like that is what happens in my PR
13:01:05narimiran@alehander42 i think i have a fix. let me test it a bit more first....
13:04:38FromGitter<gogolxdong> Production database is attacked by hacker, asking for 0.1bitcoin.
13:37:36*leorize joined #nim
13:46:59*drewr quit (Remote host closed the connection)
13:48:15Zevvthat's a fair price
13:55:22FromDiscord_<Zireael> the examples from documentation aren't quite true when it comes to properties: https://nim-lang.org/docs/manual.html#procedures-properties . I followed it when it came to getting, and it ignored the getter in favor of just getting the variable - I had to rename the function to something else for it to start working
13:58:54leorizethen wouldn't that be a bug?
13:59:39FromDiscord_<Zireael> probably, I was just checking that I hadn't misunderstood something...
13:59:41leorizeZevv: IIRC you're using nim.nvim indent script, right?
14:00:32ZevvI never got to switch to nvim, sorry
14:00:36Zevvtoo many machines
14:00:50leorizewell, but you're using the indent script, right? :p
14:00:53Zevvoh wait, I do use the ident I believe, let me check
14:00:59FromGitter<gogolxdong> Not much ,neither we have. I think He picked the wrong one, exactly the wrong country , bitcoin is sealed in China.
14:01:21Zevvleorize: ack
14:01:47leorizeI've made quite a lot of updates to the script, so please test the latest one :)
14:02:00leorizenow featuring NEP #1 indentation :)
14:02:04Zevvwhat are the changes? I never ran into any issues?
14:03:01leorizemore of a feature update actually :p
14:03:41FromGitter<gogolxdong> Database is always backuped.This trick is out of date.
14:03:42Zevvah that's sweet
14:04:01ZevvTell him he has to send you 0.1 bitcoin or you'll tell his mom
14:04:37FromGitter<gogolxdong> lmao
14:04:47ZevvYesterday I was looking for an exim log to do a performance test, I ran into a open rootfs from a hosting provider. I've been trying to get them to understand they have a security issue for the last 24 hours, but I can't get past first line customer support because I do not have a password
14:04:55ZevvNow I'm cracking the passwords so I can tell my password to support
14:05:14Zevveuh, *their* password
14:05:37Zevvooh look, I just found one. 'test123'
14:07:02FromGitter<gogolxdong> image a world has no password.
14:07:16FromGitter<gogolxdong> imagine
14:08:16FromGitter<gogolxdong> like a house without door
14:10:01Araq> and zero-cost exceptions (in c++) have a cost, generally - code bloat, missed optimizations etc.
14:10:25Araqthat's a cost that you have to compare against excessive if-statements
14:10:33Araqnot against "on error die"
14:10:50Araqobviously "on error die" wins for code size and optimizations
14:11:29Araqand as I said, it can be fine for applications and so -fno-exceptions is widely used.
14:13:14FromGitter<arnetheduck> sure, and that bloat is probably less than explicit error handling - also because you end up ignoring more errors that you didn't know could happen :)
14:15:11Araqthe hard part is library development, you easily end up playing a human compiler passing errors up your callstack because the library user might want to handle it in some form that is not 'die'
14:17:51*i7sDream joined #nim
14:18:37*noonien joined #nim
14:18:59noonienhow can i get the highest number of an int type?
14:19:01FromGitter<arnetheduck> yeah. I tend to think that libraries should very rarely die, better offer that choice to the user of the api. but I think the same about exceptions - core libraries can be exception-free and then offer an exception layer on top - it's easy to turn one into the other, but not the other way around.
14:19:23couven92noonien, `high(int)`?
14:19:28noonieni tried high(varName) and high(uint6), both resulting in an ambigous call when compiling
14:19:37FromGitter<arnetheduck> specially core libraries, to maximize their usefulness (at the expense of implementation cost in the library of course, but that's fair that libraries have a higher quality bar)
14:20:57noonien`Error: ambiguous call; both system...(a: uint64, b: uint64)[declared in ../../../../../../nix/store/0ig4fx5vnndrg2qqbr2yfhxcmz3lj7jr-nim-0.19.4/lib/system.nim(2118, 13)] and system...(a: uint32, b: uint32)[declared in ../../../../../../nix/store/0ig4fx5vnndrg2qqbr2yfhxcmz3lj7jr-nim-0.19.4/lib/system.nim(2118, 13)] match for: (int literal(3), uint16)`
14:22:13Araqso get your types right, 3'u16..high(uint16)
14:22:18*i7sDream quit (Ping timeout: 250 seconds)
14:22:55*solitudesf- joined #nim
14:25:29noonienAraq: this is the code that causes the issue: http://vpaste.net/raGDY
14:25:44noonienOH, the for is the issue, not the high()
14:25:57*floppydh quit (Read error: Connection reset by peer)
14:27:14noonienis there a way to cause an error at compile time if a constant condition is met?
14:28:26FromGitter<liquid600pgm> yes, use the `{.error.}` pragma: https://nim-lang.github.io/Nim/manual.html#pragmas-error-pragma
14:30:00noonienthank you!
14:36:37*PMunch quit (Remote host closed the connection)
14:39:35*fanta1 joined #nim
14:49:19*floppydh joined #nim
14:54:35FromGitter<mratsim> high for unsigned? no way :p
15:06:33*flaviu quit (Remote host closed the connection)
15:07:29federico3how can I detect the "main" .nim file in a project to run nim doc --project ... ?
15:11:10WilhelmVonWeinerpublic announcement, please stop abbreviating "string" to "strng" kthxbai
15:12:58*rnrwashere joined #nim
15:13:32xacedoes anyone know if you can use nim with nginx as a cgi?
15:14:15Zevvyou can do CGI with virtually all languages; nginx is the problem here
15:14:23FromGitter<jrfondren> nginx doesn't support cgi as a rule.
15:14:26Zevvas it does not do cgi
15:14:55xaceZevv: i shouldve reformatted the quesiton, is there a existable setup for using nim as a cgi for website related projects?
15:15:09FromGitter<jrfondren> there's a cgi module packaged with nim.
15:15:22xacewell doesn't have to be cgi, just a decent interface would suffice
15:15:43FromGitter<jrfondren> echo "Content-type: text"; echo(); echo "Hello, CGI"
15:15:58xaceoh shit, i didn't expect it to be included
15:16:27xacenvm, ill google it, it seems like someone else thought of this already :)
15:16:42livcdDo you guys think the era of Electron apps will end soon ?
15:17:18xacelivcd: unfortunately not. but that also depends on how long you are willing to stretch your definition of soon ;)
15:17:42FromGitter<jrfondren> the new Google Chat uses electron and it's bad enough to justify total war... but somehow there's no war. Google HQ remains unattacked. This doesn't inspire a lot of hope for the future in me.
15:18:56livcdi guess that means flutter is not ready? or the chat team decided on electron hmm
15:19:03FromGitter<jrfondren> the "I don't care about past activity, stop highlighting these channels" step takes half a minute in Google Chat. seconds+ in response time to clicks. clicks going through UI elements to open URLs.
15:19:19FromGitter<mratsim> Well, the choice is: Electron, QT, GTK+, Imgui/Nuklear, libui, Nigui, ....
15:19:43livcdmratsim: there are proprietary libraries as well
15:19:45*stefanos82 quit (Remote host closed the connection)
15:19:50FromGitter<jrfondren> maybe it's flutter. VS Code isn't anywhere near as bad.
15:19:58FromGitter<mratsim> finding a frontend dev and a designer familiar with HTML/JS/CSS is much easier
15:20:19livcdjrfondren: opening a larger log file in VS Code is terrible
15:20:25livcdlarger like -> 50mb
15:20:31FromGitter<mratsim> you didn't try Atom
15:20:55*rnrwashere quit (Remote host closed the connection)
15:20:56FromGitter<mratsim> Atom freezes for minutes, at least vscode opens them
15:21:38*rnrwashere joined #nim
15:26:23*rnrwashere quit (Remote host closed the connection)
15:26:36livcdI really want to explore sciter seems to always go under the radar
15:27:12FromGitter<mratsim> I have a plan to use the webview that is underneath sciter since a year ago :p
15:27:30FromGitter<mratsim> This one: https://github.com/oskca/webview
15:27:53*Vladar quit (Remote host closed the connection)
15:28:04livcdit looks really capable
15:28:15*Vladar joined #nim
15:28:20*[rg] joined #nim
15:28:20*Vladar quit (Read error: Connection reset by peer)
15:28:43*Vladar joined #nim
15:31:12*Vladar quit (Read error: Connection reset by peer)
15:31:34*Vladar joined #nim
15:31:36livcdmratsim: what are you going to create ?
15:31:59FromGitter<mratsim> https://github.com/numforge/monocle
15:32:33FromGitter<mratsim> transform that proof of concept into a full fledge data-viz and charting library
15:32:39FromGitter<mratsim> fledged*
15:32:56disruptekbetter than vega because...?
15:33:13Zevvmratsim: what's vega?
15:33:18FromGitter<mratsim> it uses vega
15:33:41FromGitter<mratsim> http://vega.github.io @Zevv
15:33:55disruptekso what's the win?
15:33:57FromGitter<mratsim> Vega and Vega-lite are a json format for dataviz
15:34:14FromGitter<mratsim> the win is that it works in Nim and would be integrated with Arraymancer
15:34:34FromGitter<mratsim> i.e. it would be similar to Altair not Vega: https://github.com/altair-viz/altair
15:34:35disruptekjson works in nim?!
15:35:29disruptekwhat's good about altair versus the vega suite?
15:36:00FromGitter<mratsim> Vega/Vega-lite is just grammar a description of what you want to plot
15:36:10FromGitter<mratsim> you have to convert your data into those descriptions
15:36:32disruptekwhen i say vega, i mean the whole ecosystem of vega-consuming viz apps.
15:36:34FromGitter<mratsim> Altair is that converter, it convert arrays into plottable json in the vega/vega-lite grammar
15:36:51FromGitter<mratsim> you can't feed a Numpy array to vega
15:37:41disruptekso the win is that it's not interative like voyager or the other one i can't remmeber...
15:38:35FromGitter<mratsim> The win is that I can use display the tensors I have
15:39:04disrupteki see, it's just for your arrays.
15:39:18disruptekit's altair-which-eats-arrays, but for nim.
15:39:26FromGitter<mratsim> yes
15:39:32disruptekcool. :-)
15:40:35disrupteki got interested in nim because i needed faster ai for stock trading, but i still haven't messed with arraymancer. it was the first project that drew me into the language, though. looks so promising.
15:41:28FromGitter<mratsim> qqtop is using Nim for trading but it might be only to monitor the ticker on the HK exchange
15:41:33FromGitter<mratsim> tickers*
15:41:49FromGitter<mratsim> and cooldome is using it as well
15:41:54FromDiscord_<Zireael> my 2 cents: Electron is really big and heavy, and I pretty much replaced it with the webview that someone already linked for mratsim
15:42:10disrupteki was working with LEAN and just got disgusted with the python<->c# interop.
15:42:38FromDiscord_<Zireael> I work every day with Python and Python's great until the moment that you need to ship it to consumers/players
15:42:55FromGitter<mratsim> That's Arraymancer readme :p
15:43:38*floppydh quit (Quit: WeeChat 2.4)
15:43:48FromDiscord_<Zireael> at work, Python's just the backend to a web frontend, so it doesn't have that hurdle, but for hobby stuff, well, I don't think there's anything that lets you ship Python apps without hassle
15:43:50disruptekthat's why there are so many make-your-model-in-python-and-then-compile-it-to-a-real-language projects now.
15:44:07*floppydh joined #nim
15:45:01FromDiscord_<Zireael> yep, and that's how I found Nim in the first place - at first I was wading through a sea of transpilers, most of them to or via JS, so I started thinking, why not use something that compiles to JS natively in the first place....?
15:45:01FromGitter<mratsim> The whole scientific community had this issue with Matlab and now Julia as well.
15:45:39FromDiscord_<Zireael> actually at first I was looking at targeting C, but then I thought, I do frontend at work more and more, time to learn, so I went with targeting JS instead
15:46:01FromGitter<Vindaar> @mratsim reg. monocle, you never commented on that PR of mine :P
15:46:13FromGitter<mratsim> I never saw it :p
15:46:19FromGitter<Vindaar> haha
15:46:32*rnrwashere joined #nim
15:47:11FromGitter<mratsim> merged @Vindaar
15:47:41disrupteki am targeting IR. i want zero-cost inter-vm interop between janusgraph and other code running under graal.
15:47:58FromGitter<Vindaar> thanks! then I guess the same is true for the loop fusion one: https://github.com/numforge/loop-fusion/pull/8
15:48:27disruptekbeing able to run the same code in my server and on mobile or web is just icing at this point.
15:48:36FromGitter<mratsim> Well, for ML IR if deep learning you have a lot of choice, if classic ML you have nothing :p
15:49:39disruptekit's ai winter for classic, ai summer for nn.