00:20:33 | * | vlad1777d joined #nim |
00:29:53 | * | vlad1777d quit (Ping timeout: 276 seconds) |
00:50:37 | * | skrylar quit (Quit: Leaving) |
01:20:33 | * | sleepyqt quit (Quit: Leaving) |
01:31:01 | FromGitter | <gogolxdong> What's the canonical way of nim to have the main thread wait forever? |
02:15:08 | * | tiorock joined #nim |
02:15:08 | * | tiorock quit (Changing host) |
02:15:08 | * | tiorock joined #nim |
02:15:08 | * | rockcavera is now known as Guest88510 |
02:15:08 | * | Guest88510 quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
02:15:08 | * | tiorock is now known as rockcavera |
02:17:52 | * | gangstacat quit (Ping timeout: 256 seconds) |
02:20:17 | * | gangstacat joined #nim |
02:40:13 | FromGitter | <zacharycarter> @gogolxdong if you want to start an event loop you can call runForever in the asyncdispatch module |
02:40:28 | FromGitter | <zacharycarter> there's also sleep in os |
02:40:39 | FromGitter | <zacharycarter> not quite sure what you're trying to achieve |
02:49:02 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:50:14 | FromGitter | <zacharycarter> @dom96 not trying to bug you late, just wanted to bring this to your attention: https://github.com/dom96/jester/blob/master/jester.nim#L87-L94, may want a not nil check there or something. Currently sending a response back with nil will crash jester. |
02:50:37 | FromGitter | <zacharycarter> I'll file an issue |
02:51:33 | * | vivus quit (Quit: Leaving) |
02:58:36 | FromGitter | <zacharycarter> https://github.com/dom96/jester/issues/133 |
03:02:36 | * | chemist69 joined #nim |
03:04:44 | * | rinzai quit (Ping timeout: 252 seconds) |
03:28:51 | * | rinzai joined #nim |
03:33:19 | * | rinzai quit (Ping timeout: 248 seconds) |
03:34:32 | * | endragor joined #nim |
03:35:47 | * | endragor quit (Remote host closed the connection) |
03:35:54 | * | endragor joined #nim |
03:36:00 | * | endragor quit (Remote host closed the connection) |
03:36:27 | * | endragor joined #nim |
03:43:19 | * | endragor quit (Remote host closed the connection) |
03:43:48 | * | endragor joined #nim |
04:00:51 | FromGitter | <gogolxdong> Yes, thanks @zacharycarter , seems what we need. |
04:08:28 | * | radagast_04 joined #nim |
04:52:55 | * | rinzai joined #nim |
04:57:18 | * | rinzai quit (Ping timeout: 252 seconds) |
05:24:05 | * | gangstacat quit (Quit: Ĝis!) |
05:28:41 | * | gangstacat joined #nim |
05:35:26 | * | dddddd quit (Remote host closed the connection) |
05:40:08 | * | d10n-work quit (Quit: Connection closed for inactivity) |
05:46:50 | * | rinzai joined #nim |
05:51:48 | * | rinzai quit (Ping timeout: 268 seconds) |
05:58:46 | * | nsf joined #nim |
06:44:33 | * | sz0 joined #nim |
07:04:55 | * | chemist69 quit (Ping timeout: 265 seconds) |
07:07:15 | * | chemist69 joined #nim |
07:30:17 | * | gokr joined #nim |
07:31:04 | FromGitter | <alehander42> @thor77 if I understand you correctly, you can create PNode-s on runtime (importing the needed modules from the compiler) |
07:31:17 | FromGitter | <alehander42> and then use renderer.nim (from the compiler) to generate Nim code from them |
07:31:23 | FromGitter | <alehander42> that's what we did in https://github.com/metacraft-labs/py2nim/blob/master/generator.nim |
07:32:08 | FromGitter | <alehander42> (it assumes a compiler in ../nim, if you take a look at nim.cfg , but you can git submodule it, or maybe use the compiler nimble package) |
07:39:37 | * | rinzai joined #nim |
07:43:40 | * | rinzai quit (Ping timeout: 240 seconds) |
07:44:52 | * | gokr quit (Ping timeout: 252 seconds) |
07:53:54 | FromGitter | <Thor77> @alehander42 You're writing the code to a file before executing it, though ,right? |
08:00:40 | * | PMunch joined #nim |
08:02:06 | Araq | Thor77: yes but the compiler API can also be used to run or translate the PNode's |
08:07:34 | * | xet7 quit (Read error: Connection reset by peer) |
08:07:50 | * | xet7 joined #nim |
08:09:11 | thor77 | Araq: hm, but PNode looks like a custom type to me |
08:09:38 | thor77 | it's only defined in xmldom from the stdlib but that module is not imported |
08:10:12 | Araq | compiler/ast.nim has it |
08:10:28 | Araq | compiler is not stdlib but can be used as a library |
08:12:25 | thor77 | Araq: ah, ic |
08:12:43 | PMunch | federico3, https://irclogs.nim-lang.org/08-02-2018.html#20:24:10 yes valid by design. Nim uses Unicode, so you can write all your variables with thy cyrillic alphabet should you wish to :P |
08:13:18 | Araq | PMunch, that is true but will be reconsidered when more people are happy with Unicode operators :-) |
08:13:28 | Araq | some of these should be operators |
08:13:43 | PMunch | Huh? What do you mean? |
08:14:05 | PMunch | if myVar 👑 100: echo "myVar is king!" |
08:14:24 | PMunch | Operators like that? |
08:14:51 | FromGitter | <mratsim> Julia has unicode operator but no one is using them because it’s a pain |
08:14:54 | Araq | ∑ should be an operator, not an ordinary identifier |
08:15:57 | PMunch | Ah right. But yeah as mratsim says it's a pain to use unicode operators since very few people have them on their keyboards or knows how to type them |
08:16:53 | FromGitter | <mratsim> there is this option with tab replacement: https://docs.julialang.org/en/release-0.4/manual/unicode-input/ |
08:18:07 | PMunch | Yeah, that would only work in a specialized environment tohugh.. |
08:18:10 | PMunch | though* |
08:18:33 | FromGitter | <mratsim> you mean like a code editor or vim? ;) |
08:18:57 | * | xet7 quit (Ping timeout: 256 seconds) |
08:19:28 | Araq | *shrug* I like Unicode operators and when C came along many keyboards lacked [] |
08:19:54 | Araq | Ada avoided [] for this reason. |
08:20:58 | Araq | eventually there will be progress. |
08:22:04 | FromGitter | <mratsim> Pi on all keyboards ! |
08:23:28 | FromGitter | <mratsim> There is no { [] } on my mac with a French keyboard … next time I’ll buy a Swiss, it’s actually reasonable. |
08:23:36 | FromGitter | <alehander42> that's exactly what the perl 6 people are saying (they have like a load of optional unicode operators) |
08:25:00 | FromGitter | <alehander42> honestly I'd buy a keyboard with remappable physical keys (e.g. some kind of screen/kindle inc type? -based buttons that can change appearance while still feeling as normal buttons) |
08:25:36 | Araq | alehander42: in theory we can just wait until the Unix neckbeards die out and then there will progress. in practice they found a way to spread their misguided ideas and so the future might never arrive ;-) |
08:25:50 | PMunch | Araq, are you saying we should have trigraphs in Nim? :P |
08:26:39 | PMunch | alehander42, there have been some people making those. But they are prohibitively expensive :P |
08:27:05 | PMunch | And what does any of this have to do with Unix Araq? |
08:27:33 | * | yglukhov joined #nim |
08:27:56 | * | Arrrr joined #nim |
08:28:11 | Araq | PMunch, ah you got me. |
08:28:36 | * | yglukhov quit (Remote host closed the connection) |
08:28:45 | PMunch | alehander42: https://www.artlebedev.com/optimus/ |
08:28:51 | * | yglukhov joined #nim |
08:29:02 | * | rinzai joined #nim |
08:31:28 | FromGitter | <alehander42> @PMunch damn, expensive indeed . |
08:31:41 | FromGitter | <alehander42> but hopefully demand will drive prices down :D |
08:31:46 | FromGitter | <alehander42> talking about weird keyboards |
08:31:51 | * | xet7 joined #nim |
08:31:55 | Araq | yeah we need more demand |
08:31:57 | FromGitter | <alehander42> I've wanted to try one of those too for a long time : https://images-na.ssl-images-amazon.com/images/I/818T--WBwvL._SL1500_.jpg |
08:32:11 | * | xet7 quit (Remote host closed the connection) |
08:32:15 | Araq | and fewer people who hate unicode just because they can't type it |
08:32:41 | Araq | I can't type Russian characters without switching my keyboard layout |
08:33:11 | FromGitter | <mratsim> We should through them in China, Japan, Russia, Greece or an Arabic country (right-to-left for the win) |
08:33:53 | PMunch | Haha, yeah those are cool alehander42. I've actually got a pack of keyboard switches and diodes at home to gceahe my own board like this: https://i.imgur.com/teKEGhV.jpg |
08:33:59 | * | rinzai quit (Ping timeout: 268 seconds) |
08:37:26 | * | xet7 joined #nim |
08:37:41 | FromGitter | <alehander42> @Araq I can't imagine living without at least two keyboard layouts |
08:37:58 | FromGitter | <Thor77> Huh, I thought for a moment I was in another channel |
08:38:22 | PMunch | Norwegian is lucky enough to only have 3 extra letters, so we do just fine with the ISO layout |
08:38:30 | FromGitter | <alehander42> @PMunch oh nice, sounds cool, I definitiely have to try something like this |
08:39:19 | PMunch | Thor77, haha sorry about that. This community has a tendency to go a bit off-topic at times. But just ask away with Nim questions and we'll stop :) |
08:39:56 | thor77 | PMunch: heh, absolutely no problem, im obsessed with mechanical keyboards myself ;D |
08:40:18 | PMunch | alehander42, yeah right now I'm just trying to figure out how I'm going to make the case. My idea was to take the side panel of an old computer case I have and use that, but cutting the metal precisely will be a pain.. |
08:41:08 | FromGitter | <Thor77> http://i.imgur.com/n4DE2vz.jpg :) |
08:42:25 | PMunch | Yeah, that's to tall for me :( |
08:42:35 | PMunch | I bought a set of Kailh low-profile switches |
08:42:45 | PMunch | To create a really slim little board |
08:43:06 | thor77 | Yeah, I would like a tall board as well for travelling |
08:43:08 | thor77 | *slim |
08:44:39 | thor77 | i don't really feel comfortable taking the wooden one with me, as it's quite fragile |
08:45:53 | PMunch | Yeah I'd imagine |
08:46:14 | PMunch | I've got a leopold at work, but my wrists hurts when I type on it :( |
08:46:19 | thor77 | uh :( |
08:46:26 | PMunch | So currently I'm using a chepa membrane bord |
08:46:33 | thor77 | I've got another one with a 75% layout but I don't really like typing on it anymore :/ |
08:46:46 | thor77 | at work i'm forced to use a membrane board as well :/ |
08:50:03 | PMunch | Why don't you like the 75%? |
08:50:16 | thor77 | too much hand movement |
08:50:48 | thor77 | on my 60% i basically dont have to move my hands at all to reach all relevant keys |
08:51:05 | thor77 | *40% |
08:51:18 | thor77 | on the 75% one I already have to leave homerow to reach enter or space |
08:53:37 | PMunch | Ah right :P |
08:53:43 | PMunch | I thought you went to a 100% :P |
08:53:46 | PMunch | And not down |
09:03:49 | thor77 | PMunch: nah, 100% (rubber dome) -> 75% -> 40% :) |
09:04:00 | thor77 | and 40$ is absolutely perfect for me |
09:07:37 | * | rinzai joined #nim |
09:07:51 | PMunch | Hmm, I feel 40% is a bit too cramped |
09:07:59 | PMunch | Like how would you do brackets? |
09:08:02 | PMunch | Home/end |
09:10:34 | PMunch | Thing is I want to have a ISOish layout |
09:10:46 | PMunch | And I'm probably going to try ortholinear |
09:11:07 | yunfan | i have a finger to iso |
09:11:19 | * | natrys joined #nim |
09:12:13 | * | rinzai quit (Ping timeout: 268 seconds) |
09:18:07 | * | vlad1777d joined #nim |
09:19:29 | PMunch | yunfan, what? |
09:22:22 | * | livcd quit (Changing host) |
09:22:23 | * | livcd joined #nim |
09:28:31 | FromGitter | <survivorm> @PMunch. Used some of your translation, thank you. Some things got completely rewritten, wrote TL; DR section :) |
09:29:05 | FromGitter | <survivorm> Did you read Web of light yet? |
09:29:29 | thor77 | PMunch: they're on a function layer, i'm using qmk and it got a feature named tap dance that allows to bind a key multiple times, so i got key pressed once -> opening bracket key pressed twice -> closing bracked (for [ and {) |
09:30:06 | PMunch | survivorm, no haven't had a look at it yet. Suddenly got pretty busy at work :P |
09:30:56 | PMunch | thor77, hmm interesting |
09:31:03 | PMunch | Does sound a bit clunky though :P |
09:31:04 | FromGitter | <survivorm> Yeah guys, just read an article on UX and UI. And i think author was pretty mush right - less UI, better user experiance |
09:31:41 | FromGitter | <survivorm> Looks like the best keyboard should be Siri too :) |
09:31:58 | PMunch | I was actually thinking about playing around with single-key caps lock/sticky control. So I hit ctrl, then the next key I hit would have the ctrl modifier |
09:32:22 | PMunch | survivorm, haha I'm just imagining writing code with Siri :P |
09:32:45 | FromGitter | <Thor77> Pmunch: https://git.crapwa.re/thor77/planck/src/master/qmk_firmware/keyboards/planck/keymaps/default/keymap.c this is my keymap, if you're interested |
09:32:56 | FromGitter | <survivorm> There are blind programmers, @PMunch |
09:32:58 | FromGitter | <Thor77> It works rly well for me |
09:33:22 | FromGitter | <survivorm> Though i think they use the reversive approach |
09:33:59 | FromGitter | <survivorm> The PC tells them what's written |
09:36:11 | FromGitter | <survivorm> but still, i think interfaces must be moving to as thin as they may be, not to complicating UX with "this is context-dependant keyboard, there it works one way, and here - the other" |
09:37:36 | * | radagast_04 quit (Ping timeout: 256 seconds) |
09:38:13 | PMunch | survivorm, problem is that I type faster than I speak.. |
09:38:35 | PMunch | And it's much less strenuous to type for long periods of time than talking |
09:38:45 | PMunch | And imagine the horrors of open-landscape solutions :P |
09:39:18 | FromGitter | <survivorm> And you think faster, than you type, so what? |
09:39:24 | PMunch | Thor77, thanks I'll have a look at it :) |
09:39:42 | PMunch | survivorm, well I actually end up typing faster than I think as well :P |
09:39:52 | PMunch | I only reach peak speed when I have already decided on what to type |
09:40:01 | FromGitter | <survivorm> I mean, some ways are dead-ends. And that way looks as such |
09:40:02 | PMunch | Otherwise I have to pause and think about what I'm going to write |
09:40:30 | PMunch | But I see your point |
09:40:39 | PMunch | I just don't think voice is the way to go |
09:40:46 | PMunch | Direct mind-control, maybe |
09:41:13 | FromGitter | <survivorm> PMunch, you can't type faster than you think by def. Because hands are your brain's interface to the world |
09:41:38 | FromGitter | <alehander42> filtering thoughts is not easy at all, I am doubtful (and imagine the hacks if something can accidentally "read" the wrong thought) |
09:41:40 | PMunch | Well, depends on how you define think |
09:42:06 | FromGitter | <survivorm> The more accurate assumption will be that you may type faster, than your inner monologue |
09:42:18 | PMunch | I don't make a conscious choice to move my finger to a specific key each time I want to type something |
09:42:27 | FromGitter | <survivorm> but that's more a thought conversion to the speech |
09:42:35 | PMunch | I just sorta imagine what I'm going to type and my hands just do it by themselves :P |
09:42:47 | PMunch | Yeah, something likethat |
09:43:08 | PMunch | I type faster than I can construct sentences |
09:44:04 | FromGitter | <survivorm> And that's good. Just means that your "inner speech" interface is slower, than your "hand typing" one :) |
09:44:29 | FromGitter | <survivorm> But each can't be faster than actual thought |
09:45:47 | FromGitter | <survivorm> And on interfaces - i think more on the movement-tracking, like mo-cap |
09:46:35 | FromGitter | <survivorm> that's not really the thoughts capturing, but more of the movement nerve signal |
09:46:51 | FromGitter | <survivorm> still, interfaces will be tricky |
09:47:04 | FromGitter | <survivorm> and individual too, i think |
09:47:16 | FromGitter | <matrixbot> `ratherAnonymous` I have trouble setting up the nim environment variables. ⏎ export HOME=/home/user ⏎ export PATH=$PATH:$HOME/Nim/bin ⏎ export PATH=$PATH:$HOME/.nimble/bin ⏎ export NIM_LIB_PREFIX=$PATH:$HOME/Nim/lib/ [https://gitter.im/nim-lang/Nim?at=5a7d6e23ce68c3bc7464e6f4] |
09:47:33 | FromGitter | <matrixbot> `ratherAnonymous` I'm on Arch Linux and the above is inside my ".profile" file. |
09:47:48 | FromGitter | <survivorm> and? |
09:48:06 | FromGitter | <matrixbot> `ratherAnonymous` it still doesn't find the nim binary |
09:48:09 | FromGitter | <matrixbot> `ratherAnonymous` : / |
09:48:35 | FromGitter | <survivorm> echo $PATH |
09:48:39 | FromGitter | <survivorm> in the console |
09:49:01 | FromGitter | <matrixbot> `ratherAnonymous` ok, it's not listed. but why? |
09:49:26 | PMunch | I have those in my .bashrc |
09:49:30 | * | xet7_ joined #nim |
09:49:30 | PMunch | Or at least the .nimble one |
09:49:46 | FromGitter | <survivorm> Yeah, me too |
09:50:04 | FromGitter | <ChristianWitts> did you add those to your .profile and then open a new session or sourced the profile file ? |
09:50:05 | FromGitter | <matrixbot> `ratherAnonymous` I had to "source ~/.profile" a second time for some reason. |
09:50:11 | FromGitter | <survivorm> not sure you have your .profile applied |
09:50:16 | FromGitter | <matrixbot> `ratherAnonymous` ^ |
09:50:19 | FromGitter | <matrixbot> `ratherAnonymous` weird |
09:50:29 | PMunch | Huh, I actually have .nimble/bin in my path twice :P |
09:50:41 | FromGitter | <matrixbot> `ratherAnonymous` it works now for some reason... |
09:50:49 | FromGitter | <matrixbot> `ratherAnonymous` better to often than not at all :D |
09:51:14 | FromGitter | <matrixbot> `ratherAnonymous` Nim is a super fun language, that has to offer a ton |
09:51:23 | PMunch | Ah and "which nim" is "/home/peter/.nimble/bin/nim" apparently |
09:51:30 | PMunch | That's.. Strange.. |
09:51:38 | PMunch | Shouldn't it be in .choosenim/toolchains? |
09:51:40 | * | xet7 quit (Ping timeout: 265 seconds) |
09:51:53 | FromGitter | <matrixbot> `ratherAnonymous` In C I feel like there's nothing more to learn, except libraries. |
09:51:55 | FromGitter | <survivorm> @PMunch, now, as you said it, i have nimble/bin twice too |
09:52:00 | FromGitter | <matrixbot> `ratherAnonymous` Nim had so much to offer. |
09:53:19 | PMunch | Yeah Nim is great :) |
09:54:34 | * | xet7_ is now known as xet7 |
09:55:18 | * | arecaceae quit (Remote host closed the connection) |
09:55:40 | * | arecaceae joined #nim |
09:56:27 | * | chemist69 quit (Ping timeout: 260 seconds) |
10:01:30 | * | rinzai joined #nim |
10:10:51 | * | chemist69 joined #nim |
10:39:05 | * | xet7 quit (Read error: Connection reset by peer) |
10:39:38 | * | xet7 joined #nim |
10:42:12 | * | Arrrr quit (Ping timeout: 256 seconds) |
10:49:12 | * | Yardanico_ joined #nim |
10:56:46 | * | Arrrr joined #nim |
10:56:46 | * | Arrrr quit (Changing host) |
10:56:46 | * | Arrrr joined #nim |
11:05:35 | * | Yardanico_ quit (Read error: Connection reset by peer) |
11:17:46 | * | PMunch quit (Ping timeout: 256 seconds) |
11:51:08 | FromGitter | <ZarsBranchkin> If random library is deprecated, what should I use instead? |
11:54:33 | yglukhov | ZarsBranchkin: stdlib random |
11:54:34 | yglukhov | ? |
11:55:26 | FromGitter | <ZarsBranchkin> Well isn't this from standard lib? https://nim-lang.org/docs/random.html |
11:55:33 | dom96 | PMunch> [09:51:38] Shouldn't it be in .choosenim/toolchains? |
11:55:35 | dom96 | nope |
11:59:30 | Araq | use random.rand() instead of random.random() |
12:01:09 | FromGitter | <ZarsBranchkin> Oh, don't see rand on the documentation though. It's outdated? |
12:01:48 | * | arnetheduck joined #nim |
12:03:18 | FromGitter | <ZarsBranchkin> Right, rand seems to work and keeps compiler silent |
12:22:57 | * | vlad1777d quit (Ping timeout: 248 seconds) |
12:36:50 | * | zielmicha_ quit () |
12:37:24 | * | zielmicha_ joined #nim |
12:51:10 | thor77 | hm, i've got another on-topic question: i used "nimble init" to generate a <myyproject>.nimble-file. It got "nimble >= 0.17.2" in it. Once I run "nimble install" it complains about that, as the latest tagged version is 0.8.8 |
12:51:18 | thor77 | is that expected behaviour in any way? |
12:51:22 | thor77 | or did I mess smth up? |
12:51:59 | thor77 | eh, nvm |
12:52:02 | thor77 | i'm stupid |
12:52:08 | * | LyndsySimon quit () |
12:52:28 | * | LyndsySimon joined #nim |
12:53:30 | thor77 | no idea how it got into that file, but it seems like I inserted it myseslf... |
12:58:05 | * | clyybber joined #nim |
12:59:12 | * | clyybber quit (Client Quit) |
12:59:37 | * | clyybber joined #nim |
12:59:37 | * | yglukhov quit (Read error: Connection reset by peer) |
13:00:34 | * | yglukhov joined #nim |
13:06:45 | * | dddddd joined #nim |
13:13:34 | * | yglukhov quit (Remote host closed the connection) |
13:13:53 | FromGitter | <krux02> @ZarsBranchkin not sure if I am 100% updated, rand is a bit outdated because it was not very well designed. |
13:14:19 | FromGitter | <krux02> I recommend you to use the meresse twister. It will provide you with random bits |
13:14:25 | FromGitter | <krux02> bit nothing more |
13:15:00 | * | yglukhov joined #nim |
13:16:04 | FromGitter | <krux02> @ZarsBranchkin the random module is a bit inconsistent, because it uses exclusive upper bounds. Everything else in the language uses inclusive upper bounds |
13:16:12 | dom96 | that was fixed |
13:16:17 | FromGitter | <krux02> ah, ok |
13:16:39 | FromGitter | <krux02> I ok I just looked at the latest doc from the index |
13:17:02 | FromGitter | <ZarsBranchkin> Will be fine for this use case, was jst concerned that standard random library is deprecated |
13:17:35 | FromGitter | <ZarsBranchkin> Yeah, that doc doesn't even mention rand. Should get regenerated |
13:18:12 | dom96 | the docs only show the latest release |
13:18:14 | FromGitter | <krux02> it does |
13:19:37 | * | Vladar joined #nim |
13:20:11 | FromGitter | <ZarsBranchkin> Hm, maybe i was using Nim bilt from git, forgot |
13:21:06 | yglukhov | should instantiationInfo work in a macro? |
13:21:35 | FromGitter | <krux02> dom96: would it be wrong to make the default Rand state thread local? |
13:22:59 | FromGitter | <krux02> and speking about it, does Nim make it easy to make something thread local? |
13:25:40 | * | solitudesf joined #nim |
13:29:24 | dom96 | No idea if it would be wrong. Problem is there is no easy way for a library to automatically initialise a thread local var in each new thread |
13:30:06 | FromGitter | <krux02> yea I see that |
13:30:16 | FromGitter | <krux02> c++ does make it easy now |
13:30:41 | FromGitter | <krux02> thread_local is a keyword |
13:31:28 | FromGitter | <krux02> and the random module is where I would use that |
13:33:23 | * | Snircle joined #nim |
13:35:39 | dom96 | we need support for this IMO |
13:40:17 | * | clyybber quit (Ping timeout: 248 seconds) |
13:40:49 | * | rinzai quit (Ping timeout: 248 seconds) |
13:42:57 | * | jxy quit (Ping timeout: 240 seconds) |
13:43:16 | * | gokr joined #nim |
13:45:15 | * | jxy joined #nim |
13:45:16 | FromGitter | <krux02> yes |
13:45:18 | * | clyybber joined #nim |
13:49:16 | * | Arrrr quit (Read error: Connection reset by peer) |
14:01:01 | * | rinzai joined #nim |
14:02:12 | * | r4vi quit () |
14:02:35 | * | r4vi joined #nim |
14:05:05 | * | rinzai quit (Ping timeout: 240 seconds) |
14:17:04 | arnetheduck | nlvm has thread_locals too, for nim ;) |
14:18:19 | Araq | Nim has .threadvar |
14:18:46 | Araq | the rand() procs are overloaded to take an explicit state |
14:19:14 | Araq | it can easily be used within a thread. |
14:20:33 | Araq | the only thing that would really improve the situation would be a lock around the global shared state when threads are turned on, so that threads can use the same random number generator safely |
14:24:20 | * | endragor quit (Remote host closed the connection) |
14:24:47 | * | endragor joined #nim |
14:26:46 | * | endragor_ joined #nim |
14:28:29 | * | rinzai joined #nim |
14:29:18 | * | endragor quit (Ping timeout: 240 seconds) |
14:31:15 | * | endragor_ quit (Ping timeout: 256 seconds) |
14:32:50 | * | rinzai quit (Ping timeout: 256 seconds) |
14:38:12 | FromGitter | <krux02> Araq: But creating a lock around the global shared state would slow down random number generation when only one thread is present for no reason |
14:39:16 | Araq | sure but the procs which don't take a state explicitly are about convenience |
14:39:22 | FromGitter | <krux02> I think it is smarted when by default the state of the random number generator is local for each thread, so no locking needs to be done. |
14:39:56 | * | endragor joined #nim |
14:41:12 | FromGitter | <krux02> so when someone really wants to share a single random number generator between threads this person has to create the bottleneck/lock manually. |
14:41:22 | * | rinzai joined #nim |
14:42:57 | FromGitter | <krux02> I mean the allocation is also thread local by default |
14:44:13 | FromGitter | <krux02> I just had an idea. What if global variables are all thread local by default? |
14:45:51 | FromGitter | <krux02> Just an idea, but I think it might be a good one. Because sharing state between threads always creats conflicts. |
14:47:16 | FromGitter | <andreaferretti> this invalidates the common case of initializing a global once |
14:47:30 | FromGitter | <andreaferretti> and then using it as an immutable thing from multiple threads |
14:47:47 | FromGitter | <andreaferretti> e.g. a GPU context object |
14:49:06 | FromGitter | <andreaferretti> like I do here |
14:49:07 | FromGitter | <andreaferretti> https://github.com/unicredit/neo/blob/master/neo/cudadense.nim#L231-L232 |
14:49:25 | FromGitter | <brentp> hi, I have a macros.h file that I want to include in my library in a "src/hts" directory. I can get this to work by writing the appropriate signature and using `header:"../../src/hts/macros.h"` but then that obviously fails after I try to use the library after it has been nim installed. What would be the way to do this? |
14:50:29 | * | endragor quit (Remote host closed the connection) |
14:51:30 | * | endragor joined #nim |
14:51:52 | FromGitter | <brentp> e.g. from the root of the project, in "src/hts/vcf.nim" I have a function `proc bcf_hdr_id2type(hdr:ptr bcf_hdr_t, htype:cint, int_id:cint): cint {.importc: "bcf_hdr_id2type", header:"../../src/hts/macros.h", cdecl.}` which refers to src/hts/macros.h |
14:58:50 | * | miran quit (Quit: Page closed) |
15:03:53 | FromGitter | <Thor77> I'm trying to use the compiler/ast-module, but once I import it I get "compiler-#head/compiler/ast.nim(13, 50) Error: cannot open 'std/sha1'". Am I missing something? |
15:05:54 | Araq | use nim devel with compiler-#head |
15:06:25 | FromGitter | <Thor77> How am I supposed to do that? |
15:06:43 | FromGitter | <Thor77> Define compiler-#head as an dependencyy? |
15:06:50 | Araq | get a Nim from github |
15:06:58 | FromGitter | <Thor77> already got one |
15:07:11 | Araq | does it have std/sha1 ? |
15:08:07 | FromGitter | <Thor77> it should live in lib/std/*? |
15:08:41 | FromGitter | <Thor77> but it seems like I chose a package from releases, it's 0.17.2 |
15:08:51 | FromGitter | <Thor77> and doesn't have a std-subfolder in lib/ |
15:08:55 | FromGitter | <Thor77> (or anywhere else) |
15:09:11 | Araq | just delete your 0.17.2 installation and use version from git |
15:09:46 | FromGitter | <Thor77> okey, will do :) |
15:10:00 | FromGitter | <krux02> @andreaferretti yes initializing globals one is an advantage. I think though that globals that are not initialized with variables that depend on a state could still be global and shared. |
15:10:04 | FromGitter | <Thor77> (if i get to clone it on this painfully slow train-wifi...) |
15:10:23 | Araq | krux02: IMO globals should default to global, not thread local |
15:10:32 | Araq | but you can argue either way |
15:10:52 | Araq | the split is at 50-50 from the inofficial statistics in my head |
15:11:11 | Araq | globals being global is certainly more intuitive. |
15:11:39 | arnetheduck | what's the difference between std and core in lib? |
15:12:39 | Araq | core will replace system.nim eventually |
15:12:51 | Araq | std is the new "namespace" for stdlib modules |
15:13:11 | Araq | import std / [strutils, os] will work soon |
15:13:32 | Araq | sha1 is special in that only the import with 'std' is allowed |
15:13:44 | Araq | to prevent conflicts with the sha1 nimble packages out there |
15:13:58 | Araq | new stdlib modules will all require the std/ prefix |
15:14:20 | Araq | the old stdlib module will be accessible without std/ for some years to come |
15:17:47 | * | natrys quit (Ping timeout: 276 seconds) |
15:19:12 | nekits | wasn't expecting to see nim in an article about gamma encoding, yet here I am looking at the source for the website instead of the website. |
15:23:24 | dom96 | nekits: link? |
15:23:46 | nekits | http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/ |
15:23:51 | nekits | the blog |
15:24:14 | nekits | https://github.com/johnnovak/johnnovak.site/tree/master/blog/files/2016-09-21/src |
15:24:28 | nekits | and whats used on that post. |
15:24:31 | dom96 | oh yeah, that's a brilliant blog |
15:25:04 | nekits | Never seen it before today. reddit had a post about colorspace and someone linked the blog in the comments |
15:26:23 | * | gokr quit (Ping timeout: 248 seconds) |
15:31:34 | * | natrys joined #nim |
15:35:18 | * | radagast_04 joined #nim |
15:35:50 | radagast_04 | Why should anyone use typeinfo.isNil() instead of checking if x == nil? |
15:36:33 | Araq | radagast_04, different people have different taste |
15:37:05 | Araq | there is no difference between == nil and .isNil except for seqs |
15:37:14 | radagast_04 | Ah, no worries then. I was concerned if there are any potential hidden pitfall(?)s |
15:37:16 | * | miran joined #nim |
16:06:32 | FromGitter | <Thor77> Araq: It's working fine with nim compiled from git-master, thank you :) |
16:07:26 | FromGitter | <Thor77> Now I just have to figure out how to parse and save statements somehow, get them into a PNode and compile them at runtime \o/ |
16:08:11 | FromGitter | <krux02> Araq: what is the difference between == nil and .isNil for seqs? |
16:13:13 | radagast_04 | noob question ahead: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L224 I wonder how does that not create a circular reference. It says n.nex = L.head; L.head = n |
16:13:14 | radagast_04 | Unless of course n.next = L[].head it would make sense then |
16:13:14 | radagast_04 | *sigh* may be my old **L wouldn't be so bad |
16:14:23 | radagast_04 | So why is the use of `[]` operator discouraged? |
16:15:36 | FromGitter | <krux02> well [] on lists have linear runtime |
16:15:48 | FromGitter | <krux02> but except for lists [] is very ok |
16:15:56 | * | yglukhov quit (Remote host closed the connection) |
16:18:07 | FromGitter | <krux02> radagast_04: `n` and `L` are a different type. `L` is the List object owning all the nodes, and `n` is just a node. |
16:18:33 | FromGitter | <krux02> that code just sets the node as the first element of the list `L` |
16:18:33 | rinzai | does `random.shuffle()` mutate the sequence? |
16:18:58 | * | yglukhov joined #nim |
16:19:01 | FromGitter | <krux02> yes |
16:19:07 | rinzai | +1 thanks |
16:20:25 | FromGitter | <krux02> just look at the function definition, it has a `var` argument meaning the function is allowed to change it. And it has no return value. |
16:20:43 | FromGitter | <krux02> but I have the source open, it calls `swap` N times |
16:21:59 | * | acidx quit (Remote host closed the connection) |
16:22:16 | * | acidx joined #nim |
16:24:35 | * | yglukhov quit (Ping timeout: 255 seconds) |
16:25:11 | radagast_04 | krux02, I figured. It was just confusing me a little bit, the function body. Seeing n.next = L.head; L.head = n; My eyes optimized that into n.next = n :D |
16:50:09 | * | xet7 quit (Quit: Leaving) |
16:52:57 | * | xet7 joined #nim |
17:07:10 | * | chemist69 quit (Ping timeout: 240 seconds) |
17:08:42 | * | d10n-work joined #nim |
17:09:13 | * | darithorn joined #nim |
17:09:45 | * | endragor quit (Remote host closed the connection) |
17:10:57 | * | endragor joined #nim |
17:10:58 | * | endragor quit (Remote host closed the connection) |
17:18:47 | * | rokups joined #nim |
17:20:43 | * | chemist69 joined #nim |
17:27:25 | FromGitter | <krux02> Araq: I have a lot of inline functions in glm. I just checked the generated C files |
17:27:50 | FromGitter | <krux02> for some reason there are a lot of inline functions generated that are never called |
17:29:02 | Araq | --deadCodeElim:on ? |
17:29:51 | FromGitter | <krux02> no just default arguments |
17:29:58 | FromGitter | <krux02> I can check it |
17:31:10 | FromGitter | <krux02> Ah, ok that helps |
17:31:21 | FromGitter | <krux02> why isn't it on by default? |
17:32:00 | Araq | because it's an optimization? |
17:32:27 | FromGitter | <krux02> well yea that's true |
17:32:27 | Araq | it's part of -d:release |
17:33:21 | FromGitter | <krux02> I saw that when I have a generic function in a library that function acutally gets generated in the libraryname.c file |
17:34:12 | FromGitter | <krux02> but my question is what does control if a function is generated in the library file or in the application file, when the function is generic |
17:35:03 | FromGitter | <krux02> well I will play a bit with the compiler |
17:35:12 | Araq | I think it's always in the library file |
17:35:27 | Araq | but the compiler is free to pick some .c file, there is no spec for that |
17:37:38 | FromGitter | <krux02> yea it's not about the spac I would like to know what does affect the compilation time |
17:37:52 | FromGitter | <krux02> I would like the glm library to be fast for compilation |
17:39:18 | FromGitter | <krux02> I see that when I use the library and change my nim file the library is usually not recompiled, but when I add another call with a new type that I haven't done yet, then the library.c changes and therefore needs to be recompiled |
17:39:26 | FromGitter | <krux02> I think that is generally good. |
17:39:47 | FromGitter | <krux02> I was in C++ compilation hell, and all I want to to calm down and know that I won't land there with Nim |
17:41:10 | FromGitter | <krux02> project rebuilt took two hours and the minimum sized plugin took at least 10 seconds. |
17:41:24 | FromGitter | <krux02> (just the include not functionality) |
17:45:56 | * | Trustable joined #nim |
17:51:04 | * | Ven`` joined #nim |
17:53:16 | * | miran quit (Remote host closed the connection) |
18:00:20 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:11:17 | * | nsnzero joined #nim |
18:11:44 | * | endragor joined #nim |
18:12:59 | nsnzero | good evening / day / morning / night - i just learned about nim and i like to be pointed to some tuts especially network/sockets related tuts if any are available |
18:28:16 | dom96 | nsnzero: I'm not aware of any apart from Chapter 3 in my book, but that's not free I'm afraid |
18:28:37 | dom96 | You can see the code though https://github.com/dom96/nim-in-action-code/tree/master/Chapter3/ChatApp |
18:43:53 | * | Ven` joined #nim |
18:44:49 | * | Ven`` quit (Ping timeout: 248 seconds) |
18:49:59 | nsnzero | thanks dom96 - keep up the good work |
18:50:18 | * | gokr joined #nim |
18:51:33 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:53:01 | * | nsnzero left #nim ("WeeChat 1.9.1") |
19:11:59 | * | chemist69 quit (Ping timeout: 255 seconds) |
19:12:22 | * | chemist69 joined #nim |
19:32:21 | * | couven92 joined #nim |
19:41:48 | * | tiorock joined #nim |
19:41:49 | * | tiorock quit (Changing host) |
19:41:49 | * | tiorock joined #nim |
19:41:49 | * | rockcavera quit (Killed (adams.freenode.net (Nickname regained by services))) |
19:41:49 | * | tiorock is now known as rockcavera |
19:56:35 | * | yunfan quit (Ping timeout: 240 seconds) |
20:03:44 | * | natrys quit (Quit: natrys) |
20:15:12 | FromGitter | <tim-st> is there a vscode plugin for nim that shows me an icon where I use recursion? |
20:19:11 | * | endragor quit (Ping timeout: 256 seconds) |
20:20:00 | * | BitPuffin quit (Remote host closed the connection) |
20:21:56 | * | rokups quit (Quit: Connection closed for inactivity) |
20:26:13 | Araq | I doubt it |
20:27:58 | FromGitter | <tim-st> Ok, there are quite a few things missing in vs code I liked about jetbrains |
20:51:01 | * | solitudesf_ joined #nim |
20:51:03 | * | solitudesf_ quit (Read error: Connection reset by peer) |
20:54:03 | * | yunfan joined #nim |
21:00:40 | * | clyybber quit (Quit: good night) |
21:01:57 | * | yunfan quit (Ping timeout: 240 seconds) |
21:16:28 | * | endragor joined #nim |
21:17:26 | * | yunfan joined #nim |
21:34:55 | * | echedey joined #nim |
21:34:58 | echedey | hi |
21:36:10 | echedey | does pas2nim produced syntax compatible with last version of nim? |
21:44:24 | dom96 | hi echedey! |
21:44:53 | dom96 | It's possible that it became outdated, most of us aren't Pascal programmers so we don't really use that tool anymore. |
21:46:18 | * | enigmeta quit () |
21:46:38 | * | enigmeta joined #nim |
21:47:13 | * | dashed quit () |
21:48:06 | * | dashed joined #nim |
21:53:51 | * | Trustable quit (Remote host closed the connection) |
21:56:01 | * | arecaceae quit (Remote host closed the connection) |
21:56:28 | * | arecaceae joined #nim |
22:00:27 | * | yunfan quit (Ping timeout: 240 seconds) |
22:07:57 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:13:24 | * | yunfan joined #nim |
22:18:58 | echedey | thank you |
22:19:10 | * | echedey quit (Quit: BitchX-1.2.1 -- just do it.) |
22:31:26 | * | radagast_04 quit (Ping timeout: 276 seconds) |
22:43:34 | * | yunfan quit (Ping timeout: 256 seconds) |
22:49:29 | * | yunfan joined #nim |
22:51:23 | * | Syneh__ quit () |
22:51:35 | * | Syneh__ joined #nim |
22:52:37 | * | Vladar quit (Remote host closed the connection) |
22:57:51 | * | yunfan quit (Ping timeout: 256 seconds) |
23:07:00 | * | yunfan joined #nim |
23:17:07 | * | endragor quit (Ping timeout: 256 seconds) |
23:30:52 | * | solitudesf quit (Ping timeout: 252 seconds) |
23:46:15 | * | xet7_ joined #nim |
23:46:48 | * | couven92 quit (Ping timeout: 240 seconds) |
23:47:39 | * | darithorn quit (Quit: Leaving) |
23:48:41 | * | xet7 quit (Ping timeout: 276 seconds) |
23:54:09 | * | couven92 joined #nim |
23:54:37 | * | couven92 quit (Read error: Connection reset by peer) |
23:59:11 | * | Sembei joined #nim |