00:04:43 | dom96 | ahh, `getCurrentDir() / filename`, this was prepending a `/` on Android |
00:05:27 | * | ptdel quit (Ping timeout: 240 seconds) |
00:08:27 | dom96 | and now your font library doesn't know how to read the font files :) |
00:18:13 | leorize | disruptek: o/ |
00:19:52 | dom96 | Seems the best way about this is to allow passing a FileStream into readFontTtf |
00:30:36 | * | krux02_ joined #nim |
00:31:52 | dom96 | yay, it runs |
00:33:01 | * | gendarme quit (Quit: Leaving) |
00:33:07 | * | krux02 quit (Ping timeout: 240 seconds) |
00:36:20 | * | krux02_ quit (Remote host closed the connection) |
00:36:56 | * | ptdel joined #nim |
00:36:59 | * | ptdel quit (Client Quit) |
00:51:02 | * | rockcavera joined #nim |
00:55:15 | * | ptdel joined #nim |
00:55:20 | nisstyre | so twitter has this wacky timestamp format |
00:55:54 | nisstyre | https://play.nim-lang.org/#ix=2bUN |
00:56:10 | nisstyre | I have no idea what to put in there for the timezone offset (I assume that's what the +0000 bit is?) |
00:56:32 | disruptek | yep. |
00:56:58 | nisstyre | except https://nim-lang.org/docs/times.html#parsing-and-formatting-dates doesn't seem to have a format specifier for 4 digits |
00:57:03 | * | zedeus joined #nim |
00:57:14 | nisstyre | you can do zz but that's two |
00:57:23 | disruptek | so? |
00:57:31 | nisstyre | what can I do to parse it properly? |
00:57:36 | disruptek | ZZ00? |
00:57:51 | nisstyre | I guess that might work |
00:58:07 | nisstyre | no clue why they need 4 digits |
00:58:16 | disruptek | because it's hrs. |
01:00:34 | leorize | disruptek: pong |
01:00:38 | nisstyre | apparently it's not standard https://stackoverflow.com/questions/2917810/what-date-rfc-does-twitter-use |
01:01:06 | disruptek | leorize: hey, i forget what i wanted to ask you, sorry. 😁 |
01:01:13 | leorize | :P |
01:08:43 | * | lbart quit (Ping timeout: 260 seconds) |
01:09:53 | * | lbart joined #nim |
01:11:23 | * | theelous3 quit (Ping timeout: 272 seconds) |
01:18:59 | zedeus | wait, someone here trying to parse twitter stuff? |
01:19:51 | zedeus | nisstyre: https://github.com/zedeus/nitter |
01:21:05 | zedeus | his has an (almost) feature complete twitter parser, including profiles, search, lists, etc (missing "moments" and a couple other less important things) |
01:21:08 | zedeus | this*( |
01:22:48 | FromGitter | <ejstembler_gitlab> What should I use for unit testing in Nim? I found `unittest` but it recommends using `testament` instead, which I couldn't find. The Curated Packages list only shows Einheit. What are most people using? |
01:23:22 | * | dadada quit (Ping timeout: 268 seconds) |
01:23:50 | disruptek | unittest. |
01:33:36 | * | dadada joined #nim |
01:34:00 | * | dadada is now known as Guest91174 |
01:34:49 | FromGitter | <kaushalmodi> Another +1 for unittest |
01:36:32 | FromGitter | <xflywind> unittest or isMainModule(block+assert) |
01:39:41 | nisstyre | zedeus: that's cool, I already wrote an implementation of what I need without a library though |
01:39:52 | nisstyre | I just want to do some timestamp parsing at this point |
01:40:06 | zedeus | I didn't use a library either, nitter is a full twitter client based on web scraping |
01:40:20 | nisstyre | yeah, it looks well done anyway |
01:40:28 | zedeus | ty |
01:40:53 | nisstyre | zedeus: what did you use to parse twitter's "created_at" fields? |
01:41:17 | nisstyre | the +0000 is the offset from UTC in seconds, right? |
01:41:17 | zedeus | post creation date? |
01:41:36 | nisstyre | yeah, when you pull a tweet from the API, it has "created_at" as a field, with a timestamp |
01:41:44 | nisstyre | e.g. "created_at":"Thu Feb 06 23:23:52 +0000 2020" |
01:41:47 | zedeus | https://github.com/zedeus/nitter/blob/a89376008a91a4b4f9f971248047529e4bfd649c/src/parserutils.nim#L84 |
01:42:09 | nisstyre | ah that's unix time |
01:42:18 | nisstyre | oh I see you're parsing markup? |
01:42:24 | zedeus | hm can't help you with what the API returns as I don't use it |
01:42:31 | nisstyre | yeah, this is all from the API |
01:42:33 | nisstyre | thanks though |
01:42:40 | nisstyre | I don't understand why they do it differently |
01:42:46 | nisstyre | their whole API is awful tbh |
01:42:57 | nisstyre | I had to do a hacky workaround to reconstruct a thread |
01:43:11 | zedeus | hah, I could write a loooong blog post about oddities in their html too |
01:43:13 | nisstyre | this is the project I'm working on https://github.com/weskerfoot/TweetLog |
01:43:22 | nisstyre | it's similar to that thread reader app thing, but runs locally |
01:43:30 | nisstyre | and you use a js bookmarklet to save tweets |
01:44:06 | nisstyre | so the only place I'm touching markup is here https://github.com/weskerfoot/TweetLog/blob/master/bookmarklet.js |
01:44:25 | zedeus | nice, but unfortunately this requites a developer account, so I'm not sure many will get to use it |
01:44:33 | nisstyre | yeah, it is a bit of a hassle |
01:44:41 | nisstyre | but they usually let you create one fairly quickly |
01:45:01 | nisstyre | I don't know of a workaround that doesn't require me to run the app on a server with accounts |
01:45:24 | nisstyre | I could make the bookmarklet do the scraping maybe |
01:46:03 | zedeus | well consider this https://nitter.net/OldhamMade/status/1180631388250353665 |
01:46:25 | zedeus | nitter already has a way to perfectly parse twitter threads, storing them in easy to use data types |
01:46:46 | nisstyre | zedeus: what's the likelihood that it'll be broken by some future update to the frontend? |
01:46:50 | * | Guest91174 quit (Ping timeout: 240 seconds) |
01:47:27 | zedeus | tiny, they switched to serving the new javascript-based layout, but I rewrote my user agent generator to only make agents that trigger the old layout |
01:47:44 | nisstyre | ah ok, yeah that seems like a good workaround |
01:47:49 | zedeus | so to break, they would have to make big changes to their old (or legacy rather) layout |
01:47:56 | nisstyre | or remove it entirely |
01:48:15 | zedeus | well, they still have their old mobile layout for when you don't have javascript enabled, and that thing is probably 10 years old if not more |
01:48:18 | nisstyre | I have another project I work on that does stuff with Facebook's frontend, and they're apparently going to update it soon |
01:48:23 | nisstyre | but I use the mobile site for some of it |
01:48:24 | FromGitter | <ejstembler_gitlab> Okay, thanks disruptek, @kaushalmodi and @xflywind. I'm using `unittest` now. So far, so good... |
01:48:31 | * | dadada_ joined #nim |
01:48:49 | zedeus | _if_ it does completely break, I'll rewrite it to use the new public api with guest tokens |
01:48:58 | zedeus | I already do this to fetch video info |
01:50:25 | nisstyre | zedeus: I noticed you're using a specific fork of jester |
01:50:29 | nisstyre | any particular reason? |
01:51:08 | zedeus | to prevent asynchttpserver from crashing when run behind nitter, but I made a pr which has now been merged, so no not anymore |
01:51:19 | nisstyre | ah ok awesome |
01:51:36 | zedeus | although this will still require "jester#head" |
01:54:47 | zedeus | adding a proper API to nitter is planned but it'll take a while, so you could fork nitter and add whatever you need then use it in the /status/ router where you have access to the Conversation (thread) object, which includes the main tweet, before and after chains, and the replies |
01:55:17 | zedeus | let me know if you need help, I can guide you through the code if needed, but it should be fairly straight forward |
01:57:01 | nisstyre | zedeus: I might do that, thanks for linking the project |
02:02:13 | * | dadada_ quit (Ping timeout: 268 seconds) |
02:03:31 | * | dadada_ joined #nim |
02:17:38 | * | dadada_ quit (Ping timeout: 268 seconds) |
02:18:27 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:18:37 | * | dadada joined #nim |
02:19:00 | * | dadada is now known as Guest60696 |
02:20:46 | * | chemist69 joined #nim |
02:29:19 | * | couven92 quit (Ping timeout: 260 seconds) |
02:32:21 | * | Guest60696 quit (Ping timeout: 265 seconds) |
02:33:33 | * | dadada_ joined #nim |
02:42:33 | * | Kaivo quit (Quit: WeeChat 2.7) |
02:47:49 | * | dadada_ quit (Ping timeout: 265 seconds) |
02:48:31 | * | dadada_ joined #nim |
02:53:21 | * | LER0ever joined #nim |
03:02:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
03:03:18 | * | LER0ever quit (Remote host closed the connection) |
03:03:31 | * | dadada_ joined #nim |
03:13:55 | * | jwm224 quit (Quit: WeeChat 2.8-dev) |
03:15:39 | * | ptdel quit (Remote host closed the connection) |
03:17:14 | * | dadada_ quit (Ping timeout: 240 seconds) |
03:18:31 | * | dadada joined #nim |
03:18:55 | * | dadada is now known as Guest85308 |
03:30:47 | * | muffindrake quit (Ping timeout: 240 seconds) |
03:32:52 | * | Guest85308 quit (Ping timeout: 268 seconds) |
03:33:05 | * | muffindrake joined #nim |
03:33:31 | * | dadada_ joined #nim |
03:47:40 | * | dadada_ quit (Ping timeout: 268 seconds) |
03:48:34 | * | dadada_ joined #nim |
03:52:53 | * | ikan-keli_2 joined #nim |
03:52:57 | * | ikan-keli_ quit (Ping timeout: 260 seconds) |
04:00:28 | * | rockcavera quit (Remote host closed the connection) |
04:02:23 | * | dadada_ quit (Ping timeout: 272 seconds) |
04:03:31 | * | dadada_ joined #nim |
04:10:02 | * | vivus quit (Quit: Leaving) |
04:12:20 | * | dddddd quit (Ping timeout: 268 seconds) |
04:16:50 | * | dadada_ quit (Ping timeout: 240 seconds) |
04:18:31 | * | dadada joined #nim |
04:18:54 | * | dadada is now known as Guest72448 |
04:32:41 | * | Guest72448 quit (Ping timeout: 268 seconds) |
04:32:48 | * | nsf joined #nim |
04:33:26 | * | dadada_ joined #nim |
04:38:47 | FromGitter | <ejstembler_gitlab> I there something similar to Ruby's `Enumerable.each_slice` in nim? ref: https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-each_slice |
04:47:14 | * | dadada_ quit (Ping timeout: 240 seconds) |
04:48:31 | * | dadada_ joined #nim |
05:00:47 | FromDiscord | <Elegant Beef> Could a macro be used to increment a int and assign it for each file it's used in? |
05:01:25 | FromDiscord | <Elegant Beef> basically as a method of giving specific nim files an UID |
05:01:39 | disruptek | sure. |
05:01:49 | FromDiscord | <Elegant Beef> See im always dubious of your claims 😄 |
05:02:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
05:02:28 | disruptek | use the oids module for unique ids. |
05:02:50 | FromDiscord | <Elegant Beef> nah i just want basic ints |
05:03:00 | FromDiscord | <Elegant Beef> starting at 0 and working up |
05:03:07 | disruptek | admittedly, i'm almost always full of shit. |
05:03:31 | * | dadada_ joined #nim |
05:17:42 | * | dadada_ quit (Ping timeout: 268 seconds) |
05:18:31 | * | dadada joined #nim |
05:18:55 | * | dadada is now known as Guest42822 |
05:31:14 | FromGitter | <Varriount> Elegant Beef: A compile-time variable and procedure |
05:32:02 | * | Guest42822 quit (Ping timeout: 240 seconds) |
05:33:14 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#pragmas-compiletime-pragma |
05:33:15 | * | lritter joined #nim |
05:33:33 | * | dadada_ joined #nim |
05:37:06 | FromDiscord | <Elegant Beef> i see |
05:37:33 | FromGitter | <Varriount> There's also the `static` statement, which does something similar |
05:40:04 | FromGitter | <Varriount> Really, I wonder if compileTime should be renamed as `static` as well, since that's the term most used for compile time stuff |
05:40:33 | FromDiscord | <Elegant Beef> static to me means there's only a single instance of said thing so im not they guy to comment on it 😄 |
05:46:31 | * | marmotini_ joined #nim |
05:47:37 | * | dadada_ quit (Ping timeout: 265 seconds) |
05:48:36 | * | dadada_ joined #nim |
06:02:02 | * | dadada_ quit (Ping timeout: 240 seconds) |
06:03:33 | * | dadada_ joined #nim |
06:17:03 | * | dadada_ quit (Ping timeout: 260 seconds) |
06:18:33 | * | dadada joined #nim |
06:18:57 | * | dadada is now known as Guest56559 |
06:32:55 | * | Guest56559 quit (Ping timeout: 260 seconds) |
06:33:36 | * | dadada_ joined #nim |
06:37:12 | FromGitter | <Varriount> Elegant Beef: True. But "compileTime" is a bit long |
06:44:37 | * | Hideki_ quit (Remote host closed the connection) |
06:47:44 | * | dadada_ quit (Ping timeout: 268 seconds) |
06:48:33 | * | dadada_ joined #nim |
06:56:36 | * | jjido joined #nim |
06:57:44 | * | solitudesf joined #nim |
07:03:01 | * | dadada_ quit (Ping timeout: 265 seconds) |
07:03:33 | * | dadada_ joined #nim |
07:08:46 | * | sigmapie8 joined #nim |
07:09:13 | * | crem quit (Ping timeout: 272 seconds) |
07:10:16 | * | crem joined #nim |
07:17:43 | * | dadada_ quit (Ping timeout: 260 seconds) |
07:18:41 | * | dadada joined #nim |
07:19:05 | * | dadada is now known as Guest92970 |
07:30:22 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:32:45 | * | Guest92970 quit (Ping timeout: 268 seconds) |
07:33:31 | * | dadada joined #nim |
07:33:54 | * | dadada is now known as Guest69574 |
07:34:51 | * | Vladar joined #nim |
07:35:23 | * | krux02 joined #nim |
07:44:51 | * | Hideki_ joined #nim |
07:46:37 | * | Hideki_ quit (Remote host closed the connection) |
07:46:52 | * | Hideki_ joined #nim |
07:46:55 | * | Hideki_ quit (Remote host closed the connection) |
07:47:14 | * | Guest69574 quit (Ping timeout: 240 seconds) |
07:47:31 | * | Hideki_ joined #nim |
07:48:33 | * | dadada_ joined #nim |
07:51:34 | * | Hideki_ quit (Remote host closed the connection) |
07:51:49 | * | Hideki_ joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:28 | * | dadada_ quit (Ping timeout: 265 seconds) |
08:03:31 | * | dadada_ joined #nim |
08:04:54 | * | gmpreussner joined #nim |
08:08:17 | FromDiscord | <Elegant Beef> so the compiletime says it can be used for setting up LUTs but how does one do that, my table doesnt exist at compiletime apparently |
08:13:38 | Araq | there is some new v1 bug regarding this |
08:14:00 | Araq | it doesn't yet work as the spec claims it does |
08:14:26 | Araq | for now, to use a .compileTime var at runtime use this workaround: |
08:14:37 | * | JustASlacker joined #nim |
08:14:43 | Araq | const asConst = compileTimeVar |
08:14:59 | Araq | and then use 'asConst' for the code running at runtime |
08:15:14 | * | JustASlacker quit (Max SendQ exceeded) |
08:15:46 | * | JustASlacker joined #nim |
08:16:27 | * | JustASlacker quit (Max SendQ exceeded) |
08:17:07 | * | JustASlacker joined #nim |
08:18:10 | FromDiscord | <Elegant Beef> ok thanks |
08:21:25 | * | solitudesf quit (Ping timeout: 272 seconds) |
08:30:07 | * | LER0ever joined #nim |
08:31:07 | * | LER0ever quit (Client Quit) |
08:32:03 | * | LER0ever joined #nim |
08:38:59 | * | couven92 joined #nim |
08:39:46 | FromGitter | <alehander92> krux02 <3 yeah no need for raising |
08:39:49 | FromGitter | <alehander92> in $ ! |
08:44:25 | * | floppydh joined #nim |
08:59:20 | * | couven92 quit (Read error: Connection reset by peer) |
08:59:45 | * | couven92 joined #nim |
09:01:24 | FromDiscord | <Elegant Beef> Well now im using automatically generated ints instead of passing the type around for get component and has component |
09:01:27 | FromDiscord | <Elegant Beef> So there's that |
09:01:34 | FromDiscord | <Elegant Beef> Kinda using ints now |
09:02:12 | FromDiscord | <Elegant Beef> enums i mean |
09:08:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
09:10:21 | * | dadada joined #nim |
09:10:45 | * | dadada is now known as Guest53236 |
09:16:13 | * | marmotini_ quit (Remote host closed the connection) |
09:16:48 | * | marmotini_ joined #nim |
09:16:50 | * | tefter quit (Ping timeout: 240 seconds) |
09:17:09 | krux02 | @alehander92: what exactly are you referring to with that comment. I don't have the context right now |
09:17:27 | * | NimBot joined #nim |
09:20:57 | * | JustASlacker quit (Ping timeout: 272 seconds) |
09:21:35 | * | marmotini_ quit (Ping timeout: 272 seconds) |
09:22:43 | FromGitter | <alehander92> you commented |
09:22:44 | FromGitter | <alehander92> 4 days ago |
09:22:46 | FromGitter | <alehander92> on something |
09:22:53 | FromGitter | <alehander92> but i was probably missing |
09:25:12 | * | ftsf joined #nim |
09:26:27 | * | sigmapie8 quit (Ping timeout: 240 seconds) |
09:28:38 | FromGitter | <alehander92> i married guys |
09:29:03 | FromGitter | <alehander92> so we can say we are +1 nimmers now |
09:29:17 | FromGitter | <alehander92> hopefully more in the future |
09:29:30 | Zevv | woo when did that happen? |
09:29:40 | FromGitter | <alehander92> saturday |
09:29:45 | FromGitter | <alehander92> @zah was there |
09:29:45 | Zevv | congrats dude! |
09:29:53 | FromGitter | <alehander92> i have to find a photo with him |
09:30:51 | FromGitter | <alehander92> thanks, otherwise how are things going, i really want to try the :arc stuff when i have free time this week |
09:30:55 | FromGitter | <alehander92> is the os:any finished |
09:31:07 | Zevv | what is "finished" |
09:31:11 | Zevv | it Works For Me |
09:31:16 | Zevv | tell me what you'd need |
09:31:45 | FromGitter | <alehander92> ok |
09:31:57 | FromGitter | <alehander92> i would just use it for the toy kernel |
09:31:58 | FromGitter | <alehander92> i guess |
09:32:13 | FromGitter | <alehander92> so for now i need to provide only libc stubs right? |
09:33:00 | * | marmotini_ joined #nim |
09:36:42 | FromGitter | <alehander92> https://drive.google.com/open?id=1Y7ZEG2dL4AlqZYbu1vg8SW7mMBoDuZiV |
09:37:04 | FromGitter | <alehander92> i think this photo is enough for now |
09:37:52 | Zevv | Look at that present! |
09:38:13 | Zevv | oh right, you just provide malloc/free/realloc and some other standard libc stuff. |
09:38:38 | FromGitter | <alehander92> yeah i cant still figure out what did zah give us |
09:38:42 | FromGitter | <alehander92> like its for cooking |
09:39:02 | Zevv | send a pic :) |
09:39:29 | FromGitter | <alehander92> but its like a modern cooking machine i almost feel i can wash my clothes there or something, its that multifunctional |
09:39:44 | FromGitter | <alehander92> i can only send you wedding pics sorry |
09:39:52 | FromGitter | <alehander92> ok, so malloc/free/realloc is enough |
09:40:01 | FromGitter | <alehander92> and no need to pass any other flags? |
09:40:06 | * | JustASlacker joined #nim |
09:40:08 | Zevv | fwrite and stdout are used for echo |
09:41:12 | FromGitter | <alehander92> of course |
09:41:31 | FromGitter | <alehander92> and exceptions/panics? by default what happens, do i need to define panicoverride |
09:41:41 | Zevv | --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc |
09:41:54 | Zevv | no panicoverride |
09:42:38 | * | tefter joined #nim |
09:43:06 | * | ftsf_ joined #nim |
09:43:32 | Araq | -d:danger shouldn't be required |
09:43:41 | Araq | and --gc:arc implies --exceptions:goto |
09:43:46 | FromGitter | <alehander92> ah ok |
09:43:53 | FromGitter | <alehander92> doesnt it require useMalloc? |
09:43:58 | FromGitter | <alehander92> what does it use if i dont provide it |
09:44:18 | * | Hideki_ quit (Remote host closed the connection) |
09:44:29 | Zevv | it uses the Nim allocator |
09:44:40 | Zevv | which gets huge blobs from the OS and does allocations from there |
09:44:59 | * | Hideki_ joined #nim |
09:45:29 | Zevv | also it does not perform too wel with arc in all cases, as realloc() is implemented by a fixed alloc()/copy()/free(), and that bites back when growing seqs, for example |
09:45:40 | FromGitter | <alehander92> ahh |
09:46:34 | * | ftsf quit (Ping timeout: 268 seconds) |
09:49:39 | * | Hideki_ quit (Ping timeout: 268 seconds) |
09:58:34 | Araq | well you cannot count on realloc not doing the copying so IMHO it hardly matters all that much |
09:59:14 | Araq | the primary exception is micro benchmarks when you only grow a single seq and can misuse the MMU to do it for you |
10:02:40 | * | Hideki_ joined #nim |
10:02:45 | * | JustASlacker quit (Ping timeout: 272 seconds) |
10:06:10 | * | awe00 joined #nim |
10:08:47 | Zevv | I think it is a real life issue. It's pretty common to do a ton of things and store the results in a seq |
10:08:51 | * | tefter quit (Quit: WeeChat 2.7) |
10:08:52 | Zevv | slurping a file by line |
10:08:55 | Zevv | calculating stuff |
10:09:50 | Zevv | it is likely that your seq will move to the end of the heap while doing that, allowing it to grow without getting moved with each realloc. |
10:14:09 | * | Guest53236 is now known as dadada |
10:18:47 | Araq | maybe. in my world I usually have multiple seqs that grow |
10:19:25 | Zevv | good thing disruptek is asleep I guess |
10:20:25 | FromDiscord | <Elegant Beef> Do have to ask, is it more acceptable that im storing my components in a table[int,component] and on system creation getting a compiletime made typedesc > int for required types? |
10:21:02 | FromDiscord | <Elegant Beef> my ECS does work, just a matter of needing a valid method of testing |
10:22:07 | * | marmotini_ quit (Remote host closed the connection) |
10:22:26 | FromDiscord | <Elegant Beef> With placeholder code removed my components are just data buckets |
10:22:26 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/678909108845412372/unknown.png |
10:26:40 | Araq | terrible ;-) |
10:27:46 | Araq | for me the only reason for an ECS is speed, putting 3 floats into a 'ref' is not about speed, it's writing C# code in Nim |
10:30:05 | FromDiscord | <Elegant Beef> Well i mean until i figure out a place to put the required data i dont know whereelse to put it |
10:30:15 | FromDiscord | <Elegant Beef> Well i mean until i figure out a place to put the required data i dont know where else to put it |
10:30:57 | Araq | but I already said it yesterday. you use separate arrays, you can parallelize the operations working on the arrays because ideally they have no dependencies between each other, you can serialize it because it's all just blobs of data without pointers. Ever tried to store a closure to disk? it's not fun |
10:31:31 | Araq | yes, it's anti-OO, it's as anti-OO as it can get. That's the point. |
10:31:42 | FromDiscord | <Elegant Beef> i mean i dont know what you mean |
10:31:50 | FromDiscord | <Elegant Beef> It's not that im trying to stick to OO |
10:32:47 | * | chemist69 quit (Ping timeout: 240 seconds) |
10:33:37 | FromDiscord | <Elegant Beef> Also the other benefit of ECS is composition over inheritance |
10:33:54 | FromDiscord | <mratsim> Btw, thoughts on turning this into an article? https://github.com/mratsim/Arraymancer/pull/413#issuecomment-586924873 |
10:33:54 | FromDiscord | <mratsim> I think designing API that avoids the expression problem/dynamic dispatch is perhaps not well known |
10:33:58 | disbot | ➥ WIP: Add dbscan clustering method ; snippet at 12https://play.nim-lang.org/#ix=2bWh |
10:33:59 | * | chemist69 joined #nim |
10:34:57 | FromDiscord | <mratsim> ooohh congrats @alehander42 |
10:35:32 | Araq | oh yeah, same, congrats alehander42! |
10:35:53 | FromDiscord | <clyybber> congrats @alehander42 |
10:36:51 | Araq | mratsim: sure, name it "Solving the Expression Problem in Nim" |
10:37:57 | Araq | mratsim: Indeed, I don't know it. I solve the expression problem by adding enum values and patching my code :-) |
10:38:22 | FromDiscord | <mratsim> if that was all that was needed I wouldn't need those experiments that generated case statement from a compileTime Table (https://github.com/mratsim/compute-graph-optim see e07 / experiment 7) |
10:39:02 | FromDiscord | <mratsim> i.e. that doesn't work in the VM because typedesc + VM = sad face |
10:40:03 | Araq | your needs are not my needs. I never think "Ohh, if only I could have the same code distributed over a different set of files", but yeah, it's a valid problem for library development |
10:40:23 | * | marmotini_ joined #nim |
10:40:30 | Araq | libraries are harder to write than application code :-) |
10:40:36 | FromDiscord | <mratsim> Often it could even be between multiple repos |
10:40:55 | FromDiscord | <mratsim> I suppose that's why we still don't have interfaces 😉 |
10:41:01 | FromDiscord | <mratsim> or concepts 😉 |
10:41:15 | Araq | not really |
10:41:46 | Araq | 1. we do have concepts. it's just that they have little purpose as Nim's generics are unchecked for maximum flexibility already. |
10:41:58 | * | marmotini_ quit (Remote host closed the connection) |
10:42:18 | Araq | 2. interfaces introduce another form of subtyping. that's not something you add over a long weekend |
10:42:22 | Araq | I mean |
10:42:40 | Araq | you can do it over a long weekend. and then fix the bugs for additional 10 years. |
10:42:54 | FromDiscord | <mratsim> I know those weekends |
10:43:24 | FromDiscord | <mratsim> and when you finished you realize to you need another weekend to fight against Appveyor, Azure Pipelines or Travis |
10:43:32 | FromDiscord | <mratsim> that you need* |
10:44:10 | FromDiscord | <mratsim> well anyway, concepts work OK nowadays, I use them in both Arraymancer and Weave |
10:44:39 | Araq | fwiw I see C++'s multiple inheritance as better as C#'s class/interface split |
10:45:03 | FromDiscord | <mratsim> in the type system, I think what is in the worse shape are distinct types |
10:45:22 | Araq | in C# you often have to decide between interface and class and slowly the interfaces grow all the features that classes already have |
10:45:28 | FromDiscord | <mratsim> static distinct type in particular tend to give me not son == nil ICE |
10:46:20 | Araq | it's fashion driven language design, so uhhh MI is bad because ... well who knows. so let's inherit from multiple interfaces instead |
10:47:00 | Araq | what's a static distinct type? |
10:48:31 | FromDiscord | <mratsim> I define a "Ct[T: SomeUnsignedInt or byte] = distinct T", a type that only has constant-time operations available: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time.nim#L16-L18 |
10:49:22 | FromDiscord | <mratsim> I need to do some precomputation in the VM, for example computing the negative modular inverse modulo a prime: https://github.com/mratsim/constantine/blob/master/constantine/math/precomputed.nim#L92-L95 |
10:49:37 | FromDiscord | <mratsim> I can't return the distinct type, because semchecking |
10:50:12 | FromDiscord | <mratsim> I can't enforce compile-time input because static object don't work (but assigning to a const is a sufficient workaround) |
10:50:24 | FromDiscord | <mratsim> I can't use {.compileTime.} either because ICE |
10:51:26 | FromDiscord | <mratsim> also, if this function is tagged static or compile-time, the result is never updated: https://github.com/mratsim/constantine/blob/master/constantine/math/precomputed.nim#L32-L34 |
10:51:45 | FromDiscord | <mratsim> with WOrd input* |
10:51:54 | FromDiscord | <mratsim> (that was a long weekend) |
10:52:26 | Araq | report a bug. or multiple |
10:53:00 | FromDiscord | <mratsim> anyway, I do think Nim has a huge potential for Elliptic Curve crypto and constant time math |
10:53:00 | Araq | we should have our own codegen for constant time and .push constantTime: on |
10:53:21 | FromDiscord | <mratsim> you can use distinct type to properly identify and restrict operations |
10:53:27 | * | abm joined #nim |
10:53:29 | Araq | relying on "huh, the optimizer won't patch this" is terrible |
10:53:36 | FromDiscord | <mratsim> you can use them also to distinguish secret and publc data |
10:54:02 | Araq | what you're really doing is that you use an *un*specified subset of the language and pray for the best |
10:54:18 | FromDiscord | <mratsim> see https://briansmith.org/GFp-0 on some ideas that would be nice for a generic library |
10:55:00 | FromDiscord | <mratsim> also current libraries are using code generation in perl (NTL iirc) or Python (Apache Milagro Crypto) to create the BigInt/elliptic curve instance |
10:55:21 | FromDiscord | <mratsim> Constant-time is not a fight against Nim, it's a fight against the C compiler |
10:55:31 | Araq | exactly |
10:56:01 | Araq | but assuming Nim compiled to native code directly, it would likewise be a fight against the Nim compiler |
10:56:31 | Araq | compilers optimize |
10:56:38 | FromDiscord | <mratsim> I think this is the most insightful papers of compiler "optimization": https://www.cl.cam.ac.uk/~rja14/Papers/whatyouc.pdf |
10:58:04 | Araq | gotta go, bbl |
10:58:21 | * | Hideki_ quit (Remote host closed the connection) |
10:59:27 | * | Hideki_ joined #nim |
10:59:31 | FromDiscord | <clyybber> why would optimization be a problem for constant time math? |
11:02:05 | FromDiscord | <mratsim> it's in the paper, if the optimizations reveal "bits" of data, you can narrow down the value of the secret that is supposed to be protected |
11:02:13 | FromDiscord | <mratsim> and breach the key |
11:02:14 | * | nimblepoultry quit (Quit: Connection closed for inactivity) |
11:02:25 | FromDiscord | <mratsim> See: https://github.com/mratsim/constantine/wiki/Constant-time-arithmetics |
11:03:13 | FromDiscord | <mratsim> this is a good write-up on that: https://research.kudelskisecurity.com/2017/01/16/when-constant-time-source-may-not-save-you/ |
11:03:13 | FromDiscord | <clyybber> hmm |
11:03:15 | FromDiscord | <clyybber> interesting |
11:04:12 | * | Hideki_ quit (Ping timeout: 265 seconds) |
11:05:24 | FromDiscord | <clyybber> @mratsim Would it make sense to add "padding" ? |
11:05:50 | FromDiscord | <clyybber> to equalize the time |
11:07:15 | FromDiscord | <mratsim> it's all padded to the maximum modulus |
11:32:09 | * | Hideki_ joined #nim |
11:36:58 | * | Hideki_ quit (Remote host closed the connection) |
11:37:14 | * | Hideki_ joined #nim |
11:44:28 | * | Guest29 joined #nim |
11:45:29 | livcd | what's that game in Nim |
11:45:30 | * | Guest90 joined #nim |
11:45:32 | livcd | a racing game |
11:45:35 | livcd | forgot its name :/ |
11:46:46 | * | Guest29 quit (Client Quit) |
11:47:31 | livcd | ah got it |
11:53:37 | Zevv | good manners require that you now *share* the name |
11:59:55 | * | Guest90 left #nim ("Textual IRC Client: www.textualapp.com") |
12:01:54 | * | solitudesf joined #nim |
12:03:59 | * | Guest90 joined #nim |
12:04:22 | * | krux02 quit (Remote host closed the connection) |
12:09:15 | FromDiscord | <mratsim> relevant xkcd: https://xkcd.com/979/ |
12:10:27 | FromDiscord | <mratsim> I guess FOSDEM forgot about sending a mail for the videos and I will have to install IRC |
12:21:21 | * | nsf quit (Quit: WeeChat 2.7) |
12:23:24 | Zevv | Would be a good idea anyway! :) |
12:23:45 | FromDiscord | <Rika> is db_mysql or so safe against most sql injections? |
12:32:14 | * | Guest90 quit (Quit: ZZZzzz…) |
12:34:25 | * | marmotini_ joined #nim |
12:45:58 | * | marmotini_ quit (Remote host closed the connection) |
12:46:08 | dadada | hey |
12:46:32 | * | marmotini_ joined #nim |
12:46:51 | * | marmotini_ quit (Read error: Connection reset by peer) |
12:47:03 | * | marmotini_ joined #nim |
12:47:31 | dadada | under linux it has become unseemly for programs to install their configuration/data/stuff directly in hidden folders that are in $HOME |
12:48:10 | dadada | although it's still widely done, many projects either have moved their stuff to $HOME/.config/some_sub_dir_of_that |
12:48:29 | dadada | or $HOME/.local/(share)/some_sub_dir_of_that |
12:49:24 | dadada | nimble and choosenim by default choose $HOME/.nimble/ $HOME/.choosenimble/ |
12:49:39 | dadada | as I can see on the choosenim github page |
12:50:06 | dadada | araq, dom96: please take this under consideration |
12:51:05 | dadada | the reason is that with the old way of stuffing everything into $HOME over time it gets messy |
12:52:57 | dadada | though until now only a small fraction of projects seem to have gotten the memo :D |
12:55:56 | * | natrys joined #nim |
12:57:09 | FromDiscord | <Rika> i agree with this |
12:57:14 | dadada | not so small actually, I'd say it's at least 50:50 at this point |
12:57:20 | FromDiscord | <Rika> except for choosenim, as binaries are also stored in .choosenim |
12:57:31 | FromDiscord | <Rika> well, actually both do |
12:57:36 | FromDiscord | <Rika> now that i think about it |
12:57:48 | FromDiscord | <Rika> so maybe to .local is okay, but deffo not .config |
12:57:50 | dadada | there's no rule that binaries can't be in .local or .config |
12:58:19 | FromDiscord | <Rika> it's unconventional for binaries to be in .config is it not |
12:58:34 | dadada | yeah, local may be more appropriate, but both would be better than the current status |
12:58:59 | dadada | .local is filled with configurations, too, I'm actually not sure why there're two conventions |
12:59:36 | dadada | I found themes for kde plasma containing python files inside .local/share/plasma/desktoptheme/breeze-alphablack/ |
12:59:46 | dadada | while not a binary, it's still something that can be executed |
13:01:10 | dadada | chrome is under .config/chromium .config/google-chrome and contains all kinds of data like caches and extensions (which can be executable) |
13:01:26 | * | sean joined #nim |
13:01:30 | dadada | both folders are being used rather loosely, I'd think they'd both be okay |
13:01:47 | dadada | even for the original unix structure /usr used to mean user stuff |
13:01:49 | * | sean is now known as Guest99195 |
13:02:09 | dadada | today it's used for system libraries, their data and so on |
13:04:41 | FromDiscord | <Rika> i know local having binaries is 100% okay |
13:05:15 | * | Kaivo joined #nim |
13:05:44 | FromDiscord | <vi> .config is the XDG config directory, and .local is the base for the XDG data directory |
13:05:45 | FromDiscord | <vi> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html |
13:08:25 | * | rockcavera joined #nim |
13:10:54 | lqdev[m] | dadada: /usr is 'unix system resources', not 'user stuff' |
13:11:31 | dadada | lqdev[m]: are you sure that isn't an acronym they came up later to fit the use case? because I heard something like that |
13:11:49 | dadada | but thanks for correcting me |
13:12:31 | * | JustASlacker joined #nim |
13:12:32 | dadada | lqdev[m]: "In the original Unix implementations, /usr was where the home directories of the users were placed" |
13:12:36 | dadada | looks like I was right |
13:12:44 | dadada | maybe I shouldn't have apologized |
13:12:47 | dadada | hmm |
13:12:54 | * | Guest99195 quit (Quit: ZZZzzz…) |
13:14:26 | dadada | lqdev[m]: https://www.bell-labs.com/usr/dmr/www/notes.html |
13:15:32 | lqdev[m] | TIL |
13:16:30 | dadada | believing a stranger on the internet is difficult, I guess |
13:25:41 | * | sean joined #nim |
13:25:52 | * | Guest11 joined #nim |
13:25:52 | * | sean quit (Client Quit) |
13:26:21 | * | sean joined #nim |
13:26:40 | * | sean quit (Client Quit) |
13:26:57 | * | Guest11 quit (Remote host closed the connection) |
13:27:06 | * | sean joined #nim |
13:27:27 | * | sean quit (Client Quit) |
13:28:06 | * | sean joined #nim |
13:28:06 | * | sean quit (Client Quit) |
13:28:31 | * | Guest27024 joined #nim |
13:28:52 | * | Guest27024 quit (Client Quit) |
13:31:57 | * | arecaceae quit (Remote host closed the connection) |
13:32:19 | * | arecaceae joined #nim |
13:33:39 | * | JustASlacker quit (Ping timeout: 272 seconds) |
13:34:33 | * | dddddd joined #nim |
13:50:24 | federico3 | there was a pure-Nim SVM... is it gone? |
14:00:38 | * | Vladar quit (Quit: Leaving) |
14:01:16 | FromDiscord | <clyybber> I only know of shashlicks libsvm wrapper |
14:01:27 | * | sean__ joined #nim |
14:21:24 | * | awe00 quit (Ping timeout: 265 seconds) |
14:22:19 | FromDiscord | <ejstembler> Anyone know if there something similar to Ruby's `Enumerable.each_slice` in nim? ref: https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-each_slice |
14:26:12 | leorize | not in the stdlib |
14:27:46 | FromDiscord | <mratsim> @federico3 it was under nim-lang umbrella iirc so probably in the graveyard |
14:27:47 | leorize | !repo itertools |
14:27:48 | disbot | https://github.com/narimiran/itertools -- 9itertools: 11Nim rewrite of a very popular Python module of the same name. 15 55⭐ 5🍴 |
14:27:54 | leorize | @ejstembler: ^ |
14:28:05 | FromDiscord | <mratsim> and it was not pure Nim it was a wrapper around libsvm |
14:28:10 | leorize | it contains the chunked iterator that seems to do what you want |
14:28:43 | FromDiscord | <mratsim> also I don't see any reason to use SVM nowadays |
14:28:51 | * | dadada quit (Ping timeout: 240 seconds) |
14:29:45 | * | theelous3 joined #nim |
14:30:06 | FromDiscord | <mratsim> in almost all cases, using either a random forest or gradient boosted trees is better, unless your stakeholders prefer the explainability of SVM (but even in that case there is Gaussian Mixture Models-based library by Microsoft that cater to that need) |
14:30:21 | federico3 | mratsim: I'm looking for a simple algorithm to classify text by measuring similarity |
14:31:05 | FromDiscord | <mratsim> Use TF-IDF + PCA |
14:31:45 | FromDiscord | <mratsim> that's called latent semantic indexing it's to classify documents into topics |
14:32:04 | federico3 | I tried 3-word trigrams and it's heavy |
14:32:09 | FromDiscord | <mratsim> TF-IDF is term frequency and inverse document frequency (i.e. counting the number of words and their inverse frequency) |
14:32:13 | Zevv | federico3: concatenate, gzip and see how big the result is |
14:32:24 | FromDiscord | <mratsim> and PCA is just simple principal component analysis |
14:32:40 | FromDiscord | <mratsim> that's my go-to for text analysis |
14:32:59 | federico3 | thanks! |
14:33:28 | FromDiscord | <mratsim> example on a 2 hour competition, that's basically the only unique thing I did: https://github.com/mratsim/meilleur-data-scientist-france-2018/blob/1fd721e5668188261842781ce9b6e16b46b5b298/m110_feat_eng.py#L30-L33 |
14:33:36 | * | dadada joined #nim |
14:33:37 | FromDiscord | <mratsim> and I got rank 44 out of 350 |
14:33:59 | * | dadada is now known as Guest59422 |
14:34:28 | FromDiscord | <mratsim> for trigrams and such, AFAIK someone packaged gensim |
14:35:15 | FromDiscord | <mratsim> Make sure to look into the "starting kits" in this competition as well: https://www.kaggle.com/c/quora-question-pairs |
14:35:28 | FromDiscord | <clyybber> Zevv: lol |
14:39:07 | * | awe00 joined #nim |
14:46:17 | * | Hideki_ quit (Remote host closed the connection) |
14:46:41 | Zevv | clyybber: you laugh: https://homepages.cwi.nl/~paulv/papers/ccp11.pdf |
14:46:50 | * | Guest59422 quit (Ping timeout: 240 seconds) |
14:47:01 | * | Hideki_ joined #nim |
14:48:33 | * | dadada_ joined #nim |
14:51:49 | * | Hideki_ quit (Ping timeout: 268 seconds) |
14:56:15 | Zevv | I saw a presentation from this guy a few years back. His demo was taking DNA of a number of species and checking similarity between pairs, and automatically generating his "tree of life" from that. Was pretty funny |
14:57:10 | federico3 | Zevv: brilliant. The only drawback is that you have to compare all the texts combinations |
14:57:27 | Zevv | sure |
14:58:14 | FromDiscord | <clyybber> yeah, dna sounds like a thing it should work pretty great for |
15:00:05 | FromDiscord | <mratsim> THere are a couple papers from this year that used generic natural language processing techniques successfully on DNA |
15:00:42 | FromDiscord | <mratsim> generic as in, you don't assume that the separator is the "space" or don't tell the algorithm how to deal with unicode |
15:01:38 | FromDiscord | <mratsim> AFAIk the only thing you configure is that text is read from left to right and then it uses statistic techniques to build "words" and then deep learning to associate a meaning to those, understand context and such |
15:01:51 | FromDiscord | <clyybber> you mean letting it operate on literal A T C G? |
15:01:54 | FromDiscord | <mratsim> yes |
15:02:03 | * | dadada_ quit (Ping timeout: 260 seconds) |
15:02:17 | FromDiscord | <mratsim> and understand the role of the construct, and generate alternate sequences |
15:02:48 | FromDiscord | <mratsim> well it "understands" as much as it understands natural language bu it's still useful, for example for google translate |
15:03:17 | FromDiscord | <mratsim> https://link.springer.com/chapter/10.1007/978-3-030-29726-8_19 |
15:03:31 | * | dadada_ joined #nim |
15:04:11 | FromDiscord | <mratsim> keyword: proteomics/genomics/metabolimic + deep learning |
15:04:46 | FromDiscord | <mratsim> transcriptomics work as well for DNA/RNA |
15:10:47 | * | Vladar joined #nim |
15:16:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
15:16:51 | * | LER0ever quit (Remote host closed the connection) |
15:17:55 | * | LER0ever joined #nim |
15:18:35 | * | dadada_ joined #nim |
15:25:54 | * | Hideki_ joined #nim |
15:26:23 | FromDiscord | <ejstembler> @leorize Yes, `chunked` would work. Thanks! https://github.com/narimiran/itertools/blob/master/src/itertools.nim#L645 |
15:27:55 | * | nsf joined #nim |
15:30:49 | * | ftsf_ quit (Ping timeout: 272 seconds) |
15:31:58 | * | dadada_ quit (Ping timeout: 265 seconds) |
15:33:19 | disruptek | hearts and minds, people; hearts and minds! |
15:33:36 | * | dadada joined #nim |
15:33:59 | * | dadada is now known as Guest87004 |
15:35:41 | * | LER0ever quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:39:21 | Zevv | bards and rhymes |
15:39:55 | * | sekao joined #nim |
15:41:38 | sekao | is there anything like `when defined(test)`? i want to write code in my library that only runs during tests |
15:43:34 | FromGitter | <kaushalmodi> sequtils has a `zip`. What's the "unzip" equivalent? |
15:44:05 | disruptek | set a -d:test when you invoke tests. |
15:44:21 | disruptek | but, that's kinda against the philsophy of tests. |
15:47:56 | * | Guest87004 quit (Ping timeout: 268 seconds) |
15:48:34 | * | dadada_ joined #nim |
15:52:41 | FromDiscord | <Rika> is there a seq-flattening function in the stdlib or itertools somewhere |
15:52:45 | * | Hideki_ quit (Ping timeout: 265 seconds) |
15:54:50 | * | sekao quit (Remote host closed the connection) |
15:58:01 | FromGitter | <Vindaar> @kaushalmodi @Rika there's neither of those two in the stdlib. You can use `seqmath` if you want: https://github.com/Vindaar/seqmath/blob/master/src/seqmath/sutil.nim |
16:02:10 | * | fanta1 joined #nim |
16:03:07 | * | dadada_ quit (Ping timeout: 272 seconds) |
16:03:31 | * | dadada_ joined #nim |
16:04:35 | * | azed joined #nim |
16:05:05 | FromDiscord | <Rika> vindaar, i mean in either stdlib or itertools lib |
16:07:18 | FromGitter | <Vindaar> then consider my answer an answer to 50% of your question :) |
16:08:51 | FromDiscord | <Rika> thanks though |
16:10:37 | * | tefter joined #nim |
16:11:42 | disruptek | half-answers, half-price. |
16:17:14 | * | dadada_ quit (Ping timeout: 240 seconds) |
16:18:31 | * | dadada_ joined #nim |
16:29:48 | * | Trustable joined #nim |
16:32:02 | * | dadada_ quit (Ping timeout: 240 seconds) |
16:33:37 | * | dadada joined #nim |
16:33:59 | * | dadada is now known as Guest33536 |
16:45:10 | * | abm quit (Remote host closed the connection) |
16:45:26 | * | floppydh quit (Quit: WeeChat 2.7) |
16:45:35 | * | abm joined #nim |
16:45:46 | * | a_b_m joined #nim |
16:45:52 | * | a_b_m quit (Remote host closed the connection) |
16:46:50 | * | Guest33536 quit (Ping timeout: 240 seconds) |
16:47:19 | disruptek | i don't understand slices. |
16:48:05 | disruptek | const foo = 200.HttpCode .. 300.HttpCode ... case code: of foo: echo "type mismatch" ... |
16:48:23 | disruptek | case code: of 200.HttpCode .. 300.HttpCode: echo "okay" |
16:48:34 | disruptek | case code: of 200.HttpCode ..< 300.HttpCode: echo "type mismatch" |
16:48:39 | * | lritter quit (Quit: Leaving) |
16:48:39 | * | dadada_ joined #nim |
16:49:02 | disruptek | typeof(200.HttpCode .. 300.HttpCode) == typeof(200.HttpCode ..< 300.HttpCode) |
16:49:40 | FromDiscord | <Rika> whats the issue here? |
16:49:48 | FromDiscord | <Rika> i dont understand what you dont understand |
16:49:53 | * | JustASlacker joined #nim |
16:50:26 | FromDiscord | <Rika> oh i see |
16:50:28 | disruptek | ..< isn't working for me in a case statement. moreover, a const slice doesn't work in a case statement, either. |
16:50:40 | FromDiscord | <Rika> the first feels like a bug |
16:50:50 | FromDiscord | <Rika> actually both feel like bugs |
16:51:02 | disruptek | yes, it makes me think that maybe i'm missing something. |
16:51:39 | disruptek | i feel like i've done this before but i can't find where. |
16:53:51 | * | sigmapie8 joined #nim |
16:54:02 | disruptek | works fine for const foo = {x .. y} |
16:54:41 | * | dwdv joined #nim |
16:54:47 | disruptek | const foo = {x ..< y} --> "ordinal type expected" |
16:55:39 | * | JustASlacker quit (Ping timeout: 240 seconds) |
16:56:16 | disruptek | i think i'm getting the benefit of an auto-cast or something for the range operator. |
16:57:58 | dwdv | Hi, everyone! Quick one, why isn't this exploding (at runtime)? `type Foo = range[1..10]; var f: Foo = Foo.high.succ; echo f #=> 11` |
16:58:54 | disruptek | fair question. |
17:02:21 | * | dadada_ quit (Ping timeout: 265 seconds) |
17:02:35 | FromDiscord | <Rika> ranges are weird right now afaik? |
17:02:51 | disruptek | gah i wonder if i should test 1.0 |
17:03:18 | disruptek | i guess i answered my own question. |
17:03:38 | * | dadada_ joined #nim |
17:04:55 | disruptek | well, Foo.high is just an int. int.succ should yield 11. |
17:05:07 | disruptek | the question is, why is that a valid value for the range? |
17:09:09 | disruptek | what's weird is, if i de-sugar ..< it works fine. |
17:10:31 | dwdv | Yeah, other constellations (e.g. assigning to a var beforehand) result in range or conversion errors. |
17:12:16 | disruptek | you could try making your integers distinct, i guess, if it won't break other code. |
17:16:55 | * | dadada_ quit (Ping timeout: 260 seconds) |
17:17:11 | dwdv | Alright, will try that, thanks. Btw., Ada's fixed point types as in `delta 0.1 range 0.0..1.0` aren't supported in nim, correct? |
17:18:33 | * | dadada_ joined #nim |
17:18:39 | dwdv | Nah, can't find anything in the docs. Alright. |
17:19:08 | FromDiscord | <clyybber> can be accomplished using a distinct int |
17:21:43 | FromGitter | <alehander92> but if high returns an int |
17:21:52 | FromGitter | <alehander92> Foo stops to matter |
17:22:07 | FromGitter | <alehander92> but high should return a Foo , right? |
17:22:49 | disruptek | no, high should return an int. |
17:22:51 | FromGitter | <alehander92> the question is, should succ/prev raise , I think it does |
17:23:04 | FromGitter | <alehander92> but why |
17:23:07 | disruptek | it's a range of ints. |
17:23:10 | FromGitter | <alehander92> enum high returns an enum |
17:23:12 | disruptek | what do you think it should return? |
17:23:22 | FromGitter | <alehander92> a "range of ints" value |
17:23:39 | disruptek | no, a range type is a limitation on ordinal values that may be assigned to the type. |
17:25:00 | Araq | dwdv, you can use a custom type with overloaded operators |
17:25:03 | FromGitter | <alehander92> i still think it should keep the range-ness, as its valuable |
17:25:17 | disruptek | well, it does. as the type. |
17:25:32 | disruptek | if you want a range-aware type, you are free to make one. |
17:26:29 | disruptek | the whole point of this animal is that T is range[T..T] |
17:27:25 | disruptek | but again, why doesn't ..< work for me? |
17:29:57 | dwdv | Yeah, seems like I'll go with the overloaded operators approach to support the rounding behaviour. Let's see whether the end result is as verbose as the original ada code. :) |
17:30:39 | Araq | spoiler: it never is. |
17:30:44 | disruptek | i mean, shit. |
17:30:46 | disruptek | how could it be? |
17:31:51 | * | dadada_ quit (Ping timeout: 260 seconds) |
17:32:48 | disruptek | but again, i don't even understand how my bug is possible. |
17:33:32 | Araq | what bug? |
17:33:34 | * | dadada joined #nim |
17:33:57 | * | dadada is now known as Guest89910 |
17:35:11 | disruptek | i cannot make ..< work to generate a constant i can use as a case of clause. |
17:35:41 | disruptek | but it's fine un-sugared as x .. pred(y) |
17:36:28 | Araq | well '..' is magical in 'of' branches and arrays, ..< isn't |
17:36:57 | disruptek | i cannot assign the constant, though; forget about the case -- it's just a use-case, so to speak. |
17:37:08 | Araq | I once tried to change the language to also allow ..< but the compiler's internals told me not to do this |
17:37:14 | disruptek | system.`..` != .. |
17:37:21 | Araq | yeah |
17:37:28 | disruptek | this is blowing my fucking mind right now. |
17:37:48 | disruptek | well, it helps that i was planning on doing some work today. |
17:37:55 | disruptek | so.. edibles. |
17:38:09 | disruptek | system.`..` != .. but whatfer? |
17:38:59 | Araq | well for a start array[I, T] predates system.`..` by years |
17:39:20 | Araq | Nim started with `..` being a special case |
17:39:24 | Araq | and then we extended it |
17:39:32 | * | Vladar quit (Quit: Leaving) |
17:39:39 | disruptek | okay, that makes more sense. |
17:39:40 | FromDiscord | <clyybber> I think nowadays, the compiler could be adapted to take arbitrary static slices for case of, |
17:40:05 | Araq | indeed, but it's quite some work |
17:40:21 | FromDiscord | <clyybber> and it makes case object analysis a bit more nasty |
17:40:25 | disruptek | thanks again, jasper. |
17:40:39 | disruptek | i don't think it changes it that much. |
17:43:55 | * | nsf quit (Quit: WeeChat 2.7) |
17:44:24 | disruptek | {200.HttpCode .. 299.HttpCode} 😁 |
17:47:37 | * | Guest89910 quit (Ping timeout: 272 seconds) |
17:48:36 | * | dadada_ joined #nim |
17:49:36 | * | Hideki_ joined #nim |
17:54:21 | * | Hideki_ quit (Ping timeout: 268 seconds) |
17:58:56 | * | tefter quit (Quit: WeeChat 2.7) |
18:00:11 | * | azed quit (Quit: WeeChat 2.7) |
18:00:43 | disruptek | clyybber: what are you using for term? alacritty? |
18:02:32 | * | abm quit (Read error: Connection reset by peer) |
18:03:00 | * | abm joined #nim |
18:04:46 | * | kungtotte quit (Remote host closed the connection) |
18:05:01 | * | kungtotte_ joined #nim |
18:05:01 | FromDiscord | <clyybber> ye |
18:05:21 | shashlick | how do you avoid github api limits when testing from travis |
18:05:48 | * | pqflx3[m] quit (Ping timeout: 246 seconds) |
18:05:49 | * | letto quit (Remote host closed the connection) |
18:05:56 | disruptek | which limits? |
18:06:03 | * | lain quit (Ping timeout: 240 seconds) |
18:06:09 | * | leorize[m] quit (Ping timeout: 246 seconds) |
18:06:12 | * | vycb[m] quit (Ping timeout: 252 seconds) |
18:06:12 | * | grantmwilliams quit (Ping timeout: 252 seconds) |
18:06:12 | * | d-nice2[m] quit (Ping timeout: 252 seconds) |
18:06:12 | * | oswin[m] quit (Ping timeout: 252 seconds) |
18:06:34 | * | unclechu quit (Ping timeout: 245 seconds) |
18:06:36 | * | lqdev[m] quit (Ping timeout: 256 seconds) |
18:06:44 | * | letto joined #nim |
18:06:48 | shashlick | http://api.github.com |
18:06:59 | * | Demos[m] quit (Ping timeout: 260 seconds) |
18:06:59 | * | skrylar[m] quit (Ping timeout: 260 seconds) |
18:07:01 | * | pigmej quit (Ping timeout: 248 seconds) |
18:07:01 | * | planetis[m] quit (Ping timeout: 248 seconds) |
18:07:01 | * | salotz[m] quit (Ping timeout: 248 seconds) |
18:07:05 | disruptek | what is matrix and why is it such a hard technology to make work? |
18:07:10 | * | BitPuffin quit (Ping timeout: 256 seconds) |
18:07:18 | disruptek | does it run on moon dust or something? |
18:07:21 | * | Yardanico[m] quit (Ping timeout: 240 seconds) |
18:07:23 | * | silvernode[m] quit (Ping timeout: 245 seconds) |
18:07:23 | * | s87651[m] quit (Ping timeout: 245 seconds) |
18:07:32 | * | hohlerde quit (Ping timeout: 260 seconds) |
18:07:32 | * | watzon[m] quit (Ping timeout: 248 seconds) |
18:07:37 | shashlick | limits you to 100 calls per hour or something, works fine as an individual user but when testing on travis, the same IP is making calls there and looks like one person |
18:07:44 | * | freepump[m] quit (Ping timeout: 256 seconds) |
18:07:45 | shashlick | you'd think github gave CIs a free pass |
18:08:07 | * | GitterIntegratio quit (Ping timeout: 240 seconds) |
18:08:24 | Araq | why would they though? it's a request either way and costs money |
18:08:47 | * | lain joined #nim |
18:08:52 | disruptek | can't you just register and get a raised limit? i forget how i do it. |
18:09:36 | disruptek | the safety weasel no longer exists. bad news for some. |
18:09:46 | FromDiscord | <mratsim> Matrix is decentralized @disruptek, meaning you don't have a centralized IRC, Discord or SLack server that stores messages and relay stuff |
18:09:51 | disruptek | we are running without training wheels now, boys. |
18:10:14 | disruptek | i guess decentralized means dysfunctional in english. |
18:11:56 | FromDiscord | <mratsim> is it? decentralized is how things worked, see: fish markets, craftsmen, gossips. There was no Amazon/Walmart/Newspapers |
18:12:10 | FromDiscord | <mratsim> It's coming back to your roots :p |
18:12:12 | FromGitter | <davideps> I noticed https://nim-lang.org/0.13.0/actors.html and was wondering--are there more examples of working with the actor model in nim? |
18:12:17 | disruptek | so why doesn't it work? |
18:12:25 | disruptek | irc doesn't have these problems. |
18:12:40 | disruptek | come back to your roots. come back to irc. |
18:12:54 | leorize | matrix does work :P |
18:13:23 | disruptek | oh wb leorize |
18:13:33 | disruptek | i thought you were offline because you vanished from irc. |
18:13:43 | leorize | only the matrix one |
18:13:55 | disruptek | oh, so the matrix one was the correct one? |
18:13:57 | FromDiscord | <mratsim> @davideps, I'm pretty sure there are no tutorial-level examples. I do use some kind of actor model in my multithreading framework |
18:14:03 | disruptek | irc is the one that doesn't work? |
18:14:06 | FromDiscord | <mratsim> all work is distributed via message passing |
18:14:33 | leorize | I keep both because matrix.org freenode bridge is terrible |
18:14:35 | FromGitter | <davideps> I'm working in Python right now and was hoping to find something similar but faster. |
18:15:09 | FromGitter | <davideps> @mratsim is your multithreading framework a library? |
18:15:15 | disruptek | well, you came to the right place. |
18:15:16 | disruptek | !repo weave |
18:15:18 | disbot | https://github.com/mratsim/weave -- 9weave: 11A state-of-the-art multithreading runtime: message-passing based, fast, scalable, ultra-low overhead 15 115⭐ 8🍴 |
18:15:57 | leorize | disruptek: no, the matrix one doesn't work |
18:16:01 | FromDiscord | <mratsim> it's very low-level Nim so I wouldn't advise using it as a starting point (i.e. I reimplement my own channels and plenty of other stuff) |
18:16:07 | FromGitter | <deech> Nimble question: I'd like to have a project specific `packages.json`and `nimbleDir` for *some* packages but have it fall back to the default `~/.nimble` and `~/.nimble/packages_official.json` for packages not specified and installed in the project local `nimbleDir`. Is that possible? |
18:16:23 | FromGitter | <davideps> My previous link is the actor model that is built into Nim's standard library? |
18:16:36 | disruptek | deech: i dunno why you resist nimph. |
18:16:48 | FromDiscord | <mratsim> it's probably in the graveyard because I never heard of it |
18:16:56 | FromDiscord | <mratsim> there is a library called: |
18:16:58 | FromGitter | <deech> Only because `nimble` comes standard. |
18:16:59 | FromDiscord | <mratsim> !repo nimoy |
18:17:00 | disbot | https://github.com/evacchi/nimoy -- 9nimoy: 11A minimal experimental actor library for Nim (wip) 15 23⭐ 2🍴 |
18:17:43 | FromGitter | <deech> Ok, fine. I'll try `nimph`. |
18:17:57 | disruptek | dude. i make packages for nimble users, too. |
18:18:02 | sigmapie8 | Hi, I was reading the manual and found an example under Raise statement: raise newEOS("operating system failed"). The compiler says newEOS is an undeclared identifier. |
18:18:10 | disruptek | shashlick says you can just nimble install nimph, now. |
18:18:18 | disruptek | er, pass it the url. |
18:18:21 | Araq | sigmapie8, it's only an example |
18:18:37 | FromDiscord | <mratsim> asume that people copy-paste example at Araq |
18:18:47 | FromDiscord | <mratsim> hence why you should never put rm -rf |
18:18:52 | Araq | not every code snippet in the manual has to be complete, compilable example |
18:19:20 | sigmapie8 | Araq, I disagree. Examples should always be working. |
18:19:55 | Araq | it's a race to the bottom, next step: Always assume that every sentence is read outside of its context. |
18:19:55 | disrupteq | pr away |
18:20:20 | Araq | next: assume that only 2 out 4 words in a sentence were read |
18:20:21 | sigmapie8 | :) |
18:20:24 | FromDiscord | <mratsim> I prefer pastable example as well. In the paste there were some examples that worked but were missing imports |
18:20:53 | FromDiscord | <mratsim> "Always assume that every sentence is read outside of its context." --> you would love the "reporters" we get on our Discord channel |
18:21:00 | disrupteq | we should just link them to the playground. |
18:21:10 | * | pqflx3[m] joined #nim |
18:21:13 | sigmapie8 | yes some examples do have missing imports. |
18:21:24 | FromDiscord | <mratsim> they take things you say and picture that it's a death match between your project and the others projects. My quotes were several times taken out of context |
18:24:18 | * | couven92 quit (Read error: Connection reset by peer) |
18:24:46 | * | couven92 joined #nim |
18:25:30 | * | lqdev[m] joined #nim |
18:30:01 | * | leorize[m] joined #nim |
18:30:24 | * | pigmej joined #nim |
18:30:34 | shashlick | choosenim will be able to install and update nightlies real soon |
18:30:45 | shashlick | we need more reliable nightlies though |
18:30:53 | FromGitter | <Varriount> mratsim: I quite liked the your comment in that issue you posted |
18:31:29 | FromGitter | <Varriount> I'll admit, it's never occurred to me to use type values that way |
18:32:34 | * | planetis[m] joined #nim |
18:33:13 | * | awe00 quit (Ping timeout: 265 seconds) |
18:33:50 | * | salotz[m] joined #nim |
18:34:34 | * | oswin[m] joined #nim |
18:35:17 | * | BitPuffin joined #nim |
18:37:16 | FromDiscord | <mratsim> 🙂 |
18:39:58 | * | vycb[m] joined #nim |
18:40:06 | * | d-nice2[m] joined #nim |
18:40:06 | * | grantmwilliams joined #nim |
18:43:05 | * | freepump[m] joined #nim |
18:43:14 | * | watzon[m] joined #nim |
18:43:50 | * | skrylar[m] joined #nim |
18:44:08 | * | Yardanico[m] joined #nim |
18:45:00 | FromDiscord | <clyybber> 🙂 |
18:45:55 | * | Demos[m] joined #nim |
18:46:11 | * | silvernode[m] joined #nim |
18:48:15 | * | s87651[m] joined #nim |
18:49:32 | * | hohlerde joined #nim |
18:58:59 | * | nsf joined #nim |
19:22:35 | Araq | has anybody an idea how to get an alternative wasm proposed? |
19:27:06 | * | jjido joined #nim |
19:30:12 | FromGitter | <Varriount> Araq: Own a company with a major influence on the internet? |
19:30:25 | FromGitter | <Varriount> What's wrong work wasm? |
19:31:28 | * | marmotini_ quit (Remote host closed the connection) |
19:32:02 | * | marmotini_ joined #nim |
19:32:08 | Araq | https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md so "reference types" are coming |
19:32:47 | Araq | and it's not hard to imagine where it ends: when it supports everything .NET does |
19:34:14 | Araq | except that .NET is much better at everything, it's not a "MVP" for over a decade, it got a real type system, real language interop, more than 4 basic types |
19:36:02 | * | marmotini_ quit (Ping timeout: 240 seconds) |
19:37:12 | Araq | JVM lacks value based datatypes which is an important missing feature, but .NET doesn't lack that. Of course, we cannot use it because evil M$ is behind it, but still. |
19:37:40 | Araq | isn't .NET covered by an ISO standard? |
19:37:58 | disruptek | like that helps. |
19:38:12 | disruptek | the problem is that .net won't be ported to jvm. |
19:38:36 | Araq | oh, only C# is covered by a standard and .NET isn't |
19:41:10 | * | marmotini_ joined #nim |
19:41:21 | Araq | 4 basic types, no 'goto', and already they have to hack function pointers into the design. A hell of a start |
19:42:42 | disruptek | is this part of your ir research? 😉 |
19:44:53 | Araq | no, I don't "research" IRs in the sense that I read about what others did. I know. My research would be about building a prototype of what I have in mind |
19:45:29 | disruptek | you make it sound like you haven't learned anything by the mistakes they've made. |
19:46:43 | * | lqdev[m] quit (Quit: killed) |
19:46:43 | * | BitPuffin quit (Quit: killed) |
19:46:43 | * | leorize[m] quit (Quit: killed) |
19:46:44 | * | planetis[m] quit (Quit: killed) |
19:46:44 | * | salotz[m] quit (Quit: killed) |
19:46:44 | * | skrylar[m] quit (Quit: killed) |
19:46:46 | * | Yardanico[m] quit (Quit: killed) |
19:46:50 | * | grantmwilliams quit (Quit: killed) |
19:46:50 | * | pqflx3[m] quit (Quit: killed) |
19:46:50 | * | watzon[m] quit (Quit: killed) |
19:46:52 | * | vycb[m] quit (Quit: killed) |
19:46:52 | * | freepump[m] quit (Quit: killed) |
19:46:55 | * | Demos[m] quit (Quit: killed) |
19:46:55 | * | silvernode[m] quit (Quit: killed) |
19:46:55 | * | pigmej quit (Quit: killed) |
19:46:55 | * | d-nice2[m] quit (Quit: killed) |
19:46:55 | * | hohlerde quit (Quit: killed) |
19:47:00 | * | oswin[m] quit (Quit: killed) |
19:47:14 | * | s87651[m] quit (Quit: killed) |
19:47:28 | FromDiscord | <clyybber> I actually rather like injectdestructors, I don't think another IR would make it any better or simpler |
19:49:11 | * | nsf quit (Quit: WeeChat 2.7) |
19:52:13 | FromDiscord | <Generic> wasm has no goto? |
19:52:23 | FromDiscord | <Generic> how can it even be called "assembly"? |
19:53:06 | disruptek | it has comefrom. |
19:54:16 | * | fanta1 quit (Quit: fanta1) |
19:55:35 | FromGitter | <matrixbot> `reversem3` !repo blog |
19:55:52 | Yardanico | @reversem3 you can use matrix-irc bridge, no need for matrix->gitter->irc |
19:56:21 | Araq | clyybber: waiting for your fixes for my arc-optimizations branch |
19:56:33 | Yardanico | https://github.com/matrix-org/matrix-appservice-irc/wiki/Guide:-How-to-use-Matrix-to-participate-in-IRC-rooms |
20:02:09 | * | Kaivo_ joined #nim |
20:02:58 | * | Kaivo quit (Read error: Connection reset by peer) |
20:04:11 | * | nixfreak joined #nim |
20:04:25 | nixfreak | !repo blog |
20:04:27 | disbot | https://github.com/dom96/ipsumgenera -- 9ipsumgenera: 11Static blog generator written in Nim 15 47⭐ 7🍴 7& 14 more... |
20:05:01 | * | rockcavera is now known as Guest76346 |
20:05:01 | * | tiorock joined #nim |
20:05:01 | * | Guest76346 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
20:05:01 | * | tiorock is now known as rockcavera |
20:05:45 | * | marmotini_ quit (Remote host closed the connection) |
20:06:34 | * | marmotini_ joined #nim |
20:07:15 | Araq | there is more than that |
20:10:50 | * | marmotini_ quit (Ping timeout: 240 seconds) |
20:14:01 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:16:41 | * | jjido joined #nim |
20:18:08 | * | silvernode[m] joined #nim |
20:18:43 | * | tane joined #nim |
20:20:32 | leorize | @reversem3: join #freenode_#nim:matrix.org |
20:26:50 | * | tiorock joined #nim |
20:26:50 | * | rockcavera quit (Killed (adams.freenode.net (Nickname regained by services))) |
20:26:50 | * | tiorock is now known as rockcavera |
20:31:52 | * | al_ joined #nim |
20:31:52 | * | al_ is now known as Guest94576 |
20:35:37 | * | abm quit (Quit: Leaving) |
20:35:57 | * | sigmapie8 quit (Quit: Leaving) |
20:39:02 | * | Kaivo_ quit (Quit: WeeChat 2.7) |
20:39:04 | FromDiscord | <clyybber> Araq: Have to study atm. One week to go |
20:39:17 | * | Kaivo joined #nim |
20:39:19 | Araq | ah ok |
20:40:18 | * | leorize[m] joined #nim |
20:40:18 | * | Yardanico[m] joined #nim |
20:40:18 | * | salotz[m] joined #nim |
20:40:19 | * | GitterIntegratio joined #nim |
20:40:19 | * | pigmej joined #nim |
20:40:19 | * | planetis[m] joined #nim |
20:40:19 | * | Demos[m] joined #nim |
20:40:19 | * | lqdev[m] joined #nim |
20:40:19 | * | BitPuffin joined #nim |
20:40:19 | * | unclechu joined #nim |
20:40:24 | * | grantmwilliams joined #nim |
20:40:25 | * | d-nice2[m] joined #nim |
20:40:25 | * | s87651[m] joined #nim |
20:40:25 | * | hohlerde joined #nim |
20:40:25 | * | vycb[m] joined #nim |
20:40:25 | * | oswin[m] joined #nim |
20:40:26 | * | freepump[m] joined #nim |
20:40:26 | * | watzon[m] joined #nim |
20:40:26 | * | skrylar[m] joined #nim |
20:40:26 | * | pqflx3[m] joined #nim |
20:41:08 | * | drewr quit (Ping timeout: 245 seconds) |
20:44:39 | * | nixfreak quit (Remote host closed the connection) |
20:50:41 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:55:48 | * | drewr joined #nim |
20:57:56 | * | awe00 joined #nim |
21:00:06 | * | ptdel joined #nim |
21:04:36 | FromGitter | <waghanza> hi, ⏎ I have compiled https://github.com/the-benchmarker/web-frameworks/blob/master/nim/httpbeast/server.nim with ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e4affe4292ff243d3d2aae6] |
21:04:55 | FromGitter | <waghanza> could anyone check the above code and compilation option ? |
21:05:38 | FromGitter | <Yardanico> Well, one reason might be that "march=native" picks a wrong CPU model for your CPU |
21:05:51 | FromGitter | <Yardanico> try without march=native and mtune=native |
21:08:30 | FromGitter | <waghanza> Ok. I'll try, I do not know what are this option |
21:08:34 | * | jjido joined #nim |
21:08:37 | Yardanico | where did you take that from? |
21:08:40 | Yardanico | and why do you really need it? :P |
21:17:09 | FromGitter | <waghanza> It was made by a `nim` contributor => https://github.com/the-benchmarker/web-frameworks/pull/1743/files ⏎ but, to be honest, it was not compiled on *alpine* at this time |
21:17:09 | disbot | ➥ [Nim] Improve code, Code Style, More Nim way |
21:17:38 | Yardanico | uhh |
21:17:42 | Yardanico | idk why juan added all those flags |
21:18:36 | * | blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in) |
21:18:41 | * | hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in) |
21:18:45 | FromGitter | <waghanza> probably because it was accurate at this time |
21:28:26 | * | dadada_ quit (Ping timeout: 240 seconds) |
21:29:58 | * | blackbeard420 joined #nim |
21:30:51 | * | hpyc9 joined #nim |
21:32:28 | * | Trustable quit (Remote host closed the connection) |
21:33:46 | * | dadada joined #nim |
21:34:10 | * | dadada is now known as Guest65539 |
21:37:15 | solitudesf | this is just wrong. you cant allow wacking arbitrary compiler flags. even your c benches dont use march=native or lto |
21:41:35 | * | Guest94576 quit (Quit: Guest94576) |
21:47:23 | FromGitter | <Varriount> The elixir and rust benchmarks *appear* to be using similar flags |
21:47:27 | * | Guest65539 quit (Ping timeout: 268 seconds) |
21:47:48 | FromGitter | <Varriount> Though the C and C++ benchmarks do not |
21:48:43 | * | dadada_ joined #nim |
21:49:13 | FromGitter | <Obround> Hello, I am trying to use the `compileTime` pragma, but it doesn't work. This is the code: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e4b0a5818ac9b0fb5c72f5c] |
21:49:55 | FromGitter | <Obround> Seems like the `compileTime` pragma didn't work... |
21:50:13 | def- | compile time variables are only available at compile time |
21:50:17 | def- | echo pi is run at runtime |
21:50:32 | FromGitter | <Obround> Ok... |
21:50:33 | def- | you might want `const pi = 3.14159` |
21:50:55 | FromGitter | <Obround> I'm not sure I understand... Whats the difference? |
21:50:58 | * | awe00 quit (Read error: Connection reset by peer) |
21:51:15 | def- | const calculates the value at compile time and stores it so that it's available at runtime |
21:51:26 | def- | {.compileTime.} calculates it at compile time and only provides it at compile time |
21:51:33 | FromGitter | <Obround> And compileTime var? |
21:52:22 | def- | `static: echo pi` if you want to print a compileTime variable at compile time |
21:53:01 | * | awe00 joined #nim |
21:53:28 | def- | but I would consider the error you got a compiler error anyway, the Nim compiler should already notice that pi is undeclared at runtime and not just pass it to the C compiler |
21:54:06 | FromGitter | <Obround> Yeah... Thanks a lot! |
21:54:31 | * | awe00 quit (Client Quit) |
21:58:42 | FromGitter | <Obround> Another question: Is there some way to demote a const to a var? |
22:00:25 | def- | make a copy of it? |
22:00:28 | def- | var x = pi |
22:00:35 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:01:22 | FromGitter | <Obround> Yeah, but while still retaining the name. |
22:02:29 | lqdev[m] | nope. |
22:02:53 | lqdev[m] | you can only do that if you introduce a new scope and shadow the old symbol |
22:02:59 | * | dadada_ quit (Ping timeout: 260 seconds) |
22:03:34 | * | dadada_ joined #nim |
22:06:39 | * | solitudesf quit (Ping timeout: 272 seconds) |
22:14:47 | * | shadowbane quit (Quit: Konversation terminated!) |
22:16:41 | * | natrys quit (Quit: natrys) |
22:17:14 | * | dadada_ quit (Ping timeout: 240 seconds) |
22:18:44 | * | dadada_ joined #nim |
22:19:05 | * | shadowbane joined #nim |
22:26:39 | FromGitter | <Varriount> def-: "compileTime variables are available at runtime too" |
22:26:47 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#pragmas-compiletime-pragma |
22:33:15 | * | dadada_ quit (Ping timeout: 272 seconds) |
22:33:49 | * | dadada joined #nim |
22:34:12 | * | dadada is now known as Guest61221 |
22:37:31 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
22:38:29 | * | tane quit (Quit: Leaving) |
23:07:27 | * | Guest61221 quit (Ping timeout: 272 seconds) |
23:08:34 | * | dadada_ joined #nim |
23:10:50 | * | smitop joined #nim |
23:13:10 | dom96 | argh, the effect system is annoying when you cannot tell Nim to ignore it |
23:14:56 | leorize | use a `{.noSideEffects.}:` block for that |
23:16:31 | dom96 | ahh, {.tags: []}: should also be a thing |
23:18:50 | * | gmpreussner quit (Ping timeout: 240 seconds) |
23:19:03 | * | sean__ quit (Ping timeout: 260 seconds) |
23:19:46 | * | gmpreussner joined #nim |
23:20:44 | dom96 | ".raise effects differ" |
23:20:46 | dom96 | -.- |
23:26:56 | * | ptdel joined #nim |
23:29:08 | FromGitter | <Varriount> dom96: Perhaps there should be a "yesIReallyKnowWhatIAmDoing" block |
23:36:58 | dom96 | I don't even know if there is a way to do this |
23:37:02 | dom96 | *sigh* |
23:37:12 | dom96 | I have to modify sdl2 to make it compatible |
23:39:22 | FromDiscord | <Recruit_main_70007> It’s not a good project until you have to edit a module’s source code |
23:40:25 | * | zickzackv joined #nim |
23:45:02 | * | sean joined #nim |
23:45:25 | * | sean is now known as Guest21190 |
23:47:47 | * | couven92 quit (Read error: Connection reset by peer) |
23:48:14 | * | couven92 joined #nim |
23:52:29 | * | Guest21190 quit (Quit: Guest21190) |