00:01:31 | * | brson joined #nim |
00:08:56 | * | irrequietus quit () |
00:11:58 | MyMind | cool nim 0.10.2 is on homebrew finally |
00:17:18 | MyMind | yay https://github.com/infininight/nim.tmbundle |
00:20:34 | BlaXpirit_ | Can someone try out or review/nitpick my CSFML bindings library? https://github.com/blaxpirit/nim-csfml |
00:20:39 | BlaXpirit_ | Varriount_? |
00:21:05 | * | Epic|gmpreussner is now known as gmpreussner |
00:22:03 | BlaXpirit_ | maybe def- |
00:26:40 | ekarlso- | https://bpaste.net/show/0121ed5d868b < doesn't that look valid ? it gives me a 400 though I dont see a reason why |
00:29:10 | MyMind | spaces instead of tabs are mandatory right? |
00:29:29 | renesac_ | yes, for indentation |
00:30:21 | reactormonk | How can I interweave C code dependencies? It would depend on nim code, and other nim could would depend on the first one and the C code |
00:33:04 | * | wan quit (Quit: WeeChat 1.0.1) |
00:35:16 | ekarlso- | dom96: u around ? |
00:35:30 | def- | I think it's pretty cool that you can easily make a macro to make JSON work directly in Nim: https://github.com/Araq/Nim/pull/1869 |
00:36:45 | ekarlso- | is postContent broken somehow ? the asynchttpserver is going 400 on my ass saying no content-length was given but python requests works fine |
00:37:23 | def- | ekarlso-: that's interesting, can you give me your code? I have an open pull request with postContent, can just add it there probably |
00:37:24 | * | yglukhov__ joined #nim |
00:37:45 | def- | (add the fix for content-length there) |
00:38:04 | def- | BlaXpirit_: i only have linux though |
00:38:14 | ekarlso- | def-: take a look at the link I pasted :) |
00:38:26 | ekarlso- | https://bpaste.net/show/0121ed5d868b |
00:38:28 | BlaXpirit_ | def-, that's good, because i'm pretty sure it will only work on linux, without some minor changes |
00:38:44 | BlaXpirit_ | i'm gonna start up that windoze virtual machine one day too |
00:41:07 | BlaXpirit_ | also, I didn't consider that I'm going to bed soon, so I won't be able to hear your comments right away |
00:41:33 | * | yglukhov__ quit (Ping timeout: 244 seconds) |
00:42:15 | def- | ekarlso-: you probably need to add an \c\L at the and of headers |
00:42:22 | def- | maybe we should do that automatically |
00:50:54 | MyMind | adam_s: exist any yasnippet for nim? |
00:53:06 | * | hakand quit (Quit: Be back later ...) |
00:57:52 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:58:47 | adam_s | MyMind: none that I'm aware of, but I haven't looked |
00:58:58 | adam_s | it would be pretty easy to write some if you wanted, though |
00:59:07 | adam_s | I don't really use yas |
00:59:47 | renesac_ | http://nim-by-example.github.io/oop/ <-- this page calls multi-methods "methods" and implies they are needed for OOP, but it is only needed if you want inheritance, and in most cases it is the wrong tool |
01:00:02 | renesac_ | flaviu: ? |
01:01:32 | flaviu | renesac_: It appears my ignorance is showing. |
01:02:30 | flaviu | I suppose I can change that, but I the words "OOP" imply inheritance for many people. |
01:02:52 | renesac_ | actually, I'm not sure if multi-methods are needed for inheritance |
01:03:08 | renesac_ | I never used neither in nimrod |
01:03:42 | renesac_ | http://nim-lang.org/tut2.html#object-oriented-programming |
01:03:44 | Triplefox | oop is basically a "whatever i think it is" term at this point |
01:04:16 | BlaXpirit_ | true dat |
01:07:21 | * | superfunc[mobile quit (Quit: Connection closed for inactivity) |
01:08:22 | def- | BlaXpirit_: i can't even get csfml installed^^ |
01:08:32 | BlaXpirit_ | def-, distro? |
01:08:39 | def- | i'm building from source |
01:08:55 | BlaXpirit_ | uhhhhhhhhhhhhhhh okay |
01:09:03 | BlaXpirit_ | what seems to be the problem? |
01:09:10 | def- | only have csfml 1.6 in gentoo strangely |
01:09:15 | BlaXpirit_ | D: |
01:10:10 | def- | BlaXpirit_: https://gist.github.com/def-/561538f0a59243836fcb |
01:10:49 | BlaXpirit_ | well i dont know gentoo at all |
01:11:13 | def- | that has nothing to do with gentoo, I'm just building from source and cmake is doing weird stuff |
01:12:14 | BlaXpirit_ | lol i don't remember the last time i had to execute "make" myself |
01:13:05 | phira | kids these days |
01:13:21 | phira | in my day it was all configure;make;make install |
01:13:35 | def- | phira: i wish it was for sfml, don't understand this cmake error |
01:13:39 | BlaXpirit_ | yaourt -S name here |
01:13:40 | phira | now it's # curl http://insecure.site.com/installer.sh | bash |
01:13:46 | BlaXpirit_ | def-, do u even have SFML? |
01:13:49 | BlaXpirit_ | phira, yuck |
01:13:55 | def- | BlaXpirit_: yeah |
01:13:57 | phira | BlaXpirit_: I know :/ |
01:14:07 | BlaXpirit_ | def-, I'm not sure if CSFML 2.1 will work with SFML 2.2 |
01:15:25 | BlaXpirit_ | whatever, this is not urgent :| |
01:15:36 | def- | BlaXpirit_: on archlinux sfml 2.2 gets installed with csfml 2.1 at least |
01:15:46 | BlaXpirit_ | def-, yeah, and csfml doesn't work :D :D :D |
01:15:51 | BlaXpirit_ | i had to downgrade |
01:15:55 | BlaXpirit_ | sfml |
01:16:03 | renesac_ | I don't know what SFML is, but I know what FML is, and it seems related |
01:16:04 | renesac_ | :P |
01:16:10 | BlaXpirit_ | no, not related |
01:16:17 | BlaXpirit_ | this has gotten really offtopic, sorry |
01:16:24 | BlaXpirit_ | and i definitely should go now. |
01:16:29 | renesac_ | I ws being sarcastic |
01:16:30 | renesac_ | XD |
01:16:33 | renesac_ | *was |
01:17:06 | BlaXpirit_ | it's not even jokingly related, because there is virtually nothing negative about it |
01:17:27 | renesac_ | the compilation/instalation |
01:17:43 | renesac_ | bah, forget it, it was a dumb joke |
01:21:25 | reactormonk | Araq, How can I interweave C code dependencies? It would depend on nim code, and other nim could would depend on the first one and the C code |
01:21:51 | Araq | reactormonk: .compile pragma? |
01:28:20 | * | z1y joined #nim |
01:28:52 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
01:32:22 | reactormonk | Araq, I only see a compileTime pargma, not a compile pragma in the manual |
01:32:27 | * | z1y quit (Remote host closed the connection) |
01:33:19 | Araq | http://nim-lang.org/nimc.html#compile-pragma |
01:33:25 | * | z1y joined #nim |
01:36:18 | reactormonk | Araq, where do I put the code that the .compile pragma depends on? Above? |
01:36:44 | Araq | it doesn't matter, but it should be in the same module |
01:39:29 | * | JohnnyLee quit (Quit: Page closed) |
01:42:12 | * | z1y quit (Ping timeout: 264 seconds) |
01:43:09 | reactormonk | ok |
01:43:26 | reactormonk | Will try and report. |
01:49:30 | * | gmpreussner_ joined #nim |
01:49:57 | * | gmpreussner quit (Ping timeout: 244 seconds) |
01:58:06 | MyMind | Araq: in few hours will be official for Textmate https://github.com/infininight/nim.tmbundle |
01:58:38 | def- | MyMind: nice |
01:59:16 | MyMind | It's very basic support but will be shouted on the official twitter |
01:59:26 | * | VinceAddons quit (Read error: Connection reset by peer) |
02:10:24 | * | darkf joined #nim |
02:14:18 | * | z1y joined #nim |
02:26:14 | * | yglukhov__ joined #nim |
02:27:35 | * | z1y quit (Remote host closed the connection) |
02:28:12 | * | z1y joined #nim |
02:30:23 | * | yglukhov__ quit (Ping timeout: 240 seconds) |
02:45:19 | * | kapil__ joined #nim |
02:50:10 | * | yglukhov__ joined #nim |
02:54:48 | * | yglukhov__ quit (Ping timeout: 264 seconds) |
03:04:24 | * | willwillson quit (Ping timeout: 245 seconds) |
03:07:43 | * | z1y quit (Remote host closed the connection) |
03:08:05 | * | z1y joined #nim |
03:18:20 | * | Varriount joined #nim |
03:19:56 | * | Varriount quit (Client Quit) |
03:20:48 | * | Varriount_ is now known as Varriount |
03:23:51 | * | superfunc[mobile joined #nim |
03:27:45 | renesac_ | nim still don't have any interface to write bits (rather than bytes) to a file? |
03:29:11 | renesac_ | and when I should use the stream module rather than simply writing to a file using the procs in system? |
03:32:18 | EXetoC | there are bit-granularity file systems? |
03:33:29 | renesac_ | no, you need at least one bit of buffer |
03:33:47 | renesac_ | but there are bit-granularity data that a proc can generate |
03:34:09 | renesac_ | *one byte of buffer |
03:38:34 | Varriount | renesac_: The stream module allows for multiple stream interfaces, such that you can (theoretically) write to a socket as easily as to a file. |
03:39:02 | EXetoC | but what should happen if a single bit is written? since you need to then store a byte |
03:39:17 | renesac_ | EXetoC: it is written to the buffer |
03:39:45 | renesac_ | when you close the file, it is written, followed by some padding (zeroes?) |
03:39:53 | EXetoC | ok |
03:40:33 | Varriount | renesac_: So make the char equivalent of a bit padded by some zeroes? |
03:41:06 | renesac_ | Varriount: well, what is the difference of defining the same procs for the socket as for a file? |
03:42:12 | renesac_ | w/o using that stream object? |
03:44:29 | * | brson quit (Quit: leaving) |
03:47:33 | * | z1y quit (Remote host closed the connection) |
03:48:05 | * | Boscop quit (Read error: Connection reset by peer) |
03:48:11 | * | z1y joined #nim |
03:48:30 | * | Boscop joined #nim |
03:49:46 | * | saltylicorice joined #nim |
03:53:38 | renesac_ | Varriount:: I will probably use a uint8, as data with bit granularity is binary data, and I will use lots of bitwise ops to manipulate it |
03:54:30 | renesac_ | if there is no such IO/stream library, I will write it, but I'm not sure what model I should use |
03:54:49 | renesac_ | I don't see what value the "stream" object full of callbacks is adding |
03:55:24 | renesac_ | instead of the regular static dispatching by the compiler |
03:55:37 | * | z1y quit (Ping timeout: 240 seconds) |
03:58:48 | Varriount | renesac_: Ask araq |
04:10:51 | renesac_ | ok, it indeed makes easier to write extra functions that works on any type of stream |
04:11:25 | renesac_ | but zahari's user defined type classes also should make the same thing possible |
04:12:37 | renesac_ | just define a stream type testing if the required operations are defined for that type, and avoid that runtime overhead of calbacks |
04:12:53 | renesac_ | I'm missing something? |
04:13:33 | renesac_ | Varriount:: the manual says that user defined type classes are still in development, how stable are they? |
04:14:43 | EXetoC | they often break |
04:15:35 | * | z1y joined #nim |
04:17:56 | * | ARCADIVS joined #nim |
04:19:52 | renesac_ | :P |
04:24:55 | * | dts|pokeball joined #nim |
04:26:58 | renesac_ | oh, but I think with pure generics it may be possible to make this work, but then the functions accepting Stream will have a "T" instead of the much more descriptive "Stream" as type |
04:28:32 | renesac_ | and the tests will happen in the function bodies, instead of the requeriments being documented on a centralized place |
04:28:54 | renesac_ | not very pretty |
04:29:17 | renesac_ | is there work being done to fix user defined type classes, or is it low priority? |
04:31:25 | EXetoC | it's not of priority for 1.0, and zahary is very busy |
04:31:35 | renesac_ | ok |
04:33:20 | renesac_ | but whole libraries types (like the stream one) could be rewritten taking advantage of this, aparently |
04:34:43 | * | boydgreenfield quit (Quit: boydgreenfield) |
04:38:39 | * | jefus__ joined #nim |
04:40:10 | renesac_ | and I find strange that the buffer and buffer lenght should be given as parameters to every relevant stream operation, as oposed to be stored in the stream object as state |
04:40:34 | renesac_ | like it is in C I think |
04:40:48 | renesac_ | that one is for araq to answer though |
04:41:10 | * | renesac_ is now known as renesac|away |
04:41:57 | * | jefus_ quit (Ping timeout: 240 seconds) |
04:45:29 | renesac|away | oh, nevermind the last question, it is the lower level interface |
05:04:01 | * | saltylicorice quit (Ping timeout: 244 seconds) |
05:05:41 | * | x4nt joined #nim |
05:06:01 | x4nt | Does echo always end in a newline? |
05:10:14 | EXetoC | yes. see 'write' (stdout.write) |
05:18:40 | * | Sergio965 joined #nim |
05:47:21 | * | superfunc[mobile quit (Quit: Connection closed for inactivity) |
05:49:53 | * | yenic left #nim (#nim) |
06:17:54 | * | jpoirier quit (Ping timeout: 244 seconds) |
06:23:21 | reactormonk | What's the current branch? devel or master? |
06:26:23 | dts|pokeball | reactormonk, i think devel just merged into master |
06:43:14 | * | dyu joined #nim |
06:51:14 | * | dts|pokeball quit (Changing host) |
06:51:14 | * | dts|pokeball joined #nim |
06:52:51 | * | SplinterOfChaos quit (Ping timeout: 256 seconds) |
07:16:11 | * | gmpreussner__ joined #nim |
07:16:57 | * | gmpreussner_ quit (Ping timeout: 240 seconds) |
07:39:35 | * | BlaXpirit joined #nim |
07:46:39 | * | yglukhov__ joined #nim |
08:00:31 | * | gour joined #nim |
08:08:38 | * | Sergio965 quit (Quit: Bye! :)) |
08:08:59 | * | Sphax joined #nim |
08:27:19 | * | adam_s quit (Quit: Leaving) |
08:29:11 | * | dts|pokeball is now known as blackmist |
08:29:37 | * | blackmist is now known as dts|pokeball |
08:29:57 | * | hakand joined #nim |
08:49:02 | * | dyu quit (Ping timeout: 245 seconds) |
08:51:53 | * | dyu joined #nim |
09:00:18 | * | z1y quit (Remote host closed the connection) |
09:00:51 | * | z1y joined #nim |
09:05:03 | * | Sphax quit (Quit: ZZZZZzzzzz) |
09:11:53 | ekarlso- | yet what is it that will replace parseopt ? |
09:14:51 | * | goobles joined #nim |
09:16:02 | * | Sphax joined #nim |
09:22:07 | * | lyro joined #nim |
09:36:01 | ekarlso- | can a exception be used in a case statement ? |
09:36:22 | * | zahary1 quit (Quit: Leaving.) |
09:36:42 | dts|pokeball | try it and see? |
09:36:47 | ekarlso- | packages.nim(247, 12) Error: selector must be of an ordinal type, float or string |
09:36:50 | ekarlso- | meh -,,- |
09:36:54 | ekarlso- | if statement then I guess |
09:42:11 | * | yglukhov___ joined #nim |
09:42:11 | * | yglukhov__ quit (Read error: Connection reset by peer) |
09:48:57 | * | hakand quit (Quit: Be back later ...) |
09:51:05 | * | repax joined #nim |
09:51:48 | * | hakand joined #nim |
09:53:16 | * | superfunc quit (Ping timeout: 246 seconds) |
10:00:13 | * | z1y quit (Remote host closed the connection) |
10:01:24 | * | z1y joined #nim |
10:24:35 | * | ekarlso- quit (Changing host) |
10:24:35 | * | ekarlso- joined #nim |
10:33:03 | * | gokr quit (Quit: Leaving.) |
10:40:45 | * | gokr joined #nim |
10:40:57 | * | Matthias247 joined #nim |
10:41:17 | * | gokr_ quit (Ping timeout: 240 seconds) |
10:42:17 | * | Sphax quit (Quit: ZZZZZzzzzz) |
10:42:49 | * | VinceAddons joined #nim |
10:42:50 | * | Sphax joined #nim |
10:55:23 | * | z1y quit (Ping timeout: 256 seconds) |
11:00:16 | * | gokr1 joined #nim |
11:00:19 | * | gokr1 quit (Read error: Connection reset by peer) |
11:01:33 | * | kapil__ quit (Quit: Connection closed for inactivity) |
11:01:44 | * | gokr1 joined #nim |
11:05:12 | * | willwillson joined #nim |
11:05:38 | * | bjz joined #nim |
11:08:40 | * | milosn quit (Remote host closed the connection) |
11:09:34 | * | milosn joined #nim |
11:20:39 | * | Sphax quit (Quit: ZZZZZzzzzz) |
11:32:06 | * | Epic|gmpreussner joined #nim |
11:32:22 | * | gmpreussner__ quit (Ping timeout: 245 seconds) |
11:36:36 | * | VinceAddons quit (*.net *.split) |
11:36:36 | * | x4nt quit (*.net *.split) |
11:36:36 | * | MightyJoe quit (*.net *.split) |
11:38:20 | * | MightyJoe joined #nim |
11:38:29 | * | xant1 joined #nim |
11:39:52 | * | Forty-3 quit (Ping timeout: 259 seconds) |
11:40:49 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:40:55 | * | bjz quit (Read error: Connection reset by peer) |
11:46:22 | * | hakand quit (Quit: Be back later ...) |
11:47:21 | * | bjz joined #nim |
11:47:27 | * | soggybread quit (Quit: leaving) |
11:48:00 | * | hakand joined #nim |
11:56:46 | * | gokr1 quit (Quit: Leaving.) |
12:08:30 | * | z1y joined #nim |
12:09:58 | * | bjz quit (Read error: Connection reset by peer) |
12:10:06 | * | bjz_ joined #nim |
12:11:33 | * | repax_ joined #nim |
12:14:27 | * | z1y quit (Quit: Leaving.) |
12:14:49 | * | repax quit (Ping timeout: 245 seconds) |
12:20:03 | * | Sphax joined #nim |
12:20:20 | * | repax_ quit (Quit: repax_) |
12:26:47 | * | z1y joined #nim |
12:33:17 | * | z1y quit (Remote host closed the connection) |
12:42:20 | * | bjz joined #nim |
12:42:43 | * | bjz_ quit (Read error: Connection reset by peer) |
12:46:42 | * | Matthias247 joined #nim |
12:50:30 | * | bjz quit (Ping timeout: 250 seconds) |
12:51:13 | * | bjz joined #nim |
12:59:16 | * | irrequietus joined #nim |
12:59:29 | * | irrequietus quit (Changing host) |
12:59:29 | * | irrequietus joined #nim |
13:05:42 | * | z1y joined #nim |
13:09:23 | * | bjz quit (Ping timeout: 240 seconds) |
13:14:02 | * | jefus__ is now known as jefus |
13:16:30 | * | VinceAddons joined #nim |
13:16:54 | * | gokr quit (Ping timeout: 245 seconds) |
13:18:01 | * | bjz joined #nim |
13:22:14 | * | bjz quit (Read error: Connection reset by peer) |
13:24:06 | joebo | It looks like asynchttpserver is single threaded. Are there any multi-threaded versions or other ways of enabling it to use all the cores on a machine, aside from having 8 processes listening on different ports and having a reverse proxy round-robin it |
13:26:32 | * | Trustable joined #nim |
13:26:48 | acidx | joebo: not sure about technicalities regarding num, but if your operating system supports it, you can enable SO_REUSEPORT on the main socket, so that various processes can bind on the same port. the kernel will then schedule the connections. |
13:27:41 | joebo | true |
13:28:18 | Araq | joebo: we still haven't tested async with spawn :-) |
13:28:21 | joebo | I was hoping I there was an existing solution that used spawn |
13:28:43 | joebo | Araq: Thanks, I figured... it's still quite new it seems |
13:28:56 | Araq | both features are bleeding edge |
13:29:17 | Araq | spawn works with classical sockets though |
13:30:39 | * | bjz joined #nim |
13:32:01 | joebo | ok... the async/await pattern looks really nice |
13:32:09 | joebo | very clean code |
13:32:26 | Araq | that said, async has still performance problems, I think and so is slower than the boring old sockets, so spawn + old sockets might be the winner |
13:32:46 | joebo | I may try spawning from the asynchttpserver callback and see what happens |
13:33:28 | joebo | Araq: are you aware of any server examples using boring old sockets ? I can go check rosettacode |
13:35:56 | joebo | http://goran.krampe.se/2014/10/25/nim-socketserver/ |
13:37:24 | Araq | yeah that one uses a non-optimized deepCopy of the socket's buffer |
13:37:32 | Araq | but apparently performance is acceptable |
13:39:21 | joebo | hmm, it still only used one core on windows (100% cpu on one core) even with --threads:on |
13:39:49 | * | bjz quit (Ping timeout: 245 seconds) |
13:40:56 | joebo | but maybe the response callback is so quick that it still keeps using these same thread/core |
13:55:55 | * | kapil__ joined #nim |
13:56:07 | joebo | that seemed to be it. I added a more CPU intensive workload to the spawned callback and it started using more cores |
13:56:32 | * | bjz joined #nim |
13:56:48 | Araq | good |
13:57:25 | joebo | nim is really impressive. thank you |
14:00:57 | * | ramnes joined #nim |
14:01:11 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:06:20 | BlaXpirit | so destructors is a new thing? :o |
14:07:22 | BlaXpirit | or has it been experimental for long? |
14:08:32 | * | dirkk0 joined #nim |
14:09:16 | ramnes | hi |
14:09:34 | * | gokr joined #nim |
14:09:50 | ramnes | why didn't I heard about nim before and why so much hype now? |
14:10:10 | * | bjz quit (Ping timeout: 255 seconds) |
14:10:52 | gokr | ramnes: Because it was recently renamed to Nim - and because of the hype around Rust I suspect (where Nim pops up as a similar lang) |
14:11:27 | ramnes | yeah I know it just has changed it's name, but I never heard about nimrod neither |
14:11:38 | gokr | Me neither, until like a month or two ago |
14:11:48 | ramnes | and Rust is hype for monthes now |
14:12:00 | gokr | I have been cranking out articles btw, http://goran.krampe.se/category/nim |
14:12:06 | gokr | Might be of help if you are learning. |
14:12:10 | * | hakand quit (Quit: Be back later ...) |
14:12:33 | ramnes | nice, thanks gokr |
14:13:09 | ramnes | any serious project on Github to see some nice code? |
14:13:11 | * | bjz joined #nim |
14:14:23 | joebo | gokr: your socket server example was very help. thanks |
14:14:31 | gokr | Good! |
14:15:12 | gokr | I am all for slick async stuff - but a "regular" forking server is also very useful since then you can rely on blocking code if you need to. |
14:15:34 | gokr | For an async server all code handling the requests will need to be async. |
14:16:04 | * | hakand joined #nim |
14:16:47 | gokr | Its also worth noting that the "spawn" uses the thread pool that Andreas has written - so it doesn't actually create a new thread for each request. |
14:17:34 | gokr | ramnes: I think the forum code, Aporia etc are some of the public examples. |
14:17:37 | * | z1y quit (Ping timeout: 264 seconds) |
14:18:12 | gokr | I wrote a little utility called blimp that makes it easy to handle big binary files in git. So it may be an interesting example of a command line utility. |
14:19:17 | * | dirkk0 quit (Quit: Leaving) |
14:19:34 | dv- | nimble is nice too |
14:20:12 | * | z1y joined #nim |
14:21:07 | * | Epic|gmpreussner quit (Ping timeout: 245 seconds) |
14:22:04 | * | z1y quit (Remote host closed the connection) |
14:22:19 | * | z1y joined #nim |
14:23:01 | * | Epic|gmpreussner joined #nim |
14:23:33 | * | bjz quit (Read error: Connection reset by peer) |
14:23:52 | * | Epic|gmpreussner is now known as gmpreussner |
14:24:58 | * | gmpreussner quit (Client Quit) |
14:25:43 | * | bjz joined #nim |
14:31:48 | ramnes | why mixedCase for functions? :( |
14:32:31 | gokr | Why not? |
14:33:27 | ramnes | because snake_case is easier to read |
14:34:18 | BlaXpirit | ramnes, at least you don't have to write mixedCase in nim |
14:34:48 | * | hakand quit (Quit: Be back later ...) |
14:35:05 | ramnes | yeah but it looks like it's already the defacto standard |
14:35:11 | flaviu | .give ramnes let fooBar = "123"; echo foo_bar |
14:35:16 | Mimbus | ramnes: 123 |
14:35:34 | ramnes | wat |
14:36:49 | gokr | ramnes: "is easier to read" - says who? Its quite odd to argue like that given the amount of people thinking otherwise. |
14:37:09 | * | hakand joined #nim |
14:38:03 | BlaXpirit | mixedCase is about as easy to read as mixed_c_ase |
14:38:26 | ramnes | gokr: see http://programmers.stackexchange.com/questions/27264/naming-conventions-camelcase-versus-underscore-case-what-are-your-thoughts-ab |
14:38:32 | ramnes | aRatherLongSymbolName vs a_rather_long_symbol_name |
14:38:35 | ramnes | seems fair to me |
14:39:02 | flaviu | arguing about identifier style is unlikely to be productive |
14:39:11 | ramnes | I know |
14:39:49 | * | bjz quit (Ping timeout: 245 seconds) |
14:39:50 | ramnes | but this is a big part of a language standards design |
14:40:09 | ramnes | so I guess there is some reasons about mixedCase being used |
14:40:28 | ramnes | hence my question |
14:40:59 | gokr | ramnes: Reading a bit in that link you posted, its definitely not a black/white question. |
14:41:01 | flaviu | The language is designed so that you can use whatever style you like. |
14:41:17 | gokr | I am a Smalltalker at heart, camelCase since 1980s :) |
14:42:05 | ramnes | flaviu: you know that "do what you want" never makes readable code :) |
14:42:32 | flaviu | ramnes: Of course, your personal style should stay consistent. |
14:42:39 | gokr | Also, IMHO you can't argue that a single identifier is easier/harder to read - its the code as a whole that is interesting. And then, I (humble opinion) tend to think that camelCase holds the identifiers "together" better. |
14:43:15 | gokr | But either way, I just reacted to your view that there was some sort of "fact" that one was superior than another :) |
14:43:42 | flaviu | ramnes: But the idea is that if some library author decides to do stuff like `underscores_everywhere` and you prefer camelCase, you can keep your code consistant |
14:44:42 | BlaXpirit | flaviu, and that author will be looked down upon -_- |
14:45:01 | ramnes | I really like the PEP about naming styles |
14:45:33 | ramnes | and in my question, I was actually wondering if there is such a document for nim |
14:45:43 | ramnes | not really saying that snake_case is superior |
14:46:18 | ramnes | like I said, I'm just asking a question, don't really want to go in an infinite debate :) |
14:46:55 | flaviu | https://github.com/Araq/Nim/wiki/NEP-1-%3A-Style-Guide-for-Nimrod-Code |
14:47:11 | * | repax joined #nim |
14:47:30 | flaviu | It's intended for the compiler and standard library, but there's no reason that it can't be used elsewere. |
14:47:46 | ramnes | nice |
14:48:28 | * | jpoirier joined #nim |
14:49:10 | * | jpoirier quit (Client Quit) |
14:52:22 | ramnes | it's funny how it nim feels heavily inspired by Python, like NEP instead of PEP |
14:52:51 | ramnes | but still change things without explaining, like that naming convention |
14:53:27 | ramnes | (and I don't mean to be harsh or to troll, seriously) |
14:53:50 | ramnes | s/it// |
14:54:08 | BlaXpirit | it's harder to find a language it was not inspired by |
14:54:52 | ramnes | well, this might be biased since I'm a Python developer :p |
14:54:52 | repax | There have been much discussion on naming |
14:56:00 | repax | The steps away from T and P prefixes were very welcome |
14:57:05 | BlaXpirit | and instead we get even longer suffixes -_- |
14:57:21 | * | willwillson quit (Ping timeout: 244 seconds) |
14:57:28 | flaviu | BlaXpirit: IMO, you shouldn't have to use a suffix |
14:57:34 | ramnes | :D |
14:57:47 | flaviu | Decide if you want your type to be a ref or a value, and stick with it. |
14:58:01 | BlaXpirit | i have been able to avoid it quite successfully lately, but i'm afraid it won't always be the case |
14:59:35 | * | bjz joined #nim |
14:59:36 | ramnes | for what kind of project would you absolutely use nim instead of an other language? |
14:59:39 | flaviu | BlaXpirit: Well, many languages get along fine treating everything as a ref. |
15:00:08 | BlaXpirit | (and i ended up looking for an alternative to such a language...) |
15:01:10 | repax | Why not simply use the ptr and ref keywords? |
15:01:53 | repax | As well as `var` |
15:02:35 | repax | The need for specific ref prefixes are very uncommon |
15:03:08 | flaviu | repax: Because `new` is annoying to use, and you can't use the type construction syntax with prefixes. |
15:03:20 | repax | ramnes, lately, wherever I can |
15:03:38 | EXetoC | flaviu: you mean, without them? well you can actually |
15:03:47 | flaviu | That's why I wrote https://gist.github.com/flaviut/1ae1d7deac4c57d0a84c |
15:03:51 | EXetoC | with another parenthesis pair |
15:04:24 | flaviu | .give EXetoC type Typ = object; val: int; discard (ref Typ)(val : 1) |
15:04:27 | Mimbus | EXetoC: <no output> |
15:04:33 | flaviu | wait, what? |
15:04:43 | EXetoC | :-p |
15:04:45 | flaviu | huh, that must have been implemented recently. |
15:05:13 | flaviu | I still like box better though |
15:08:03 | EXetoC | BlaXpirit: there are so many other aspects to a language though - major ones that matter |
15:08:35 | BlaXpirit | it's not the prefixes themselves, it's the confusion that they cause |
15:08:58 | flaviu | .eval "1.2.3.4.5.6".split('.').map(strip) |
15:09:01 | Mimbus | flaviu: eval.nim(3, 24) Error: type mismatch: got (seq[string], proc (string, bool, bool): string{.noSideEffect.}) |
15:09:11 | flaviu | but the last two bools are optional. |
15:09:40 | BlaXpirit | bugs are everywhere |
15:10:02 | * | bjz quit (Ping timeout: 250 seconds) |
15:11:21 | * | saml joined #nim |
15:11:27 | EXetoC | BlaXpirit: there are many other things a newcomer has to learn |
15:11:44 | EXetoC | what do you think about Obj/ObjRef/ObjPtr? |
15:12:04 | BlaXpirit | EXetoC, yeah, there are many undocumented things a newcomer has to learn |
15:12:04 | EXetoC | *Foo |
15:12:15 | * | vqrs joined #nim |
15:12:24 | EXetoC | and then FooObj |
15:12:43 | BlaXpirit | what do you mean, what I think about them |
15:12:45 | EXetoC | that's a temporary issue, but ok good point |
15:13:17 | EXetoC | BlaXpirit: yes, that's the replacement. the primary type would just be Foo, and then you would introduce some of the others if necessary |
15:13:42 | BlaXpirit | how do I know if it's necessary? |
15:14:00 | BlaXpirit | what if i make a library and think it is not necessary to make the object type public |
15:14:36 | BlaXpirit | (which is exactly what i did) |
15:15:38 | flaviu | BlaXpirit: Then I suppose your users will have to stop worrying about that small inefficiency. |
15:16:08 | EXetoC | yes, you can either add them later, or the user can, or the user can just do (ref Foo) |
15:16:15 | BlaXpirit | nope |
15:16:36 | BlaXpirit | i mean, the first part - yes, the rest - nope |
15:17:19 | flaviu | Has anyone written a dynamic typing library? |
15:17:33 | EXetoC | you'd like to avoid ref Foo at all costs? |
15:17:49 | repax | Is this really a problem with nim? No matter what language you use you have to consider the boundary between API and implementation |
15:17:51 | BlaXpirit | EXetoC, you misunderstood... i wasn't clear enough |
15:18:09 | BlaXpirit | I'd like to avoid having these different types at all costs |
15:18:10 | EXetoC | repax: right |
15:18:33 | vqrs | Is anyone using nim for JavaScript stuff? |
15:18:35 | BlaXpirit | which is why i enforce object-type-only for some and ref-type-only for others |
15:18:37 | EXetoC | BlaXpirit: then do so if you choose. I'm just saying that it's new convention |
15:19:08 | flaviu | vqrs: only project I know of is the package list on the nim website. |
15:19:19 | BlaXpirit | but I have a scarier problem at hand |
15:19:22 | BlaXpirit | "usage of a type with a destructor in a non destructible context" |
15:19:43 | EXetoC | BlaXpirit: I don't know how that approach is any different |
15:19:50 | vqrs | flaviu |
15:19:56 | vqrs | flaviu How do you mean? |
15:20:20 | BlaXpirit | nim-lang/packages |
15:20:32 | BlaXpirit | no, that's not it |
15:20:46 | flaviu | vqrs: http://nim-lang.org/nimblepkglist.js |
15:21:10 | flaviu | it runs on this page: http://nim-lang.org/lib.html |
15:21:12 | * | bjz joined #nim |
15:21:13 | BlaXpirit | don't scare people like that |
15:21:14 | EXetoC | BlaXpirit: you mean, because the basic type would then sometimes not be exposed? then maybe it would be a good idea to always define it |
15:21:32 | vqrs | I see |
15:21:34 | BlaXpirit | EXetoC, so it's just a ton of boilerplate |
15:22:02 | * | tane joined #nim |
15:22:42 | EXetoC | maybe. I don't think many people have adhered to this convention yet |
15:23:32 | BlaXpirit | I think a JS minifier is a must-have in any nim-js pipeline |
15:24:32 | repax | Sounds useful |
15:25:28 | BlaXpirit | http://marijnhaverbeke.nl/uglifyjs http://nim-lang.org/nimblepkglist.js result is 53.6% of original |
15:25:50 | BlaXpirit | nobody's gonna look at it anyway |
15:26:12 | BlaXpirit | i mean actively read it |
15:26:27 | flaviu | It could be even smaller, if a more advanced compiler was used |
15:26:49 | BlaXpirit | lol |
15:26:51 | flaviu | there's lots of stuff in the global scope that doesn't need to have long identifiers. |
15:26:53 | BlaXpirit | it just pollutes namespace |
15:26:54 | onionhammer | i would use closure compiler |
15:26:56 | onionhammer | too |
15:26:58 | BlaXpirit | that's compiler's fault |
15:26:58 | onionhammer | see which gives smaller results |
15:27:04 | onionhammer | https://developers.google.com/closure/compiler/ |
15:27:05 | BlaXpirit | it should be wrapped in anonymous function |
15:27:10 | flaviu | I can't get closure compiler to work. |
15:27:14 | onionhammer | http://closure-compiler.appspot.com/home |
15:27:17 | flaviu | Compilation did not complete successfully. See warnings pane for details. |
15:27:37 | vqrs | I was looking for a powerful language for a single page application, and Nim looks nice, but http://nim-lang.org/backends.html#the-javascript-target makes it sound like it's not a very good idea |
15:27:49 | onionhammer | for advanced it didnt, hm |
15:28:33 | onionhammer | doesnt look like valid js to me.. |
15:29:03 | onionhammer | whoa.. did not know JS had labels |
15:29:05 | onionhammer | thats crazy ;) |
15:29:12 | BlaXpirit | no goto though |
15:29:24 | onionhammer | yeah |
15:29:33 | onionhammer | thats where the closure compiler is hanging up |
15:30:09 | EXetoC | vqrs: what do you think is missing? |
15:30:18 | BlaXpirit | i don't understand that code |
15:30:25 | BlaXpirit | there is a bunch of function definition |
15:30:28 | BlaXpirit | but where is "main"? |
15:30:51 | vqrs | EXetoC:It sounds like I can't make use of virtually the entire standard library. |
15:32:04 | BlaXpirit | the main question is, can js libraries be used |
15:32:23 | flaviu | BlaXpirit: All the code that is not in a function is main |
15:32:38 | vqrs | That, too. The page only shows a rudimentary funciton call to JS, not however whether the JS object model can be accessed from within Nim |
15:32:41 | BlaXpirit | flaviu, it's hard to tell because of no indentation xD |
15:32:47 | * | z1y quit (Ping timeout: 265 seconds) |
15:33:28 | BlaXpirit | vqrs, I can't find even that |
15:33:35 | BlaXpirit | pls link to "rudimentary funciton call to JS" |
15:33:45 | vqrs | BlaXpirit: http://nim-lang.org/backends.html#javascript-invocation-example |
15:33:52 | kokozedman | hey guys... how do I do a C : return *((uint32_t*)(addr)) in nim? addr is an arbitrary pointer |
15:33:53 | BlaXpirit | thank you |
15:34:08 | BlaXpirit | cast[ptr uint32] i think |
15:34:24 | BlaXpirit | cast[ptr uint32](addr)[] i think |
15:34:25 | gokr | vqrs: Amber smalltalk is quite cool (one page app) |
15:34:36 | kokozedman | BlaXpirit: ok, thanks |
15:35:16 | BlaXpirit | ah, vqrs |
15:35:21 | EXetoC | it's just that addr is a keyword |
15:35:27 | vqrs | gokr: Hmm the overview sounds nice |
15:35:31 | BlaXpirit | so you have to predefine all functions and it has to be static |
15:35:36 | BlaXpirit | nope nope, not usable for js, sadlt |
15:35:39 | BlaXpirit | sadly |
15:35:48 | gokr | vqrs: I know Nicolas Petton who created Amber. Its used for www.smalltalkhub.com |
15:35:58 | BlaXpirit | not that i would want to confine myself to a compiled language if it's all gonna perform even worse than default |
15:36:15 | gokr | Its a very clean Smalltalk and the cool part is that the IDE runs "live" in your browser |
15:36:24 | gokr | So you can code as you go. |
15:37:14 | flaviu | Well, I got rid of all the code it kept whining about, but it still fails |
15:37:33 | BlaXpirit | whatever |
15:37:50 | vqrs | Well, I'm going to write a compiler that runs in the browser, and visualizes its execution step by step, and for correctness' sake I wanted some more bells and whistles than JS has... I looked at TypeScript so far and that didn't look too shabby |
15:38:01 | BlaXpirit | the js target really, really, really should output everything wrapped in a function+call |
15:38:03 | * | bjz quit (Read error: Connection reset by peer) |
15:38:29 | BlaXpirit | guys, the best thing that tries to hide JS's horrors is LiveScript |
15:38:33 | BlaXpirit | please just trust me |
15:38:33 | gokr | vqrs: Do look at Amber. Its already a compiler that runs in a browser :) |
15:39:00 | EXetoC | some people seem to have nothing but praise for js |
15:39:11 | EXetoC | but that's true for everything I guess |
15:39:13 | gokr | vqrs: Check this: http://amber-lang.net/learn.html |
15:39:17 | gokr | Interactive tutorial. |
15:39:29 | vqrs | gokr: I will, the language is set to be Eiffel though, it's a Bachelor's Thesis |
15:40:00 | gokr | vqrs: Either case, the Amber compiler is a full multistage compiler with an IR etc, so ... it should be useful to study. |
15:40:10 | BlaXpirit | does the "Got 5 minutes?" part refer to the time it takes to load? |
15:40:11 | gokr | And its written in itself. |
15:40:18 | vqrs | BlaXpirit: Fair question |
15:40:45 | gokr | Note that I don't think the tutorial is stripped/minified etc., |
15:40:57 | gokr | Any "one page app" will have a bit of loading time I guess. |
15:41:11 | gokr | Also, the latest Amber and IDE etc is newer than those pages. |
15:41:12 | BlaXpirit | no but it seriously loads for minutes |
15:41:15 | vqrs | I'm waiting a minute now... |
15:41:15 | gokr | What? |
15:41:31 | gokr | Oh, then it must be broken |
15:41:46 | BlaXpirit | it loads for a minute and then just stops download and is simply broken |
15:41:51 | BlaXpirit | yay |
15:41:57 | flaviu | Yeah, there's a message in the console |
15:42:01 | flaviu | it looks broken |
15:42:17 | vqrs | yep |
15:42:17 | gokr | a pity. |
15:42:27 | gokr | But you can check the old IDE by clicking that button on the main page |
15:42:51 | gokr | And in fact, on www.smalltalkhub.com - you can get into the IDE and browse all the code of that site. |
15:43:31 | flaviu | Neat. Is the code stored as an AST? |
15:43:45 | gokr | The code is stored compiled. |
15:43:55 | gokr | If you hit the console on www.smalltalkhub.com |
15:43:58 | gokr | And type in: |
15:43:59 | gokr | smalltalk.Browser._open() |
15:44:09 | gokr | And hit enter, you get the IDE up. Then you can browse the code. |
15:44:29 | gokr | (agian the older IDE, the new is called Helios) |
15:44:55 | gokr | Every time you save a method it will be compiled into js and "hooked in". |
15:44:57 | vqrs | smalltalk.Browser is undefined here |
15:45:35 | gokr | Chrome? |
15:45:40 | gokr | It works for me in Chrome. |
15:45:41 | vqrs | Yeah, that explains it I guess: http://puu.sh/e6EsZ/7d5ea5c6f2.png |
15:46:28 | gokr | interesting |
15:47:26 | gokr | Weird. |
15:47:30 | gokr | It works for me. |
15:47:37 | vqrs | Maybe you have it cached? |
15:47:40 | def- | works for me as well |
15:47:48 | gokr | Smalltalkhub is an Amber app - that uses REST to talk to a REST based server that uses MongoDB. |
15:48:03 | gokr | So the whole UI is in Amber. |
15:48:21 | gokr | vqrs: I may, but I doubt def- has |
15:48:32 | vqrs | hmm |
15:48:56 | vqrs | now it works... |
15:49:23 | gokr | Its a sortof github kinda site but for Smalltalkers. |
15:49:35 | gokr | Nicolas wrote it - same guy who created Amber. |
15:52:17 | gokr | Sorry for the offtopic flurry, but its a very nice example of a language on/in js (not just a trivial transformation). |
15:52:38 | BlaXpirit | it never works out |
15:55:43 | * | bjz joined #nim |
15:56:48 | gokr | BlaXpirit: What do you mean? |
15:57:11 | vqrs | gokr: Shame the tutorial is down... |
15:57:23 | BlaXpirit | gokr, "a language on/in js (not just a trivial transformation)." never works out |
15:57:36 | gokr | vqrs: I can alert them on the list |
15:57:45 | vqrs | gokr: Thanks |
15:57:56 | saml | why not? |
15:58:06 | gokr | vqrs: But it a pretty clean Smalltalk, so any tutorial on Smalltalk |
15:58:59 | gokr | BlaXpirit: Its kinda interesting to claim that "it never works out" for a language that actually runs a site with over 2000 repositories and almost 2000 register accounts. |
15:59:41 | vqrs | I've never used SmallTalk before, so I it's kinda hard to judge for me whether I should go down that road |
16:00:25 | BlaXpirit | no, it is not hard |
16:01:25 | vqrs | You like being cryptic, eh? |
16:01:33 | * | kapil__ quit (Quit: Connection closed for inactivity) |
16:01:49 | BlaXpirit | being direct would've been worse |
16:02:41 | * | darkf quit (Quit: Leaving) |
16:03:06 | gokr | vqrs: Its kinda like Ruby since Ruby is a Smalltalk "clone" in a different syntax |
16:03:50 | gokr | As usual, its all about what you want to do. Smalltalk has been successful in many different contexts. But its very different from Nim of course. |
16:04:43 | gokr | vqrs: Good starting place: www.world.st |
16:05:21 | vqrs | gokr: Currently doing this: http://amber-smalltalk.github.io/trysmalltalk/ Based on the name "prof stef" I guess that it's the same |
16:05:39 | gokr | Ah, great. Yep, same. |
16:06:22 | * | gour quit (Remote host closed the connection) |
16:07:45 | * | gour joined #nim |
16:10:49 | BlaXpirit | took me long enough to realize that my library has memory leaks virtually everywhere |
16:11:15 | BlaXpirit | who would've thought {.override.} is so relevant |
16:11:31 | BlaXpirit | and now that I added it, I'm getting "usage of a type with a destructor in a non destructible context" for no reason |
16:11:34 | * | bjz quit (Ping timeout: 250 seconds) |
16:11:56 | BlaXpirit | are destructors even a popular thing? are there alternatives maybe? |
16:12:24 | BlaXpirit | because i do need to destroy ptr object when it goes out of scope |
16:15:25 | * | bjz joined #nim |
16:15:31 | EXetoC | pointers are unmanaged. you could either do it manually or wrap the type |
16:15:58 | BlaXpirit | I'm gonna need a destructor either way. |
16:16:38 | EXetoC | destructors are experimental |
16:16:45 | BlaXpirit | what does that mean? |
16:17:06 | BlaXpirit | not experimental in general |
16:17:24 | BlaXpirit | I'm interested for the outlook of community on destructors, the progress of their implementation, etc |
16:17:39 | BlaXpirit | in any case... is this a bug? https://bpaste.net/show/bcf10f3a5640 |
16:18:05 | BlaXpirit | oh, should've added the error message. it's "(8, 5) Error: usage of a type with a destructor in a non destructible context" |
16:18:05 | EXetoC | don't you need {.experimental.} in order to use destructors now? they simply might not work as expected in some cases |
16:18:43 | BlaXpirit | EXetoC, they seem to work nicely when I don't reassign variables |
16:19:10 | BlaXpirit | at least the rest of my code compiled and memory leaks were gone |
16:19:40 | * | hakand_ joined #nim |
16:20:02 | BlaXpirit | oooh I have an idea. I wish I could let users of my library choose whether to activate destructors or not |
16:20:14 | * | hakand quit (Ping timeout: 245 seconds) |
16:20:16 | EXetoC | it's yet another thing that might not have priority over other things |
16:21:11 | BlaXpirit | I'm pretty sure I know how to conditionally apply a pragma, but what about passing options to modules? |
16:21:39 | * | matkuki joined #nim |
16:22:14 | BlaXpirit | --symbol? |
16:23:47 | EXetoC | I don't know, but I've only used --define so far |
16:26:04 | BlaXpirit | sure would be nicer to define it in code |
16:28:54 | BlaXpirit | define is the thing. thanks. |
16:31:25 | * | dyu quit (Quit: Leaving) |
16:32:27 | matkuki | Happy new year guys! |
16:33:12 | dv- | that was two weeks ago matkuki |
16:33:27 | BlaXpirit | optional destructors, not too shabby https://bpaste.net/show/d62540a0a074 |
16:33:31 | saml | matkuki, happy birthday |
16:35:05 | matkuki | Yes I know, I haven't been on this channel for some time :) |
16:36:29 | matkuki | Why does array access with an enum member require an .ord to be added? example: |
16:37:01 | matkuki | a[MyEnum.en.ord], instead of just a[MyEnum.en] |
16:37:28 | EXetoC | that works if it's an array that takes MyEnum indices |
16:38:01 | BlaXpirit | matkuki, enums members are not numbers |
16:38:36 | * | jefus_ joined #nim |
16:39:11 | matkuki | BlaXpirit: Can you explain in more detail? I'm new to Nim. |
16:39:48 | BlaXpirit | what is MyEnum.en? |
16:40:24 | BlaXpirit | it's a thing, a concept, just one of MyEnum's options. it is not a number |
16:40:27 | * | bjz quit (Ping timeout: 265 seconds) |
16:40:48 | BlaXpirit | so why are you surprised that an operation that wants a number does not accept something that is not a number? |
16:41:07 | EXetoC | some languages have more relaxed semantics |
16:41:20 | EXetoC | but I approve of the added type safety |
16:41:41 | matkuki | EXetoC: That's why I was a little confused. |
16:42:01 | matkuki | BlaXpirit: Got it, thanks. |
16:42:11 | * | jefus quit (Ping timeout: 256 seconds) |
16:42:19 | EXetoC | it's similar to having a "T = distinct int", where T is not an int, but if you want the underlying value then you have to do "val.int" |
16:44:55 | matkuki | EXetoC: When is this useful? |
16:45:51 | EXetoC | matkuki: you could prevent something like this for example: "10.kg + 5.miles" |
16:46:20 | matkuki | good example, thanks |
16:46:44 | EXetoC | had those not been distinct, but then it would be exactly the same as "10 + 5" |
16:48:20 | EXetoC | implicit conversions can be defined with converters, but that should be done sparingly, so as to not create needless confusion |
16:51:42 | BlaXpirit | why does nim have to converge from posix-defined command line arguments specification? |
16:51:47 | BlaXpirit | diverge* |
16:52:25 | ldlework | to keep you on your toes |
16:52:31 | ldlework | BlaXpirit: I don't think Araq is a big fan of posix |
16:52:41 | BlaXpirit | and even in parseopt2 error handling seems nonexistent |
16:52:44 | BlaXpirit | i don't understand |
16:52:53 | BlaXpirit | does it just accept any options and |
16:53:08 | BlaXpirit | leave almost everything to you? |
16:53:21 | BlaXpirit | geez |
16:53:32 | BlaXpirit | not even an automatic help message generation? |
16:53:54 | ldlework | BlaXpirit: settle down |
16:54:00 | * | gokr quit (Quit: Leaving.) |
16:54:45 | BlaXpirit | someone really should check out docopt |
16:56:01 | * | kniteli joined #nim |
16:56:12 | BlaXpirit | ldlework, how can I settle down, when the language with the most potential suffers from such silly things |
16:56:27 | ldlework | BlaXpirit: I mean, you've been here for a while |
16:56:39 | BlaXpirit | i still keep getting surprised |
16:57:03 | ldlework | It should come as no surprise Nim is full of these wierd edges that require careful handling |
16:58:02 | BlaXpirit | does nim compiler command line interface actually use this thing? |
16:58:15 | BlaXpirit | that explains why it's so wonky |
16:59:30 | flaviu | EXetoC: In that case, mightn't an implicit converter between kg and g be a good idea? |
16:59:31 | * | enquora joined #nim |
16:59:50 | BlaXpirit | flaviu, they should be the same type |
16:59:53 | flaviu | so you could add 100.g + 1.kg |
17:00:03 | * | brson joined #nim |
17:00:14 | BlaXpirit | proc kg(x) = G(x:x) |
17:00:24 | ldlework | flaviu: I think that's what they were saying so but to not go over board |
17:00:24 | BlaXpirit | i mean proc g(x) = G(x:x) |
17:00:37 | BlaXpirit | proc kg(x) = G(x:1000*x) |
17:00:41 | flaviu | Yeah, I think that BlaXpirit has the best solution here. |
17:01:03 | flaviu | best to keep the units consistent |
17:01:26 | BlaXpirit | G is like distinct float |
17:01:26 | EXetoC | flaviu: why not overload the operators? |
17:01:35 | BlaXpirit | and no idea why i wrote "x:" there |
17:01:46 | flaviu | EXetoC: Combinatorial explosion. |
17:02:02 | BlaXpirit | kg(x) = Grams(1000.0*x) |
17:02:29 | flaviu | BlaXpirit: Yes, I understand |
17:02:49 | BlaXpirit | i just wanted to write it out better |
17:03:44 | BlaXpirit | seriously though, should I look into porting docopt to Nim? |
17:04:27 | flaviu | BlaXpirit: Please do. parseopt's syntax is unconventional and the api is meh too. |
17:04:41 | BlaXpirit | lol syntax is the least of its problems |
17:04:52 | BlaXpirit | that module probably has like 20 lines of code because it just does almost nothing |
17:05:19 | * | Matthias247 joined #nim |
17:05:38 | EXetoC | https://github.com/acolley/docopt.nim.git |
17:05:40 | repax | weight is just *one* type. Use templates to implement others too (length, energy, etc) |
17:05:48 | BlaXpirit | EXetoC, oh. |
17:06:07 | def- | repax: I did something like that: https://github.com/def-/nim-units/blob/master/units.nim |
17:06:30 | BlaXpirit | crazy |
17:06:34 | BlaXpirit | i like it |
17:06:43 | repax | def-, looks very nice! |
17:07:01 | flaviu | Yeah, really impressive |
17:07:22 | flaviu | although it looks like you forgot to add a flag to turn off tests. |
17:08:27 | def- | flaviu: yeah, the whole thing was more of a test, should clean it up a bit |
17:08:48 | BlaXpirit | docopt.nim - 1 star on github |
17:08:52 | BlaXpirit | is the situation really that dire? |
17:09:26 | flaviu | docopt.nim doesn't seem to have tests |
17:09:39 | EXetoC | I've never heard anyone mention it |
17:09:43 | flaviu | but docopt provides a test suite: https://github.com/docopt/docopt/blob/master/testcases.docopt |
17:09:46 | EXetoC | it might not have been announced |
17:10:21 | BlaXpirit | it seems unfinished |
17:10:29 | BlaXpirit | tons of todo |
17:11:10 | * | hakand__ joined #nim |
17:11:10 | * | hakand_ quit (Read error: Connection reset by peer) |
17:11:11 | flaviu | yep: "# TODO: finish" |
17:11:16 | BlaXpirit | D: |
17:11:38 | flaviu | BlaXpirit: So get to work! |
17:11:46 | EXetoC | that TODO sure carries a lot of weight |
17:11:52 | BlaXpirit | i've been working 5 days and nobody wants to check out my library |
17:11:57 | BlaXpirit | :< |
17:12:23 | BlaXpirit | well i haven't really announced it, but yeah |
17:12:24 | EXetoC | link? |
17:12:30 | EXetoC | right.. :p |
17:12:35 | BlaXpirit | https://github.com/blaxpirit/nim-csfml |
17:13:04 | flaviu | I'm not interested in making games at the moment, but maybe a short example would be good? |
17:13:05 | EXetoC | I'm pretty sure fowl would've accepted PRs, but ok |
17:13:09 | EXetoC | or were there any other issues? |
17:13:11 | flaviu | oh, there are examples |
17:13:18 | def- | flaviu: pretty nice examples even |
17:13:18 | BlaXpirit | there sure are examples |
17:13:28 | BlaXpirit | 1 doesnt work because i added destructors and there is a bug |
17:13:31 | BlaXpirit | gonna fix it soon |
17:13:41 | BlaXpirit | (bug in nim, seems likely) |
17:13:57 | BlaXpirit | EXetoC, there are many issues |
17:14:15 | BlaXpirit | the main ones I've written as issues on fowl's library |
17:14:28 | BlaXpirit | but it's just manually maintained or even not maintained in some places |
17:14:39 | BlaXpirit | human error is likely |
17:15:19 | flaviu | It's also more fun to start from scratch, right? :P |
17:15:23 | BlaXpirit | yes |
17:15:39 | BlaXpirit | well in this case it also was easier |
17:16:01 | BlaXpirit | i did learn a lot from the other library though |
17:18:13 | * | willwillson joined #nim |
17:18:30 | repax | Is there a principle behind the variance in naming convention: new_RenderWindow() vs newSoundBufferRecorder() |
17:19:03 | BlaXpirit | repax, I write examples in 2 different styles |
17:19:19 | BlaXpirit | the library itself adheres to official style guide as far as i'm aware |
17:19:23 | * | goobles quit (Quit: Page closed) |
17:19:25 | BlaXpirit | but some examples i use my own preferred style |
17:19:37 | repax | Ok, just wondered |
17:19:43 | BlaXpirit | repax, underscores are ignored in nim btw |
17:19:49 | repax | I know |
17:19:53 | flaviu | #fcf8f4 looks really great. Nice choice boydgreenfield. |
17:20:07 | BlaXpirit | wha |
17:20:13 | repax | But sometimes one might want to put emphasis on something |
17:20:39 | * | bjz joined #nim |
17:21:57 | BlaXpirit | flaviu, took me long enough to figure out that you're probably talking about documentation |
17:22:03 | flaviu | oh, yes. |
17:22:13 | flaviu | the background color |
17:24:24 | * | gokr joined #nim |
17:24:49 | * | gokr_ joined #nim |
17:24:59 | BlaXpirit | And if someone is still looking at my library, make sure to nitpick. |
17:25:03 | * | gokr1 joined #nim |
17:25:26 | ldlework | simple.nim(3, 32) Error: type mismatch: got (int literal(800), int literal(600)) |
17:25:43 | BlaXpirit | okay, that's not good..? |
17:25:58 | gokr1 | BlaXpirit: Help me evolve lapp then |
17:26:10 | BlaXpirit | gokr1, sorry? |
17:26:34 | gokr1 | https://gitlab.3dicc.com/gokr/lapp |
17:26:47 | gokr1 | It uses the synopsis (= help message) as the grammar |
17:27:00 | gokr1 | Originall ported to Nim from Lua by Steve Donovan |
17:27:01 | BlaXpirit | gokr1, but that's what docopt does |
17:27:11 | gokr1 | docopt? |
17:27:14 | BlaXpirit | why is your library good and why why not port docopt and why i |
17:27:19 | BlaXpirit | why is your library good and why not port docopt |
17:27:37 | gokr1 | I didn't know about docopt - and lapp was already (as I said) ported by Steve |
17:27:43 | BlaXpirit | okay |
17:27:49 | gokr1 | I simply fixed it from a bit of rot - and improved it a bit. |
17:27:58 | gokr1 | I use it in blimp |
17:28:51 | * | gokr quit (Ping timeout: 264 seconds) |
17:29:01 | flaviu | I personally like docopt better |
17:30:17 | gokr1 | Seems neat |
17:30:21 | gokr1 | I hadn't heard of it |
17:30:36 | BlaXpirit | I updated nim-csfml so that snakes example should work now |
17:30:42 | BlaXpirit | it's my favorite |
17:31:44 | BlaXpirit | ooh it might be a cool idea to implement a compile-time option parser |
17:32:11 | BlaXpirit | docopt for C works by generating C code using Python :| |
17:32:12 | flaviu | Cool, yes, but it'll be a lot more work |
17:32:22 | BlaXpirit | how cool of a showcase would it be though |
17:32:33 | BlaXpirit | i have no idea if it's even possible |
17:32:39 | flaviu | of course it is |
17:32:58 | flaviu | if nothing else, you could use parseStmt |
17:33:21 | flaviu | then it's just standard string mangling |
17:35:12 | BlaXpirit | ldlework, so please tell me more about that error |
17:35:12 | * | yglukhov___ quit (Read error: Connection reset by peer) |
17:35:17 | * | yglukhov____ joined #nim |
17:36:28 | BlaXpirit | proc videoMode*(modeWidth, modeHeight: cint, bitsPerPixel: cint = 32) |
17:36:36 | BlaXpirit | can you not call it videoMode(800, 600) ? |
17:37:08 | flaviu | gokr1: your lapp library doesn't appear to be in pacakges.json |
17:37:24 | flaviu | You should submit it: https://github.com/nim-lang/packages/compare |
17:38:47 | * | bjz quit (Read error: Connection reset by peer) |
17:39:13 | ldlework | BlaXpirit: I'm just running your master branch |
17:39:16 | ldlework | and doing |
17:39:20 | ldlework | nim c simple.nim |
17:39:31 | BlaXpirit | well that's not good |
17:39:42 | BlaXpirit | you can do cint(800), cint(600) |
17:39:52 | BlaXpirit | but i thought you can pass int literal to cint arguments |
17:40:04 | BlaXpirit | it's pretty lame if you can't...... |
17:40:20 | BlaXpirit | but it works on my system, and on def's system |
17:40:36 | ldlework | it wants three ints |
17:40:39 | ldlework | not two |
17:40:46 | ldlework | csfml.videoMode(width: cint, height: cint, bpp: cint): TVideoMode |
17:41:15 | BlaXpirit | ldlework, you're using fowl's library |
17:41:21 | BlaXpirit | D: |
17:41:34 | BlaXpirit | the T gives it away |
17:41:51 | ldlework | That sounds like a problem with packaging then |
17:41:55 | ldlework | Well I guess not |
17:42:08 | BlaXpirit | it's quite a problem that they're named the same :| |
17:42:46 | ldlework | how do you do a nimble install from source? |
17:42:54 | BlaXpirit | go into the folder |
17:42:56 | BlaXpirit | nimble install |
17:43:01 | BlaXpirit | i should mention that too, huh |
17:43:31 | BlaXpirit | ldlework, but the way I'm doing it is --path:../src |
17:44:24 | * | yglukhov____ quit (Ping timeout: 240 seconds) |
17:55:50 | * | bjz joined #nim |
17:58:16 | ldlework | BlaXpirit: I installed csfml 2.2 from source but I get |
17:58:24 | ldlework | could not load: libcsfml-window.so |
17:58:28 | BlaXpirit | ldlework, is there such thing as csfml 2.2? |
17:58:35 | ldlework | yeah its the latest version |
17:58:35 | * | hguux_ quit (Ping timeout: 272 seconds) |
17:58:45 | BlaXpirit | https://github.com/LaurentGomila/CSFML/releases |
17:58:58 | * | phira quit (Excess Flood) |
17:59:03 | ldlework | http://www.sfml-dev.org/download/sfml/2.2/ |
17:59:07 | ldlework | I take it csfml is something else? |
17:59:13 | BlaXpirit | yes |
17:59:20 | * | phira joined #nim |
17:59:28 | * | Sphax quit (Quit: CYA!!) |
17:59:41 | BlaXpirit | ldlework, it looks like you had used fowl's library before |
17:59:53 | BlaXpirit | did you not have those libraries already installed? |
17:59:59 | ldlework | alright |
18:00:32 | BlaXpirit | i'm gonna try to help you in private messages cuz this is offtopic |
18:00:37 | * | ARCADIVS quit (Quit: ARCADIVS) |
18:01:07 | * | rpag joined #nim |
18:01:07 | * | hguux_ joined #nim |
18:06:16 | * | dts|pokeball quit (Quit: Leaving) |
18:06:36 | * | dts|pokeball joined #nim |
18:07:37 | * | dts|pokeball quit (Remote host closed the connection) |
18:07:57 | * | dts|pokeball joined #nim |
18:08:50 | * | dts|pokeball quit (Remote host closed the connection) |
18:09:05 | * | dts|pokeball joined #nim |
18:10:19 | * | skyfex quit (Read error: Network is unreachable) |
18:10:56 | * | skyfex joined #nim |
18:11:48 | * | iivvoo quit (Ping timeout: 265 seconds) |
18:12:33 | * | dts|pokeball quit (Client Quit) |
18:14:13 | * | EastByte_ quit (Ping timeout: 265 seconds) |
18:15:03 | * | CARAM__ quit (Ping timeout: 244 seconds) |
18:16:11 | * | Varriount|Busy joined #nim |
18:16:26 | * | EastByte_ joined #nim |
18:17:05 | Varriount|Busy | Meep. |
18:17:14 | BlaXpirit | hi |
18:17:47 | * | dtscode joined #nim |
18:17:58 | * | CARAM__ joined #nim |
18:18:11 | * | iivvoo joined #nim |
18:18:29 | ldlework | I wanted to share this all with you: http://labs.echonest.com/Uploader/index.html?trid=TRXKEZN13AF58CD0A8&thresh=9 |
18:19:00 | ldlework | you're welcome |
18:21:05 | * | hakand__ quit (Quit: Be back later ...) |
18:22:28 | * | gour_ joined #nim |
18:25:19 | * | bjz quit (Ping timeout: 256 seconds) |
18:25:22 | * | Trixar_za quit (Ping timeout: 244 seconds) |
18:25:42 | * | gour quit (Ping timeout: 245 seconds) |
18:27:58 | * | Trixar_za joined #nim |
18:34:02 | * | superfunc joined #nim |
18:39:52 | * | yglukhov____ joined #nim |
18:42:33 | * | gour_ is now known as gour |
18:43:04 | * | bjz joined #nim |
18:43:42 | Varriount|Busy | Hrm. Decisions, decisions... |
18:45:33 | superfunc | just curious, on variant types, why can't the names clash across discriminators? |
18:48:19 | superfunc | as in: Term = ref object ... case kind : TermKind ... of Succ: t1 : Term .... of Pred: t1 : Term |
18:49:12 | Varriount|Busy | superfunc: I think it's an implementation detail, and an ambiguity issue |
18:49:37 | ekarlso- | flaviu: yo |
18:49:43 | flaviu | hi |
18:50:00 | superfunc | Varriount|Busy: Ok, I just wanted to make sure there wasn't some flaw in doing it that way I was missing |
18:52:20 | BlaXpirit | superfunc, Varriount|Busy, I just recently also ran into that |
18:53:20 | superfunc | I've been doing a small writeup on implementing simply typed LC in nim to add some documentation to the language. |
18:53:30 | Varriount|Busy | LC? |
18:53:37 | superfunc | Hopefully I'll get it done in the next few days, still a few more things I need to read |
18:53:42 | superfunc | lambda calculus |
18:54:21 | superfunc | so far my Nim implementation is much faster, and equally as clean as my old Ocaml one |
18:54:30 | * | tgkokk joined #nim |
18:54:44 | def- | superfunc: nice, anything online yet? |
18:55:16 | superfunc | I'll ping you in the next couple days I'm ready to show it |
18:55:17 | * | bjz quit (Ping timeout: 245 seconds) |
18:55:45 | * | ldlework is now known as superproc |
18:56:16 | * | superproc is now known as ldlework |
18:57:02 | superfunc | had I known I'd be so into nim... lol |
18:57:15 | ldlework | hehe |
18:59:28 | * | tgkokk quit (Ping timeout: 264 seconds) |
19:04:00 | * | tgkokk joined #nim |
19:04:26 | * | bjz joined #nim |
19:04:56 | * | SplinterOfChaos joined #nim |
19:07:16 | onionhammer | Varriount|Busy deciding on what to work on next? :) |
19:07:23 | onionhammer | Varriount|Busy cuz I have an idea |
19:08:56 | Varriount|Busy | onionhammer: What is it? |
19:09:12 | onionhammer | new NimLime release |
19:09:17 | Varriount|Busy | onionhammer: I was thinking about working on IDE Tools, since people on the forum seem to be clamoring for it. |
19:09:31 | onionhammer | that would be awesome |
19:09:42 | Varriount|Busy | onionhammer: Sure we can't just set the package control to just use the head revision all the time? |
19:09:43 | onionhammer | I could help you test that too |
19:09:56 | onionhammer | im not sure - i didn't submit it to package control |
19:10:04 | onionhammer | im not sure we want to do that either ;) |
19:10:20 | onionhammer | also I think some of your stuff might have gotten borked over the past several months |
19:10:27 | Varriount|Busy | onionhammer: ? |
19:10:45 | onionhammer | just thnk you should retest it, not sure specifically |
19:10:51 | onionhammer | if you havent already retested latest |
19:11:02 | onionhammer | think there was something with ## |
19:11:06 | onionhammer | iirc |
19:11:06 | Varriount|Busy | onionhammer: I accounted for the executable renaming, I think. |
19:11:22 | Varriount|Busy | When I get home I'll test it. |
19:11:25 | onionhammer | okay |
19:12:08 | Varriount|Busy | onionhammer: At the moment, in my spare time, I'm designing a filepath module. |
19:12:15 | onionhammer | interesting |
19:12:35 | Varriount|Busy | The problem is both storing things efficiently, *and* allowing extensions... |
19:13:25 | Varriount|Busy | For instance, I plan on storing the parts of a path in a single string, with each part prefixed by an integer. The only problem is, where do I store a drive (when on windows)? |
19:15:28 | def- | Varriount|Busy: what about ropes?: http://nim-lang.org/ropes.html |
19:16:48 | Varriount|Busy | def-: Ropes are trees. Part of my goal is to *minimize* references. |
19:16:53 | def- | alright |
19:17:01 | onionhammer | hm nim or nimlime isnt happy with spaces in path on windows |
19:17:03 | onionhammer | :) |
19:17:10 | onionhammer | during build |
19:17:50 | onionhammer | Varriount /c/Path/On/Windows ? |
19:20:34 | flaviu | Are ropes really effective at improving performance compared to giant char vectors? |
19:21:02 | Varriount|Busy | flaviu: Ropes are good for many large strings. |
19:21:44 | Varriount|Busy | flaviu: They can help save space. It's one of the tme vs space tradeoffs |
19:21:47 | Varriount|Busy | *time |
19:23:22 | * | bjz quit (Read error: Connection reset by peer) |
19:24:43 | * | tgkokk quit (Ping timeout: 255 seconds) |
19:28:29 | * | gsingh93 joined #nim |
19:29:35 | BlaXpirit | lol so i just installed nim on Windows and it can't compile anything |
19:29:48 | BlaXpirit | .eval echo "ok" # not even this |
19:29:48 | Varriount|Busy | BlaXpirit: How, and did you install a compiler? |
19:29:53 | Mimbus | BlaXpirit: ok |
19:30:38 | * | tgkokk joined #nim |
19:30:57 | BlaXpirit | I downloaded Windows installer 32bit and installed on Windows 7 64bit virtual machine. I had MinGW installed apparently but also checked to install MinGW in Nim installer |
19:31:24 | Varriount|Busy | BlaXpirit: And what happens when you try to compile something? |
19:31:28 | BlaXpirit | C:\Nim\lib/nimbase.h:385:13: error: size of array 'assert_numbits' is negative typedef int assert_numbits[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof (NI)*8 ? 1 : -1]; |
19:31:43 | Varriount|Busy | BlaXpirit: That means it's still picking up your previous compiler. |
19:32:06 | * | bjz joined #nim |
19:32:10 | BlaXpirit | Varriount|Busy, I don't think there was anything wrong with that compiler |
19:32:13 | Varriount|Busy | The 'add to path' option *appends* to your path |
19:32:37 | Varriount|Busy | BlaXpirit: That error occurs when the bit-ness of the Nim executable and the bit-ness of the C compiler don't match. |
19:32:45 | BlaXpirit | but I think it's 32bit |
19:33:02 | Varriount|Busy | " I had MinGW installed apparently but also checked to install MinGW in Nim installer" |
19:33:25 | BlaXpirit | I only install 32 bit things |
19:33:33 | BlaXpirit | although who knows.. |
19:33:50 | Varriount|Busy | BlaXpirit: Please check. |
19:33:58 | BlaXpirit | wish I knew how |
19:34:21 | BlaXpirit | I see mingw32 everywhere |
19:36:01 | Varriount|Busy | BlaXpirit: That doesn't necessarily mean anything. The 64 bit version of Mingw32 has a similar folder layout to the 32 bit version |
19:36:38 | Varriount|Busy | BlaXpirit: What does 'gcc --version' print out? |
19:37:00 | BlaXpirit | I did a SET PATH=C:\Nim\dist\mingw\bin;%PATH% and it works now. thanks. |
19:37:39 | BlaXpirit | hm interesting, Varriount|Busy |
19:37:54 | BlaXpirit | I didn't even have that old compiler in PATH, that special Nim shortcut seems to add it |
19:38:00 | * | tgkokk left #nim ("Textual IRC Client: www.textualapp.com") |
19:38:10 | Varriount|Busy | BlaXpirit: Huh? What old compiler? |
19:38:20 | BlaXpirit | the old mingw that i had installed |
19:38:26 | Varriount|Busy | Hm... |
19:38:55 | Varriount|Busy | BlaXpirit: The shortcut leads to a batch file. Could you gist the contents of it please? |
19:38:57 | BlaXpirit | i never added it to PATH but when i start Nim command line shortcut, it initializes the session by prepending that external mingw to the beginning of PATH and its own is near the end |
19:39:57 | BlaXpirit | https://bpaste.net/show/a162a51233a7 |
19:41:04 | BlaXpirit | when i start my normal cmd, mingw32-gcc does not exist |
19:41:25 | BlaXpirit | when i use this batch file/shortcut, it is mingw32-gcc (GCC) 4.8.1 |
19:41:31 | Varriount|Busy | BlaXpirit: Um, I don't see where it's prepending the external mingw? |
19:41:40 | BlaXpirit | Varriount|Busy, that surprised me too |
19:42:57 | BlaXpirit | no, I'm misinterpreting something |
19:43:35 | BlaXpirit | very sorry for the confusion |
19:43:49 | * | flaviu quit (Read error: Connection reset by peer) |
19:43:50 | BlaXpirit | I actually have gcc (rev5, Built by MinGW-W64 project) 4.8.1 |
19:44:01 | BlaXpirit | and it is present in PATH |
19:44:19 | BlaXpirit | should've just checked everything |
19:45:10 | * | flaviu joined #nim |
19:45:19 | BlaXpirit | but that still doesn't explain why it doesn't prefer its own GCC |
19:45:54 | BlaXpirit | ah because I change directory |
19:46:02 | BlaXpirit | NIMRODPATH=. duh |
19:46:11 | BlaXpirit | that shouldn't be the way it is |
19:46:18 | Varriount|Busy | Hrm, your right. |
19:46:38 | * | Varriount|Busy makes another note of what to when he gets home |
19:46:46 | BlaXpirit | thx |
19:50:33 | BlaXpirit | cool stuff. nim-csfml works on Windows! |
19:52:39 | BlaXpirit | didnt even have to mess with compilers or anything, CSFML dll binary download works |
19:52:49 | BlaXpirit | not on Linux, though |
19:52:59 | Varriount|Busy | BlaXpirit: Make sure to test with a mingw64 compiler |
19:53:17 | BlaXpirit | Varriount|Busy, why? |
19:53:33 | Varriount|Busy | BlaXpirit: Platform differences |
19:53:46 | BlaXpirit | I will notbut i have 64 bit on linux anyway |
19:55:32 | BlaXpirit | yeah, i should've installed 64bit first, then uninstalled and left 32bit permanently |
19:55:44 | BlaXpirit | don't want to redo it twice though |
19:58:21 | Varriount|Busy | BlaXpirit: You know, you could fix the compiler script, and then send it to me. |
19:58:40 | Varriount|Busy | Since it's going to take me about half an hour to get home |
19:59:58 | * | BlaXpirit quit (Read error: Connection reset by peer) |
20:00:17 | * | Varriount|Busy quit (Quit: Page closed) |
20:00:48 | * | BlaXpirit joined #nim |
20:01:31 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045]) |
20:02:10 | BlaXpirit | Varriount, I have no idea what to fix |
20:04:19 | BlaXpirit | I mean, `SET NIMRODPATH=D%` is an OK fix as long as you make sure current directory path is set correctly in the shortcut |
20:04:27 | BlaXpirit | I mean, `SET NIMRODPATH=%CD%` is an OK fix as long as you make sure |
20:04:35 | BlaXpirit | %C apparently is something |
20:09:54 | * | superfunc quit (Ping timeout: 250 seconds) |
20:16:51 | * | flaviu quit (Remote host closed the connection) |
20:17:08 | * | flaviu joined #nim |
20:18:08 | * | flaviu quit (Remote host closed the connection) |
20:18:22 | MyMind | https://twitter.com/macromates/status/552134978692472832 |
20:18:23 | * | flaviu joined #nim |
20:22:12 | * | hasenj joined #nim |
20:24:24 | * | bjz quit (Ping timeout: 244 seconds) |
20:41:16 | * | flaviu quit (Remote host closed the connection) |
20:41:30 | * | flaviu joined #nim |
20:41:59 | * | flaviu quit (Remote host closed the connection) |
20:42:18 | * | flaviu joined #nim |
20:49:12 | * | hasenj quit (Quit: hasenj) |
20:49:19 | onionhammer | http://forum.nimrod-lang.org/t/721 |
20:51:29 | * | nande joined #nim |
20:51:45 | * | Mat4 joined #nim |
20:51:51 | Mat4 | hello |
20:53:51 | flaviu | Why does https://github.com/nim-lang/nits exist? |
20:54:19 | BlaXpirit | D: |
20:54:25 | flaviu | Also, a redirect for http://nim-lang.org/nimrodc.html would be good. |
20:56:01 | flaviu | https://github.com/nim-lang/nimble/blob/master/developers.markdown makes no mention of tests. |
20:56:13 | flaviu | What is the recommended directory structure for that? |
21:09:44 | * | gour quit (Remote host closed the connection) |
21:10:22 | * | jpoirier joined #nim |
21:12:07 | * | matkuki joined #nim |
21:12:48 | ekarlso- | flaviu: u wanna look at the packages thing again ? :p |
21:13:07 | ekarlso- | i'm gonna push a patch for the license thingie |
21:13:07 | flaviu | ekarlso-: Sure, let me pull |
21:13:39 | ekarlso- | flaviu: lemme push first :p |
21:13:41 | ekarlso- | will notify u |
21:20:09 | matkuki | How do you convert a C pointer to a static string to something that can be used with "echo"? |
21:20:34 | matkuki | I trying to pring the OpenGL version using glGetString(GL_VERSION) |
21:20:45 | matkuki | sorry, print |
21:21:25 | EXetoC | cast to cstring? |
21:22:04 | EXetoC | and then it will be converted to string by echo |
21:22:13 | EXetoC | which calls $ implicitly |
21:22:50 | matkuki | Gives me "SIGSEGV: Illegal storage access."? |
21:23:20 | matkuki | Also tried "cast[ptr cstring]" |
21:23:25 | BlaXpirit | is there some C parser for nim that gives AST of C? |
21:23:53 | repax | matkuki, are you sure that the pointer is non nil? |
21:24:17 | repax | and can you read its content as, say an int? |
21:25:10 | EXetoC | matkuki: does it return nil? |
21:25:25 | EXetoC | it might |
21:25:27 | matkuki | just a sec... |
21:26:09 | repax | BlaXpirit, have you looked at clang? |
21:26:14 | BlaXpirit | no |
21:26:16 | EXetoC | but the proc should then raise an GL error, unless something else is going on |
21:26:20 | repax | sorry, didn't see the nim part |
21:26:36 | BlaXpirit | what does c2nim use |
21:26:37 | matkuki | EXetoC: If I use "== nil" it returns false |
21:27:24 | BlaXpirit | rolls with its own.. |
21:27:32 | BlaXpirit | matkuki, give code pls |
21:27:58 | repax | matkuki, echo cast[int](versionString[]) |
21:28:14 | EXetoC | ? |
21:28:25 | Mat4 | is someone here interested in cross compilation for Parallax Propeller MCU's ? |
21:28:37 | matkuki | I'm using the nim-lang/opengl library. |
21:28:42 | matkuki | The code is var tmp :cstring; tmp = cast[cstring](glGetString(GL_VERSION)); echo(tmp) |
21:30:35 | def- | matkuki: https://www.opengl.org/wiki/FAQ#What_is_an_OpenGL_context_and_why_do_you_need_a_window_to_do_GL_rendering.3F |
21:30:48 | EXetoC | it didn't return nil though |
21:31:57 | * | Amrykid joined #nim |
21:32:00 | repax | possible reasons: 1) the address can't be read at all by the process. 2) it's not null-terminated |
21:32:32 | BlaXpirit | something is wrong again :( |
21:32:33 | EXetoC | you could print the first 20 chars or something, one by one |
21:32:38 | BlaXpirit | $ nimble install c2nim |
21:32:52 | BlaXpirit | nim not found |
21:33:00 | BlaXpirit | (Looking for nim (>= 0.10.2)) |
21:34:53 | BlaXpirit | any ideas? |
21:35:17 | BlaXpirit | nim -v 0.10.3 |
21:35:43 | BlaXpirit | ah damn, i probably have old nimble |
21:36:56 | BlaXpirit | now it says c2nim.nim(11, 33) Error: cannot open 'llstream' |
21:37:37 | matkuki | repax: also tried "glGetString(GL_SHADING_LANGUAGE_VERSION​)" and "glGetString(GL_VENDOR​)", same error. |
21:37:49 | BlaXpirit | matkuki, give code pls |
21:38:00 | BlaXpirit | why are you making it hard for everyone? |
21:38:33 | BlaXpirit | oh, you gave 1 line |
21:38:36 | EXetoC | you compared the output of glGetString to nil directly? though it shouldn't matter |
21:38:43 | matkuki | http://pastebin.com/3e3eASRa |
21:38:46 | BlaXpirit | but I want a complete example so i can try and tweak |
21:38:52 | EXetoC | BlaXpirit: that problem has remained for some time |
21:38:58 | BlaXpirit | :( |
21:39:04 | EXetoC | because the compiler is not being included in the installation |
21:39:14 | matkuki | no sorry wait... |
21:39:29 | EXetoC | it is indeed easier to just add the bin dir to the path |
21:39:55 | BlaXpirit | EXetoC, ? |
21:39:59 | BlaXpirit | which path |
21:40:07 | BlaXpirit | the normal one? |
21:40:14 | matkuki | http://pastebin.com/hw8t3ChR |
21:40:17 | matkuki | line 132 |
21:40:46 | EXetoC | BlaXpirit: yes. that would be the simplest "installation" |
21:40:48 | EXetoC | for now |
21:40:58 | BlaXpirit | ah |
21:41:07 | BlaXpirit | i thought maybe i could fool nimble with PATH somehow |
21:41:09 | BlaXpirit | ok thx |
21:41:10 | EXetoC | but maybe you can copy the compiler dir to that lib dir |
21:41:30 | EXetoC | and I could update the build script if it then works |
21:42:02 | * | Amrykid quit (Changing host) |
21:42:02 | * | Amrykid joined #nim |
21:42:12 | EXetoC | I think it would be best if it was /usr/lib/nim/lib though, in that case |
21:42:23 | BlaXpirit | okay, matkuki, i can run it and get sigsegv. will look. |
21:42:41 | matkuki | BlaXpirit: Great, thanks! |
21:44:22 | BlaXpirit | glGetString(GL_SHADING_LANGUAGE_VERSION) returns 61 |
21:44:23 | BlaXpirit | okay |
21:44:42 | BlaXpirit | wrapper is broken, matkuki |
21:44:46 | BlaXpirit | very very broken |
21:44:55 | BlaXpirit | opengl.nim |
21:44:56 | BlaXpirit | proc glGetString(name: GLenum): GLubyte |
21:45:10 | BlaXpirit | actually is ptr GLubyte |
21:45:19 | EXetoC | crap |
21:45:32 | BlaXpirit | EXetoC, who writes wrappers like that, srsly |
21:45:38 | EXetoC | me? |
21:45:54 | BlaXpirit | i thought my wrapper was not ready |
21:46:08 | BlaXpirit | now i think otherwise :p |
21:46:14 | matkuki | I noticed that. I'm not that good at Nim yet, I thought the conversion was implicit or something. |
21:46:29 | EXetoC | it would be very confusing |
21:46:50 | flaviu | BlaXpirit: Yes, your wrapper is excellent! |
21:46:57 | flaviu | Most are nothing more than c2nim output. |
21:47:17 | Mat4 | what's the status of c2nim (and where can I found it) ? |
21:47:58 | BlaXpirit | Mat4, you can find it in google. 2nd search result https://github.com/nim-lang/c2nim |
21:48:06 | BlaXpirit | wait |
21:48:09 | BlaXpirit | you mean "status"? |
21:48:42 | BlaXpirit | well it's definitely not gonna translate C code, it's mostly just for headers, and not perfect even at that, last time i've tried |
21:49:14 | renesac|away | there is some improvment ideas on GSOC 2014 proposal |
21:49:21 | renesac|away | for c2nim |
21:49:27 | * | renesac|away is now known as renesac |
21:50:56 | BlaXpirit | flaviu, i wish someone would use it xD |
21:51:13 | Mat4 | I need wrapping the standard libraries of the propGCC compiler for using Nim for cross-compilation |
21:51:27 | EXetoC | some things were fixed the last couple of months |
21:51:57 | matkuki | BlaXpirit, EXetoC: yup, with adding "ptr" to the glGetString return type it works. |
21:52:02 | EXetoC | the biggest issue I had was the unsupported ##, and multiline macros |
21:52:32 | Mat4 | ok, I will how well the sources are converted |
21:53:03 | BlaXpirit | Mat4, it will not convert sources well |
21:53:09 | BlaXpirit | only C header (.h) files |
21:53:49 | BlaXpirit | EXetoC, do you think I could take advantage of clex, cparse somehow? |
21:54:15 | BlaXpirit | because i don't understand it at all :| |
21:55:32 | EXetoC | no idea |
21:56:07 | * | johnsoft quit (Ping timeout: 245 seconds) |
21:56:44 | ekarlso- | any people here good at webdesign ? :) |
21:57:20 | * | johnsoft joined #nim |
22:01:40 | EXetoC | I'm alright at developing functional websites |
22:02:11 | EXetoC | but I've never bothered to learn how to do fancy stuff with css since it's so quirky |
22:02:27 | matkuki | EXetoC: Should I open an issue on github for glGetString? |
22:03:17 | ldlework | EXetoC: amen |
22:03:17 | EXetoC | sure |
22:03:21 | EXetoC | my wrapper generator must be broken. I hope I can find it again |
22:03:41 | EXetoC | but I'll have to look at what else is broken |
22:04:27 | matkuki | I'm going to be playing with opengl for a while, will report if I find anything else. |
22:05:55 | flaviu | I can't say I'm good at CSS, but things typically turn out at least reasonable-looking. |
22:05:55 | BlaXpirit | i should try to pair some of this with sfml :3 |
22:06:46 | BlaXpirit | I'm so tempted to just steal an OpenGL piece of code from somewhere, but the licenses, those damn licenses |
22:07:08 | BlaXpirit | there is a lot of code under MIT, but can I publish it in my repo under zlib license? |
22:07:09 | EXetoC | no one will notice :> |
22:08:45 | flaviu | Is there some way to disable `Info: instantiation from here`? |
22:09:05 | BlaXpirit | why |
22:09:15 | ldlework | EXetoC: :P |
22:09:40 | flaviu | BlaXpirit: Because it's useless and irritates me. |
22:09:50 | flaviu | I suppose grep will suffice :P |
22:11:06 | * | Mimbus quit (Read error: No route to host) |
22:11:10 | flaviu | As there looks like there's no way to turn off ProveInit either |
22:12:09 | * | flaviu left #nim (#nim) |
22:12:12 | * | flaviu joined #nim |
22:12:40 | * | Mimbus joined #nim |
22:12:50 | BlaXpirit | matkuki, where did you get that code that you pasted from? |
22:13:41 | BlaXpirit | also, any particular reason why you're using SDL? :p |
22:13:49 | ldlework | Its better. |
22:14:01 | ldlework | Packaged better, for one. |
22:14:25 | matkuki | BlaXpirit: a little modified from "nim-lang/sdl2/examples/sdl_opengl_example.nim" |
22:14:35 | BlaXpirit | thank you, matkuki |
22:17:22 | matkuki | I'm want to make a game. Nim looks and feels great to me. I already have a prototype is Python/SDL2. I kinda like SDL2. |
22:18:09 | dtscode | is nim good for writing games? |
22:18:31 | BlaXpirit | dtscode, probably |
22:18:42 | BlaXpirit | that's what I'm expecting to use it for |
22:18:49 | dtscode | interesting |
22:19:21 | ldlework | matkuki: I too am using Nim for games |
22:19:27 | BlaXpirit | matkuki, are you going for 3D? |
22:19:42 | * | enquora quit (Quit: enquora) |
22:20:27 | dtscode | ldlework, can i see an example? |
22:20:27 | matkuki | BlaXpirit: not yet, I'm just starting to play with OpenGL. The game will be primarily 2D. For now |
22:21:01 | BlaXpirit | "primarily" 2D ? |
22:21:58 | Araq | BlaXpirit, Mat4 c2nim does translate function bodies as well |
22:22:14 | repax | I have an sdl2 wrapper with nicer names for procs and types (i.e. no T/P prefixes etc): https://github.com/repax/sdl2 |
22:22:19 | matkuki | Idlework: Good to know. How far have you come? |
22:22:23 | Araq | it's not perfect, but when you know its limitations you can convert thousands of lines easily |
22:22:37 | ldlework | matkuki: I've cloned Qix and I'm working on a Lights Out! clone with a friend |
22:23:00 | ldlework | matkuki: I'm working on my own little game library similiar to pygame |
22:23:13 | Araq | and I'm making it compile 'template' right now |
22:23:38 | BlaXpirit | ldlework, sfml..? |
22:24:15 | matkuki | Idlework: That's great. Keep it up! I'm currently working out the art direction for the game. |
22:24:36 | Araq | repax: put it on nimble |
22:24:51 | * | superfunc|busy joined #nim |
22:25:02 | repax | Araq, I've sent a pull req to dom |
22:25:16 | Araq | it's usually merged within a day |
22:25:17 | BlaXpirit | I do not see why "sdl2" is in standard library |
22:25:38 | Araq | BlaXpirit: graphics.nim uses sdl and is still in the stdlib |
22:25:47 | BlaXpirit | graphics, eh |
22:26:05 | repax | Hopefully, most libraries will move over to the new naming convention |
22:26:20 | ldlework | BlaXpirit: no, I'm not impressed with sfml, I use SDL |
22:26:31 | Araq | repax: that's already happening afaict |
22:26:46 | BlaXpirit | ldlework, what exactly are you not impressed with? |
22:26:51 | ldlework | BlaXpirit: the packaging for one |
22:27:02 | BlaXpirit | lol |
22:27:08 | BlaXpirit | what is wrong with packaging? |
22:27:18 | ldlework | there is none? |
22:27:24 | BlaXpirit | in my experience SDL has been much, much harder to get working |
22:27:26 | ldlework | you get some folders with the headers and libs in them |
22:27:31 | BlaXpirit | what do you mean "there is none" |
22:27:34 | ldlework | you have to install them by hand |
22:27:35 | matkuki | BlaXpirit: For now it's just 2D, maybe I'll add a depth of field element or something to it later. |
22:27:40 | BlaXpirit | ldlework, no..? |
22:27:40 | dtscode | BlaXpirit, i get sdl working pretty easily |
22:27:51 | ldlework | BlaXpirit: point to the debs I can install sfml 2.1 |
22:28:01 | ldlework | (official debs) |
22:28:24 | BlaXpirit | ldlework, lol you think everyone is supposed to make official debs for everything? |
22:28:43 | ldlework | BlaXpirit: I'll stick with SDL then |
22:28:48 | BlaXpirit | facepalm |
22:29:09 | BlaXpirit | that's like saying "i'll stick with Windows then" |
22:29:16 | flaviu | I'm using fsanitize, and the GC is causing a "stack-buffer-overflow" at lib/system/gc.nim:888 |
22:29:22 | ldlework | If you say so. Notice how I'm unmoved. |
22:29:42 | Araq | flaviu: how do you think conservative stack marking works? |
22:29:46 | * | dtscode is moved at ldlework's steadfast unmovingness |
22:30:00 | repax | You all move upwards on my screen |
22:30:02 | BlaXpirit | oh look, ldlework https://launchpad.net/~sonkun/+archive/ubuntu/sfml-stable |
22:30:10 | * | tane quit (Quit: Verlassend) |
22:30:15 | BlaXpirit | seems abandoned though -_- |
22:30:30 | ldlework | BlaXpirit: I don't think I'll be asking my users to install a PPA for a project that can't provide packages |
22:30:48 | BlaXpirit | ldlework, you can't be serious here |
22:30:59 | ldlework | BlaXpirit: you keep saying that, and yet I keep using SDL |
22:31:06 | Araq | ldlework: *we* don't provide packages |
22:31:14 | Mat4 | BlaXpirit: There are similar projects like this out there |
22:31:18 | BlaXpirit | why do you think a developer is supposed to make packages for every single distro? |
22:31:21 | ldlework | Araq: sure, but we're not even 1.0 |
22:31:23 | Mat4 | (even for C++) |
22:31:34 | ldlework | Araq: and you've asked people to do so |
22:31:38 | ldlework | so we're ahead of the SFML project |
22:31:40 | Araq | ldlework: in opensource land, few things are |
22:31:40 | ldlework | \o/ |
22:31:52 | BlaXpirit | ldlework, look, if your sh**ty distro doesn't have packages, that's nobody else's fault |
22:31:54 | ldlework | Araq: how does it feel to be ahead of the game? |
22:32:04 | ldlework | BlaXpirit: does your OS have packages for SFML 2.1? |
22:32:10 | BlaXpirit | yes |
22:32:16 | ldlework | neat which OS? |
22:32:23 | BlaXpirit | Arch Linux |
22:32:25 | ldlework | And who maintains them? |
22:32:40 | flaviu | ldlework: |
22:32:41 | Araq | ldlework: I don't know the opposite feeling. |
22:32:42 | flaviu | Sven-Hendrik Haase |
22:32:43 | dtscode | arch is really awesome about keeping its repos upto date |
22:32:48 | ldlework | Araq: ;P |
22:32:50 | BlaXpirit | https://www.archlinux.org/packages/community/x86_64/sfml/ Sven-Hendrik Haase |
22:32:51 | dtscode | Araq++ |
22:33:03 | dtscode | now if arch could just be more stable :/ |
22:33:13 | BlaXpirit | sorry for offtopic tho :( |
22:33:19 | flaviu | dtscode: You just aren't l33t enough ;) |
22:33:28 | ldlework | BlaXpirit: cool! I hope it works well for you. |
22:33:47 | dtscode | flaviu, probably :} i will admit to having lost entire arch installations on my hdd before |
22:33:57 | BlaXpirit | ldlework, you probably should go back to C++ though, because distros don't have packages for nim |
22:33:59 | dtscode | i did use manjaro though |
22:34:07 | ldlework | BlaXpirit: I'm not looking to distribute Nim |
22:34:09 | BlaXpirit | i don't know why i said "back" |
22:34:19 | dtscode | BlaXpirit, didnt ubuntu use to have a nimrod compiler package? |
22:34:25 | flaviu | BlaXpirit: Relax. He's not required to use your package if he prefers SDL. |
22:34:31 | ldlework | BlaXpirit: hey I have an idea, lets be a complete shitass |
22:34:48 | BlaXpirit | i'm just asking for any reason whatsoever why you prefer sdl |
22:34:56 | ldlework | BlaXpirit: and I gave you one |
22:35:00 | ldlework | did you ask so that you could combat me |
22:35:02 | ldlework | and put me down |
22:35:10 | * | saml_ joined #nim |
22:35:18 | ldlework | Or are you literally offended in CFML's place? |
22:35:42 | * | saml quit (Ping timeout: 265 seconds) |
22:36:47 | superfunc|busy | why you gotta keep ruffling feathers dude, just chill |
22:36:52 | * | adam_s joined #nim |
22:37:59 | ldlework | dtscode: this is a game I'm helping my friend write to help him learn how to use Nim: https://github.com/dustinlacewell/lights-out |
22:39:06 | dtscode | awesome. ty |
22:39:14 | ldlework | I don't remember where we left off, or if it is in a working state |
22:43:51 | flaviu | Is there a way to convert an exception to a string? |
22:44:18 | flaviu | Not getStackTrace, but to the same format that gets printed |
22:45:05 | * | vendethiel joined #nim |
22:45:38 | flaviu | auxWriteStackTrace isn't exposed anywhere :/ |
22:46:54 | * | tinAndi joined #nim |
22:48:45 | * | superfunc|busy quit (Ping timeout: 265 seconds) |
22:49:04 | Araq | flaviu: when I expose all the good stuff that is internally used people complain about the shitty API design :P |
22:49:27 | flaviu | Well, I guess `auxWriteStackTrace` isn't a good thing to expose. |
22:49:39 | Araq | see newException. was some internal helper, people wanted it badly |
22:49:53 | Araq | got exported and now we have better means and confused users |
22:50:04 | flaviu | but something like `$`(ref Exception) that returns the exception name, message, and stacktrace as a single string. |
22:50:22 | BlaXpirit | the main concern is bloating system module |
22:50:31 | BlaXpirit | people won't complain about separate modules |
22:51:00 | Araq | BlaXpirit: ldlework does just that. |
22:51:11 | flaviu | BlaXpirit: Exceptions are already part of system.nim, and `$` is just omitted functionality IMO. |
22:51:26 | BlaXpirit | well exceptions should be part of system |
22:51:35 | BlaXpirit | that's for sure |
22:51:59 | BlaXpirit | but defining `$` for exceptions in any particular way is not good |
22:52:23 | ldlework | Well I don't complain that system.nim is too bloated |
22:52:27 | flaviu | BlaXpirit: The way that the compiler outputs it on the console is the correct way to define `$` |
22:52:44 | ldlework | I just think that we could mitigate those who do thing it is bloated by refactoring everything to depend on the preamble rather than system.nim |
22:52:54 | ldlework | we can then break up system.nim into more focused modules |
22:53:08 | BlaXpirit | flaviu, I'd rather just see exception message and optionally type |
22:53:08 | ldlework | and not have to import basic string and sequence mainipulations |
22:53:56 | Araq | ldlework: that's however even this way for scripting langs: import os, os.path, re, sys |
22:54:18 | Araq | is my typical first python line |
22:54:24 | ldlework | I don't think those things should be in this preample |
22:54:28 | ldlework | note you don't do |
22:54:47 | ldlework | "import basic_string_features" "import things_that_make_sequences_minimally_useful" |
22:55:12 | flaviu | ldlework: Try out numpy |
22:55:21 | flaviu | that's what you end up doing |
22:55:24 | EXetoC | matkuki: only glGetString and glGetStringi have similar signatures in gl.xml, so let's hope those are the only mistakes |
22:55:25 | ldlework | flaviu: numpy isn't a language |
22:55:40 | EXetoC | matkuki: you could edit it directly via github if you want to, otherwise I'll fix it |
22:55:44 | ldlework | flaviu: numpy is a library for a specific collection of domains |
22:55:49 | ldlework | odd analogy |
22:55:59 | ldlework | This is a threshold question |
22:56:04 | ldlework | We already have things in system.nim |
22:56:09 | ldlework | and we already have shit in stdlib |
22:56:11 | matkuki | EXetoC: I already opened an issue. |
22:56:34 | ldlework | so there's already a line, I think our line is just *so ever slightly* crossed into the inconvenient zone |
22:56:57 | ldlework | Especially compared with default functionality in things like Python, or even modern system languages |
22:57:02 | EXetoC | matkuki: I don't see how that makes any difference, but I'm looking into it |
22:57:40 | ldlework | There's only a handful of things I'd move from sequtils and strutils into core, but there is the bloated argument, so my response is lets refactor the core. |
22:57:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:58:22 | BlaXpirit | Python probably would have more things imported by default, by an order of magnitude, if we actually considered how many methods every built in type has |
22:58:33 | BlaXpirit | but it's not a problem because documentation is logically separated |
22:58:44 | Mat4 | I think splitting the system module is advantageous. Possible in different levels of system support |
22:58:57 | ldlework | https://docs.python.org/2/library/stdtypes.html#string-methods |
22:59:17 | ldlework | While Python's string type does have about 2 dozen methods, they are all hardcore fundamental operations you want to do on strings |
22:59:24 | ldlework | And Python has a 'strutils' module too |
22:59:43 | BlaXpirit | no..? |
23:00:08 | ldlework | There are a couple I'd take off of Python's string type if I was redesigning PYthon in order to make this argument |
23:00:16 | ldlework | but only like 3 or 4 that seem like anachronisms |
23:00:33 | ldlework | BlaXpirit: no..? what? |
23:00:34 | * | BillsPC quit (Remote host closed the connection) |
23:00:35 | * | dtscode quit (Quit: ZNC - http://znc.in) |
23:01:02 | * | dts|pokeball joined #nim |
23:01:31 | BlaXpirit | I don't know any such "strutils" module, and there is no other module that is like nim's strutils |
23:01:50 | ldlework | https://docs.python.org/2/library/string.html |
23:01:58 | ldlework | BlaXpirit: better disagree before you're sure |
23:02:14 | BlaXpirit | just look at that module and what it defines -_- |
23:02:31 | BlaXpirit | I wasn't wrong, in any case |
23:02:31 | Araq | Mat4: splitting system.nim has been tried at least twice now. it's harder than it looks and at the end of the day doesn't help much. but ymmv |
23:02:34 | ldlework | Stuff that doesn't belong on the type? |
23:02:59 | EXetoC | matkuki: done |
23:02:59 | BlaXpirit | ldlework, it just defines string constants! |
23:03:07 | ldlework | BlaXpirit: and... several other things |
23:03:09 | ldlework | god you are lazy |
23:03:19 | ldlework | please stop participating in public debate until you can have a better attitude |
23:03:23 | ldlework | seriously |
23:03:39 | BlaXpirit | what other things are there that are not available without importing it? |
23:03:51 | ldlework | capwords? |
23:03:52 | BlaXpirit | just Template, it seems |
23:03:54 | ldlework | formatting? |
23:04:04 | BlaXpirit | formatting is available as a method of str |
23:04:09 | ldlework | all of the deprecated functionality ives there |
23:04:22 | ldlework | BlaXpirit: string.Formatter |
23:04:31 | matkuki | EXetoC: Great, thanks. |
23:04:37 | ldlework | BlaXpirit: this is what happens when you take a fundamentalist position, just to argue |
23:04:41 | ldlework | what the fuck is your actual position? |
23:05:58 | matkuki | EXetoC: By the way, when you say edit directly via github, what do I need to do? I'm haven't used github that much. |
23:06:27 | ldlework | EXetoC: when looking at files on github, there is usually an edit button nearby |
23:06:47 | * | superfunc joined #nim |
23:07:02 | EXetoC | *matkuki |
23:07:10 | ldlework | right, sorry :) |
23:09:11 | matkuki | I don't see the button. I see only "Raw", "Blame", "History" and a few others. |
23:09:30 | ldlework | matkuki: are you a contributor to the repo? |
23:09:50 | ldlework | matkuki: its the little pencil icon |
23:11:18 | EXetoC | not everyone knows what a pencil is anymore |
23:11:28 | ldlework | hehe |
23:11:58 | matkuki | Idlework: Oh I see. Sorry, I'm new to this. Got it for next time! |
23:13:30 | * | saml_ quit (Read error: Connection reset by peer) |
23:25:21 | * | saltylicorice joined #nim |
23:26:51 | Araq | hi saltylicorice welcome |
23:28:29 | * | z1y joined #nim |
23:28:59 | * | repax quit (Quit: repax) |
23:32:05 | * | z1y quit (Client Quit) |
23:36:57 | * | dts|pokeball quit (Quit: Leaving) |
23:37:50 | MyMind | I tried to compile aporia on os x and got: |
23:37:52 | MyMind | CustomStatusBar.nim(41, 24) Error: undeclared identifier: 'False' |
23:37:54 | MyMind | FAILURE: Execution failed with exit code 256 |
23:38:11 | EXetoC | matkuki: do you know about the automatic error checking? |
23:38:18 | * | dtscode joined #nim |
23:38:21 | EXetoC | for the opengl interface |
23:38:23 | Araq | MyMind: used aporia from github? |
23:38:32 | MyMind | nimble install aporia |
23:38:35 | * | dtscode quit (Remote host closed the connection) |
23:38:38 | Araq | should be fixed since a few weeks |
23:38:48 | matkuki | EXetoC: No, how does it work? |
23:38:58 | * | tinAndi quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0/20141125180439]) |
23:39:02 | Araq | maybe nimble doesn't use the latest commit but some "official stable" commit? |
23:39:14 | * | dtscode joined #nim |
23:39:15 | * | saltylicorice quit (Ping timeout: 256 seconds) |
23:39:24 | flaviu | MyMind: nimble install aporia@#head |
23:39:24 | MyMind | maybe |
23:41:18 | MyMind | flaviu: that command doesn't work on zsh it does on bash |
23:41:25 | EXetoC | matkuki: you call a gl function and don't think more about it |
23:41:33 | def- | MyMind: "aporia@#head" |
23:41:42 | EXetoC | it's actually a massive wrapper, created with the help of a macro |
23:41:43 | flaviu | MyMind: ZSH does something special with # iirc, just escape it. |
23:42:14 | MyMind | aporia installed succesfully |
23:43:12 | MyMind | could not load: libpango-1.0.dylib |
23:43:48 | matkuki | EXetoC: the "wrapErrorChecking" macro? |
23:43:53 | EXetoC | matkuki: yes |
23:44:11 | matkuki | I'm just now looking at the code. |
23:44:27 | EXetoC | I could've just done it without a macro since I was generating from the spec, but where's the fun in that? |
23:44:43 | Mat4 | have someone tried compiling Nim with Visual C ? |
23:45:02 | matkuki | EXetoC: :) |
23:45:05 | Araq | Mat4: iirc Demos at least does that regularly |
23:46:45 | Araq | and I'll do it in a few days too |
23:47:35 | flaviu | Is there a way to get the exception name other then casting? |
23:48:27 | Araq | flaviu: dunno, why is that so important? you cannot do much with the name |
23:48:47 | * | dtscode quit (Quit: ZNC - http://znc.in) |
23:49:07 | flaviu | Araq: unittest.nim's exception handling is inadequate. It's best to give as much information as possible to the user. |
23:49:29 | * | dtscode joined #nim |
23:49:51 | Araq | flaviu: unittest itself is inadequate |
23:50:04 | flaviu | Yeah, but at least it can give me a stack trace. |
23:50:23 | Araq | if brokenCode: writeStackTrace() |
23:50:27 | ldlework | :( |
23:50:42 | Araq | everything can give you a stacktrace, it's a simple call |
23:50:59 | flaviu | I still don't like it, but ok. |
23:51:23 | ldlework | Don't stack traces usually include what went wrong? |
23:51:38 | ldlework | Not just "someone called writeStackTrace from here --->" |
23:51:57 | Araq | ldlework: getStackTrace(someException) then |
23:52:14 | ldlework | Araq: ah okay |
23:52:28 | * | johnsoft quit (Ping timeout: 255 seconds) |
23:53:14 | * | johnsoft joined #nim |
23:55:12 | * | adam_s left #nim ("Leaving") |
23:58:18 | flaviu | Nice commit: https://github.com/flaviut/Nim/commit/7f02174ded35fc39f93657fbceb2a3dcd3885304 :P |
23:58:41 | flaviu | I have no idea what happened there |