00:07:48 | * | Trustable quit (Remote host closed the connection) |
00:28:40 | * | clyybber quit (Ping timeout: 248 seconds) |
00:36:03 | * | arnetheduck joined #nim |
01:01:27 | * | SenasOzys quit (Ping timeout: 260 seconds) |
01:07:11 | * | clyybber joined #nim |
01:12:17 | FromGitter | <matrixbot> `petersjt014` Hi: I'm trying to compile something and am not getting any luck sofar. I have this set in nim.cfg: ⏎ ⏎ ```gcc.path = r"C:\Program Files\Git\mingw64\bin"``` ⏎ ⏎ which the compiler apparently doesn't like. It is a formatting thing? [https://gitter.im/nim-lang/Nim?at=5ac031f0458cbde557990876] |
01:15:52 | * | S1tiSchu joined #nim |
01:19:28 | * | SitiSchu quit (Ping timeout: 240 seconds) |
01:41:59 | * | tefter quit (Remote host closed the connection) |
01:44:41 | * | yglukhov quit (Read error: Connection reset by peer) |
01:45:33 | * | yglukhov joined #nim |
02:14:35 | * | clyybber quit (Quit: good night) |
02:15:13 | * | dddddd quit (Remote host closed the connection) |
02:37:30 | * | athenot joined #nim |
02:41:18 | * | max3 joined #nim |
02:41:50 | * | otep joined #nim |
02:42:06 | * | otep left #nim (#nim) |
02:42:45 | * | athenot quit (Ping timeout: 276 seconds) |
02:44:34 | * | athenot joined #nim |
02:56:46 | FromGitter | <data-man> @petersjt014: Try add path to system env %PATH% |
03:05:07 | * | athenot quit (Ping timeout: 260 seconds) |
03:35:34 | FromGitter | <matrixbot> `petersjt014` suddenly It's in `C:\bin\mingw64`. I have no idea how that happened, but it works now. thanks! |
03:37:14 | FromGitter | <matrixbot> `petersjt014` I finally have a working nim install. The fun begins. |
03:41:57 | FromGitter | <matrixbot> `petersjt014` it feels pretty nice to just be able to get an exe right away |
03:43:40 | FromGitter | <genotrance> That's the best part ;) |
03:52:44 | FromGitter | <matrixbot> `petersjt014` though calling command line utils without any kind of wrapper still feels...weird. |
03:53:10 | FromGitter | <matrixbot> `petersjt014` It gives me a mild fear of name collisions or something, but I'll admit it's convenient |
03:59:05 | FromGitter | <zacharycarter> is there a way to get a file handle from a directory? |
03:59:13 | FromGitter | <zacharycarter> trying not to resort to using the posix module |
05:10:10 | * | shashlick1 joined #nim |
05:24:49 | * | byte512 quit (Ping timeout: 248 seconds) |
05:26:39 | * | byte512 joined #nim |
05:33:02 | FromGitter | <zacharycarter> anyone have any examples of using the dispatcher w/ posix and asyncdispatch? |
05:33:10 | FromGitter | <zacharycarter> I've found a windows example but nothing for osx / linux |
05:49:19 | FromGitter | <zacharycarter> I'm really just needing help converting code from the old asyncio format to the new asyncdispatch format for osx |
05:49:39 | FromGitter | <zacharycarter> can't quite figure out how to register things w/ the global dispatcher - just calling register with the fd isn't working obv |
06:05:28 | * | shashlick1 quit (Quit: WeeChat 1.9.1) |
06:05:50 | * | shashlick1 joined #nim |
06:42:37 | * | Lord_Nightmare quit (Ping timeout: 256 seconds) |
06:44:41 | * | Lord_Nightmare joined #nim |
06:49:26 | * | yglukhov quit (Read error: Connection reset by peer) |
06:50:03 | * | yglukhov joined #nim |
07:05:31 | * | rokups joined #nim |
07:06:24 | * | max3 quit (Quit: Connection closed for inactivity) |
07:08:36 | * | yglukhov quit (Ping timeout: 276 seconds) |
07:09:24 | * | yglukhov joined #nim |
07:21:00 | * | gokr joined #nim |
07:28:00 | FromGitter | <kinkinkijkin> I'm having a confusing issue |
07:28:13 | FromGitter | <kinkinkijkin> for some reason, .contains from strutils is returning reversed values |
07:28:23 | FromGitter | <kinkinkijkin> true if not containing, false if containing |
07:28:45 | FromGitter | <kinkinkijkin> is this standard behaviour in nim or is this weird? |
07:32:20 | FromGitter | <kinkinkijkin> hmm, it's only happening sometimes |
07:39:09 | * | gokr quit (Ping timeout: 276 seconds) |
07:50:56 | FromGitter | <kinkinkijkin> nvm I was testing a strict upgrade of the code standard I'm making on code written to the old version of the standard |
07:51:05 | FromGitter | <kinkinkijkin> and it was causing some expectable issues |
07:51:11 | FromGitter | <kinkinkijkin> just added a compatability line |
07:53:11 | * | jjido joined #nim |
07:53:55 | * | arecaceae quit (Remote host closed the connection) |
07:54:19 | * | arecaceae joined #nim |
07:58:34 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:00:31 | * | gokr joined #nim |
08:03:21 | * | Senketsu_ joined #nim |
08:04:15 | * | nsf joined #nim |
08:10:12 | * | endragor joined #nim |
08:17:39 | * | Senketsu_ quit (Remote host closed the connection) |
08:25:20 | * | user1101 joined #nim |
08:26:39 | * | federico3 quit (Ping timeout: 260 seconds) |
08:26:49 | * | federico3 joined #nim |
08:31:25 | * | rockcavera joined #nim |
08:44:22 | FromGitter | <mratsim> it’s weird ;) |
08:53:33 | * | r3d9u11 joined #nim |
08:58:38 | * | yglukhov quit (Read error: Connection reset by peer) |
08:59:11 | * | yglukhov joined #nim |
08:59:21 | * | yglukhov quit (Remote host closed the connection) |
08:59:54 | * | yglukhov joined #nim |
09:01:38 | * | yglukhov quit (Remote host closed the connection) |
09:01:50 | * | yglukhov joined #nim |
09:02:07 | * | rauss quit (Read error: Connection reset by peer) |
09:03:18 | * | rauss joined #nim |
09:06:00 | FromGitter | <kinkinkijkin> okay, I have successfully implemented inline loops of arbitrary length, looping count, depth, position, and grouping |
09:06:28 | * | SenasOzys joined #nim |
09:06:42 | FromGitter | <kinkinkijkin> now that I've done the easy part, it's time to move on to the renderer |
09:10:33 | * | yglukhov quit (Remote host closed the connection) |
09:10:36 | * | Vladar joined #nim |
09:20:13 | * | yglukhov joined #nim |
09:25:01 | FromGitter | <alehander42> what project are you working on :O |
09:25:15 | * | ofelas quit (Ping timeout: 256 seconds) |
09:37:04 | FromGitter | <mratsim> A music project |
09:39:44 | FromGitter | <mratsim> https://irclogs.nim-lang.org/30-03-2018.html#08:10:05 |
09:41:23 | * | gokr quit (Quit: Leaving.) |
09:45:40 | * | Ven`` joined #nim |
09:52:47 | * | rokups quit (Quit: Connection closed for inactivity) |
10:17:20 | dom96 | So tempted to announce Nim v1 for April Fools :P |
10:17:27 | Yardanico | dom96, :P |
10:17:43 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:17:57 | dom96 | Need something more ridiculous though, that's too believable :) |
10:19:14 | Yardanico | dom96, python backend :D |
10:20:04 | * | NimBot joined #nim |
10:21:57 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:22:11 | federico3 | please don't /o\ |
10:25:09 | Yardanico | dom96, what is the best way to limit number of running async futures at the same time? |
10:25:46 | Yardanico | make a count, increment it when future starts, decrement from future callback? and also I need to wait until this count is lower than maximum |
10:26:28 | Yardanico | my program is mostly IO intensive, but I think threads may actually be a better choice here |
10:29:35 | * | nsf quit (Quit: WeeChat 2.0.1) |
10:30:03 | * | jjido joined #nim |
10:31:16 | FromGitter | <alehander42> Haha python backend would be funny |
10:32:15 | FromGitter | <alehander42> And it will provoke an I |
10:32:34 | FromGitter | <alehander42> Interesting discussion in py5hon threads:D |
10:32:56 | Yardanico | wait, threads can't return values by themselves? I need to use channels or manual memory management, right? |
10:32:58 | federico3 | actually some people could use it |
10:34:30 | dom96 | Yardanico: Spawned procedures can |
10:34:45 | dom96 | Yardanico: IO intensive means you should be using async |
10:34:49 | dom96 | not threads |
10:35:46 | Yardanico | dom96, i'm trying, but I somehow need efficiently limit count of futures running at the same time |
10:36:33 | dom96 | why? |
10:38:08 | Yardanico | dom96, well I'm making a program for pen-testing routers, so I call async proc for every ip:port combination, but I want to limit number of routers being scanned at the same time |
10:38:27 | Yardanico | and also I need to think about timeouts with async http client |
10:39:31 | federico3 | sounds more like a security scanner |
10:39:54 | Yardanico | federico3, well, probably |
10:40:13 | dom96 | okay, so yeah, just keep an int somewhere |
10:40:20 | dom96 | increment when async proc starts |
10:40:22 | dom96 | decrement when finishes |
10:40:43 | dom96 | Try not to use global variables if you can help it, better to have a State object that you pass around |
10:41:29 | federico3 | dom96: how about a blockchain-based backend? :D |
10:42:17 | Yardanico | dom96, and to check count of futures I can use "while runningCount >= maxCount: await sleepAsync(50)" ? |
10:42:33 | Yardanico | I mean to limit count of futures running at the same time |
10:45:45 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:59:22 | FromGitter | <dom96> Sure. There is probably a more efficient method but that'll work. |
10:59:34 | * | qwertfisch quit (Quit: ZNC - http://znc.in) |
11:00:07 | * | jjido joined #nim |
11:11:04 | * | zahary_ quit (Quit: Connection closed for inactivity) |
11:15:45 | * | dddddd joined #nim |
11:16:03 | * | SenasOzys quit (Read error: Connection reset by peer) |
11:16:14 | * | SenasOzys_ joined #nim |
11:33:21 | Yardanico | but currently I'm fighting with async httpclient - for some reason it just hangs after 5-10 seconds from program start (async getContent proc) |
11:34:44 | Yardanico | well, first calls to async getContent proc are being executed fine, but after 10-15 seconds new calls just hang |
11:41:11 | FromGitter | <mratsim> How about Nim PHP backend revived ? :P |
11:43:17 | FromGitter | <mratsim> but Python backend would be the best I think. “After listening to our community and the wealth on Python <-> Nim bridges, we decided to support Python bytecode as one of Nim’s official backend" |
11:48:29 | FromGitter | <mratsim> The best April’s Fools I ever saw was this one: http://dev.opera.com/articles/view/labs-introducing-opera-face-gestures/ |
11:50:16 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:59:32 | * | aguspiza joined #nim |
12:01:36 | Vladar | And the joke is that Opera is still relevant? =) |
12:07:37 | * | natrys joined #nim |
12:18:15 | * | jjido joined #nim |
12:21:38 | FromGitter | <mratsim> Opera is actually great |
12:23:18 | * | jaco60 joined #nim |
12:35:21 | FromGitter | <zetashift> +1 for the Python backend |
12:35:32 | FromGitter | <zetashift> also IS opera still great? I know it was great |
12:45:02 | * | jjido quit (Ping timeout: 256 seconds) |
12:57:23 | * | xet7 quit (Ping timeout: 256 seconds) |
13:09:07 | * | xet7 joined #nim |
13:19:38 | Vladar | IMO, Opera *was* great while it used its own engine. |
13:35:09 | * | SenasOzys_ quit (Ping timeout: 264 seconds) |
13:36:12 | * | yglukhov quit (Remote host closed the connection) |
13:43:42 | * | nsf joined #nim |
13:44:38 | * | SenasOzys_ joined #nim |
13:44:40 | * | SenasOzys_ quit (Remote host closed the connection) |
13:45:35 | * | SenasOzys joined #nim |
14:00:15 | FromGitter | <zacharycarter> still looking for help w/ asyncdispatch |
14:00:34 | FromGitter | <zacharycarter> need someone to explain / show how to register handlers for posix based operating systems |
14:00:39 | FromGitter | <zacharycarter> I have an example for windows os |
14:01:18 | * | r3d9u11 quit (Remote host closed the connection) |
14:05:39 | dom96 | zacharycarter: looked into fsmonitor's source code? |
14:07:09 | FromGitter | <zacharycarter> yes but it uses the old asyncio module I believe dom96 |
14:07:12 | FromGitter | <zacharycarter> not asyncdispatch |
14:08:01 | FromGitter | <zacharycarter> that's where I started - then I realized asyncio was being deprecated |
14:08:05 | FromGitter | <zacharycarter> and replaced w/ asyncdispatch |
14:09:00 | FromGitter | <diegogub> hi guys, someone could send me few examples of macros? i'm trying to build a case statement with variable cases.. |
14:09:30 | FromGitter | <diegogub> I have been reading everywhere from macros, but Im not sure which is correct way to code one |
14:09:50 | FromGitter | <diegogub> I wanted to avoid parsing a string.. |
14:10:06 | FromGitter | <zacharycarter> the best way IMO is to first figure out what AST you need to generate |
14:10:26 | FromGitter | <zacharycarter> then use one of the helper macros inside the macros module to show you want code you need to write to do so |
14:10:46 | FromGitter | <diegogub> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac0e866458cbde5579b45f6] |
14:11:08 | FromGitter | <zacharycarter> that's what you want to generate? |
14:11:35 | FromGitter | <diegogub> yes, at first..to get started, but I would send a array of strings..to generate more Ofbranch |
14:11:44 | FromGitter | <diegogub> something like: |
14:11:45 | FromGitter | <diegogub> macro mcase(val: string; events: seq[string]): typed = |
14:11:58 | FromGitter | <zacharycarter> well start out this way - |
14:16:15 | * | user1101 left #nim (#nim) |
14:17:18 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac0e9ed458cbde5579b4cd6] |
14:17:42 | FromGitter | <zacharycarter> the second macro basically gives you the code you need to write the macro |
14:17:49 | FromGitter | <zacharycarter> minus writing the macro signature and handling parameters |
14:17:57 | * | user1101_ joined #nim |
14:18:09 | FromGitter | <zacharycarter> dom96: so should I use asyncio? or is there a way to do this with asyncdispatch too? |
14:18:59 | FromGitter | <diegogub> thank you @zacharycarter |
14:19:12 | FromGitter | <diegogub> Also reading the code behing helpers is good |
14:19:25 | FromGitter | <zacharycarter> np |
14:20:09 | * | user1101_ quit (Read error: Connection reset by peer) |
14:48:34 | dom96 | zacharycarter: oh, you definitely shouldn't use asyncio |
14:50:04 | dom96 | You should use the selectors module I think https://nim-lang.org/docs/selectors.html |
14:51:11 | FromGitter | <zacharycarter> ah okay - I had a suspicion (last weekend or the weekend before) that that's what I should be using - thank you for confirming :) |
15:07:05 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:07:38 | dom96 | Wow, I'm amazed. My WiFi deauther works on my home WiFi network and I don't even need its passphrase :o |
15:08:24 | * | arnetheduck joined #nim |
15:12:34 | FromGitter | <zacharycarter> :D |
15:14:27 | * | yglukhov joined #nim |
15:21:09 | FromGitter | <alehander42> https://nim-lang.org/blog.html I am dissapointed, no 1 april result :D |
15:26:14 | federico3 | *disappointed |
15:26:36 | dom96 | We can still do something, ideas welcome :) |
15:28:04 | federico3 | dom96: the backend I suggested :p |
15:29:05 | dom96 | blockchain? |
15:30:57 | federico3 | ...at the risk of being taken seriously and receiving millions in funding |
15:32:23 | dom96 | Not sure how I could explain that :) |
15:40:01 | * | edcragg quit (Quit: ZNC - http://znc.in) |
15:40:03 | dom96 | Nice thought though, Bitcoin is all the rage. |
15:40:09 | federico3 | the compiler starting the build puts sources into DAG nodes. Other compiler compile them into C sources into other nested nodes and then objects and then link them. This achieves distributed building - consensus ensures the build is trusted (aka nobody injected backdoors). |
15:40:10 | dom96 | Even though it's dropping like a stone right now |
15:40:15 | * | edcragg joined #nim |
15:40:35 | dom96 | hah, proof-of-work by compilation |
15:41:09 | federico3 | that wasn't meant as PoW but why not throwing that in :D |
15:42:32 | * | enthus1ast joined #nim |
15:44:21 | * | enthus1a1t quit (Ping timeout: 256 seconds) |
15:45:54 | * | xkapastel joined #nim |
15:46:02 | * | SenasOzys quit (Remote host closed the connection) |
15:48:31 | * | SenasOzys joined #nim |
15:50:41 | FromGitter | <alehander42> @dom96 give me a min |
15:54:15 | FromGitter | <mratsim> can I give you a nim instead ;) |
15:54:26 | * | natrys quit (Ping timeout: 276 seconds) |
15:56:16 | FromGitter | <mratsim> Ethereum is dropping because an ASIC miner for Ethereum has been running for 2 months. And ASICs increase centralization, so no the discussion is about forking Ethereum: https://github.com/ethereum/EIPs/issues/958 |
15:57:26 | FromGitter | <mratsim> I just spent more time wrapping a Fortran proc to do linear regression than doing an emulator for Chip-8 :/. And the code I produced is super unclean ... |
15:58:06 | dom96 | mratsim: oh? And why is Bitcoin dropping? :) |
15:58:28 | FromGitter | <mratsim> I don’t know :P |
16:00:34 | * | yglukhov quit (Remote host closed the connection) |
16:01:06 | * | yglukhov joined #nim |
16:05:53 | * | yglukhov quit (Ping timeout: 256 seconds) |
16:06:39 | * | Ven`` joined #nim |
16:06:39 | * | natrys joined #nim |
16:06:41 | * | Ven`` quit (Client Quit) |
16:09:52 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac1044f92f5d6205781d563] |
16:10:52 | FromGitter | <alehander42> :D that's my 1 april idea but it's probably a bit too random (and it requires some more ideas & editing from somebody who knows english ) |
16:11:45 | FromGitter | <alehander42> https://gist.github.com/alehander42/2a8bfd7b4dedd6dc9e9b5999e75c98e3 |
16:16:07 | * | S1tiSchu is now known as SitiSchu |
16:24:53 | * | xincognito10[m] left #nim ("User left") |
16:36:04 | FromGitter | <zetashift> I wouldn't mention it as a new release version, maybe under a new flag or something |
16:38:06 | * | Snircle joined #nim |
16:38:31 | FromGitter | <AjBreidenbach> wait it's an april fools joke, right? |
16:38:44 | FromGitter | <data-man> And OpenCL backend! :) |
16:41:37 | * | enthus1a1t joined #nim |
16:41:54 | federico3 | that sounds way too real to be an april fool |
16:42:12 | FromGitter | <alehander42> exactly |
16:42:31 | FromGitter | <alehander42> the best april fools are the ones that make you doubt if it's actually real |
16:43:27 | * | enthus1ast quit (Ping timeout: 240 seconds) |
16:43:31 | FromGitter | <alehander42> anyway if you guys or @dom96 want you can reuse something of this for some parody article, I am heading out now |
16:44:13 | FromGitter | <data-man> Hm, Brainfuck backend? |
16:58:03 | FromGitter | <alehander42> I admit this whole brains-of-Araq-and gitter people connected into a cloud that compiles Nim projects in realtime |
16:58:06 | FromGitter | <alehander42> is a bit creepy |
16:59:41 | FromGitter | <mratsim> the computer research scientist is a bit too far fetched |
17:00:13 | FromGitter | <mratsim> "Nim releases its borrow checker!" |
17:00:22 | FromGitter | <mratsim> would actually be believable :P |
17:01:40 | * | ofelas joined #nim |
17:17:38 | * | PMunch joined #nim |
17:18:33 | PMunch | Hmm, would it be possible for the documentation generator to check hyperlinks somehow? |
17:19:10 | PMunch | I feel a lot of links are always broken |
17:19:22 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:19:53 | PMunch | The last one I noticed is the link to "built in set type" here: https://nim-lang.org/docs/sets.html |
17:20:24 | PMunch | It links to https://nim-lang.org/docs/manual.html#set-type but the actual section is https://nim-lang.org/docs/manual.html#types-set-type |
17:22:52 | PMunch | Another question, is it possible to create a type with some fields hidden? I know you can use the export marker to export things, but that only applies across module borders. So I guess what I need to do is create same kind of pseudo-module |
17:26:55 | FromGitter | <mratsim> @PMunch, this is what i use: https://github.com/status-im/nim-eth-keys/blob/f22ae0a827f74ddad0e9c5ce39b64e9f93453f9f/src/datatypes.nim#L34-L51 |
17:30:16 | FromGitter | <wu-lee> newbie question: how do I echo the address of a variable/ref? I seem to be unable to stringify the result of addr(). |
17:32:35 | FromGitter | <mratsim> repr |
17:32:59 | FromGitter | <mratsim> or $castByteAddress (add foo) |
17:33:19 | FromGitter | <mratsim> cast ByteAddress addr foo (Gitter eating brackets) |
17:35:13 | FromGitter | <wu-lee> @mratsim thanks! |
17:36:46 | FromGitter | <data-man> My new console favorites: :) ⏎ https://github.com/rgburke/grv ⏎ https://github.com/rgburke/wed |
17:39:13 | * | yglukhov joined #nim |
17:43:21 | * | yglukhov quit (Read error: Connection reset by peer) |
17:43:58 | * | yglukhov joined #nim |
17:49:32 | * | SenasOzys quit (Remote host closed the connection) |
17:52:33 | * | SenasOzys joined #nim |
17:53:56 | * | r3d9u11 joined #nim |
17:54:32 | * | yglukhov quit (Remote host closed the connection) |
17:55:22 | * | xkapastel quit (Quit: Connection closed for inactivity) |
18:00:07 | FromGitter | <Vindaar> just replace both by emacs + magit (magit alone is a good enough reason to use emacs, imo :P ) |
18:10:34 | * | yglukhov joined #nim |
18:12:06 | * | yglukhov quit (Remote host closed the connection) |
18:13:24 | FromGitter | <Vindaar> rereading my message makes it sound way too serious, haha |
18:28:27 | * | PMunch quit (Ping timeout: 240 seconds) |
18:37:57 | * | miran joined #nim |
18:42:58 | * | PMunch joined #nim |
18:45:28 | PMunch | mratsim, and that's sufficient for them to be seen as regular variables? |
19:03:16 | * | xkapastel joined #nim |
19:06:00 | PMunch | Hmm, Araq did you mention that you wanted to fix that int literals weren't accepted in container initialisation? |
19:06:17 | Araq | no. |
19:06:50 | PMunch | ie. var x: seq[uint8] = @[1, 2, 3] |
19:06:54 | PMunch | Hmm, why not? |
19:07:21 | Araq | because special typing rules to save keystrokes suck. |
19:07:34 | Araq | to save keystrokes, Nim has macros. |
19:08:24 | PMunch | But 1 could just as well be a uint8 and not an int. It's just chosen to be always be an int.. |
19:12:24 | dom96 | This is what mapLiterals is for https://nim-lang.org/docs/sequtils.html#mapLiterals.m,untyped,untyped |
19:13:06 | dom96 | I do wish Nim was more friendly here though. |
19:13:11 | dom96 | s/friendly/permissive/ |
19:13:15 | FromGitter | <data-man> ```import sequtils ⏎ var x = mapLiterals([1, 2, 3], uint8) ⏎ ⏎ echo x``` ⏎ ⏎ I late :) [https://gitter.im/nim-lang/Nim?at=5ac12f4bc4d0ae8007250c06] |
19:24:28 | * | smt` joined #nim |
19:25:43 | PMunch | Hmm, I guess that works. But it's kind of a hack IMO |
19:25:55 | PMunch | Why would 1 be locked to the int type anyways |
19:26:40 | PMunch | Especially since you can do "var x: uint8 = 5" |
19:28:10 | miran | can't you do something like @[5'u8, 6, 7, 8] ? |
19:28:37 | * | smt quit (Ping timeout: 260 seconds) |
19:29:13 | PMunch | mapLiterals didn't even work for what I was trying to do.. http://ix.io/15u0/ |
19:29:43 | PMunch | miran, yes you can. And it works fine for uint8. But take my example, I want to use a set of a range type |
19:30:28 | PMunch | It works fine if I do x = {range[0..10](1), 2, 3, 4} as it assumes the same type for the rest of the integers |
19:31:01 | * | shashlick1 quit (Read error: Connection reset by peer) |
19:31:08 | PMunch | But that just looks confusing. If Nim is able to convert all the other integers, why not also the first. The type of x is already known to be seq[range[0..10]] |
19:31:16 | PMunch | s/seq/set |
19:31:40 | PMunch | I'll be back in a bit, going to take a shower |
19:31:41 | * | shashlick1 joined #nim |
19:32:15 | miran | agreed |
19:33:07 | FromGitter | <data-man> @PMunch: ⏎ ⏎ ``` I agree with you.``` [https://gitter.im/nim-lang/Nim?at=5ac133f227c509a774c85f71] |
19:34:33 | dom96 | I think the compiler doesn't have easy access to the type of 'x' when it's resolving the type of the set |
19:34:42 | dom96 | I think that's the problem |
19:35:03 | dom96 | And Araq doesn't want to convolute the logic further to support it |
19:35:10 | dom96 | Which I can sympathise with |
19:46:03 | PMunch | Back now, apparently someone needed the shower before I got the chance :P |
19:47:10 | PMunch | dom96, sure. But does 1 have to be resolved to int before knowing what type it wants. Wouldn't it be possible to have an intermediary NumberLiteral type that the compiler could apply before they got resolved to whatever was expected? |
19:49:44 | PMunch | data-man. The thing is I want to generate objects were each field is optional. Instead of just having them defined as optional this and optional that I wanted to save some space and try to make the interface easier by using a bitset for which variables where available and getters/setters like the ones miran showed to manage the fields and the set. |
19:50:27 | PMunch | But it doesn't really make sense to give the set many more possible values than I have types, hence why I wanted to restrict them with a range |
19:50:49 | PMunch | So making a new type for each of the various ranges is a bit odd |
19:54:10 | miran | IMO, if you define your x as a set of range[0..10], then when you later create it with {1, 2}, it should be "known" that these values are from that range |
19:56:04 | FromGitter | <data-man> @PMunch: Oh, I'm just working on over the bitset with arbitrary size. Based on bitsets module from compiler's dir. Candidate for collections/bitsets. :) |
20:02:45 | * | SenasOzys quit (Ping timeout: 256 seconds) |
20:07:09 | * | gokr joined #nim |
20:12:29 | PMunch | Hmm, miran. Do you know if there is a way to override the object constructor as well? |
20:12:46 | PMunch | As in MyObject(someField: 100, anotherField: "Hello world") |
20:15:18 | miran | override in which sense? |
20:16:05 | PMunch | I've now created a type similar to yours |
20:16:22 | PMunch | With hidden fields and setters and getter |
20:17:46 | PMunch | And it works fine if I do "var x: MyObject; x.someField = 100" But I can't do "var x = MyObject(someField: 100)" since that is an object constructor |
20:18:19 | PMunch | Which are not privy to the setter and getters |
20:19:42 | * | SenasOzys joined #nim |
20:21:02 | miran | you want to use the second way to do what the first way does? |
20:21:44 | miran | (sorry, it's getting late and i'm quite tired, so i might be slow :)) |
20:22:39 | PMunch | Yes |
20:22:41 | PMunch | Exactly |
20:23:51 | FromGitter | <data-man> https://www.reddit.com/r/programming/comments/88phv7/c_will_no_longer_have_pointers/ ⏎ ⏎ > I hate April 1st on the internet ⏎ ⏎ :-D [https://gitter.im/nim-lang/Nim?at=5ac13fd7e4ff28713a98f409] |
20:26:08 | PMunch | http://ix.io/15vS/Nim |
20:26:38 | PMunch | miran, that is what I have now. As you can see it fails on line 46, but the three preceding lines work if you uncomment them and comment out line 46 |
20:27:56 | PMunch | Oh well, shower is apparently available now. Back in a bit (hopefully) |
20:28:12 | miran | thanks for the example, now your intent is more clear, let me check and think a bit |
20:30:00 | * | SenasOzys quit (Ping timeout: 268 seconds) |
20:33:28 | * | miran_ joined #nim |
20:35:19 | miran_ | sorry PMunch, it is too late for me to think clearly.... hopefully someone else will jump in and help... good night everybody |
20:36:38 | * | miran quit (Ping timeout: 256 seconds) |
20:37:56 | * | miran_ quit (Client Quit) |
20:39:22 | dom96 | PMunch: that sounds like it could work, perhaps you could dive into the compiler source and try to hack it in there? :) |
20:41:32 | dom96 | This is a good one: https://blog.adacore.com/getting-rid-of-rust-with-ada |
20:46:07 | * | yglukhov joined #nim |
20:47:30 | * | r3d9u11 quit (Remote host closed the connection) |
20:53:28 | PMunch | dom96, what sounds like it could work? |
20:53:29 | * | SenasOzys joined #nim |
20:53:41 | dom96 | "Wouldn't it be possible to have an intermediary NumberLiteral type that the compiler could apply before they got resolved to whatever was expected?" |
20:53:44 | dom96 | That |
20:54:46 | PMunch | And nice punny article by the way |
20:55:06 | PMunch | dom96, oh right. Hmm.. |
20:55:35 | PMunch | That would have to wait 'til tomorrow at least |
20:56:09 | PMunch | Getting late already, and delving into the compiler source is something I have to do with a clear head :P |
20:57:12 | * | Vladar quit (Quit: Leaving) |
21:01:28 | * | rockcavera quit (Remote host closed the connection) |
21:02:06 | FromGitter | <wu-lee> newbie q: given a ref x, I can get the var with x[]; given a var/const/let y, can I get a ref to it? and are refs always mutable? |
21:08:58 | FromGitter | <zacharycarter> we should have done a april fools blog post about Nim having a Rust target |
21:09:21 | PMunch | zacharycarter, haha yes, that would've been great! |
21:09:48 | PMunch | wu-lee, const and let doesn't have an address |
21:10:02 | PMunch | But otherwise yes |
21:11:20 | dom96 | zacharycarter: gist creation on play.nim-lang.org is broken :( |
21:11:29 | dom96 | and I can't even create my own gist manually and then use |
21:12:07 | dom96 | I'm not sure if it this is also an april fools joke: https://www.reddit.com/r/programming/comments/88sqrn/a_modern_syntax_for_ada/ |
21:12:08 | dom96 | but lol |
21:12:12 | dom96 | Nim literally has this feature |
21:12:30 | FromGitter | <zacharycarter> yeah I need to update the playground to not use anon gists |
21:12:33 | FromGitter | <zacharycarter> just haven't gotten around to it yet |
21:16:40 | * | Ven`` joined #nim |
21:17:14 | Araq | PMunch: I don't think a language where const x: T = value is different from const x = value is particularly elegant or consistent |
21:17:29 | * | Ven` joined #nim |
21:17:50 | Araq | but I noticed 'consistency' is only an argument when others use this word. |
21:18:35 | FromDiscord | <treeform> there should be `value = T : const x` too! |
21:19:16 | Araq | on the other hand, we have var x: seq[int] = @[] and var x = @[] is illegal :-/ |
21:19:48 | Araq | but that means empty constructors are badly designed :P |
21:21:18 | * | Ven`` quit (Ping timeout: 260 seconds) |
21:22:28 | * | Ven` quit (Ping timeout: 260 seconds) |
21:24:59 | FromDiscord | <treeform> Hey Araq, what would it take to replace the cairo library: https://github.com/nim-lang/cairo with this: https://github.com/treeform/cairo which has more docs and tests. |
21:25:26 | * | Ven`` joined #nim |
21:27:25 | Araq | hmmm |
21:28:22 | dom96 | treeform: oooh, beautiful |
21:28:33 | FromDiscord | <treeform> thanks |
21:29:53 | FromGitter | <kinkinkijkin> I can't help but feel there's something wrong with this code but I can't pinpoint what https://i.imgur.com/wasZ2Cg.png |
21:30:45 | dom96 | treeform: So I'm not sure how to best handle these situations |
21:30:55 | dom96 | There are projects out there that depend on the current 'cairo' package |
21:31:11 | dom96 | I don't think replacing it with another package under people's noses is a good idea |
21:31:19 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:31:49 | FromGitter | <kinkinkijkin> add it under a different name from the current package |
21:32:02 | * | smt` is now known as smt |
21:32:05 | FromGitter | <kinkinkijkin> and deprecate but keep in for compatability the old one |
21:32:18 | FromDiscord | <treeform> but then people would use the old package because it has a better name? |
21:33:26 | FromDiscord | <treeform> I don't think package could be deprecate right now? |
21:33:38 | PMunch | Araq, problem is that Nim now appears to be inconsistent. "var x: uint8 = 5" works, while "var x: seq[uint8] = @[5]" doesn't work? We already have "var x: T = 5" != "var x = 5" with integer types as well which you just said isn't elegant or consistent.. |
21:34:04 | Araq | nimble could have "selected" packages |
21:34:21 | * | Ven`` joined #nim |
21:34:30 | Araq | PMunch: yeah, so it's already bad. don't want to make it worse |
21:34:43 | PMunch | Well I'd say it'd make it better |
21:34:51 | PMunch | More consistent with what already exists |
21:35:04 | PMunch | And seem less like some feature is missing.. |
21:35:22 | Araq | I'd rather remove the int literals from the language |
21:35:50 | dom96 | kinkinkijkin: Regarding your code: you can take advantage of type inference in many places |
21:36:01 | dom96 | kinkinkijkin: also, you should space out your code a bit more |
21:36:55 | dom96 | another style thing, the 'else' in your first if isn't necessary |
21:36:55 | PMunch | Araq, remove int literals? How would you define x = 5? |
21:36:58 | dom96 | you are returning anyway |
21:37:07 | dom96 | so you can just deindent the code under that 'else' and remove the 'else' |
21:37:22 | dom96 | also, the 'return' at the bottom of the proc isn't necessary |
21:38:00 | Araq | plus your code is doing string parsing in a convoluted way, try parseutils.nim |
21:38:29 | FromGitter | <kinkinkijkin> I know the return isn't necessary but I've committed it to this project's code style |
21:38:42 | FromGitter | <kinkinkijkin> I'll look at parseutils if it's part of the standard modules |
21:39:22 | FromGitter | <kinkinkijkin> I don't quite know how to implement a fast parser very well so this is the best I came up with |
21:40:24 | dom96 | better than going straight for regex :) |
21:40:54 | FromGitter | <kinkinkijkin> yeah, I went straight for regex on the original, first version of this project in C# |
21:41:03 | FromGitter | <kinkinkijkin> v2 was also c# but far better |
21:41:05 | FromGitter | <kinkinkijkin> this is v3 |
21:42:01 | dom96 | btw, my book has a nice chapter on parsing and parallelism ;) |
21:42:25 | Araq | PMunch: 5 would be 'int', not 'int literal(5)' |
21:42:58 | dom96 | Araq: Why isn't it just `number literal(5)`? |
21:43:14 | Araq | PMunch: var x: seq[byte] = @[3] does not work and var x: seq[byte] = @[myintVar] does not work either. it is consistent in its own ways. |
21:44:04 | PMunch | Yeah but var x:byte = 3 does, and that makes it confusing that var x: seq[byte] = @[3] doesn't work |
21:44:26 | PMunch | I know why it doesn't, but I'd wager 99% of Nim users have tried that at some point |
21:44:39 | FromGitter | <kinkinkijkin> imo it seems inconsistent that you can't initialize a numeric seq like that |
21:45:27 | dom96 | Literals are in special |
21:45:40 | dom96 | You're saying that var x: seq[byte] = @[myintVar] does not work |
21:45:42 | dom96 | it shouldn't |
21:45:46 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:45:49 | dom96 | but literals are different |
21:45:49 | Araq | type conversions do not compose. that's not specific to Nim. |
21:46:46 | Araq | the problem is that that literals are different. in retrospect, I wouldn't do this anymore, it makes everything more complex and confusing. it does save some typing though. |
21:47:11 | PMunch | dom96, yeah it makes sense that int variables won't work in a byte assignment. Of course they won't, different types and all. But literals don't really have a type in most peoples heads, and especially not when they can do "var x: byte = 5" |
21:47:16 | dom96 | You've saved some typing, but not enough |
21:47:33 | dom96 | yeah, that's exactly it. |
21:47:39 | dom96 | To many people `5` can be a float too |
21:47:50 | PMunch | Ah yes |
21:48:23 | PMunch | And in fact "var x: float = 5" does work |
21:48:30 | FromGitter | <kinkinkijkin> hmmm, isn't that a standard thing to learn learning programming though? that literals of different types look different |
21:48:51 | PMunch | If anything an integer and a float should not be mixable, they are stored completely differently! |
21:49:31 | * | Ven`` joined #nim |
21:50:25 | FromGitter | <kinkinkijkin> like a float should be 5.0 or 5.0f, an int should be 5, a fixed of 5 decimal places should be 5.00000 etc |
21:50:46 | FromGitter | <kinkinkijkin> thinking about it, it feels convenient but in a bad way that nim is like this |
21:51:31 | PMunch | I think "var x:float = 5" is fine |
21:51:58 | PMunch | Having to write .0 just to specify that something is a float is just annoying |
21:52:47 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:52:55 | federico3 | dom96: regarding #7463 turns out some tests need jester :) |
21:52:59 | FromGitter | <kinkinkijkin> I do too but I think if you can do that you should also be able to use a natural literal for any kind of initialization of a number variable that can be natural and contain a natural of the size of the given natural |
21:53:26 | FromGitter | <kinkinkijkin> or just remove the "any natural to any type that can contain one" thing |
21:53:27 | * | jijiji joined #nim |
21:53:53 | dom96 | federico3: to be honest, those tests should probably have a Nimble file and require `jester` in it |
21:53:53 | * | jijiji quit (Client Quit) |
21:54:01 | dom96 | federico3: then use nimble to build and test |
21:54:14 | federico3 | dom96: that would me much more hygenic |
22:03:46 | dom96 | hrm, so I muted freenode webchat and now I can't remember how to unmute it D: |
22:06:37 | FromDiscord | <treeform> when compiling to 32bit platform is int still 64 bit? |
22:07:40 | PMunch | Don't think so |
22:07:49 | PMunch | I think it's platform specific int |
22:08:21 | FromDiscord | <treeform> ok |
22:09:19 | * | dom96_ joined #nim |
22:09:32 | * | dom96_ quit (Client Quit) |
22:09:39 | PMunch | Which makes it even more annoying that literals don't work with other types than int.. |
22:09:44 | dom96 | yay for past me documenting the hostmask I muted |
22:11:28 | * | S1tiSchu joined #nim |
22:12:59 | * | SitiSchu quit (Ping timeout: 268 seconds) |
22:23:41 | * | natrys quit (Quit: natrys) |
22:23:59 | * | rockcavera joined #nim |
22:24:53 | * | S1tiSchu quit (Ping timeout: 260 seconds) |
22:26:58 | * | SitiSchu joined #nim |
22:33:20 | * | smt` joined #nim |
22:37:21 | * | smt quit (Ping timeout: 248 seconds) |
22:37:50 | * | smt_ joined #nim |
22:38:38 | FromGitter | <AjBreidenbach> yay |
22:41:05 | * | smt` quit (Ping timeout: 248 seconds) |
22:45:26 | FromGitter | <mratsim> by the way `let x = [float32 1, 2, 3, 4]` works but `let x = [float32 -1, 2, 3, 4]` will throw an error |
22:46:35 | Araq | -1 is not a int literal, it's unary minus followed by an int literal |
22:51:33 | Araq | we could make -1 an int literal and then -1 is different from - 1 |
22:52:52 | dom96 | please no |
22:55:55 | Araq | :P |
22:56:21 | * | aguspiza quit (Ping timeout: 256 seconds) |
22:57:59 | * | dddddd quit (Remote host closed the connection) |
23:02:05 | PMunch | Again, let's make it not an int literal but a number literal.. |
23:02:17 | PMunch | Would solve all these strange discrepancies |
23:02:48 | PMunch | By the way, what is the correct way to create a set that I can then assign with {1, 2, 3}? |
23:03:17 | PMunch | I tried set[int], but that's too large. set[int16] throws expected range[0..65535] |
23:03:32 | Araq | there you go. |
23:03:52 | Araq | set[range[0..65535]] |
23:04:33 | * | smt_ quit (Ping timeout: 248 seconds) |
23:04:35 | Araq | so ... we rename "int literal" to "number literal" and that solves our problems? lovely |
23:04:55 | Araq | that doesn't even work for 'echo 5' |
23:05:22 | Araq | # I doubt this allowed to print 5.0 |
23:05:43 | PMunch | I really have to do set[range[0..65535]]? Why does that work and not set[range[0..1]]? |
23:05:57 | PMunch | Even more crazy discrepancy.. |
23:06:14 | Araq | actually it's the same reason and the same topic |
23:06:30 | PMunch | I know.. |
23:06:43 | PMunch | Why wouldn't it work for echo 5? |
23:07:02 | PMunch | number literal as a string would just be the literal, as a string |
23:07:07 | Araq | because 5 is too ambiguous, it is just a number |
23:07:27 | Araq | so both $ for ints and the $ for floats would match |
23:07:47 | PMunch | Yeah, but the new $ for number literals would also match |
23:07:48 | Araq | or maybe your proposal is to "yeah, well, prefer int" in which case it's today's 'int literal' |
23:07:50 | PMunch | And take precedence |
23:08:01 | Araq | horrible. |
23:08:46 | PMunch | Why? Because it makes sense to whoever reads it? |
23:08:48 | Araq | "your operators should also work on 'numbers' which is a type with no runtime values, but it resolves overloading ambiguities" |
23:09:19 | Araq | new rule for #nim: write an RFC before proposing anything. |
23:09:35 | PMunch | They don't have to work on 'numbers', they would just get resolved at compile-time to whatever is asked for. |
23:09:49 | PMunch | Haha, I'll type one up tomorrow |
23:09:55 | Araq | it's tiresome to debunk half-assed ideas that are based on word games. |
23:09:57 | FromGitter | <mratsim> currently printing integer range type is broken for uint8-16-32, you always get ambiguous call both system.`$` and repr.`$` match |
23:10:04 | PMunch | Let's leave it dead for tonight, I'm going to bed soon anyways |
23:10:46 | Araq | happy easter |
23:10:55 | PMunch | Oh yeah, happy easter! |
23:11:03 | FromGitter | <krux02> you too happy easter |
23:11:40 | Araq | mratsim. there is no repr.`$` |
23:11:47 | FromGitter | <krux02> and we all know easter is the opposite of wester(n) |
23:13:49 | FromGitter | <mratsim> Error: ambiguous call; both system.$(x: uint64)[declared in lib/system/repr.nim(28, 5)] and system.$(x: int)[declared in lib/system.nim(1898, 5)] match for: (ProgMem) |
23:14:00 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac167b826a769820b2b4a8e] |
23:14:38 | FromGitter | <mratsim> I’ll add an issue |
23:15:17 | FromGitter | <Araq> why? just fix your code |
23:15:57 | FromGitter | <mratsim> I’ve added an overload that converts them to int before printing but why is there ambiguous call here? |
23:16:17 | FromGitter | <mratsim> u16 != u64 and != int |
23:16:25 | Araq | because the compiler says so and it's consistent. it's a program. |
23:16:26 | FromGitter | <mratsim> so I guess it’s a converter conflict |
23:16:34 | Araq | every program is 100% perfectly consistent. |
23:16:50 | FromGitter | <mratsim> I suppose so, but is it your intent? |
23:17:09 | Araq | you said it yourself. |
23:17:23 | Araq | u16 is neither int nor u64 |
23:18:09 | FromGitter | <mratsim> In that case I should get a `$` not found for type u16. |
23:18:38 | Araq | u16 converts to both types though. so both match. |
23:18:54 | FromGitter | <mratsim> this works: ⏎ ⏎ ```var a: uint16 ⏎ ⏎ echo a``` [https://gitter.im/nim-lang/Nim?at=5ac168de26a769820b2b4a90] |
23:19:34 | Araq | but that's not a range |
23:19:40 | FromGitter | <mratsim> so I really think there is a something that is done for uint16 that is not done for range types |
23:19:49 | Araq | yes. |
23:20:25 | FromGitter | <mratsim> But range types should have the same semantics has the normal type, besides checking the value right? |
23:20:57 | FromGitter | <krux02> @mratsim I just checked the compile error you had |
23:20:57 | Araq | nah, ranges make everything more complicated |
23:21:07 | FromGitter | <krux02> what exactly is the issue you have with it? |
23:21:39 | FromGitter | <krux02> it tells you that it is ambiguous |
23:21:45 | FromGitter | <krux02> but what is wrong with that |
23:21:54 | FromGitter | <mratsim> I don’t have any issue, it’s easy to workaround it, but that means that if you don’t use uint64 or int or char, you need a specific `$` overload to disambiguate |
23:22:26 | FromGitter | <krux02> the range type is not an uint16 anymore and therefor the type has to be converted to an int or uint first before it can be printed |
23:22:29 | Araq | no, uint16 works but ranges have an additional conversion relation |
23:22:37 | FromGitter | <mratsim> Imagine I’m a new guy coming from say Ada, “cool range types” let’s use it to constrain an uint16 to 100..200 —> why do I need a specific print proc. |
23:23:28 | Araq | irrelevant, nobody uses Ada. |
23:23:56 | PMunch | What? |
23:24:00 | FromGitter | <mratsim> You can’t dismiss that argument with Ada, I could have say Rust, or C++ or whatever |
23:24:06 | PMunch | Ada is used for lots of stuff.. |
23:24:14 | Araq | Rust has range types? |
23:24:22 | Araq | that's news to me. |
23:24:30 | FromGitter | <mratsim> It doesn’t, hence working range types could appeal to them |
23:24:51 | PMunch | krux02, I'm going to make a point of inviting people over for watching western movies during easter :P |
23:25:00 | dom96 | I think it's time for all of you to head for sleep :) |
23:25:18 | PMunch | Yeah, I'm on my way to bed :) |
23:25:21 | FromGitter | <krux02> I am already in bed :P |
23:25:25 | FromGitter | <mratsim> well anyone I’ll file an issue, feel free to close it, but I do think it has value. |
23:25:26 | * | PMunch quit (Quit: Leaving) |
23:25:30 | FromGitter | <mratsim> anyway* |
23:25:36 | FromGitter | <krux02> I just thought I peek into this chat befor sleeping :D |
23:25:50 | Araq | krux02: you can help me |
23:26:21 | Araq | consider this type definition |
23:26:24 | FromGitter | <krux02> @mratsim it is much nicer, if you provide solutions to problmes that just talking about things that you think are problems. |
23:26:25 | Araq | type |
23:26:25 | Araq | string {.core.} = object |
23:26:25 | Araq | len, cap: int |
23:26:26 | Araq | data: ptr UncheckedArray[char] |
23:26:56 | * | gmpreussner quit (Ping timeout: 276 seconds) |
23:28:17 | Araq | now how do I tell the codegen how to map string literals to this |
23:28:32 | * | gmpreussner joined #nim |
23:28:33 | Araq | so far I have: const nimStringLiteral {.core.} = "{$1, $1, $2}" |
23:28:56 | Araq | but that's not good enough for LLVM, nor for the current strings |
23:29:17 | Araq | depending on the implementation the codegen needs to take the address of this static memory or not |
23:31:12 | Araq | so I also need const nimStringLiteralIsAddr {.core.} = false |
23:31:20 | Araq | but that's rather inelegant |
23:33:56 | * | Ganonmasteroj joined #nim |
23:34:41 | FromGitter | <mratsim> @krux02 I don’t understand, I’m explaining the problem (ambiguous call on range[uint16]), the reasoning why it’s a problem (will trip new people) and the solution (range types should work like their base type for ambiguous call resolution). |
23:34:57 | * | Ganonmasteroj left #nim ("#superbowl") |
23:38:29 | FromGitter | <krux02> well yea actually I think that is a good point. |
23:41:05 | * | endragor quit (Remote host closed the connection) |
23:42:30 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:50:11 | FromGitter | <krux02> well I would say the actual problem is that I can't overload the `$` for range types generically. at least not afaik |
23:51:14 | FromGitter | <krux02> proc `$`T (arg: range[T]): string = ⏎ $(T(arg)) |
23:51:22 | FromGitter | <krux02> ``` $(T(arg))``` |
23:51:48 | FromGitter | <krux02> ```proc `$`[T](arg: range[T]): string = ⏎ $(T(arg))``` [https://gitter.im/nim-lang/Nim?at=5ac17094e3d0b1ff2c8fba62] |
23:51:54 | FromGitter | <krux02> this does not compile :( |
23:57:21 | FromGitter | <AjBreidenbach> :( |
23:57:21 | * | gokr quit (Ping timeout: 265 seconds) |
23:57:40 | arnetheduck | Araq, well, I know for a fact the (specially different int) types passed around in the ast are often wrong (ie different on sides of assignments), and this gets hidden by the c gen because of the liberal casting to NI and back |
23:57:49 | arnetheduck | very annoying for nlvm :) |