#🍁・general-2

1 messages · Page 66 of 1

crimson yacht
#

Cool

#

This is so cute

upbeat osprey
#

ikrrrr

crimson yacht
#

Here we dont write to the students

#

Only in the final grade

#

Some comment

upbeat osprey
#

awwww

crimson yacht
#

Wait no

#

12 graders dont have comments

#

However i send them comments

#

One by one

upbeat osprey
#

acá tenemos un yearbook cada año y siempre hay espacio para que los profesores puedan escribir algo pa los estudiantes (y sus amigos) aunque creo que usualmente los profesores solo escriben cosas pa los de grado 12 jasjajs

upbeat osprey
#

es tan dulce de vos hacer esoooo

#

(puedo usar dulce en la misma manera en inglés así?)

crimson yacht
#

Especially to the good ones

upbeat osprey
#

q lindoooo

upbeat osprey
#

woo

#

graciasss

crimson yacht
#

Rosa you are so happy

#

Finally

upbeat osprey
#

jajsajasj sí es verdad

crimson yacht
#

Not a senior

#

Not a drop out

#

A

#

What are you now?

upbeat osprey
crimson yacht
#

An old teen?

upbeat osprey
crimson yacht
#

Here we have a name

upbeat osprey
#

a graduate?

crimson yacht
#

Bachiller

upbeat osprey
#

ohhh

#

bachelor

crimson yacht
#

yes

#

We call 11 th and 12 th grades bachillerato

upbeat osprey
crimson yacht
#

We use it in a different way

upbeat osprey
crimson yacht
#

Yes

#

But

#

Its for uni

#

Not high school

upbeat osprey
#

o

#

ya veo

#

okkk no sabía eso

#

entonces creo que solo usamos bachelor

crimson yacht
#

True

proper jay
#

Hola

gusty smelt
#

Hi

#

Hola

#

Anyone?

#

Hi?

cosmic moth
#

Hola

fading ibex
#

holi

cosmic moth
#

English ?

steel oasis
#

;u

merry riverBOT
#
Usage stats for smallbirdperson (Pajarraco 🐦)

Last 30 days

Messages sent M | W

1458 | 230

Activity score

3320 (?)

Top Channels:

#☕・general: 96.71%⠀
#🍁・general-2: 2.95%⠀
#💬¦Sala 2: 0.21%⠀

Time in voice chats

1h 32m

Most used emojis

😹 27 times
🔥 21 times
😭 21 times

Most used languages

Spanish: 63.1%
English: 36.9%

winter shadow
#

;u

merry riverBOT
#
Usage stats for chewfish

Last 30 days

Messages sent M | W

676 | 551

Activity score

1885 (?)

Top Channels:

#☕・general: 92.75%⠀
#🍁・general-2: 7.1%⠀
#📚・learning-resources: 0.15%⠀

Most used emojis

💛 27 times
👍 24 times
😭 21 times

Most used languages

Spanish: 74.0%
English: 26.0%

tardy locust
#

Hah!

strange bay
#

dammit

lucid junco
#

kdjss

frozen plaza
#

3rd

lucid junco
#

t@purge 6

lusty temple
#

\o/

grizzled hedge
#

6th

strange bay
#

no you're not

lucid junco
#

First

#

Flsksksks

median trail
#

/?

lucid junco
#

t@ban @tardy locust

#

confirm

exotic kiteBOT
#

info | I don't have enough permissions to ban JPablo 🍄🌽🍅🌱🐉#3968!

lucid junco
#

Finally

#

My own shitposting channel

frozen plaza
#

Why can't we just have lounge back?

grizzled hedge
#

Lol

#

This is basically general 2

strange bay
#

why did you even like lounge so much Toby

grizzled hedge
#

General 2

strange bay
#

i never saw you in there 😂

frozen plaza
#

I was in there all the time

strange bay
#

oh?

#

hmm

lucid junco
frozen plaza
#

"Ohana means family and family never gets left behind"

open glacier
#

que es esto

frozen plaza
#

"Shitposting"

lucid junco
#

posteando popis

open glacier
#

yo tengo ese juego

lusty temple
#

@open glacier esto es un canal para conversaciones específicas que interesen a muy pocas personas, y que se sostengan por un tiempo prolongado

open glacier
#

todas las conversaciones de spanish chat entonces

lusty temple
#

si yo quiero hablar de colonias de hormigas por una hora, entonces éste es el canal adecuado

lucid junco
#

Ha

#

Básicamente las conversaciones conmjgo

open glacier
#

que lástima

frozen plaza
#

¿podemos hablar de los papás?

lucid junco
#

😦

lusty temple
#

sí, claro que se puede. pero ya si quieres hablar de las propiedades químicas del yogurt, de la fermentación y todo eso...

#

entonces es mejor este canal 😄

lucid junco
#

x = “ay”

lusty temple
#

y que todo el mundo pueda entender

#

si hay necesidad de una conversación técnica, entonces ya es mejor este canal

lucid junco
#

Sabían

#

Que se puede hacer yogúr

#

Basado en fluidos vaginales

#

@open glacier

lusty temple
#

es en serio?

open glacier
#

el hecho de que lo escribas como "yogúr" me da más asco que yogurt hecho de jugo de concha

tender flicker
#

#

asco

#

si está bueno

#

al menos en el calor del momento

open glacier
#

khé

lucid junco
#

open glacier
#

jugos vaginales = orina

median trail
#

sen^2x+cos^2x = 1

open glacier
#

es un secreto que pocos hombres saben

lucid junco
#

jugos vaginales = incluyendo pero no limitados a tejidos, sangre, líquidos transparentes y orina

open glacier
#

el líquido transparente es, en su mayoría, orina

median trail
#

@lusty temple cual es la diferencia de un string y un arreglo?

open glacier
#

un string es un arreglo de chars

lucid junco
#

no

#

@open glacier eres orina

lusty temple
#

@median trail es lo que dijo @open glacier

#

un string es un arreglo de un tipo específico: char

open glacier
#

como estás con lo de la orina eh

#

me parece que has encontrado tu fetiche

strange bay
lusty temple
#

Jaja

open glacier
#

👀

lusty temple
#

yogurt hecho de fluidos vaginales 🤔

tender flicker
#

malo no puede estar

median trail
#

fluidos vaginales con sabor a tuttifrutti 😛

open glacier
#

yogurt de orina

tender flicker
#

no creo que sepa peor que la tarta de regla

open glacier
#

tarta de regla?

lucid junco
#

Me gustan las duchas amarillas

#

tarta de regla

open glacier
#

lluvia dorada

lucid junco
#

salsa marinara de mesntruacion

open glacier
#

marinara?

#

yesoques

lusty temple
#

ya veo que este canal abrirá paso a temas insopechados

#

lol

tender flicker
#

creo que algunos temas son como para llevarlos a no filter

lucid junco
#

salsa de spaghetti

#

Pero hecha con sangre de regla

#

Este canal se da para otros temas

tender flicker
#

salsa de mi spaghetto

lucid junco
#

Ya que es para temas oscuros

open glacier
#

a

#

regla como la mestruación

lucid junco
#

Reglas en mi cara

open glacier
#

en serio le dicen la regla

lucid junco
#

Ñam

open glacier
#

Ñ A M

tender flicker
#

lucid junco
#

Champiñaca

#

Programar la menstruación

lusty temple
#

@open glacier es común decir "la regla"

open glacier
#

no es común

lucid junco
#

@lusty temple tu que programas

open glacier
#

no en uruguay

lucid junco
#

Prográmate una peda

tender flicker
#

la gran mayoría de personas que se apellidan como tu @open glacier dicen "la regla"

open glacier
#

quoi

#

hay como 10 personas en el mundo con mi apellido

#

ni siquiera estoy exagerando

lusty temple
#

@lucid junco ¿por qué quieres eso?

lucid junco
#

@lusty temple porque es bonito y está bien

lusty temple
#

no sabía que se hablaba de sexo y relaciones con tanta naturalidad lol

open glacier
#

está bien

lusty temple
#

viendo eso, creo que hablar de programación o matemática ahí sería aún mucho más pecaminoso

open glacier
#

hay una araña chiquita que me está empezando a romper las pelotas caminando por la pared

#

qué dicen? la mato o no?

lusty temple
#

yo no la mataría

open glacier
#

bueno, pero te pregunto si yo la mato

lusty temple
#

no la mates

open glacier
lusty temple
#

violas un mandamiento de Moisés

open glacier
#

entonces como satisfago mi sed de sangre?

lusty temple
#

probando un yogurt de menstruación? 😂

open glacier
devout jacinth
#

bautizao

lusty temple
#

@devout jacinth "bautizao" ?

devout jacinth
#

es nuevo, tenía que bautizarlo

#

el canal

lusty temple
#

ahhh

#

😊

lusty temple
#

Demanda: Es la cantidad de un bien que los compradores están dispuestos y pueden comprar para cada nivel de precio del bien

#

de acuerdo a esa definición, para cada nivel de precio, hay una determinada cantidad demandada. parece claro que la demanda es una función del precio

#

en cambio, en las gráficas que veo en este libro, ponen el precio en el eje vertical y la cantidad en el eje horizontal 🤔

#

de acuerdo a esa definición al menos, tendría que ser al revés 😂

#

odio a los economistas casi tanto como a los psicólogos

#

bueno, siempre se puede decir que es una curva x = f(y), en lugar de y = f(x) que es lo "natural"

#

¯_(ツ)_/¯

strong timber
#

totalmente de acuerdo

lusty temple
#

@strong timber me alegra saber que no estoy loco 😅

strong timber
#

en realidad no he entendido mucho

#

:c

lusty temple
#

Y yo que esperaba apoyo 😢

strong timber
#

@gleaming vine @half geyser el Huawei Mate 10 lite

gleaming vine
gleaming vine
half geyser
gleaming vine
#

leeco

half geyser
#

Meizu

strong timber
lusty temple
#

@median trail si quieres, puedes preguntar por acá

median trail
#

ALFIN YA ENTENDI LO DE (CHAR *) hahaha

#

tengo una pregunta

#

como yo haría para que en un array que contiene un conjunto de letras lo pase a un puntero y este me imprima todo el conjunto del array

lusty temple
#

un array que contiene un conjunto de letras es interpretado como un string

#

std::cout << str

median trail
#

pero el puntero me lee lo que esta en la posicion 0 unicamente

lusty temple
#

lo imprime

median trail
#

tengo una pregunta es necesario usar un puntero para variables que contengan letras?

lusty temple
#

no, no es necesario

#

si tienes que manejar strings en C++, te recomiendo usar la librería string

torn jewel
#

oh i missed all this

median trail
#

@lusty temple GRACIAS! Coño necesitaba que alguien me quitara la duda, ahora voy a quitar esa mierda de mi codigo ya!

#

@lusty temple que es lo que falla aca?

#include <iostream>
#include <stdlib.h>

using namespace std;
            
    int main() {
                
        char m[40];
        
        m='hola';
        
                    
            cout<<m<<endl;
        
        system("pause");
        
            return 0;    
        
        
    }
#

aiuda

torn jewel
#

i havent used cpp in a long time but

lusty temple
#

hay varios errores

torn jewel
#

m = 'hola';

lusty temple
#

' ' es para char individuales

#

ahí deberías haber usado " "

median trail
#

ahhhhhh

lusty temple
#

por otra parte, deberías haber escrito char m[40] = "hola"

#

(todo en la misma línea)

median trail
#

no puedo asignarlo despues?

lusty temple
#

puedes asignarlo después, pero no en la forma en que lo hiciste tú, haciendo m = " " (un string dado)

grizzled hedge
#

Ooh, estamos hablando de programación?

lusty temple
#

por eso es mejor hacerlo en la misma línea

torn jewel
#

yeh son

lusty temple
#

@median trail de todas formas, vuelvo a insistir, no manejes strings como arreglos de char en C++

#

eso era así en C

grizzled hedge
#

En cuál lenguaje?

median trail
#

declaro un string y listo?

#

asi no exploto?

grizzled hedge
#

Oh c/c++

lusty temple
#

una de las grandes ventajas de C++ fue la mejora en el tratamiento de strings

#

usa la librería string

grizzled hedge
#

Is it wrong to put “” where you should put ‘’ like will it give you an error?

median trail
#

entonces ahora declarare strings en vez de un arreglo tipo char

#

asi no muero

lusty temple
#

@median trail yo diría que sí, a no ser que tengas que restringirte a C

#

pero si es C++, es mejor que te acostumbres a las buenas prácticas en C++

median trail
#

si declaro un string entonces no tengo que decirle un maximo cierto?

lusty temple
#

cierto

#

en tu struct seccion, declara los campos como strings

median trail
#

sip a eso voy

#

y voy a borrar lo del puntero del .write

lusty temple
#

he de irme a almorzar

grizzled hedge
#

Oh man no sé nada de c++

median trail
#

dale

#

gracias

lusty temple
#

vuelvo más tarde

#

de nada

median trail
#

estaba explotando duro

lusty temple
#

Jaja

torn jewel
#

Ryan you asked about single quotes and double quotes, and

#

it depends on the language, I havent used cpp in forever but

median trail
#

@grizzled hedge yo tampoco solo que en la uni me lo estan enseñando y bueno, ando creando un programa para meter palabras en ingles con su significado y luego poder leerlos sin necesidad de abrir un diccionario en internet

#

sino que mi programa lo abro y lo tengo a la mano mas rapido

torn jewel
#

single quotes are for single characyers i believe

#

double are for.strings

grizzled hedge
#

Oh okay, but does it give an error if you use them the opposite way?

torn jewel
#

i dont know whar your programming knowledge is though, and if youre.familiar witg strings

grizzled hedge
#

Oh cool edsel

#

Yeah

torn jewel
#

yea it should

grizzled hedge
#

Well I️ just know python and I’m pretty sure you can use both for whatever

#

In python that is

#

I️ use them in the way that you described just because it’s the convention

torn jewel
#

I'm working with clojure atm and i think both are.for strings, and chars are a backslash

grizzled hedge
#

Chars are a backslash?

torn jewel
#

yea weirdly i cant find the.backslash on this jap keyboard im usinv to demonstrate

#

/c woild be c,

#

but with a backslash

grizzled hedge
#

Oh I️ see, well in py you can do like \n and \t for new lines and spacing out the text

torn jewel
#

in an actual string that would

#

still be a newline

#

in code it would be the char n

grizzled hedge
#

Idk if I️ should learn js or c after python

torn jewel
#

python is pretty high level, c is pretty low, so id do that

#

get exposed to different sides of programming

#

of course, js has different things to offer than python as well

grizzled hedge
#

Which one looks better haha, which one has a nice aesthetic

torn jewel
#

but regardless, with c and python you can get both extremes

#

out of which

grizzled hedge
#

Js and c

torn jewel
#

Er a lot of languages are stylistically close to c, including js. I cant speak for aesthetics tho, I just know js is a frankenstein language

#

filled with all sorts of features (good and bad)

grizzled hedge
#

Huh right, I’m gonna have to get used to all those {}s and ;s hahaha

torn jewel
#

I think js allows it optionally but i forget

#

anyways c will show you a lot of the foundational things everything else is built on

#

its closer to the.metal, as they say

grizzled hedge
#

Right, I’d also like to eventually go way down and learn like machine language and assembly language

torn jewel
#

assembly is pretty much machine language, you just use text names for all the processor commands instead of its binary name (likewise some other things recieve text names)

#

000010 01 10 might become add $R1 $R2

grizzled hedge
#

Right

torn jewel
#

note that theres individual assembly languages for different processors, if yiu didnt know already

grizzled hedge
#

Yeah like I’ve heard of ARM

#

but I️ know there’s others huh

torn jewel
#

i guess.assembly is a.bunch of moving numbers around, and everything your device can do relates to putting the right number in the right spot

grizzled hedge
#

I’ve heard it’s extremely tedious lol

#

Because I️ mean working in binary, man it must be easy to get lost in your code

torn jewel
#

get lost in the sauce

grizzled hedge
#

Was this the 0 I️ was looking for or was it that 0

torn jewel
#

theres a lot of things you have to manage yourself and no protection from missteps

#

none of those thimgs bowling alleys have to keep your ball from the gutters

lusty temple
#

assembler es a los lenguajes de programación como lógica y teoría de conjuntos es a la matemática. sentí cosas parecidas

frozen plaza
#

.settopic #lounge reincarnated

#

t@settopic #lounge reincarnated

strange bay
#

*cocks pistol* think very carefully about what youre doing toby.

grizzled hedge
#

Toby, she’s the infamous kitty of the West, you don’t wanna mess with her 👀

lucid junco
#

cocks pistol

#

heh

#

pistola

#

i can do that too

#

cocks pistol 🔫

grizzled hedge
#

Nice water gun dew

#

Kappa

strange bay
#

it's real on discord

tender flicker
lucid junco
#

Thanks

lusty temple
median trail
#

@lusty temple porque esto me genera un bucle infinito?

void LecturaU(){

    ifstream lectura;
    struct info agregar;
    string texto;
    
    
    lectura.open("cedula.txt",ios::in);
    
    if(lectura.fail()){
        cout<<"No se ha podido abrir el archivo"<<endl;
        exit(1);
        
    }else{
        cout<<"Se ha abierto exitosamente"<<endl;            
    }
    
    if(lectura.is_open()){
        
        lectura>>agregar.nombre;
                    
    do{
        
    cout<<agregar.nombre<<endl;
    cout<<agregar.cedula<<endl;
    cout<<agregar.edad<<endl;
        
    }while(!lectura.eof());
    }
        
    lectura.close();
}
torn jewel
#

Lees una cosa desde "lectura" y despues creas un loop (bucle?) que esta vivo mientras !lectura.eof(). El problema es el bucle no afecta lectura, pues si lectura ya no esta "despues de eof (lectura.eof())" cuando el bucle empiece , la programa queda parasiempre en el bucle

#

estoy pensando que querias seguir leyendo lectura en el bucle hasta que "lecture.eof" fuera verdad?

median trail
#

si, quiero que me muestre los campos hasta que ya no haya nada para leer

#

y salga

torn jewel
#

tal vez querias "lectura >> agregar.nombre" a dentro del bucle?

#

si es el caso, solo hay que ponerla under (abajo?) de "do ❴"

median trail
#

pero como haria para que decirle al programa que me lea

#

y me lo muestre

torn jewel
#

oh i might be dced

#

sorry i didnt see any of your messages

#

i was disconnected or something

#

ok gonna read them now, sec

#

que esta adentro de lectura?

#

ahora estas leyendo nombres pero parece como tal vez haya dos mas cosas

median trail
#

dentro de nombres hay un nombre es decir un string

torn jewel
#

puedes copy y paste un poco del file?

median trail
#

voy

#

voy

lusty temple
#

@median trail sí, como dijo @torn jewel, tu problema es que no lees nada dentro del bucle

median trail
#

es que no le entendi

#

y como lo arreglo?

lusty temple
#

si no lees dentro del bucle, no hay forma lectura.eof() devuelva verdadero

#

entonces no sales de ahí

#

muéstranos parte de cedula.txt para ver cómo es el formato del archivo de entrada

torn jewel
#

gracias, es dificil explicar esto siquiera en el idioma nativo de uno, no se si estoy diciendolo claro en español

lusty temple
#

@torn jewel a mí me pareció bastante claro 🙂

torn jewel
#

ohawesome

lusty temple
#

@median trail tampoco me queda claro cuál es el propósito de tu programa... ¿debes lees un archivo e imprimirlo en la salida estándar? ¿de qué forma?

#

si vas a mostrar en pantalla lo mismo que lees, no le veo mucho sentido...

#

¿o debes guardar en una colección los datos de cada una de las personas?

median trail
#

lo que quiero es pedirle al usuario 3 datos

#

eso se guarda en un txt

#

luego

#

que se muestre en pantalla

#

pero la parte de mostrar en pantalla no se como hacerla

lusty temple
#

ahh, pero entonces no es necesario que leas del archivo

#

le pides al usuario los 3 datos

median trail
#

para que es un ifstream?

#

pense que era para eso

lusty temple
#

escribes en el archivo donde quieras guardar

#

y luego lo muestras en pantalla

#

ifstream es para flujos entrantes

#

para flujos salientes, es ofstreams

#

si lo que quieres es guardar en un archivo, necesitarás un ofstream

median trail
#

pero ifstream para que suele usarse? para mostrar en pantalla lo que hay en un archivo leyendolo?

lusty temple
#

no. para leer un archivo

#

luego con lo que leas, puedes hacer lo que quieras

#

ifstream es para leer

#

la i es de input

median trail
#

pero entonces para que en youtube lo suelen usar para mostrar lo que esta en el archivo?

#

es lo que quiero hacer pero

#

no caigo en como hacer para que el ifstream lea una casilla y luego a partir de eso se de cuenta que puede seguir leyendo y me muestre en pantalla

lusty temple
#

no entiendo por qué quieres leer del archivo cuando los datos se los pides al usuario

median trail
#

porque los datos los guardo en un txt

#

y quiero que halla una opcion de menu

#

en que pueda ver todos los usuarios ingresados

lusty temple
#

ah bien, eso es otra cosa

#

lo que tienes que hacer en ese caso es leer el archivo así como estabas haciendo, e imprimir cada línea

#

o, dependiendo del formato (si pusiste algún separador entre nombre, cédula y edad), imprimir cada uno de estos datos por separado

#

también, así como lo estás haciendo, tal vez te convenga mantener una colección de personas en memoria

#

y tener una opción de "guardar" en el menú

#

que persista esa colección en el archivo

median trail
#

guieme señor que no tengo ni puta idea

#

llevo creo que 1 semana aprendio c++

#

y a penas entendi lo del maldito puntero

lusty temple
#

sería bueno ver lo que tienes hecho, cuáles son las opciones de tu menú, con qué formato estás guardando los datos en el archivo, etc.

#

imagino que una persona por línea

median trail
#

voy

lusty temple
#

pero no sé qué formato tiene esa línea

median trail
lusty temple
#

Oh, ya veo

#

todo eso por lo que pregunto en realidad no lo has hecho aún

#

así que tendríamos que empezar por el bucle principal de tu menú

#

y qué opciones va a tener ese menú

median trail
#

bueno seria introducir/ver clientes

#

pero por ahora

#

me gustaria configurar lo de ver

#

me gustaria ver que ideas tienes para aprender y estudiarla

#

asi en un futuro ya se como hacerlo

#

porque tengo una idea por lo que he visto en youtube pero como te digo no me ha quedado claro

lusty temple
#

Ok. Yo haría un menú que fuera: a=add client; d=display clients; l=load clients from file; s=save clients to file; q=quit

#

y luego un prompt (que empiece con >), para leer uno de esos caracteres, a, d, l, s, o q

#

si no es ninguno de esos, mostrar un error, tipo no such option

#

@median trail ¿te parece bien?

#

tendría una colección de clientes (por ejemplo, un vector) en memoria

#

y la opción de agregar cliente, agregaría un cliente en ese vector

#

la de mostrar, recorrería el vector mostrando cada cliente

#

la de cargar desde archivo, cargaría ese vector en memoria con los contenidos del archivo

#

y la de guardar, persistiría esa colección de clientes, en un archivo cuyo nombre se pase como parámetro o la interfaz lo pida

median trail
#

haha me parece bien pero si queires solo ayudame con lo de ver lo que guardo para que no estes haciendo tanto codigo n.n

#

@lusty temple

lusty temple
#

@median trail hago un esqueleto de cómo podría ser y luego vemos cada opción

median trail
#

okay, gracias por ayudarme n.n

lusty temple
lusty temple
#

@median trail ¿te sirvió el esqueleto?

median trail
#

ay disculpa no lo habia visto

#

voy

lusty temple
#

Jeje no hay problema

median trail
#

ya lo vi y me da error en invalid_argument porque me dice que no esta declarado

#

guau no entiendo nada de tu codigo porque usas cosas que no he aprendido pero me pondre a aprender

lusty temple
#

hmm prueba agregar #include <stdexcept>

median trail
#

haha se ve bastante lindo

#

si me sirve

#

me pondre a estudiarlo

#

porque no se de vectores aun

lusty temple
#

está incompleto además 😂

#

está para que lo rellenes

#

la parte por la que preguntabas, vendría a ser load()

#

ahí hay que leer un archivo "cedulas.txt"

#

y cargar el vector con los clientes definidos en ese archivo

#

para eso hay que ver con qué formato vas a guardar los clientes

#

tal vez podría ser una línea separada por ";"

#

o sea, cada atributo separado por ";"

median trail
#

tengo que ponerme con vectores pero si lo usas es porque debe ser mejor que lo que he hecho asi que gracias por ayudarme a ampliar mis fronteras

lusty temple
#

hay muchos contenedores para guardar objetos de distinta clase

#

busca información sobre STL

#

Standard Template Library

#

vector es un template muy importante en C++

#

de hecho, el creador de C++, Stroustrup, dijo una vez:

#

If you understand int and vector, you understand C++, the rest is 1400 pages of details.

#

lol

lusty temple
lusty temple
#

Jaja muestra mi imagen de perfil en Github que es el mismo pierrot que está conmigo en la imagen de perfil que tengo acá

lusty temple
#

@median trail viste mi último mensaje?

median trail
#

Ay no lo habia visto, ahorita me pongo con eso que ando cambiando de telefono 😃

lusty temple
#

🙂

torn jewel
lucid junco
iron hinge
#

lol

austere heron
#

i saw it in the video pewdiepie xD

grizzled hedge
#

Lol

median trail
#

22307 lol

somber vortex
#

Haha

lusty temple
#

no entendí bien el meme

#

hay muchos tests... ¿pero eso qué significa? ¿que los hombres son inseguros?

#

no entendí bien el chiste

median trail
#

los hombres quieren que le compile el codigo

torn jewel
#

"guys always want one thing and its disgusting" es algo muchas chicas dice aqui, o sea es un estereoyipo

lusty temple
#

entiendo

torn jewel
#

oh

lusty temple
#

pero todavía no comprendo bien qué tiene que ver eso con la imagen de abajo

#

@torn jewel you can say it in English if you want. I think this channel doesn't have any official language

torn jewel
#

oh ok

#

Im still trying to think on how to explain it

lusty temple
#

take your time 😃

torn jewel
#

(brb)

somber vortex
#

Hi?

torn jewel
#

it makes you think its going to talk about guys only wanting sex, but then it surprises you with " guys just want their code to compile"

lusty temple
#

ohhhh I got it

#

it makes sense now

#

thanks, @torn jewel

torn jewel
#

np

lusty temple
#

I have a similar meme

#

that is hilarious...

lucid junco
#

@lusty temple la primera foto implica que los hombres solo quieren una cosa y es disgustante (lo cual implica que los hombres solo quieren sexo)

#

Entonces la segunda es un “ejemplo” de eso a lo que ella se refiere

#

Oh

#

He llegado tarde

lusty temple
#

Sí, gracias 🙂

lucid junco
#

No hay problema 😃

lusty temple
#

"Le pedí espacio y tiempo... y me regaló hosting por un año" lol

lucid junco
#

¿Le entras al HTML?

lusty temple
#

hace bastante que no toco HTML; no trabajo en la parte frontend

lucid junco
#

ah

#

que otros lenguajes has tocado?

#

Has usado Python?

lusty temple
#

lucid junco
#

Hm...

#

Que tal FiM++

lusty temple
#

no

devout jacinth
#

este debería ser el canal computín

fast swan
#

si

grizzled hedge
#

If you’re looking for a good python resource, I️ highly recommend this book, and also keep an eye out for similar books like this also, (I️ believe there’s a java script book that I’m getting for Christmas) Python Crash Course: A Hands-On, Project-Based Introduction to Programming https://www.amazon.com/dp/1593276036/ref=cm_sw_r_cp_api_SOjhAbWH5GBEX and join a good python discord server

torn jewel
#

Get into a lisp like Clojure when you can, itll change your vida

loud pilot
#

why you wanna learn javascript ryan?

torn jewel
#

probably likes Satan or something, /shrug

lucid junco
#

to code a box that calls you stupid everytime the cursor hovers over it.

grizzled hedge
#

Loool idk it’s used in a lot of things

lusty temple
#

looool javascript is a nice and lightweight programming language though

loud pilot
#

yeah but almost everyone uses it for web stuff, you should take a look a c++ or java first learn the oop paradigm and later when u wanna start tackle web learn it together with a backend lingo like php plus the concepts of how internet works to make good use of em, cause honestly imo you won't get a solid foundation with js, my tree fiddy there lol

grizzled hedge
#

Well python is object oriented

loud pilot
#

are u working with classes already?

grizzled hedge
#

Yeah

loud pilot
#

cool go far with it python

#

explore js and check how they implement oop lol

#

there's not really oop

grizzled hedge
#

Yeah, I️ was reading about it and I️t said like js doesn’t have classes?

loud pilot
#

yup

grizzled hedge
#

Hm and it’s still considered oop, that’s pretty interesting 🤔

#

Oh lol you’re zam

loud pilot
#

it has objects it's difficult to explain

#

LMAO

#

but you should check at how python java and c++ implement OOP

#

I would recommend c++ if you wanna learn it full

#

or let's not be too traditional try c# or ruby

grizzled hedge
#

Yeah I’ll either do c++ or Java, hm I️ don’t know anything about ruby, its object oriented?

loud pilot
#

yup

#

but stuff it's a little bit different

#

the most similar in their syntax are java c# and c++

#

but making a statement like that would trigger someone lol, but you get my idea

grizzled hedge
#

Jaja right

loud pilot
#

I really recommend you to keep python as an introduction language to OOP

#

and then tackle c++ where you have to deal with more stuff that OOP implies

#

stuff that in languages like python or java is abstracted from you and automatically handled

grizzled hedge
#

Mmkay

loud pilot
#

but feel freee to check everything

#

see it for yourself

#

curiosity is power

lusty temple
#

Perl doesn't have classes either. To create an object you must bless (yeah, Larry has a nice sense of humor 😅 ) a reference

loud pilot
#

lol

#

I have never touched pearl before

#

it handles stuff like the rest of the high level lingos from what u said

cursive wave
#

dont go for Java!!!1

#

(i personally dont like java but its good to learn oop with it)

loud pilot
#

me neither lol

lusty temple
#

Java is a language that everybody loves to hate. Perl is one of those too so I sympathise with Java lol

cursive wave
#

I think i might have to learn python soon tho

#

the company i work for might want me to do some programming for them in python

lusty temple
#

Aparte from that, it's pretty good

#

I hope one day Perl 6+MoarVM could replace Java+JVM but nowadays that sounds like a dream

dreamy hull
#

@iron hinge estas ahi?

#

soy yo francis de sicily

#

cambie de profil

iron hinge
#

hey que pasa

dreamy hull
#

quiero oir tu voz para ver si suenas como homero x)

iron hinge
#

xxD

dreamy hull
#

ah nooon perdon

#

peter de padre de familia jajajaa

iron hinge
#

estoy seguro que hay peores fomas de preguntarlo xd

#

pero ahora mismo no se me ocurre ninguna

dreamy hull
#

jajajaja

#

que onda?

grizzled hedge
#

@cursive wave python is awesome, and so beautiful and pythonic, you’re becoming a computational linguist right? I️ know in natural language processing and computational linguistics they use python for like NLTK and stuff, that’s mainly why I️m learning python

dreamy hull
#

de donde eres @iron hinge

cursive wave
#

Yea i know theres somereally good libraries for that stuff in python thats another reason why i want to learn python

lucid junco
#

@cursive wave you might want to look FiM++

#

No libraries because it’s as lightweight as can be

cursive wave
#

no!

#

lol

#

seems more like an esoteric language

lucid junco
#

It is lol

#

It’s a language based on My Little Pony

cursive wave
#

yep

#

i looked it up

#

i aint getting my hands dirty on that

lucid junco
#

Ever program starts as a letter to princess Celestia

#

Like in

#

Oh

#

Wow

#

You’re mea

#

n

cursive wave
#

i know i am

lucid junco
#

Esoteric language = Conlang

cursive wave
#

pretyy much yea

lucid junco
cursive wave
#

but for programming languages

lucid junco
#

Indeed

#

What a nice guy

#

I started with Javascript then i moved onto C++

#

@grizzled hedge

cursive wave
#

i did c++ then moved to java

lucid junco
#

Oh wow

#

I made some pretty nice plugins for websites

grizzled hedge
#

If you’re going into anything with computer science you have to learn lolcode in order to even understand what “coding” is

lucid junco
#

Coding is glory

cursive wave
#

lol

lucid junco
#

To the hell with Python

#

I’ll do it the old way

#

10110010101010-01010011001

grizzled hedge
#

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

#

Lol

lucid junco
#

STDio

#

😮

grizzled hedge
#

😮

lucid junco
#

Dear princess celestia

#

Today i learned about hai world

#

That’s all about hai world

#

Your faithful student, Dew

#

I got it wrong but my fingers are we

grizzled hedge
#

KTHXBYE

cursive wave
#

KTHXBYE

lucid junco
#

Lolcode is the de facto introductory language

cursive wave
#

😂

grizzled hedge
#

Lol

lucid junco
#

Bill Gates started there

cursive wave
#

but theres always brainfuck

grizzled hedge
#

Oh jeez

cursive wave
#

isnt that what its called

grizzled hedge
#

++++++++++[>+++++++>++++++++++>+++<<<-]>++.>+.+++++++
..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.

cursive wave
#

yep

#

lol

grizzled hedge
loud pilot
#

let's create or own

cursive wave
#

lol

loud pilot
#

it's not that hard

cursive wave
#

no thanks

loud pilot
#

you just need a gramatic and we could start from there

grizzled hedge
#

A completely spanish programming language

loud pilot
#

lmao

#

that would be so funny

#

with latino references

grizzled hedge
#

Jaja

lucid junco
#

One of my friends created his own version of Final Fantasy using scratch

#

It was so weird

#

Fierro pariente{

#

Termina con “eso es todo wey”

grizzled hedge
#

Lol naiiis

lucid junco
#

I’m afraid i lack the neckbeard required for this

grizzled hedge
#

Oh guys bitcoin is going up 😮

median trail
#

@grizzled hedge yes, a cousin told me yesterday to start investing in bitcoins cause they're always going up also he told me it's a good business so far.

grizzled hedge
#

Ah yeah man, I️ put in 70 dollars in March or so and I’m up to 800 now with bitcoin cash, and also I’ve made about 100 dollars in ethereum and 100 dollars in litecoin, and I’ve been investing in some small crypto currencies that look promising (small amount in circulation and low price)

median trail
#

waaaaaaaaaaat

grizzled hedge
#

Like if you can find some good small crypto currencies for like 30 cents/1 you can put in like 5 bucks and get a bunch and if it skyrockets you make a bunch of money and if it doesn’t you just lose like 5 bucks

#

Small input infinite return

median trail
#

wow

#

what does get a bunch means?

grizzled hedge
#

Un montón de

#

You can get a bunch of that crypto currency, like 5 bucks can get you around 16.6 “black coins”

median trail
#

ahhh i got you now

#

@lusty temple estas por ahi?

lucid junco
#

No

#

Pero yo sí

#

@grizzled hedge i remember back when bitcoin was like 400 USD

grizzled hedge
#

Yeah ugh I️ wish I️ woulda bought then, my bro probably bought around there....I️ bought at about 940

#

Imagine if you bought at like 1 cent

#

Bought like 100

frozen plaza
#

:'( I should have bought a few thousand

grizzled hedge
#

You still can because it’s gonna go up to a million and then you’re gonna be like “I️ wish I️ bought at 10000” jaja Yeah I️ mean even if you put in just a bit, it’s better than nothing... it’s fun just to see how it goes

frozen plaza
#

I have no moneyz

grizzled hedge
#

It’s just gone up like crazy, people were freaking out at the 1000 mark and now it’s around 10000

loud pilot
#

where can I invest on bitcoin ? @grizzled hedge

grizzled hedge
#

You can do it on Coinbase it’s the most common way, and I’d suggest getting a wallet too... I️ like “copay”

#

On Coinbase you can get bitcoin, litecoin, and ethereum

#

They both have apps too, coinbases system is a bit annoying, but it works, and everyone uses it

#

Just do some research on it first and make sure you’re being safe and all that

#

If you want to buy other types you have to look on an exchange like Bittrex and then get a specific wallet by looking on their website, but for just bitcoin I’d just look for Coinbase and some good wallet like copay, it has you write down a code of 12 words and that’s how you can log into your wallet into different devices, because the wallet actually is on your hard drive but just like back up the wallet onto two devices or so just in case

#

Also you can learn a lot too by just going to the bitcoin subreddit too

#

Yeah multisignature wallets are good, so look for those

#

I’m personally looking at buying blackcoin, it’s only 30 cents and has a pretty okay market cap

#

A lower market cap means higher scarcity which means higher value

frozen plaza
#

I'm thinking of possibly mining eventually

grizzled hedge
#

Oh that’s cool, Yeah I️ would like to as well

#

Its so hard to explain bitcoin to people

median trail
#

@lusty temple noticeameee

#

tengo unas dudas

grizzled hedge
#

I️ was lucky to have my brother explain it all to me, without him eek it would be confusing af

lusty temple
#

@median trail ¿qué dudas?

median trail
#

me esta pasando algo cuando guardo algo dentro de variables

#

que cuando lguardo informacion y el programa me lo escribe en un .txt me pone caracteres raros

#

y segundo que yo pido diferentes datos de entrada usando en cada uno de ellos este comando "getline(cin,variableejemplo);" pero no se que pasa que no me lee el getline de la 3era informacion que pido aunque anteriormente puse un "cin.ignore();"

#

eso @lusty temple

lusty temple
#

consume (ignora o descarta) un caracter

#

no sé si eso es consistente con lo que quieres hacer, pero podría ser la causa de ese comportamiento anómalo que dices

lusty temple
#

sobre lo primero, que ahora releyendo me di cuenta que no contesté, depende también de la terminal. si estás usando el símbolo del sistema de Windows (cmd) entonces si introduces tildes o eñes, etc. seguramente tendrás problemas

median trail
#

ahorita lo leo

#

okay pero lo de cin.ignore que deberia hacer?

#

para usar varios getline?

lusty temple
#

no uses cin.ignore()

#

getline(cin, string1) captura en string1 la primera línea introducida

#

a continuación, getline(cin, string2) captura en string2 la segunda línea introducida

#

y así...

#

(por cierto, si hay algún inglés leyendo y así... es el equivalente a and so on...)

median trail
#

@lusty temple

lusty temple
#

Lo veo bien

median trail
#

el detalle es que el programa se me bugea si lo pongo asi haha

lusty temple
#

qué quieres decir?

median trail
#

pasa esto

#

sino el segundo

#

@lusty temple

lusty temple
#

seguro que no tienes nada antes de eso?

#

si el programa fuera sólo esas líneas que digo, no debería pasar eso

median trail
#

te muestro

#

eso de seccion palabra; es porque tengo un struct que se llama seccion

#

y me guarda 2 variables tipo string llamadas agregar y descripcion

lusty temple
#

bien, ahí hay varios problemas.

#

en primer lugar, te faltaría mostrar la definición del struct

#

¿los tres son strings?

median trail
#

si

lusty temple
#

agregar, descripcion y comentario?

#

entonces son tres strings, no 1

#

perdón, 2 (que fue lo que dijiste)

median trail
#

aja 3 disculpa

#

los 3 son string

lusty temple
#

los errores que iba a señalar están relacionados a la forma en que haces el write sobre el archivo (que son los responsables de que veas caracteres extraños en el .txt)

#

pero aún así, a partir de ese código, no veo motivos para que getline no se quede esperando a que escribas el primer dato

#

tendríamos que ver qué hace el programa antes de que se llame a agregarpalabras()

median trail
#

@lusty temple

#

yo antes de tener 3 getlines tenia 2 y con un cin.ignore(); lo arregle

#

pero con 3 getlines no me funciona

lusty temple
#

system("cls"); yo entiendo que haces eso para "limpiar la pantalla" pero en general evita usar system. enlentece el programa muchísimo y está mal visto llamar a un programa externo

#

lo mismo con el system("pause") que he visto por ahí

#

(esto al margen de tu problema)

median trail
#

okay okay

#

lo que pasa es que me parecia lindo

#

la funcion de system("cls")

#

pero okay

lusty temple
#

el error está en que cuando haces cin>>op ahí la opción queda guardada en el arreglo de caracteres op pero queda \n sin consumir

#

entonces el primer getline no se detiene

#

el primer caracter ya es \n

#

(en Windows sería en realidad \r\n, pero lo que ocurre es lo mismo)

#

@median trail

#

luego de cin>>op hace falta un cin.ignore(16, '\n')

#

hago una pequeña rectificación: donde dije "el primer caracter ya es \n" no es necesariamente cierto, porque la entrada podría haber sido "A \r\n"

median trail
#

Ya te leo que ando haciendo algo ^-^

lusty temple
#

en ese ejemplo op se setea con A y en el buffer de entrada queda " \r\n"

#

el primer getline consume eso

#

y por tanto no se queda esperando

#

el campo agregar de tu struct en ese caso queda con un montón de espacios

#

ok. yo debo irme. o/

median trail
#

@lusty temple graciaas! me sirvio mucho! ahora tengo que ver como arreglo lo de los caracteres raros

lusty temple
#

@median trail ¿solucionaste lo de los "caracteres raros"?

#

el problema con eso es que estás usando write()

#

eso guarda un lote de bytes que empieza en el puntero que se pasa como argumento

#

en tu caso, escribes los bytes del struct

#

pero obviamente, ahí van a estar los strings, y también metadatos que se usan asociados a esos objetos

#

lo que tienes que usar es el operador de inserción <<

somber vortex
#

Are we coding again?

fast swan
#

we always coding boys

somber vortex
#

It's great until something stops working for no reason

lusty temple
#

espero que aclare 😛

#

en tu caso, pasa igual... sólo que escribes los bytes de un struct en vez de los de un float

#

por eso se ven "caracteres raros"

#

esos caracteres raros no son más que los bytes (interpretados en ASCII, o depende en realidad de qué editor de texto uses y cómo esté configurado) del struct que pasaste como argumento a write()

#

en mi ejemplo, definí float f = 13131313 cuya representación en punto flotante de simple precisión (32 bits), es 01001011 01001000 01011110 00110001

#

si interpretas cada byte (grupo de 8 bits) como un caracter, tienes que es "KH^1"

#

eso es lo que se escribe en el archivo, y lo que muestra el editor cuando lo abres

#

en mi caso, es eso pero al revés "1^HK" porque mi arquitectura es AMD64 (que es x86_64), y por tanto little-endian

#

si la tuya fuera big-endian, sí te queda al derecho

#

el método write no deberías usarlo, salvo que quieras guardar un lote de bytes sin ninguna "interpretación" (raw bytes)

#

no son caracteres "raros", son los correspondientes a los bytes que mandaste escribir 😊

torn jewel
#

estoy aprendiendo muchi español desde estas conversaciones blobeyes

#

todo esto de bytes me hace pensar en mi gameboy emulator que escribi en Haskell

lusty temple
#

esto es lo que me gusta de C++...

#

uno puede llegar a nivel de bits directamente

#

en este caso, estamos discutiendo cosas a nivel de ceros y unos

#

es un lenguaje muy potente, orientado a objetos, pero uno puede bajar tanto de nivel hasta llegar a bytes y bits...

torn jewel
#

oo (no he terminado leyendo, es un poco mas dficil leerlo para mi)

#

si, iba a decir que

#

usyalmente no se piensa en Haskell cuando piensas de programas que

#

se .. manipula?los bytes

lusty temple
#

En Haskell, lo más parecido a un byte es un Word8

torn jewel
#

y los libraries que use fueron menow usado y conocido pero

lusty temple
#

y ByteString puede manejar un stream de bytes como una lista de Word8 ([Word8])

torn jewel
#

siquiera sus maneras de manipular la nivel bajo

#

me sentia muy elegante y stress free

lusty temple
#

🙂

torn jewel
#

te da peace of mind escribir algo con el tipo "Get GameboyInstruction"

#

y el tipo solo te dice que

lusty temple
#

ahh, sí. entiendo lo que quieres decir. you're saying that in Haskell, looking only at the signature of a function, you can infer what that function actually does

torn jewel
#

yea im lagging out btw

#

thats why im typong in fragments

lusty temple
#

bueno, lo que dije antes (a pesar de todas las erratas typos que cometí)

#

viva el spanglish lol

torn jewel
#

shit usual i lag less

#

iba a decir que especificamente, el tipo Get me da peace of mind porque

#

usualmente con leyendo bytes o strings y tratando de traducir a un tipo

#

hay pocos errores que pueden fuck you up

lusty temple
#

yeah

torn jewel
#

the Get GameboyInstruction though guaranteed to read an.instruction from bytes

#

it somehow felt so elegant and stress free

#

and safe

#

you can interpret bytes as anything, thats a lot of ways to fuck up normally

#

Haske es un placer

lusty temple
#

Haskell is incredibly safe. This is mostly due to it has one of the most advanced type systems out there, and also because of impure code is isolated in functions that deal with monads

torn jewel
#

I love the idea of the IO monad

#

Im not sure why but something abouy

#

isolating all the impure code

#

always being conscious of when youre using it

#

you cant accidentally have side effects and

lusty temple
#

Yes, it's a great idea

torn jewel
#

you cant accidentally modify impure valuez

#

theres more i liked but i forgot

#

i wrote a whole monad library for clojure but

#

i havent used them a whole lot

#

in clojure at least

#

i use them plenty in haskell

#

do you know much about lenses

lusty temple
#

no, lenses is actually one of the topics I have to study for an exam but I haven't studied it yet lol

torn jewel
#

oh do you have a fp class or something? my school had no creativity and never touched any topic like that

#

we just had a class on the paradims, we didnt even get a class just for functional p

lusty temple
#

yes, I already had a subject called "Functional Programming"and then (this past semester) I had one whose name was "Advanced Functional Programming". That's the one I still haven't taken the exam (it's on 8th December).

torn jewel
#

what school?

lusty temple
#

I told you by pm

lucid junco
#

I wanna know too

near robin
#

a mi no me dijiste tampoco jaja

lucid junco
#

Jaja salu2

cursive wave
#

any of you guys running a debian distro?

grizzled hedge
#

Ooh btc is above 10000!!!

south crane
#

i almost bought 1 bitcoin when it was worth 683 dollars

#

and then

#

i was like

#

"nah"

grizzled hedge
#

Dang nice, I️ just put in $70 around 940 and I’m up to about 838, I️ wish I️ just out in a bit more lol

south crane
#

i should have invested

#

back then I was into the dark net and was looking at the silk road a lot (morbid curiosity)

#

and everything was inbtc

#

so I was like "hey maybe I should buy one of these"

#

"nahhh theyll never actually be worth anything"

grizzled hedge
#

Haha oh man hindsight is 20/20

south crane
#

ye

lusty temple
#

@median trail viste mi mensaje?

median trail
#

@pierrot#2200 si lo vi y muchas gracias

somber vortex
#

¿Es sí en lugar de si, no?

median trail
#

@lusty temple mira porque en tu codigo colocaste out.write((char*)&f, sizeof(float))

#

Porque ahi va float en vez de f

lusty temple
#

No, es f

#

Tal vez quieras decir por qué no puse sizeof(f)

#

Es lo mismo, va a dar 4 en ambos casos

#

@somber vortex sí, es con tilde

lucid junco
#

@lusty temple

#

Huh

#

Oye eso fue accidental

#

No sabía que podía pingear

lusty temple
#

😅

lusty temple
#

@median trail no sé si lo arreglaste lo de los caracteres extraños. yo te aconsejo que sobrecargues el operador <<

#

o si no, que uses << sobre cada uno de los strings que componen el struct

#

pero lo primero es más elegante

#

podrías haber tomado ideas de mi ejemplo del otro día, ya que algunos errores que tuviste, ya estaban solucionados ahí

median trail
#

hey si vi lo del << y mande un mensaje no se si llego, pero me sirvio gracias!!!

jagged folio
open glacier
fast swan
#

simpsons en 2094

open glacier
#

no ese es homero thanompson

grizzled hedge
#

Lol

south crane
#

@grizzled hedge since you're learning python you might be interested in a script I wrote. I was in a lot of fb groups so I wrote this to auto remove me from them

median trail
#

what is that video about?

south crane
#

it autoremoves me from fb groups. written using python

#

using win32.api

median trail
#

loooooooooool

#

can i do that in c++?

south crane
#

I don't think c++ is a scripting language but I'll look into it

#

bom

#

boom*

grizzled hedge
#

Oh haha that’s cool

lusty temple
#

@median trail quieres borrar algo de un archivo?

median trail
#

si

#

pero pense que bueno hago una funcion que me pase la info que quiero borrar a un archivo que tiene de propiedad ios::out

#

pero no se como desaparecer esa info del archivo que no se borrara

lusty temple
#

primero léelo, modifica lo que quieras modificar, y luego escribes el contenido modificado

median trail
#

pero es que no modifique nada, solo hice que la info que quiero borrar se copie en un archivo que se borrara pero el archivo que no se borrara aun tiene la info porque no se como quitarla de ahi

lusty temple
#

¿qué archivo es? ¿qué quieres modificar?

median trail
#

basicamente lo que quiero es que la info del archivo que no se borrara pase al archivo que si se va a borrar

#

pero no se como hacer

lusty temple
#

no entiendo muy bien. ¿dices que copiaste el contenido del archivo que quieres borrar a otro temporal?

median trail
#

no le pares a lo que te dije anteriormente

#

solamente quiero pasar la info de un archivo que no se borrara a otro que si se borrara

#

de manera que asi borro la info

#

o como deberia borrarla?

lusty temple
#

Yo lo haría así:

#
  1. abro para lectura el archivo al que quiero borrarle algo, digamos foo.txt
#
  1. abro para escritura un archivo temporal (temp.txt), que va a tener el contenido de foo.txt pero modificado
#
  1. con un bucle leo el contenido de foo.txt línea por línea y lo copio a temp.txt modificado, si es que esa línea tenía que ser modificada
#
  1. pregunto confirmación al usuario (o no, dependiendo de cómo lo quieras), y si me confirma, renombro temp.txt como foo.txt sobreescribiendo la versión vieja
median trail
#

para que renombrar?

lusty temple
#

entiendo que lo querías modificar

median trail
#

exacto pero no hay una manera de simplemente pasar esa linea del archivo original al temporal?

lusty temple
#

no está definido qué quiere decir "pasar"

#

imagino que te refieres a copiar línea por línea de un archivo a otro

#

es el paso 3) de lo que dije antes

median trail
#

okay pero y como elimino esas lineas del archivo original?

lusty temple
#

no las eliminas en realidad... sino que haces un archivo nuevo que al final lo renombras como el original sobreescribiéndolo

#

(sin las líneas que querías borrar, o con las modificaciones que necesites)

median trail
#

no entiendo..

#

entiendo pues

#

pero me refiero

#

tengo que cambiar el codigo entonces o no se que hacer

#

ahora se crearia 1 archivos mas entonces?

lusty temple
#

¿qué es lo que no entendiste?

median trail
#

no me quedo claro eso del archivo nuevo que sera el que le copie todo lo demas que no sera borrado

#

no se me ocurre como hacerlo

lusty temple
#

declaras ifstream original("foo.txt") (éste es el flujo entrante). luego ofstream copy("temp.txt") (flujo saliente)

#

luego lees línea por línea usando original

#

y vas copiando a copy

#

si la línea tiene una palabra, por ejemplo, que quieres borrar

#

ésa línea no la copias

#

de esa manera la habrás "borrado" en el archivo temp.txt

#

al finalizar el bucle, renombras temp.txt como foo.txt

#

de forma que al final foo.txt no tendrá lo que querías borrar

#

es lo que dije en los pasos 1) a 4), pero un poquito a más bajo nivel (de abstracción)

#

bajar más es prácticamente escribir el código 😊

median trail
#

estoy intentando comprender espera...

#

okay

#

unapregunta

#

como renombro un archivo?

#

@lusty temple

#

ya entendi

lusty temple
#

ni se te ocurra usar system 😛

median trail
#

porque con el ! no me niega esa condicion

#

no se commo hacer para que me copie los demas que no sean las palabras que quiero eliminar

lusty temple
#

que la condición es !(palaba_eliminar==palabra.agregar)

#

faltan paréntesis

median trail
#

yo hice esto

#

while(!(palabra_eliminar==palabra.agregar)){
basura<<palabra.agregar<<endl;
basura<<palabra.descripcion<<endl;
rename("C:\Users\lMatt\Desktop\c++\PROGRAMA DEFINITIVO (NO TOCAR)\borrador.txt","C:\Users\lMatt\Desktop\c++\PROGRAMA DEFINITIVO (NO TOCAR)\diccionario.txt");

            }
        busqueda>>palabra.agregar;
    }
#

@lusty temple

#

pero esta mal y no se como hacerlo bien

lusty temple
#

el rename tiene que ser después del bucle

#

ahí además falta la parte en la que lees

#

también ni palabra_eliminar ni palabra.agregar cambian dentro de ese bucle

median trail
#

de verdad que la programacion ya me esta cansando

median trail
#

@lusty temple que deberia hacer? dime para cambiar todo eso, no me lo digas por partes para asi matar este bucle de una sola vez

lusty temple
#

@median trail no tengo la totalidad de tu programa, eso lo tienes tú. yo te digo los errores que cometes en lo que me muestras

#

lo que tienes que hacer lo dije dos veces

median trail
#

Ya hice algo pero no se donde poner el rename

#

porque siempre me da un error

#

que creo que tiene que ver con el return 0

lusty temple
#

el rename va después de que cerraste ambos archivos

#

o sea, una vez que ya está creado el temp.txt, ahí lo renombras

median trail
#

es decir cuando hago el .close? abajo de eso hago el rename @lusty temple ?

lusty temple
#

#

por cierto, no es necesario pasar la ruta absoluta

#

pon la ruta relativa, por portabilidad

#

si ese programa lo uso yo, no tengo una carpeta IMatt

#

(ni uso Windows tampoco)

median trail
#

pero no me funciona

#

cuando reviso las palabras

#

no me hace el cambio

lusty temple
#

ahora tiene mejor aspecto 🙂

#

hmm en la documentación dice:

#

Changes the filename of a file. The file is identified by character string pointed to by old_filename. The new filename is identified by character string pointed to by new_filename.
If new_filename exists, the behavior is implementation-defined.

#

If new_filename exists, the behavior is implementation-defined.

#

¿el archivo borrador.txt lo crea y tiene el contenido que quieres?

#

@median trail

median trail
#

emmm

#

si

#

exacto borrador tiene el contenido ya sin la palabra que quiero

#

pero no le cambia el nombre al del archivo original

#

@lusty temple

lusty temple
#

Ok

#

entonces debe ser un problema de que como existe diccionario.txt, no lo sobreescribe

#

prueba cambiar diccionario.txt por prueba.txt

#

y fíjate si ahí sí funciona

#

si funciona, entonces antes de hacer rename, usa la función erase para borrar el viejo

#

y luego sí lo renombras

median trail
#

nope no funciona 😂

lusty temple
#

¿no hay ninguna advertencia?

median trail
#

voy a hacer lo del erase

lusty temple
#

ningún warning?

median trail
#

nope

lusty temple
#

ah, ya sé lo que puede ser

median trail
#

erase es de que header?

lusty temple
#

el mismo stdio.h

#

debe ser que tu directorio actual no es donde están los archivos de texto

#

hmm, pero debería dar un error en ese caso de que no lo encuentra...