00:01:19 | * | GangstaCat quit (Quit: Leaving) |
00:08:41 | * | GangstaCat joined #nim |
00:11:47 | * | fvs quit (Quit: ERC (IRC client for Emacs 24.5.1)) |
00:11:59 | * | desophos quit (Ping timeout: 244 seconds) |
00:13:56 | * | fvs joined #nim |
00:16:13 | * | fvs left #nim (#nim) |
00:19:15 | * | fvs joined #nim |
00:21:56 | * | abruanese joined #nim |
00:22:14 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:35:10 | * | arnetheduck joined #nim |
00:38:58 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:57:25 | * | yglukhov joined #nim |
01:01:46 | * | yglukhov quit (Ping timeout: 244 seconds) |
01:07:40 | * | chemist69 quit (Ping timeout: 264 seconds) |
01:11:47 | * | chemist69 joined #nim |
01:16:56 | * | ftsf_ joined #nim |
01:18:16 | * | rolha quit (Ping timeout: 272 seconds) |
01:21:44 | * | boop quit (Ping timeout: 244 seconds) |
01:22:32 | * | arnetheduck quit (Remote host closed the connection) |
01:23:46 | * | arnetheduck joined #nim |
01:40:15 | * | chemist69 quit (Ping timeout: 250 seconds) |
01:45:26 | * | kssreeram joined #nim |
01:45:39 | ftsf_ | \o/ start of my port of my game to nim is going well |
01:46:44 | * | kssreeram quit (Client Quit) |
01:48:41 | * | bjz joined #nim |
01:49:56 | * | flyx quit (Ping timeout: 272 seconds) |
01:50:58 | * | flyx joined #nim |
01:54:12 | * | chemist69 joined #nim |
02:01:30 | ftsf_ | what does it mean when a proc takes a "foo: var baz" instead of just "foo: baz" ? |
02:08:30 | * | desophos joined #nim |
02:26:16 | * | freezerburnV quit (Ping timeout: 264 seconds) |
02:30:15 | * | flyx quit (Ping timeout: 258 seconds) |
02:30:47 | * | hendi_ joined #nim |
02:31:01 | * | flyx joined #nim |
02:31:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:34:13 | * | hendi__ quit (Ping timeout: 244 seconds) |
02:37:55 | * | flyx quit (Ping timeout: 258 seconds) |
02:43:31 | * | flyx joined #nim |
03:00:32 | * | fvs quit (Quit: ERC (IRC client for Emacs 24.5.1)) |
03:04:48 | GangstaCat | ftsf_, passed by reference |
03:07:49 | * | flyx quit (Ping timeout: 258 seconds) |
03:08:32 | * | flyx joined #nim |
03:14:10 | * | bjz joined #nim |
03:21:58 | * | kssreeram joined #nim |
03:33:07 | * | chrisheller quit (Remote host closed the connection) |
03:39:18 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
03:43:28 | * | flyx quit (Ping timeout: 258 seconds) |
03:44:08 | * | flyx joined #nim |
03:45:28 | ftsf_ | GangstaCat, I see, thanks! Without the var it's passed by value? |
03:46:41 | * | yglukhov joined #nim |
03:46:55 | GangstaCat | ftsf_, yes |
03:47:10 | ftsf_ | okay, great. thank you! |
03:50:48 | * | Jesin quit (Quit: Leaving) |
03:51:03 | * | yglukhov quit (Ping timeout: 244 seconds) |
03:53:13 | * | Jesin joined #nim |
03:56:55 | * | endragor joined #nim |
04:01:44 | ftsf_ | /o\ segfault during compile |
04:01:59 | ftsf_ | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
04:06:50 | vegansk | ftsf_, use ``koch temp c`` to fugure out what happends if you build compiler from sources |
04:07:51 | * | GangstaCat quit (Ping timeout: 276 seconds) |
04:08:46 | ftsf_ | I'm using the archlinux packaged version of nim |
04:08:57 | ftsf_ | does not seem to include koch |
04:09:04 | vegansk | s/build/built |
04:10:37 | vegansk | can you show me the source? |
04:12:40 | ftsf_ | sure https://gist.github.com/ftsf/5d5701494b14abfe1e4f4019867570b3 |
04:13:18 | * | Demos joined #nim |
04:17:15 | * | Demos quit (Read error: Connection reset by peer) |
04:19:24 | * | Demos joined #nim |
04:19:55 | vegansk | hm, seems that the compiler crashes while trying to print error message. |
04:20:28 | ftsf_ | interesting |
04:21:26 | vegansk | You error is in the line 17. It must be range[0..15], not range(0..15) |
04:21:43 | ftsf_ | aha |
04:21:53 | ftsf_ | thanks =) |
04:22:38 | vegansk | But still you need to file an issue with the minimal ``range(0..15)`` example |
04:22:45 | vegansk | Ok& |
04:22:46 | vegansk | ? |
04:22:57 | ftsf_ | sure, github issue tracker is the place? |
04:23:06 | vegansk | yep |
04:23:12 | ftsf_ | thanks |
04:23:28 | vegansk | welcome :-) |
04:24:32 | vegansk | dom96, are you here? |
04:40:24 | * | kssreeram joined #nim |
05:06:10 | * | yglukhov joined #nim |
05:07:57 | * | endragor quit (Remote host closed the connection) |
05:10:54 | * | yglukhov quit (Ping timeout: 276 seconds) |
05:14:50 | * | s4 joined #nim |
05:23:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:30:41 | * | boop joined #nim |
05:32:29 | * | bjz joined #nim |
05:33:24 | * | fredrik92 joined #nim |
05:36:42 | * | chrisheller joined #nim |
05:57:21 | * | kssreera_ joined #nim |
06:00:24 | * | kssreeram quit (Ping timeout: 244 seconds) |
06:07:59 | * | yglukhov joined #nim |
06:08:43 | * | endragor joined #nim |
06:10:41 | * | kssreera_ quit (Quit: Textual IRC Client: www.textualapp.com) |
06:11:08 | * | kssreeram joined #nim |
06:12:28 | * | yglukhov quit (Ping timeout: 264 seconds) |
06:13:57 | * | endragor quit (Ping timeout: 276 seconds) |
06:17:18 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:22:08 | * | endragor joined #nim |
06:25:43 | * | endragor_ joined #nim |
06:29:42 | * | endragor quit (Ping timeout: 260 seconds) |
06:29:59 | * | bjz joined #nim |
06:44:16 | * | endragor_ quit (Read error: Connection reset by peer) |
06:44:24 | * | endragor joined #nim |
06:46:36 | * | endragor quit (Read error: Connection reset by peer) |
06:47:01 | * | endragor joined #nim |
06:53:02 | * | rolha joined #nim |
06:57:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:05:45 | * | irrequietus joined #nim |
07:07:51 | * | pafmaf joined #nim |
07:08:29 | * | Trustable joined #nim |
07:12:44 | * | rolha quit (Ping timeout: 244 seconds) |
07:18:43 | vegansk | Araq, can you merge https://github.com/nim-lang/packages/pull/370 ? |
07:19:26 | vegansk | Thanks :-) |
07:19:34 | Araq | you're very welcome. |
07:20:05 | ftsf_ | yay got my nim app running in a browser via emscripten =) quite easy! |
07:24:27 | * | bacterius joined #nim |
07:26:59 | * | brechtm joined #nim |
07:27:19 | * | irrequietus quit () |
07:30:07 | * | Demos quit (Ping timeout: 244 seconds) |
07:30:58 | * | yglukhov joined #nim |
07:32:48 | * | desophos quit (Read error: Connection reset by peer) |
07:33:15 | * | PMunch joined #nim |
07:52:05 | vegansk | ftsf_, did you try js target in nim? |
07:52:29 | ftsf_ | vegansk, i didn't yet |
07:52:56 | vegansk | Maybe it will be easier :-) |
07:55:03 | ftsf_ | have you tried it? |
07:55:49 | ftsf_ | not sure the SDL wrapper works with the js backend |
07:55:59 | ftsf_ | .nimble/pkgs/sdl2-1.1/sdl2.nim(1067, 20) Error: undeclared identifier: 'File' |
07:57:49 | PMunch | Pretty sure it doesn't |
07:57:51 | vegansk | yes, if you need sdl, emscripten is the solution. Also look at https://github.com/yglukhov/nimx |
07:57:53 | * | kssreera_ joined #nim |
07:58:27 | ftsf_ | I guess I could try to target canvas directly, but I'm not sure how I' |
07:58:30 | ftsf_ | I'd go about that |
08:01:09 | * | kssreeram quit (Ping timeout: 250 seconds) |
08:08:52 | * | lenstr quit (Ping timeout: 244 seconds) |
08:09:48 | PMunch | ftsf_, forum.nim-lang.org/t/2138 |
08:09:53 | PMunch | That might be of interest |
08:11:02 | PMunch | That being said the earlier linked nimx thing does something similar |
08:11:57 | fredrik92 | WEEEE!!! C# will have the underscore digit seperator that I love from Nim!!!!! :D |
08:12:07 | fredrik92 | (in C# 7) |
08:12:09 | ftsf_ | PMunch, thanks |
08:12:52 | PMunch | fredrik92, cool. That's one of those little things which makes code so much easier to read :) |
08:14:12 | fredrik92 | Oh, yeah! When I started using Nim, that feature was really nice! (Still is!) thanks to whomever invented that one!!!! |
08:14:42 | ftsf_ | I've never thought to use it... where is it useful? |
08:15:14 | fredrik92 | in really big number literal!! |
08:15:35 | ftsf_ | Hmm I guess I don't use those |
08:16:32 | PMunch | ftsf_, basically the underscore character is ignored |
08:16:43 | fredrik92 | E.g.: var myMagicMaxValue = 4294967295 |
08:16:45 | PMunch | So you can type numbers like this: 10_000_000 |
08:17:11 | fredrik92 | that one is evil! myMagicMaxValue = 4_294_967_295 |
08:17:15 | ftsf_ | yeah I see |
08:17:28 | PMunch | You could of course also type things like this: 1_5_2__3434__3 but not sure why you'd want to do that :P |
08:18:13 | fredrik92 | PMunch, in C#7 they'll have binary literals (with 0b0101010101), then you can group the bit section arbitrarily |
08:18:21 | * | lyro joined #nim |
08:18:25 | fredrik92 | Btw, do we have binary literals in Nim? |
08:18:31 | PMunch | Oh yeah, that would be helpfull |
08:18:41 | PMunch | Or grouping hex values two-by-two |
08:18:45 | ftsf_ | 0b01011 i think I saw it in the docs |
08:18:48 | PMunch | fredrik92, Nim actually has case and underscore insensitivity for names as well |
08:18:50 | ftsf_ | yeah i can see it being useful there |
08:18:58 | PMunch | So hello_world is the same as helloWorld |
08:19:26 | PMunch | Only the first letter is case sensitive (so that you can have Data as a type and data as a variable for example) |
08:20:56 | ftsf_ | does a leading underscore have meaning? |
08:21:02 | ftsf_ | ahh invalid token |
08:21:34 | fredrik92 | So not doing sth like Python there! :P (GREAT!!!) |
08:22:47 | ftsf_ | ok, heading off, thanks for your help! o/ |
08:22:48 | * | ftsf_ quit (Quit: :q!) |
08:24:44 | PMunch | fredrik92, pastebin.com/dC59Ykt9 |
08:25:01 | PMunch | Binary, hexadecimal, and octal literals are all in Nim :) |
08:25:27 | fredrik92 | Cool!!! |
08:25:39 | * | bjz joined #nim |
08:26:08 | PMunch | nim-lang.org/docs/manual.html#lexical-analysis-numerical-constants |
08:26:43 | PMunch | Along with int literals of various types (uint, 8/16/32/64 bit, etc) |
08:26:49 | PMunch | And float literals |
08:27:02 | * | rolha joined #nim |
08:31:19 | yglukhov | PMunch: hey i fixed your problem |
08:31:30 | yglukhov | nimble install -y nimsl |
08:31:40 | * | kssreeram joined #nim |
08:31:49 | PMunch | fredrik92, also exponential form: 2e+4 = 20000.0 |
08:31:58 | * | kssreera_ quit (Read error: Connection reset by peer) |
08:32:33 | * | Demon_Fox quit (Quit: Leaving) |
08:33:41 | PMunch | yglukhov, oh cool! |
08:33:46 | PMunch | What was wrong? |
08:34:50 | PMunch | Hmm, the colour wheen should really react to events outside of the circle.. |
08:35:01 | PMunch | Thought I was lagging big time there for a second |
08:35:12 | * | rolha quit (Quit: Textual IRC Client: www.textualapp.com) |
08:37:03 | PMunch | The layout direction chooser in the Collections tab is also opposite of what it says |
08:37:21 | * | gokr joined #nim |
08:38:00 | PMunch | Plus I'm not 100% sure that the FPS number is accurate. It often reports 1 but the program still feels responsive |
08:40:10 | yglukhov | PMunch: nimsl was making too strict assumptions regarding nim installation. specifically it expected system.nim to be in lib folder. but in your case its not true |
08:41:30 | * | kssreeram quit (Ping timeout: 276 seconds) |
08:41:42 | yglukhov | PMunch: if youre gonna compile nimx for android, please also nimble install -y nimx. there has been a recent change in jnim lib... |
08:42:21 | PMunch | I was actually just about to try it :) |
08:46:00 | PMunch | pastebin.com/bpBBr3qt |
08:46:01 | PMunch | Hmm, strange |
08:46:46 | PMunch | Not sure how it found SDL initially.. |
08:48:07 | PMunch | fredrik92, you can even type things like: 0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64 |
08:48:40 | fredrik92 | wait, binary literal for a double floating-point value? |
08:49:16 | PMunch | Yup :) |
08:49:23 | fredrik92 | kay... That one, i really don't see why you'd need it... But sure, whatever floats your boat (not pun intended) |
08:49:33 | PMunch | In case you want to go slightly mad |
08:49:47 | PMunch | Whatever ints your boat |
08:49:57 | fredrik92 | ouch! |
08:51:31 | PMunch | I can see int them being practical for the int types. So say 0b1010'i8 would create the number 10 as an int8 |
08:51:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:51:52 | PMunch | For microcontroller programming and other low level stuff that could be really practical |
08:52:35 | fredrik92 | PMunch, yeah sure, I just meant the binary literal for float and double! |
08:52:55 | PMunch | Yeah, not sure where that would come in handy :P |
08:53:26 | fredrik92 | I mean, honestly, how many of you can read IEEE standard double values in binary? |
08:53:28 | PMunch | I guess for debugging/educational purposes they might be practical. But otherwise I'm not too sure.. |
08:53:33 | * | cofeepot joined #nim |
08:53:59 | fredrik92 | When most of us (like me, oops) don't even get past being able to read simple hex! |
08:55:02 | PMunch | It's nice to have though, makes the language more general purpose :) |
08:55:14 | fredrik92 | Yeah sure!!!! |
08:55:25 | Araq | we had this feature and I'm not sure if it's still in the language |
08:56:58 | PMunch | Araq, just tested it now and it still works |
08:57:07 | PMunch | If you were talking about the floating point thing |
08:57:45 | Araq | yup. |
08:57:53 | Araq | so there you go, Nim has it. |
09:01:18 | PMunch | http://nim-lang.org/docs/manual.html#syntax-strong-spaces |
09:01:20 | ftsf | hello again! does nim have an equivalent of "extern int foo;" in C? |
09:01:28 | PMunch | Oh wow, that would confuse me so bad :S |
09:02:57 | * | hendi_ is now known as hendi |
09:03:09 | Araq | PMunch: we'll remove it from the language, even though I still think it just makes sense |
09:03:28 | Araq | nobody uses it |
09:03:55 | Araq | everybody is soo afraid that his code reflects operator precedences directly |
09:04:07 | * | brechtm quit (Remote host closed the connection) |
09:04:11 | PMunch | Araq, I agree that it makes sense. And math with brackets can look super ugly. But if I didn't realize it was on then I would have a bad time.. |
09:05:17 | * | fastrom joined #nim |
09:05:42 | * | fastrom1 joined #nim |
09:06:04 | Araq | well we can always turn it on then :P |
09:06:23 | Araq | but it scares too many people. |
09:07:02 | cheatfate | Is it possible with nimble to make something like test installation, to be sure your package is working properly? |
09:07:04 | * | nd_ quit (Quit: Leaving) |
09:07:14 | PMunch | Is there anything like PEP for Nim by the way? |
09:07:23 | Araq | I like it when technology is driven by fearmongers... :P |
09:07:52 | Araq | PMunch: we have NEP-1 dealing with style issues |
09:08:02 | Araq | you can create further NEPs. |
09:09:22 | PMunch | Hmm, after using #? strongSpaces how do you disable it afterwards (sorry, might be obvious, haven't used parser directives in Nim before). |
09:09:57 | Araq | it's per module |
09:10:06 | * | fastrom quit (Ping timeout: 276 seconds) |
09:10:09 | Araq | you cannot disable it |
09:10:26 | Araq | nor use it for everything automatically |
09:11:30 | PMunch | Ah okay |
09:12:37 | PMunch | Would be interesting to use it for those parts which included long and hard to read bracketed expressions without having to worry about breaking stuff elsewhere in code.. |
09:15:29 | PMunch | For constants coming from a C/C++ wrapper, ALL_UPPERCASE are allowed, but ugly. (Why shout CONSTANT? Constants do no harm, variables do!) |
09:15:37 | PMunch | ^ From the style docs |
09:15:50 | PMunch | I now want to try and write code with VARIABLES |
09:16:00 | PMunch | Just to see how it would look |
09:26:02 | PMunch | "In the age of HTTP, [...], WWW it is foolish to pretend these are somewhat special words requiring all uppercase." - again from the style docs. While I don't disagree with the styling convention these are special words as they are abbreviations. |
09:26:04 | hendi | Is it possible for nimble to also run tests? to make sure the installed package works as intended? |
09:26:17 | ldlework | Can't you do that before uploading it? |
09:27:11 | PMunch | ldlework, some tests might be architecture dependent |
09:27:25 | * | elrood joined #nim |
09:28:42 | hendi | I mean, if I install some random package, I'd like to run its tests |
09:29:26 | * | Senketsu joined #nim |
09:31:14 | PMunch | hendi, nothing automated in nimble as far as I know. You could run them manually though if they are supplied |
09:33:24 | hendi | okay, I'll do that then.. thanks |
09:33:45 | Araq | hendi: http://ci.nim-lang.org |
09:34:01 | Araq | https://134-60803270-gh.circle-artifacts.com/0/home/ubuntu/nim-ci/output/nimble_install_report.html |
09:34:09 | Araq | just check your package there |
09:35:49 | PMunch | Is that site available in a machine readable format? |
09:38:11 | * | bjz joined #nim |
09:41:59 | elrood | looks pretty machine-readable to me. it has some extra </td>-tags to confuse the hell out of your html-parser of choice, though |
09:44:19 | PMunch | elrood, I meant something that was meant to be machine readable and wouldn't change if someone decided it would be fun to add some more content to the site |
09:44:37 | PMunch | ie. a simple JSON or XML output |
09:44:53 | PMunch | Or even just a csv |
09:47:17 | * | endragor_ joined #nim |
09:50:22 | Araq | PMunch: ask federico3 when he's around |
09:50:35 | PMunch | Will do, thanks :) |
09:50:38 | * | endragor quit (Ping timeout: 272 seconds) |
09:50:47 | * | endragor_ quit (Remote host closed the connection) |
09:51:16 | * | endragor joined #nim |
09:52:13 | yglukhov | PMunch: with ANDROID_HOME i'm not sure how to help. except adding some log to naketools line 109 - 146. be sure to remove nakefile after every naketool modification, and note that nakefile searches for naketools in installed nimble packages. |
09:53:00 | PMunch | Hmm, I'll look into it later |
09:57:40 | Araq | bbl |
10:03:56 | bacterius | is it possible to use a codegenDecl pragma on types somehow? it doesn't seem to work |
10:04:49 | bacterius | like in C you can set __attribute__((...)) on types like alignment or other and it'll apply to any instances of it |
10:17:41 | * | endragor quit (Remote host closed the connection) |
10:17:52 | * | endragor joined #nim |
10:27:58 | * | endragor quit (Remote host closed the connection) |
10:29:33 | * | brechtm joined #nim |
10:29:58 | * | chrisheller quit (Remote host closed the connection) |
10:31:34 | * | chrisheller joined #nim |
10:35:49 | * | chrisheller quit (Ping timeout: 252 seconds) |
10:38:02 | ftsf | would there be a way to make a float type that will automatically convert into an int when it's necessary? |
10:38:30 | * | pafmaf quit (Ping timeout: 276 seconds) |
10:42:04 | * | brechtm quit (Ping timeout: 260 seconds) |
10:46:42 | * | abruanese quit (Quit: ZNC 1.6.3+deb1 - http://znc.in) |
10:47:39 | PMunch | ftsf, just create a converter |
10:48:16 | ftsf | oh, *looks up converter* |
10:48:40 | * | endragor joined #nim |
10:48:54 | PMunch | nim-lang.org/docs/manual.html#converter_1 |
10:50:03 | ftsf | awesome =) |
10:50:21 | PMunch | Very practical for C wrappings |
10:50:22 | ftsf | that saves a heap of useless coding |
10:50:34 | PMunch | Yup :) |
10:54:19 | ftsf | hmm I guess there's no way to see if an object has a method, because objects don't have methods |
10:54:24 | ftsf | (at runtime) |
10:58:06 | cofeepot | I think you can use compiles(obj.mymethod) |
10:59:41 | cofeepot | tho that's not runtime i guess |
11:00:22 | ftsf | mmm sounds not, that's cool. gotta get used to not using a dynamic typed language =) |
11:00:40 | * | endragor quit (Remote host closed the connection) |
11:00:40 | ftsf | been using python and lua too long |
11:01:17 | cofeepot | it is a different way of thinking, but i think you can do the same things, ultimately :) |
11:01:45 | ftsf | yep, just define the method on all the objects with no implementation if it's not needed |
11:02:04 | cofeepot | also you can use http://nim-lang.org/docs/manual.html#generics-concepts |
11:03:32 | ftsf | mmm sounds like an interface? |
11:03:46 | * | endragor joined #nim |
11:04:00 | PMunch | hendi, federico3 just added a JSON version of the build report: https://136-60803270-gh.circle-artifacts.com/0/home/ubuntu/nim-ci/output/nimble_install_report.json |
11:04:17 | PMunch | So you could automate the check now :) |
11:04:39 | cofeepot | ftsf: sorta, but interfaces are usually run time, whereas this is compile time |
11:04:58 | ftsf | oh okay =) |
11:05:10 | PMunch | Another option would be to store methods for a certain object in a list |
11:05:20 | PMunch | If you need it for one specific thing |
11:05:25 | ftsf | *nods* |
11:05:50 | ftsf | \o/ everything is working so nicely now |
11:05:56 | cofeepot | yeah you can make something closer to run time interfaces with closures from what i understand |
11:06:05 | ftsf | my game works and exports to html =) |
11:06:09 | ftsf | so happy! |
11:06:20 | cofeepot | congratulations! :D |
11:06:55 | PMunch | Cool! |
11:07:15 | PMunch | HTML5+JS? |
11:07:20 | ftsf | yep |
11:07:35 | ftsf | http://static.impbox.net/vector/vector.html Z to accel, X to brake, UP to boost =) |
11:09:16 | cofeepot | very cool!! |
11:12:34 | * | kssreeram joined #nim |
11:12:37 | ftsf | =) |
11:14:02 | PMunch | Much cooler when I realized Left/Right turned you :P |
11:14:06 | ftsf | haha |
11:14:09 | ftsf | forgot to mention those controls |
11:15:30 | * | fredrik92 quit (Ping timeout: 272 seconds) |
11:16:47 | PMunch | So it is using a HTML5 canvas and direct JavaScript control? |
11:17:38 | ftsf | yep |
11:21:16 | PMunch | Cool |
11:22:15 | PMunch | Source? |
11:22:48 | * | pafmaf joined #nim |
11:32:45 | * | TheLemonMan joined #nim |
11:36:23 | * | zaquest quit (Read error: Connection reset by peer) |
11:42:03 | * | bacterius quit (Quit: Leaving) |
11:45:08 | * | zaquest joined #nim |
11:45:09 | * | ics quit (Quit: Connection closed for inactivity) |
11:45:58 | ftsf | based on https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim |
11:47:58 | PMunch | And that runs in HTML5/JS? |
11:48:13 | ftsf | if you compile with emscripten |
11:48:28 | ftsf | https://hookrace.net/blog/porting-nes-go-nim/ |
11:49:00 | * | brechtm joined #nim |
11:51:00 | PMunch | But but but |
11:51:07 | PMunch | How does the SDL stuff work? |
11:51:13 | ftsf | magic! |
11:51:16 | ftsf | I dunno |
11:51:43 | PMunch | Wait, is SDL being compiled to emscrpiten? |
11:52:23 | ftsf | yep |
11:54:25 | flyx | well it isn't surprising as people also have compiled OpenTTD to JavaScript. |
11:55:07 | PMunch | What is this madness! :S |
11:56:43 | flyx | I heard it has something to do with Sparta |
11:58:37 | * | kssreeram quit (Ping timeout: 250 seconds) |
12:02:55 | * | freevryheid joined #nim |
12:03:03 | * | freevryheid is now known as fvs |
12:03:45 | * | kssreeram joined #nim |
12:11:43 | ftsf | for y in countup(player.pos.y-64, player.pos.y+64, step=16): gives lib/nim/system.nim(1891, 9) Error: for a 'var' type a variable needs to be passed |
12:11:56 | ftsf | does countup require vars? |
12:15:13 | * | kssreeram quit (Read error: Connection reset by peer) |
12:21:16 | PMunch | nim-lang.org/docs/system.html#countup.i,S,T,int |
12:21:20 | PMunch | Doesn't seem like it |
12:21:39 | ftsf | S and T are just any type right? |
12:21:56 | ftsf | "may be any ordinal type" |
12:21:56 | PMunch | You don't have to include "step=" by the way (is it even allowed?) |
12:22:09 | ftsf | seems to be |
12:24:52 | chemist69 | Hi, since many people here have mentioned converters, I wanted to try them out, but immediately ran into an error: "for a 'var' type a variable needs to be passed". Can s.o. tell me why this minimal example does not compile: |
12:25:09 | chemist69 | https://glot.io/snippets/eg2vre2fmu |
12:26:15 | ftsf | chemist69, same error I am getting |
12:26:18 | ftsf | with countup |
12:26:21 | ftsf | and I am using converters |
12:26:26 | * | nsf quit (Quit: WeeChat 1.5) |
12:26:36 | chemist69 | yes, me too. |
12:26:59 | PMunch | chemist69, got a copy/pastable version of that? |
12:27:27 | chemist69 | doesn't the glot.io link work? |
12:27:39 | ftsf | c/p works for me |
12:28:29 | * | ics joined #nim |
12:28:34 | PMunch | Well, I can copy paste but it refuses to allow Linux' middle mouse copy/paste |
12:29:53 | chemist69 | you're right, that does not seem to work |
12:31:25 | PMunch | Hmm |
12:33:26 | chemist69 | do you 'Hmm' to the copy/pasting issue or to the compilation error ? :) |
12:33:39 | PMunch | The compilation error |
12:37:13 | kier | does it work if you use a named variable instead of '_'? |
12:37:19 | kier | i.e. for i in countup(...): |
12:37:29 | kier | no idea if that will fix it, just curious |
12:37:29 | ftsf | kier, nope |
12:37:31 | chemist69 | no, same error |
12:37:55 | kier | odd. does it work without the converter? |
12:38:23 | ftsf | kier, yep |
12:38:23 | chemist69 | no, gives type mismatch: got (float64, int) |
12:38:59 | chemist69 | no, it does not work without the converter! |
12:39:21 | kier | i mean if you replace 4.1 with 4 or something |
12:39:28 | kier | so that it won't cause a type error |
12:40:19 | chemist69 | yes, then it runs. |
12:40:24 | kier | i'd recomend raising this as an issue, if only because the error message doesn't seem to be relevant to the cause of the error |
12:41:09 | PMunch | It also works if you do countup(1,4.3.toInt) |
12:41:35 | PMunch | So I'm guessing this is actually an issue |
12:42:08 | chemist69 | Great, every time I test something, it becomes an issue... :) |
12:42:22 | ftsf | ^_^ |
12:42:26 | kier | yeah. either your should compile (in which case there's a compiler bug blocking it from compiling) or it shouldn't compile (in which case the error message could be improved) |
12:42:30 | ftsf | that's what happens when you use new software |
12:42:36 | kier | s/your should/your code should/ |
12:48:47 | chemist69 | issue submitted: https://github.com/nim-lang/Nim/issues/4431 |
12:50:15 | * | nd_ joined #nim |
12:57:23 | ftsf | hmm can I disable XDeclaredButNotUsed for a module that I'm using as a library? |
13:04:16 | cheatfate | ftsf, and which one is producing it? |
13:04:22 | cheatfate | from standard library? |
13:04:28 | ftsf | cheatfate, no my own library |
13:05:02 | cheatfate | you need to resolve your XDeclardButNotUsed, then :) |
13:05:37 | ftsf | cheatfate, no... it's a library, it's not expected to use all the functions |
13:06:10 | * | fredrik92 joined #nim |
13:06:31 | cheatfate | ftsf, there you can make public function with `* |
13:06:33 | cheatfate | `*` |
13:07:06 | ftsf | public function won't complain about that? |
13:07:06 | cheatfate | then XDeclaredButNotUsed will not be fired on this function |
13:07:09 | ftsf | ahh cool |
13:07:10 | ftsf | thanks |
13:08:52 | cheatfate | ftsf, http://nim-lang.org/docs/manual.html#procedures-export-marker |
13:08:59 | ftsf | hmm I was `include`ing the library rather than importing it, because it requires access to a global from the including module |
13:09:13 | ftsf | I'm not sure how to access that in the library if it's imported |
13:09:22 | ftsf | equivalent of `extern` in C |
13:09:52 | ftsf | hmm maybe I know a way around it |
13:14:35 | PMunch | pastebin.com/y8y2z9A8 |
13:14:46 | PMunch | That's an example of what fails |
13:15:19 | PMunch | For the converter problem |
13:15:35 | PMunch | It definitely looks like an issue |
13:18:00 | chemist69 | okay... |
13:26:52 | * | s4 quit (Quit: Konversation terminated!) |
13:35:31 | * | nsf joined #nim |
13:40:53 | chemist69 | would you like to add your code to the issue on github (#4431)? |
13:41:39 | PMunch | It's pretty much just an extract of the system.nim library functions and some realization of the template |
13:41:54 | PMunch | I was just trying to see if it was actually an issue or not |
13:44:02 | chemist69 | I see. |
13:50:31 | * | LeNsTR joined #nim |
13:51:15 | * | LeNsTR is now known as lenstr |
13:51:17 | yglukhov | i remember someone has done a super(T) macro some time ago. does anyone know where i can find it? |
13:51:21 | yglukhov | Araq |
13:53:41 | fvs | is nim discard == python pass? |
13:53:49 | yglukhov | nevermind, found it. if anyone interested https://gist.github.com/fowlmouth/3c74409c30533bb0a5b4 |
13:54:31 | ftsf | fvs, it can do that! |
13:54:37 | ftsf | it does otherthings too |
13:54:42 | fvs | like nop |
13:54:53 | ftsf | and ignore return |
14:02:45 | * | pafmaf quit (Read error: Connection reset by peer) |
14:05:45 | * | kssreeram joined #nim |
14:10:19 | * | endragor quit (Ping timeout: 260 seconds) |
14:13:58 | fvs | does nim have a function to convert "['a','b']" to seq[char] e.g. pythons's ast.literal_eval? |
14:14:43 | * | nd_ quit (Quit: Leaving) |
14:17:50 | PMunch | You have parseStmt |
14:17:54 | PMunch | nim-lang.org/docs/macros.html#parseStmt,string |
14:18:10 | PMunch | Takes a string and returns a Nim AST node |
14:18:20 | PMunch | Used in macros |
14:18:29 | PMunch | fvs, ^ |
14:18:42 | PMunch | But I doubt there is anything runtime |
14:20:00 | PMunch | Short of parsing it yourself obviously |
14:20:34 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:21:52 | fvs | thks |
14:24:40 | * | kssreeram joined #nim |
14:24:51 | * | irrequietus joined #nim |
14:31:36 | * | chrisheller joined #nim |
14:36:10 | * | chrisheller quit (Ping timeout: 252 seconds) |
14:36:31 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
14:37:07 | ftsf | expression 'normalize(diff)' has no type (or is ambiguous) but diff is a Vector2d http://nim-lang.org/docs/basic2d.html#normalize,Vector2d |
14:37:12 | ftsf | any idea why that error would happen? |
14:39:08 | cheatfate | dom96, ping |
14:43:50 | ftsf | oh I was doing foo = diff.normalize() but normalize operates in place |
15:04:54 | * | nsf quit (Quit: WeeChat 1.5) |
15:14:31 | ftsf | can you return multiple values? |
15:24:09 | * | PMunch quit (Quit: leaving) |
15:25:02 | kier | ftsf: only by returning a tuple |
15:25:17 | ftsf | ahh I see |
15:29:10 | * | rolha joined #nim |
15:31:59 | * | pregressive joined #nim |
15:41:37 | * | brson joined #nim |
15:43:54 | * | irrequietus quit (Remote host closed the connection) |
15:44:18 | * | irrequietus joined #nim |
15:45:26 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:04:02 | * | _stowa joined #nim |
16:04:26 | * | irrequietus quit () |
16:04:59 | * | nd_ joined #nim |
16:10:53 | * | nsf joined #nim |
16:11:59 | * | _stowa quit (K-Lined) |
16:13:13 | * | cofeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:15:55 | * | desophos joined #nim |
16:19:40 | * | brechtm quit (Remote host closed the connection) |
16:20:53 | * | benwbooth joined #nim |
16:21:27 | ftsf | anyone know how to specify infinity/-infinity for floats? |
16:22:26 | kier | ftsf: http://nim-lang.org/docs/system.html#Inf |
16:22:42 | * | GangstaCat joined #nim |
16:23:06 | ftsf | \o/ thanks! |
16:25:21 | * | brechtm joined #nim |
16:26:09 | * | brechtm quit (Remote host closed the connection) |
16:32:06 | * | rolha quit (Ping timeout: 276 seconds) |
16:37:28 | * | rolha joined #nim |
16:38:30 | * | vendethiel- joined #nim |
16:39:45 | * | vendethiel quit (Ping timeout: 246 seconds) |
16:39:52 | * | sp33der89 joined #nim |
16:43:44 | * | rolha quit (Ping timeout: 250 seconds) |
16:48:02 | * | vendethiel- quit (Ping timeout: 260 seconds) |
16:53:26 | * | brson quit (Quit: leaving) |
17:01:12 | * | Demos joined #nim |
17:01:30 | * | yglukhov quit (Ping timeout: 250 seconds) |
17:27:05 | * | avsej quit (Quit: Quit) |
17:27:53 | * | avsej joined #nim |
17:27:53 | * | avsej quit (Changing host) |
17:27:53 | * | avsej joined #nim |
17:34:04 | * | michael_campbell quit (Ping timeout: 240 seconds) |
17:41:01 | * | yglukhov joined #nim |
17:43:34 | * | rolha joined #nim |
18:11:42 | * | brson joined #nim |
18:16:56 | * | GangstaCat quit (Quit: Leaving) |
18:25:17 | * | M-cpt joined #nim |
18:38:28 | * | yglukhov quit (Remote host closed the connection) |
18:43:29 | * | yglukhov joined #nim |
18:49:08 | * | pafmaf joined #nim |
19:00:07 | * | brson_ joined #nim |
19:02:07 | * | wh1t3r0s3 quit (Ping timeout: 244 seconds) |
19:02:38 | * | brson quit (Ping timeout: 244 seconds) |
19:02:50 | * | brechtm joined #nim |
19:04:16 | * | wh1t3r0s3 joined #nim |
19:04:58 | * | brechtm quit (Remote host closed the connection) |
19:15:21 | * | brechtm joined #nim |
19:16:24 | * | Demos quit (Ping timeout: 244 seconds) |
19:21:34 | * | chrisheller joined #nim |
19:28:02 | * | pregressive quit (Remote host closed the connection) |
19:38:24 | * | Demos joined #nim |
19:43:08 | * | brson_ quit (Ping timeout: 250 seconds) |
19:43:56 | * | vendethiel joined #nim |
19:49:51 | * | kssreeram joined #nim |
19:51:19 | * | fredrik92 quit (Read error: Connection reset by peer) |
20:00:10 | * | fredrik92 joined #nim |
20:04:34 | * | brson joined #nim |
20:07:53 | * | PMunch joined #nim |
20:11:39 | cheatfate | dom96, are you here? |
20:14:57 | * | Matthias247 joined #nim |
20:23:46 | * | chrisheller quit (Remote host closed the connection) |
20:24:54 | * | chrisheller joined #nim |
20:30:41 | * | TheLemonMan joined #nim |
20:50:40 | * | Ven_ joined #nim |
20:54:33 | * | xet7 quit (Quit: Leaving) |
20:55:26 | * | xet7_ joined #nim |
20:58:44 | * | xet7 joined #nim |
21:02:07 | * | xet7 quit (Client Quit) |
21:05:58 | * | fvs quit (Quit: ERC (IRC client for Emacs 24.5.1)) |
21:14:53 | * | shodan45 quit (Quit: Konversation terminated!) |
21:15:51 | * | onionhammer joined #nim |
21:16:26 | * | xet7 joined #nim |
21:17:35 | * | pregressive joined #nim |
21:22:49 | * | PMunch quit (Quit: leaving) |
21:23:13 | * | ldlework quit (Changing host) |
21:23:13 | * | ldlework joined #nim |
21:24:32 | * | yglukhov quit (Read error: Connection reset by peer) |
21:25:04 | * | yglukhov joined #nim |
21:32:20 | * | pafmaf quit (Quit: Leaving) |
21:40:33 | * | pregressive quit (Remote host closed the connection) |
21:41:51 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
22:00:11 | * | elrood quit (Quit: Leaving) |
22:02:06 | * | heinrich5991 quit (Ping timeout: 246 seconds) |
22:04:09 | * | xet7 quit (Quit: Leaving) |
22:08:20 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:08:51 | cheatfate | zielmicha, i saw in your reactor.nim readme.md this phrase "They are arguably richer and more performant". I'm totally agree with "richer", but can you give some proofs of "more performant"? |
22:09:01 | * | heinrich5991 joined #nim |
22:09:53 | cheatfate | zielmicha, could you please make a copy of asynchttpserver.nim using reactor.nim so we can compare performance of both... |
22:16:21 | * | vendethiel quit (Ping timeout: 244 seconds) |
22:22:43 | * | Trustable quit (Remote host closed the connection) |
22:32:45 | dom96 | cheatfate: stop pinging me and just ask. |
22:32:50 | dom96 | Please |
22:34:09 | * | rolha quit (Ping timeout: 276 seconds) |
22:34:53 | cheatfate | dom96, couldn't find any information how to check (not published) nimble package. |
22:35:17 | dom96 | cheatfate: The reason you should just ask if that others might know the answer to your question. |
22:35:26 | dom96 | This is especially the case regarding Nimble. |
22:35:40 | dom96 | *is that |
22:35:58 | dom96 | I don't understand what you want to do though |
22:36:05 | dom96 | check? as in test? |
22:36:24 | cheatfate | dom96, i want to check my package configuration (make local installation) |
22:36:39 | dom96 | cheatfate: cd into the package directory and type 'nimble install' |
22:36:40 | cheatfate | to see if everything works fine |
22:37:31 | cheatfate | thank, you and also, i'm waiting for this answer for 2 days... (its about pinging, asking question and all other problems you are trying to blame me) |
22:38:00 | * | pregressive joined #nim |
22:40:04 | sp33der89 | Anyone knows if the Urho3D nim port works with the latest nim version? Or should I go ahead and try it out myself! |
22:43:29 | sp33der89 | Well I guess since it uses c2nim mostly it should be |
22:58:50 | dom96 | sp33der89: no idea, sorry. Indeed, it is best to test it yourself :) |
22:59:20 | dom96 | cheatfate: did you ask it or did you just start by pinging me? |
23:02:12 | * | pregressive quit (Remote host closed the connection) |
23:03:07 | cheatfate | dom96, [Jun 29 12:07:03 <cheatfate> Is it possible with nimble to make something like test installation, to be sure your package is working properly?] |
23:03:27 | * | desophos quit (Remote host closed the connection) |
23:04:00 | dom96 | cheatfate: fair enough, if that happens again you might have better luck asking on the Forum. |
23:05:29 | cheatfate | dom96, it looks like my `questions limit` is exceeded, this was my last question |
23:05:45 | dom96 | questions limit? |
23:05:49 | dom96 | There is no such thing |
23:10:38 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:14:02 | * | xet7 joined #nim |
23:22:48 | * | j3rn joined #nim |
23:29:16 | sp33der89 | no problem, I was surprised to find a WIP port of it anyway! |
23:33:56 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
23:41:22 | * | GangstaCat joined #nim |
23:42:26 | * | desophos joined #nim |
23:43:32 | vktec | How can I import a C struct using FFI? |
23:51:13 | vktec | (I'm writing a wrapper, and some of the functions return a struct type, so I need a way to use that from within Nim) |
23:51:39 | * | sp33der89 quit (Ping timeout: 246 seconds) |
23:52:52 | * | yglukhov quit (Remote host closed the connection) |